name | type | arguments | Default | description |
---|---|---|---|---|
gravity | Phaser.Types.Math.Vector2Like | <optional> | ||
setBounds | object | boolean | <optional> |
Should the world have bounds enabled by default? |
|
setBounds.x | number | <optional> | 0 |
The x coordinate of the world bounds. |
setBounds.y | number | <optional> | 0 |
The y coordinate of the world bounds. |
setBounds.width | number | <optional> |
The width of the world bounds. |
|
setBounds.height | number | <optional> |
The height of the world bounds. |
|
setBounds.thickness | number | <optional> | 64 |
The thickness of the walls of the world bounds. |
setBounds.left | boolean | <optional> | true |
Should the left-side world bounds wall be created? |
setBounds.right | boolean | <optional> | true |
Should the right-side world bounds wall be created? |
setBounds.top | boolean | <optional> | true |
Should the top world bounds wall be created? |
setBounds.bottom | boolean | <optional> | true |
Should the bottom world bounds wall be created? |
positionIterations | number | <optional> | 6 |
The number of position iterations to perform each update. The higher the value, the higher quality the simulation will be at the expense of performance. |
velocityIterations | number | <optional> | 4 |
The number of velocity iterations to perform each update. The higher the value, the higher quality the simulation will be at the expense of performance. |
constraintIterations | number | <optional> | 2 |
The number of constraint iterations to perform each update. The higher the value, the higher quality the simulation will be at the expense of performance. |
enableSleeping | boolean | <optional> | false |
A flag that specifies whether the engine should allow sleeping via the |
timing.timestamp | number | <optional> | 0 |
A |
timing.timeScale | number | <optional> | 1 |
A |
plugins.attractors | boolean | <optional> | false |
Should the Matter Attractor Plugin be enabled? An attractors plugin that makes it easy to apply continual forces on bodies. It's possible to simulate effects such as wind, gravity and magnetism. |
plugins.wrap | boolean | <optional> | false |
Should the Matter Wrap Plugin be enabled? A coordinate wrapping plugin that automatically wraps the position of bodies such that they always stay within the given bounds. Upon crossing a boundary the body will appear on the opposite side of the bounds, while maintaining its velocity. |
plugins.collisionevents | boolean | <optional> | true |
Should the Matter Collision Events Plugin be enabled? |
enabled | boolean | <optional> | true |
Toggles if the world is enabled or not. |
correction | number | <optional> | 1 |
An optional Number that specifies the time correction factor to apply to the update. |
getDelta | function | <optional> |
This function is called every time the core game loop steps, which is bound to the Request Animation Frame frequency unless otherwise modified. |
|
autoUpdate | boolean | <optional> | true |
Automatically call Engine.update every time the game steps. |
restingThresh | number | <optional> | 4 |
Sets the Resolver resting threshold property. |
restingThreshTangent | number | <optional> | 6 |
Sets the Resolver resting threshold tangent property. |
positionDampen | number | <optional> | 0.9 |
Sets the Resolver position dampen property. |
positionWarming | number | <optional> | 0.8 |
Sets the Resolver position warming property. |
frictionNormalMultiplier | number | <optional> | 5 |
Sets the Resolver friction normal multiplier property. |
debug | boolean | Phaser.Types.Physics.Matter.MatterDebugConfig | <optional> | false |
Controls the Matter Debug Rendering options. If a boolean it will use the default values, otherwise, specify a Debug Config object. |
runner | Phaser.Types.Physics.Matter.MatterRunnerConfig | <optional> |
Sets the Matter Runner options. |