Merge branch 'master' of https://github.com/teamsnowman/wastedtime
This commit is contained in:
commit
34db8854ed
1 changed files with 6 additions and 1 deletions
7
main.js
7
main.js
|
@ -1,4 +1,6 @@
|
|||
// main thing here
|
||||
var canvas = document.getElementById('canvas');
|
||||
var ctx = canvas.getContext('2d');
|
||||
|
||||
window.requestAnimFrame = (function(){
|
||||
return window.requestAnimationFrame ||
|
||||
|
@ -16,6 +18,9 @@ window.requestAnimFrame = (function(){
|
|||
|
||||
function render() {
|
||||
// game code
|
||||
requestAnimFrame(render);
|
||||
}
|
||||
|
||||
function block(lane) {
|
||||
|
||||
requestAnimFrame(animloop);
|
||||
}
|
Loading…
Reference in a new issue