Created
July 6, 2021 23:49
-
-
Save silmood/4b5b4dc5bceedd4d87e386c339a7a919 to your computer and use it in GitHub Desktop.
Revisions
-
silmood revised this gist
Jul 6, 2021 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,7 @@ let capturer let renderer let duration = 120 function setup() { renderer = createCanvas(400, 400) @@ -15,7 +16,7 @@ function draw() { if(frameCount == 0) { capturer.start() capturer.capture(renderer.canvas) } else if(frameCount >= duration){ capturer.stop() capturer.save() } -
silmood created this gist
Jul 6, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ // Es necesario incluir la librería de CCapture dentro de tu proyecto: https://github.com/spite/ccapture.js/ let capturer let renderer function setup() { renderer = createCanvas(400, 400) capturer = new CCapture( { format: 'png', framerate: 60, quality: 30 } ) frameRate(60) } function draw() { _draw() if(frameCount == 0) { capturer.start() capturer.capture(renderer.canvas) } else if(frameCount >= 120){ capturer.stop() capturer.save() } capturer.capture(renderer.canvas) } function _draw() { }