Spring force

  • 
    

// End of spring that moves let thing = { position: { x: 1, y: 0.5 }, mass: 0.1 };

// Anchored other end of spring const pinnedAt = {x: 0.5, y: 0.5};

// Create force: length of 0.4 const springForce = Forces.springForce(pinnedAt, 0.4);

continuously(() => { // Apply force thing = Forces.apply(thing, springForce); }).start();

[Read more](https: