PhysicsJS
PhysicsJS copied to clipboard
Features for non-web game engines
A few features I've added that helped me in a non-document environment with a javascript game engine. Offering them if desirable.
- stepDelta for when you don't need to generate a new unix timestamp, as you already have delta time
- onStep for bodies, so that you can modify it to update your sprites or other graphics automatically. In my case, for example, I need it to set the x and y centers of my sprite and set the rotation in degrees.
- Utility functions to convert between radians and degrees
Thanks for the great work!