Small World Engine API Reference - v0.78.00
    Preparing search index...

    Interface SpringJointOptions

    Configuration options for SpringJoint.

    interface SpringJointOptions {
        anchorA?: Vector3D;
        anchorB?: Vector3D;
        bodyA: Object3D;
        bodyB?: Object3D | null;
        breakForce?: number;
        collideConnected?: boolean;
        damping?: number;
        restLength?: number;
        stiffness?: number;
    }

    Hierarchy (View Summary)

    Index
    anchorA?: Vector3D

    Local-space anchor offset attached to bodyA (defaults to (0, 0, 0)).

    anchorB?: Vector3D

    Local-space anchor offset attached to bodyB, or world-space anchor if bodyB is null (defaults to (0, 0, 0)).

    bodyA: Object3D

    The primary Object3D entity constrained by this joint.

    bodyB?: Object3D | null

    The secondary Object3D entity, or null/undefined to anchor to a fixed point in world space.

    breakForce?: number

    Maximum impulse or force threshold before this joint breaks and disables itself (default: Infinity).

    collideConnected?: boolean

    Whether the two connected bodies are allowed to collide with each other (default: false).

    damping?: number

    Damping coefficient c (N*s/m) suppressing oscillation. Defaults to 2.

    restLength?: number

    Equilibrium rest length of the spring (defaults to initial distance at creation).

    stiffness?: number

    Spring stiffness coefficient k (N/m). Defaults to 50.