MatterPhysics
Extends
Constructors
new MatterPhysics()
new MatterPhysics(
app
):MatterPhysics
Parameters
• app: Application
<any
>
Returns
Overrides
Source
src/physics/matter/MatterPhysics.ts:15
Properties
_factory
_factory:
IPhysicsFactory
Inherited from
Source
Accessors
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
engine
get
engine():Engine
Returns
Engine
Source
src/physics/matter/MatterPhysics.ts:20
factory
get
factory():IPhysicsFactory
Returns
Source
Methods
addToWorld()
addToWorld(…
objects
):void
Parameters
• …objects: (MatterBodyLike
| IMatterPhysicsObject
)[]
Returns
void
Overrides
Source
src/physics/matter/MatterPhysics.ts:93
createWorldBounds()
createWorldBounds(
useStage
):void
Parameters
• useStage: boolean
= true
Returns
void
Source
src/physics/matter/MatterPhysics.ts:56
destroy()
destroy():
void
Returns
void
Overrides
Source
src/physics/matter/MatterPhysics.ts:24
drawDebug()
drawDebug():
void
Returns
void
Source
src/physics/matter/MatterPhysics.ts:113
init()
init(
pAutoStart
,pDebug
,autoCreateBounds
,pEngineOptions
):Promise
<void
>
Initializes the physics engine
Parameters
• pAutoStart: boolean
= false
• pDebug: boolean
= false
• autoCreateBounds: boolean
= true
• pEngineOptions: IEngineDefinition
= {}
Returns
Promise
<void
>
Overrides
Source
src/physics/matter/MatterPhysics.ts:32
removeFromWorld()
removeFromWorld(…
bodies
):void
Parameters
• …bodies: MatterBodyLike
[]
Returns
void
Overrides
Source
src/physics/matter/MatterPhysics.ts:107
start()
start():
void
Returns
void
Source
src/physics/matter/MatterPhysics.ts:85
stop()
stop():
void
Returns
void
Source
src/physics/matter/MatterPhysics.ts:89
update()
update(
_deltaTime
):void
Parameters
• _deltaTime: number
Returns
void