void onAnimationFrame(double time, int frame) { animationLoop(time, frame); requestId = context.requestAnimationFrame(onAnimationFrame); }