RapierPhysics
Extends
Constructors
new RapierPhysics()
new RapierPhysics(
app
):RapierPhysics
Parameters
• app: Application
<any
>
Returns
Overrides
Source
src/physics/rapier/RapierPhysics.ts:15
Properties
_factory
_factory:
IPhysicsFactory
Inherited from
Source
Accessors
SIFactor
get
SIFactor():number
Returns
number
Source
src/physics/rapier/RapierPhysics.ts:20
add
get
add():IPhysicsAddFactory
Returns
Source
container
set
container(value
):void
Parameters
• value: Container
<Application
<any
>>
Source
debug
get
debug():boolean
set
debug(value
):void
Parameters
• value: boolean
Returns
boolean
Source
src/physics/rapier/RapierPhysics.ts:35
factory
get
factory():IPhysicsFactory
Returns
Source
world
get
world():World
Returns
World
Source
src/physics/rapier/RapierPhysics.ts:24
Methods
addToWorld()
addToWorld(…
objects
):void
Parameters
• …objects: (RigidBody
| IRapierPhysicsObject
)[]
Returns
void
Overrides
Source
src/physics/rapier/RapierPhysics.ts:129
createWorldBounds()
createWorldBounds(
useStage
):void
Parameters
• useStage: boolean
= true
Returns
void
Source
src/physics/rapier/RapierPhysics.ts:97
destroy()
destroy():
void
Returns
void
Overrides
Source
src/physics/rapier/RapierPhysics.ts:76
drawDebug()
drawDebug():
void
Returns
void
Source
src/physics/rapier/RapierPhysics.ts:143
init()
init(
pAutoStart
,pDebug
,autoCreateBounds
,pEngineOptions
?):Promise
<void
>
Initializes the physics engine
Parameters
• pAutoStart: boolean
= false
• pDebug: boolean
= false
• autoCreateBounds: boolean
= true
• pEngineOptions?
• pEngineOptions.gravity?: Vector2
• pEngineOptions.systemOfUnitsFactor?: number
Returns
Promise
<void
>
Overrides
Source
src/physics/rapier/RapierPhysics.ts:39
makeWall()
makeWall(
def
):object
Parameters
• def: IRapierWallDefinition
Returns
object
body
body:
RigidBody
collider
collider:
Collider
definition
definition:
IRapierWallDefinition
=def
Source
src/physics/rapier/RapierPhysics.ts:84
removeFromWorld()
removeFromWorld(…
bodies
):void
Parameters
• …bodies: RigidBody
[]
Returns
void
Overrides
Source
src/physics/rapier/RapierPhysics.ts:137
start()
start():
void
Returns
void
Source
src/physics/rapier/RapierPhysics.ts:121
stop()
stop():
void
Returns
void
Source
src/physics/rapier/RapierPhysics.ts:125
update()
update(
deltaTime
):void
Parameters
• deltaTime: number
Returns
void