Mam problem z requestAnimationFrame. Kod wygląda mniej wiecej tak:
function klasa(argumenty_nevermind)
{
var requestAnimationFrame= window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
this.running=false;
this.start = function()
{
this.running= true;
this.requestAnimationFrame( this.loop() );
}
this.loop = function()
{
if( this.running)
{
this.requestAnimationFrame( this.loop() );
}
}
this.stop=function(){this.isrunning=false;}
}
wciąż dostaję błąd too much recursion. Jakieś pomysły, czegoś nie ustawiłem? nie mogę znaleźć błędu...