added canvas
This commit is contained in:
parent
cb720a19da
commit
710d17c827
1 changed files with 6 additions and 1 deletions
7
main.js
7
main.js
|
@ -1,4 +1,6 @@
|
||||||
// main thing here
|
// main thing here
|
||||||
|
var canvas = document.getElementById('canvas');
|
||||||
|
var ctx = canvas.getContext('2d');
|
||||||
|
|
||||||
window.requestAnimFrame = (function(){
|
window.requestAnimFrame = (function(){
|
||||||
return window.requestAnimationFrame ||
|
return window.requestAnimationFrame ||
|
||||||
|
@ -16,6 +18,9 @@ window.requestAnimFrame = (function(){
|
||||||
|
|
||||||
function render() {
|
function render() {
|
||||||
// game code
|
// game code
|
||||||
|
|
||||||
requestAnimFrame(animloop);
|
requestAnimFrame(animloop);
|
||||||
|
}
|
||||||
|
|
||||||
|
function block(lane) {
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue