Javascript: encapsulating requestAnimationFrame loop in a class looses the object’s this reference
I would like to roll a Javascript class for doing animations via window.requestAnimationFrame
. Unfortunately, when I run my code, the Google Chrome Developer Tools throws this at me: