The cube is not a mesh. It is 125 individual mass points, each carrying its own force, velocity, position, and mass, and every one of them gets its position and velocity updated with the RK4 method once per frame. RK4 is what keeps the motion stable instead of exploding after a few seconds.
Holding it together is a spring data structure I designed to connect any two mass points efficiently. In the demo the springs are the yellow lines and the mass points are the purple dots, so you can watch the structure stretch, compress, and settle back rather than just seeing a surface move.