I have a chain of objects that looks like this:
Game.world.update()
I would like to use requestAnimationFrame to determine the frame rate of this function.
However, when I implement it as follows:
World.prototype.update = function() { requestAnimationFrame(this.update); }
The area changes from a world object to a window object. How do I save the area I want when calling the requestAnimationFrame () method? I know this has something to do with anonymous functions and the like, but I can't think about it.
source share