Documentation
    Preparing search index...

    Variable PACKAGE_NAMEConst

    PACKAGE_NAME: "@fourjs/physics"

    @fourjs/physics — the stable, solver-independent physics API (§101, Part IV).

    Application code targets this package and never a solver directly (§20); a concrete engine reaches it through PhysicsSolverAdapter (§37).

    WP-5.1 shipped the types and the pure functions: the §20–§34 public vocabulary, the four §37 descriptors, the §24 shape unions, PhysicsMaterial and the §25 combination rules, the §29 event payloads, the §30 query records and their filter semantics, the §37 adapter contract, and the §85 validators. WP-5.2 adds the two §6a components — RigidBody (§23, §26) and Collider (§24, §25) — which hold the authored state a user manipulates and produce the descriptors an adapter is built from. PhysicsWorld / PhysicsSystem, which register those components and drain their command buffers, arrive in WP-5.3. WP-6.1 adds §28's constraints: the Joint classes, the full JointDescriptor union of the plan P6-1 tier, the SolverJointAccess seam, and the world's addJoint/removeJoint with plan P6-2 break monitoring. WP-7.2 adds §19's control-mode transitions: SolverBodyAccess.setBodyType and PhysicsWorld.setBodyControlMode, which re-type a registered body in place with optional velocity inheritance from an animated PoseTarget. WP-7.3 adds §19's blend pipeline itself, under the "blended" transform authority (§42): the world feeds pose targets to kinematic bodies before the solve and writes the weighted target/solver pose after it, plus createPoseTargetCaptureSystem — the §39 step-3−1 system an application must register for the target history the blend's velocity inheritance reads. 2026-08-06 adds the §79 component serializers (PH-17): RIGID_BODY_SERIALIZER and COLLIDER_SERIALIZER, typed against the structural ComponentSerializerShape so registering them into @fourjs/serialization's registry needs no new §3.1 edge.

    PH-11b (2026-08-21) adds §12's solver-backed character controller: SweptCharacterController — a capsule swept through PhysicsWorld.shapeCast (§30) with slide-along-wall, step height and a slope limit — the SweptCharacterSystem that advances it at §39 step 4 under §42's "kinematic" authority, and its §79 serializer. It holds a CharacterController rather than extending one; the module states why.

    Named exports only, alphabetical within each module group.