I am trying to port a simple JavaScript game to an Android device. I have created a Webview and put the required files into the Assets folder. I get an outline of the window on the phone but the game doesn't run. I can receive debugging messages in the console in Eclispe from the JavaScript code.
The error message im getting is:
Uncaught TypeError: Object [object DOMWindow] has no method 'requestAnimationFrame' at file:///android_asset/www/index2.html:287
The method where the error is:
function run(){
var loop = function(){
update();
render();
window.requestAnimationFrame(loop,canvas);
}
window.requestAnimationFrame(loop,canvas);
}
Is it related to the window.requestAnimation... ? Any suggestion how I can fix it would be gratefully appreciated.. Thank you.