Skip to main content

Interface: PhysicsOptions

Properties

gravity?

optional gravity: Vector

Vector that specifies the gravity to apply to all physics bodies. Default is { dx: 0, dy: 1 }

Source

physics/src/PhysicsOptions.ts:24


logEngineStats?

optional logEngineStats: boolean

Whether to log the average time it takes to update the physics engine each frame.

Source

physics/src/PhysicsOptions.ts:20


showsPhysics?

optional showsPhysics: boolean

Whether or not to show the physics bodies in the game by drawing an outline around them.

Source

physics/src/PhysicsOptions.ts:8


showsPhysicsLineWidth?

optional showsPhysicsLineWidth: number

The width of the physics body outline. Defaults to 1.

Source

physics/src/PhysicsOptions.ts:16


showsPhysicsStrokeColor?

optional showsPhysicsStrokeColor: RgbaColor

The color of the physics body outline. Defaults to green.

Source

physics/src/PhysicsOptions.ts:12