000/30); // draw app at 30fps

setInterval(sendControls, 1000/20); // send control input at 20fps

var rotate = false;


if(touchable) {
	canvas.addEventListener( 'touchstart', onTouchStart, false );
	canvas.addEventListener( 'touchmove', onTouchMove, false );
	canvas.addEventListener( 'touchend', onTouchEnd, false );
	window.onorientationchange = resetCanvas;  
	window.onresize = resetCanvas;  
} else {
	
	canvas.addEventListener( 'mousemove', onMouseMove, false );
	canvas.addEventListener( 'mousedown', on