2014-05-17 14:22:40 +00:00
|
|
|
// main thing here
|
2014-05-17 14:26:55 +00:00
|
|
|
var canvas = document.getElementById('canvas');
|
|
|
|
var ctx = canvas.getContext('2d');
|
2014-05-17 14:22:40 +00:00
|
|
|
|
|
|
|
window.requestAnimFrame = (function(){
|
|
|
|
return window.requestAnimationFrame ||
|
|
|
|
window.webkitRequestAnimationFrame ||
|
|
|
|
window.mozRequestAnimationFrame ||
|
|
|
|
function( callback ){
|
|
|
|
window.setTimeout(callback, 1000 / 60);
|
|
|
|
};
|
|
|
|
})();
|
|
|
|
|
|
|
|
(function animloop(){
|
|
|
|
requestAnimFrame(animloop);
|
|
|
|
render();
|
|
|
|
})();
|
|
|
|
|
|
|
|
function render() {
|
|
|
|
// game code
|
2014-05-17 14:28:48 +00:00
|
|
|
requestAnimFrame(render);
|
2014-05-17 14:26:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function block(lane) {
|
|
|
|
|
2014-05-17 14:22:40 +00:00
|
|
|
}
|