@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
Events
afterPhysicsUpdateEvent
Ƭ afterPhysicsUpdateEvent: Object
Fired after each physicsUpdate.
Type declaration
Name | Type |
---|---|
data | [] |
eventLevel | ["game" ] |
name | "afterPhysicsUpdate" |
returnVal | any [] |
waitForCompletion | true |
Defined in
beforePhysicsUpdateEvent
Ƭ beforePhysicsUpdateEvent: Object
Fired before each physicsUpdate.
Type declaration
Name | Type |
---|---|
data | [] |
eventLevel | ["game" ] |
name | "beforePhysicsUpdate" |
returnVal | any [] |
waitForCompletion | true |
Defined in
collisionEvent
Ƭ collisionEvent: Object
Fired for every colliding collider pair that has collision detection enabled for one of them.
Type declaration
Name | Type |
---|---|
data | { handle1 : number ; handle2 : number ; started : boolean } |
data.handle1 | number |
data.handle2 | number |
data.started | boolean |
eventLevel | ["game" ] |
name | "collisionEvent" |
returnVal | any [] |
waitForCompletion | true |
Defined in
contactForceEvent
Ƭ contactForceEvent: Object
Fired for every colliding collider pair that has contact Force detection enabled for one of them.
Type declaration
Name | Type |
---|---|
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.collider1 | ReturnType <RAPIER.TempContactForceEvent ["collider1" ]> |
data.collider2 | ReturnType <RAPIER.TempContactForceEvent ["collider2" ]> |
data.maxForceDirection | ReturnType <RAPIER.TempContactForceEvent ["maxForceDirection" ]> |
data.maxForceMagnitude | ReturnType <RAPIER.TempContactForceEvent ["maxForceMagnitude" ]> |
data.totalForce | ReturnType <RAPIER.TempContactForceEvent ["totalForce" ]> |
data.totalForceMagnitude | ReturnType <RAPIER.TempContactForceEvent ["totalForceMagnitude" ]> |
eventLevel | ["game" ] |
name | "contactForceEvent" |
returnVal | any [] |
waitForCompletion | true |
Defined in
physicsUpdateEvent
Ƭ physicsUpdateEvent: Object
Fired in parallel to the physicsUpdate.
Type declaration
Name | Type |
---|---|
data | [] |
eventLevel | ["game" ] |
name | "physicsUpdate" |
returnVal | any [] |
waitForCompletion | false |