It's from scratch rather than using a physics engine.
Each point of the cube has an elastic bind between each of the neighboring ones. There are also diagonal supports in it but they are a bit weaker.
What I need to do is add dampening between each node. But to do that I need to know velocity. I thought it would be more efficient to add to momentum rather than have my force functions deal with mass to figure out how much they impact velocity. So each ball only has a momentum rather than a velocity, and then that divided by mass adjusts the position. What I need to do is split it all out, and record the prior frame's velocity.
I was lazy and threw in some code for drag instead, so the balls have drag with the air instead as a replacement for dampening.
Sorry it looks like it loads a long time. It's falling from a pretty good height.
Code for those who want it: https://jssocial.pw/u/babylonsoftbody
(post is archived)