- #1
- 970
- 670
I have been experimenting with a minimal "toy" physics engine for JavaScript, called verlet.js but now I want to switch to a more versatile and feature rich engine.
One feature I would like to use is the ability to assign a reference angle to a pair of segments (i.e. links, i.e. distance constraints), so that there will be a proportional restoring torque that will try to rotate the links back to the reference angle whenever they are bent away from that original angle. For example if we set 180 degrees for each joint in a chain, we get a cantilever that resists being bent away from a straight line. In the engine referred to above, this is done by specifying three particles (a, b, c), and the angle between ab and bc, plus a stiffness parameter. You do this for each set of three successive particles forming the cantilever.
Which JS engines support this feature or an equivalent feature?
More generally, I couldn't find any recent comparison between different open source JS physics engines -- the ones I did find are several years old. Is there a recent comparative review of JS physics engines, e.g. box2d, matter.js etc?
One feature I would like to use is the ability to assign a reference angle to a pair of segments (i.e. links, i.e. distance constraints), so that there will be a proportional restoring torque that will try to rotate the links back to the reference angle whenever they are bent away from that original angle. For example if we set 180 degrees for each joint in a chain, we get a cantilever that resists being bent away from a straight line. In the engine referred to above, this is done by specifying three particles (a, b, c), and the angle between ab and bc, plus a stiffness parameter. You do this for each set of three successive particles forming the cantilever.
Which JS engines support this feature or an equivalent feature?
More generally, I couldn't find any recent comparison between different open source JS physics engines -- the ones I did find are several years old. Is there a recent comparative review of JS physics engines, e.g. box2d, matter.js etc?
Last edited: