Skip to content
On this page

@thejsngin/standard-assets / Modules / physicsWorld/type

Module: physicsWorld/type

Table of contents

Type Aliases

Events

Type Aliases

physicsWorldResourceType

Ƭ physicsWorldResourceType: RAPIER.World

physicsWorld resource. Stored added at gameInstance.store.world.

Defined in

physicsWorld/type.ts:16

Events

afterPhysicsUpdateEvent

Ƭ afterPhysicsUpdateEvent: Object

Fired after each physicsUpdate.

Type declaration

NameType
data[]
eventLevel["game"]
name"afterPhysicsUpdate"
returnValany[]
waitForCompletiontrue

Defined in

physicsWorld/type.ts:49


beforePhysicsUpdateEvent

Ƭ beforePhysicsUpdateEvent: Object

Fired before each physicsUpdate.

Type declaration

NameType
data[]
eventLevel["game"]
name"beforePhysicsUpdate"
returnValany[]
waitForCompletiontrue

Defined in

physicsWorld/type.ts:25


collisionEvent

Ƭ collisionEvent: Object

Fired for every colliding collider pair that has collision detection enabled for one of them.

Type declaration

NameType
data{ handle1: number ; handle2: number ; started: boolean }
data.handle1number
data.handle2number
data.startedboolean
eventLevel["game"]
name"collisionEvent"
returnValany[]
waitForCompletiontrue

Defined in

physicsWorld/type.ts:61


contactForceEvent

Ƭ contactForceEvent: Object

Fired for every colliding collider pair that has contact Force detection enabled for one of them.

Type declaration

NameType
data{ collider1: ReturnType<RAPIER.TempContactForceEvent["collider1"]> ; collider2: ReturnType<RAPIER.TempContactForceEvent["collider2"]> ; maxForceDirection: ReturnType<RAPIER.TempContactForceEvent["maxForceDirection"]> ; maxForceMagnitude: ReturnType<RAPIER.TempContactForceEvent["maxForceMagnitude"]> ; totalForce: ReturnType<RAPIER.TempContactForceEvent["totalForce"]> ; totalForceMagnitude: ReturnType<RAPIER.TempContactForceEvent["totalForceMagnitude"]> }
data.collider1ReturnType<RAPIER.TempContactForceEvent["collider1"]>
data.collider2ReturnType<RAPIER.TempContactForceEvent["collider2"]>
data.maxForceDirectionReturnType<RAPIER.TempContactForceEvent["maxForceDirection"]>
data.maxForceMagnitudeReturnType<RAPIER.TempContactForceEvent["maxForceMagnitude"]>
data.totalForceReturnType<RAPIER.TempContactForceEvent["totalForce"]>
data.totalForceMagnitudeReturnType<RAPIER.TempContactForceEvent["totalForceMagnitude"]>
eventLevel["game"]
name"contactForceEvent"
returnValany[]
waitForCompletiontrue

Defined in

physicsWorld/type.ts:74


physicsUpdateEvent

Ƭ physicsUpdateEvent: Object

Fired in parallel to the physicsUpdate.

Type declaration

NameType
data[]
eventLevel["game"]
name"physicsUpdate"
returnValany[]
waitForCompletionfalse

Defined in

physicsWorld/type.ts:37