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

    Class JointAbstract

    Abstract base class for all physics constraints and articulated joint types.

    Hierarchy (View Summary)

    Index
    anchorA: Vector3D

    Local anchor offset on bodyA.

    anchorB: Vector3D

    Local anchor offset on bodyB, or world-space anchor if bodyB is null.

    bodyA: Object3D

    The primary Object3D entity constrained by this joint.

    bodyB: Object3D | null

    The secondary Object3D entity, or null to anchor bodyA to static world space.

    breakForce: number

    Maximum force or impulse threshold before joint rupture.

    collideConnected: boolean

    Whether collision response between bodyA and bodyB is enabled.

    enabled: boolean = true

    Whether the joint is actively evaluated during physics simulation ticks.

    isBroken: boolean = false

    Whether the joint has exceeded breakForce and ruptured.

    • get isFullyAsleep(): boolean

      True when every dynamic body connected by this joint is currently asleep (static bodies do not count). A fully-asleep joint has nothing to solve: both endpoints are frozen, so the solve can be skipped without waking them. This mirrors the collision solver, which only applies impulses to approaching contacts and therefore never re-wakes settled bodies.

      Returns boolean

    • Optional pre-solve hook to accumulate continuous forces (e.g. Hookean spring tension).

      Parameters

      • dt: number

        Fixed substep delta time in seconds.

      Returns void

    • Solves positional drift and geometric error projection to prevent numerical stretching.

      Returns void

    • Solves velocity constraints using Projected Gauss-Seidel iterations.

      Parameters

      • dt: number

        Fixed substep delta time in seconds.

      Returns void