I think it would be extremely powerful to include a parameter for magnatizim in the physics section or rather as a form of object interaction… I.e. Static no dynamics, fully dynamic, then magnetic… With a slider to control now much of a positive or negative pull…
There's a long discussion about Physics here...
Long story short, it's up to Tumult to add access to the Matter.js API. That's what Physics in Hype is based on. I don't think they have gravity wells, but they seem to have support for joints.
If an element's velocity could be modified – while the project is running – it could simply be constantly nudged toward the intended target with JavaScript.
Agreed, I think we all have asked for something like this in our own way on various requests.
I think the possibly properties would be something like…
Is Attractor ( attracts the elements that have Can be attracted ) attraction slider 1-10
Can be attracted: ( attracted to an Attractor element)
Is Repulser. ( repulses other elements that have Can be repulsed ) repulsed slider 1-10
Can be repulsed: ( repulsed from an Repulser element)
If an Element has both *Can be repulsed & Can be attracted, then a new slider will set which is the stronger.
If an element is not set to either Can be repulsed & Can be attracted then their other physics are applied.
All the elements can have any of the other physic properties. But an Attractor & Repulser probably should not be able to have *Can be repulsed & Can be attracted.
I agree; this has been a semi-common request - though typically given more in the form of “gravity” for individual bodies to do stellar simulations. In this case, negative would be repulsion and positive values would be attraction.
I don’t think this is on the Matter.js roadmap, but I’ll make sure it is mentioned.