You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2019. It is now read-only.
Integrators are fairly straightforward to create. Simply follow the Factory Pattern, and extend the methods .integrateVelocities() and .integratePositions().
Example:
Physics.integrator('my-integrator',function(parent){return{integrateVelocities: function(bodies,dt){// update the velocities of all bodies according to timestep dt// store previous velocities in .state.old.vel// and .state.old.angular.vel},integratePositions: function(bodies,dt){// update the positions of all bodies according to timestep dt// store the previous positions in .state.old.pos// and .state.old.angular.pos// also set the accelerations to zero}};});