rhodonite
    Preparing search index...

    Class OimoPhysicsStrategy

    Physics strategy implementation using the Oimo.js physics engine. This class provides physics simulation capabilities for 3D objects in the scene. It implements the PhysicsStrategy interface to integrate with the Rhodonite framework.

    Implements

    Index

    Constructors

    Properties

    __world: any

    The shared Oimo physics world instance. All physics bodies are added to this single world for simulation.

    __worldProperty: PhysicsWorldProperty = ...

    Global physics world properties shared across all instances. Contains gravity settings and randomization options.

    Methods

    • Sets the rotation of the physics body using Euler angles. Recreates the physics body with the new rotation while preserving other properties.

      Parameters

      • eulerAngles: IVector3

        The new Euler angles (in radians) to set for the physics body

      Returns void

    • Sets the scale of the physics body. Recreates the physics body with the new scale applied to the original local scale while preserving other properties.

      Parameters

      • scale: IVector3

        The scale factors to apply to the physics body's dimensions

      Returns void

    • Advances the physics simulation by one time step. This static method should be called once per frame to update all physics bodies in the shared world. It processes collisions, applies forces, and updates positions.

      Returns void