Skip to main content

Class: PhysicsOptions

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

Constructors​

Constructor​

new PhysicsOptions(): PhysicsOptions

Returns​

PhysicsOptions

Properties​

fps​

fps: number = 45

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

The target frames per second for the physics simulation loop.


gravity​

gravity: object

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

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:31

Instance of RAPIER.


useEventQueue​

useEventQueue: boolean = false

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

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:20

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.