melonJS
    Preparing search index...

    Interface PhysicsJoint

    A joint World#addJoint made. Keep it to remove the joint with World#removeJoint.

    const rope = app.world.addJoint({ type: "rope", a: hook, b: lantern });
    rope.definition.maxLength; // the length it was given, or the distance when it was made
    app.world.removeJoint(rope);
    rope.native; // null once removed
    interface PhysicsJoint {
        definition: JointDefinition;
        native: unknown;
    }
    Index
    definition: JointDefinition

    what the joint was made from: a copy of the definition given, with the defaults filled in (anchorA, a rope's maxLength). World#setAdapter rebuilds the joint from it.

    native: unknown

    The engine's own joint: a planck.Joint or a Rapier ImpulseJoint, for what the shared definition does not cover (a motor, for example). Changes made to it are not kept when World#setAdapter rebuilds the joint, and it is null once the joint is removed.