first commit
This commit is contained in:
commit
9e4d936a96
9 changed files with 4864 additions and 0 deletions
11
animate.js
Normal file
11
animate.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
const drawing = editor.drawing;
|
||||
const duration = 10;
|
||||
const fps = 5;
|
||||
const frames = [];
|
||||
for(let frame = 0; frame < duration*fps; frame++) {
|
||||
const t = frame/fps;
|
||||
drawing.ctx.get_time = () => t;
|
||||
drawing.ctx.draw();
|
||||
frames.push(drawing.html);
|
||||
}
|
||||
console.log(frames.join('\n\n<<FRAME SEPARATOR>>\n\n'))
|
Loading…
Add table
Add a link
Reference in a new issue