File size: 382 Bytes
2f65818
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
export const baseGame = {
	default: `const canvas = document.querySelector('canvas');
canvas.style.backgroundColor = '#fff';
const ctx = canvas.getContext('2d');
const w = canvas.width;
const h = canvas.height;

function draw(){
	const FPS = 60;

	// TODO: Add drawing logic here

	// NEVER stop the loop
	setTimeout(requestAnimationFrame(draw),1000/FPS)
}
draw();
    `.trim(),
};