rhodonite
    Preparing search index...

    Class RapierPhysicsStrategy

    Physics strategy implementation using externally provided Rapier.js bindings.

    RhodoniteTS intentionally does not import Rapier directly. Call RapierPhysicsStrategy.initialize(RAPIER) before creating this strategy.

    Implements

    Index
    __worldProperty: PhysicsWorldProperty = ...
    • get isInitialized(): boolean

      Returns true when Rapier bindings have already been injected.

      Returns boolean

    • Removes the body and all generic analytic-shape colliders.

      Returns void

    • Sets the Rapier body world rotation from Euler angles.

      Parameters

      • eulerAngles: IVector3

        Euler angles in radians

      Returns void

    • Sets the Rapier body world position.

      Parameters

      • worldPosition: IVector3

        New world position

      Returns void

    • Sets the Rapier body world rotation.

      Parameters

      Returns void

    • Recreates the Rapier body with a scaled collider shape.

      Parameters

      Returns void

    • Sets up a Rapier rigid body and collider for the given entity.

      Parameters

      Returns void

    • Updates the associated entity transform from the Rapier body state.

      Parameters

      Returns void

    • Internal

      Releases the Rapier world owned by a destroyed Engine.

      Parameters

      Returns void

    • Internal

      Parameters

      • group: number
      • mask: number

      Returns number

    • Internal

      Parameters

      Returns void

    • Injects Rapier.js bindings. Physics worlds are created lazily per Engine.

      Parameters

      Returns Promise<void>

    • Advances one Engine's Rapier world, or every initialized Engine world when omitted.

      Parameters

      • OptionalframeId: number
      • deltaTime: number = ...
      • Optionalengine: Engine

      Returns void