Skip to main content

Class: PhysicsOptions

Defined in: src/physics/PhysicsOptions.ts:7

Constructors

Constructor

new PhysicsOptions(): PhysicsOptions

Returns

PhysicsOptions

Properties

fps

fps: number = 45

Defined in: src/physics/PhysicsOptions.ts:11

The target frames per second for the physics simulation loop.


gravity

gravity: object

Defined in: src/physics/PhysicsOptions.ts:16

The global gravity vector applied to the physics world.

x

x: number = 0.0

y

y: number = -9.81

z

z: number = 0.0


RAPIER?

optional RAPIER: RAPIERCompat

Defined in: src/physics/PhysicsOptions.ts:34

Instance of RAPIER.


useEventQueue

useEventQueue: boolean = false

Defined in: src/physics/PhysicsOptions.ts:29

If true, an event queue will be created and passed to world.step(), enabling the handling of collision and contact events.


worldStep

worldStep: boolean = true

Defined in: src/physics/PhysicsOptions.ts:23

If true, the Physics manager will automatically call world.step() on its fixed interval. Set to false if you want to control the simulation step manually.