11 lines
No EOL
322 B
JavaScript
11 lines
No EOL
322 B
JavaScript
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')) |