TWorld
Index
Constructors
constructor
Properties
publicactors
publicconfig
publicgameState
publicphysicsDebug
Methods
publicaddActor
Parameters
actor: default
Returns void
publicapplyCentralForce
Parameters
component: default
force: vec3
Returns void
publicapplyCentralImpulse
Parameters
component: default
impulse: vec3
Returns void
publiccreate
Returns Promise<void>
publicdestroy
Returns void
publicgetLighting
Returns TSerializedLighting
publicgetRenderTasks
Returns TSerializedRenderTask[]
publiconEnterCollisionClass
Adds a listener for when a collision occurs with a specific collision class
Parameters
actor: default
collisionClass: string
handler: TCollisionCallback
Returns void
publicpause
Called when a state is moved out of the active state so world updates should stop
Returns void
publicqueryArea
Parameters
from: vec3
to: vec3
optionaloptions: TPhysicsQueryOptions
Returns Promise<TWorldQueryAreaResult[]>
publicqueryLine
Parameters
from: vec3
to: vec3
optionaloptions: TPhysicsQueryOptions
Returns Promise<TWorldQueryLineResult[]>
publicremoveActor
Parameters
actor: default
Returns void
publicstart
Called when a state is entered so the world updates should continue
Returns void
publicupdate
Called every frame with delta and triggers update on all actors
Parameters
_: default
delta: number
Returns Promise<TWorldUpdateStats>
publicupdateBodyOptions
Parameters
component: default
options: TPhysicsBodyOptions
Returns void
publicupdateTransform
Parameters
component: default
Returns void
Adds actor to the world