hextris/main.js

26 lines
501 B
JavaScript
Raw Normal View History

// main thing here
2014-05-17 14:26:55 +00:00
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
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) {
}