spring-vrm

Our spring chains as glTF: VRMC_springBone, plus our own record of them. A rigged body's springs (a tail, a ponytail, a strand hung from a bone) go out in the standard every VRM loader reads (three-vrm's VRMSpringBoneLoaderPlugin, UniVRM, Godot's VRM importer), so they swing in those engines with no setup. Beside it goes TOSIJS_spring_chains, which holds the springs exactly as our model has them, so a file read back here swings as it did when it was made. riggedBodyGlb writes both (pass it the rig recipe); this module is the conversion and the schema, pure.

Where the two models differ

Our chain (spring-chain) is Verlet at a fixed 120 Hz: velocity kept at 1 - damping per second, gravity an acceleration, and each point PULLED toward its rest place by a fraction that grows with stiffness, so the restoring force grows with how far it is out. VRM's (three-vrm's VRMSpringBoneJoint.update, once a frame) adds the last frame's movement times 1 - dragForce, then stiffness × dt metres along the bone's rest axis and gravityPower × dt metres along gravityDir, then keeps the length. So: