Spaces:
Runtime error
Runtime error
File size: 547 Bytes
65567a2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
export const base = {
default: `/** CHANGELOG
* v1.0.0. Set up canvas
*/
const canvas = document.querySelector('canvas');
const ctx = canvas.getContext('2d');
/*
* The draw function is called every frame to update the canvas.
* To change the drawing logic, modify the code inside this function.
*/
function draw(){
// TODO: Add drawing logic here
// Set the desired FPS (frames per second) for the animation
const FPS = 60;
// Schedule the next frame to be drawn
setTimeout(requestAnimationFrame(draw),1000/FPS)
}
draw();
`.trim(),
};
|