Taos API Reference
    Preparing search index...

    Class PhysicsSystem

    Index

    Constructors

    Properties

    world: PhysicsWorld | null = null

    The shared world, or null until its async init resolves.

    paused: boolean

    When true, step is a no-op (editor edit mode freezes the sim).

    Methods

    • Register a per-frame callback run after each world step (e.g. transform sync).

      Parameters

      • fn: (dt: number) => void

      Returns void

    • Register a callback run BEFORE each world step — for accumulating forces (buoyancy, thrusters) that Jolt integrates during the step and then clears. Skipped while paused / pre-init, exactly like step.

      Parameters

      • fn: (dt: number) => void

      Returns void

    • Drop a body-id key's owner association (on body removal / detach).

      Parameters

      • key: number

      Returns void

    • Subscribe to pause-state transitions. The editor toggles pause on play/stop, so components use this to snapshot their authored pose when play starts and restore it when play stops. Fires only on an actual change.

      Parameters

      • fn: (paused: boolean) => void

      Returns void

    • Step the world then run every ticker. No-op while paused or pre-init.

      Parameters

      • dt: number

      Returns void