commit 9952509a9ee05a5b35ab0a8e43f4f5f050d1cef2 Author: Christian Dreier Date: Wed May 24 22:43:38 2017 +0200 basic setup diff --git a/index.html b/index.html new file mode 100644 index 0000000..04f71b1 --- /dev/null +++ b/index.html @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/main.js b/main.js new file mode 100644 index 0000000..4700a08 --- /dev/null +++ b/main.js @@ -0,0 +1,16 @@ +var canvas = document.getElementById("canvas") +var ctx = canvas.getContext("2d") + + +ctx.fillStyle = 'rgb(200,0,0)'; +ctx.fillRect(10, 10, 55, 50); + + +var fps = 30; +function draw() { + setTimeout(function() { + requestAnimationFrame(draw); + // Drawing code goes here + + }, 1000 / fps); +} \ No newline at end of file