2020-07-28 20:21:55 -07:00
|
|
|
|
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [WorldDef](worlddef.md)
|
|
|
|
|
|
|
|
|
|
|
|
# Interface: WorldDef
|
|
|
|
|
|
|
2021-04-16 17:10:15 +02:00
|
|
|
|
**`prop`** gravity [{ x : 0, y : 0}]
|
|
|
|
|
|
|
|
|
|
|
|
**`prop`** allowSleep [true]
|
|
|
|
|
|
|
|
|
|
|
|
**`prop`** warmStarting [true]
|
|
|
|
|
|
|
|
|
|
|
|
**`prop`** continuousPhysics [true]
|
|
|
|
|
|
|
|
|
|
|
|
**`prop`** subStepping [false]
|
|
|
|
|
|
|
|
|
|
|
|
**`prop`** blockSolve [true]
|
|
|
|
|
|
|
|
|
|
|
|
**`prop`** velocityIterations [8] For the velocity constraint solver.
|
|
|
|
|
|
|
|
|
|
|
|
**`prop`** positionIterations [3] For the position constraint solver.
|
|
|
|
|
|
|
2020-07-28 20:21:55 -07:00
|
|
|
|
## Hierarchy
|
|
|
|
|
|
|
|
|
|
|
|
* **WorldDef**
|
|
|
|
|
|
|
|
|
|
|
|
## Index
|
|
|
|
|
|
|
|
|
|
|
|
### Properties
|
|
|
|
|
|
|
|
|
|
|
|
* [allowSleep](worlddef.md#optional-allowsleep)
|
|
|
|
|
|
* [blockSolve](worlddef.md#optional-blocksolve)
|
|
|
|
|
|
* [continuousPhysics](worlddef.md#optional-continuousphysics)
|
|
|
|
|
|
* [gravity](worlddef.md#optional-gravity)
|
|
|
|
|
|
* [positionIterations](worlddef.md#optional-positioniterations)
|
|
|
|
|
|
* [subStepping](worlddef.md#optional-substepping)
|
|
|
|
|
|
* [velocityIterations](worlddef.md#optional-velocityiterations)
|
|
|
|
|
|
* [warmStarting](worlddef.md#optional-warmstarting)
|
|
|
|
|
|
|
|
|
|
|
|
## Properties
|
|
|
|
|
|
|
|
|
|
|
|
### `Optional` allowSleep
|
|
|
|
|
|
|
|
|
|
|
|
• **allowSleep**? : *boolean*
|
|
|
|
|
|
|
2021-05-11 18:30:36 -07:00
|
|
|
|
*Defined in [src/dynamics/World.ts:53](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L53)*
|
2020-07-28 20:21:55 -07:00
|
|
|
|
|
|
|
|
|
|
___
|
|
|
|
|
|
|
|
|
|
|
|
### `Optional` blockSolve
|
|
|
|
|
|
|
|
|
|
|
|
• **blockSolve**? : *boolean*
|
|
|
|
|
|
|
2021-05-11 18:30:36 -07:00
|
|
|
|
*Defined in [src/dynamics/World.ts:57](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L57)*
|
2020-07-28 20:21:55 -07:00
|
|
|
|
|
|
|
|
|
|
___
|
|
|
|
|
|
|
|
|
|
|
|
### `Optional` continuousPhysics
|
|
|
|
|
|
|
|
|
|
|
|
• **continuousPhysics**? : *boolean*
|
|
|
|
|
|
|
2021-05-11 18:30:36 -07:00
|
|
|
|
*Defined in [src/dynamics/World.ts:55](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L55)*
|
2020-07-28 20:21:55 -07:00
|
|
|
|
|
|
|
|
|
|
___
|
|
|
|
|
|
|
|
|
|
|
|
### `Optional` gravity
|
|
|
|
|
|
|
2021-05-02 17:18:33 -07:00
|
|
|
|
• **gravity**? : *[Vec2](../classes/vec2.md)*
|
2020-07-28 20:21:55 -07:00
|
|
|
|
|
2021-05-11 18:30:36 -07:00
|
|
|
|
*Defined in [src/dynamics/World.ts:52](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L52)*
|
2020-07-28 20:21:55 -07:00
|
|
|
|
|
|
|
|
|
|
___
|
|
|
|
|
|
|
|
|
|
|
|
### `Optional` positionIterations
|
|
|
|
|
|
|
|
|
|
|
|
• **positionIterations**? : *number*
|
|
|
|
|
|
|
2021-05-11 18:30:36 -07:00
|
|
|
|
*Defined in [src/dynamics/World.ts:59](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L59)*
|
2020-07-28 20:21:55 -07:00
|
|
|
|
|
|
|
|
|
|
___
|
|
|
|
|
|
|
|
|
|
|
|
### `Optional` subStepping
|
|
|
|
|
|
|
|
|
|
|
|
• **subStepping**? : *boolean*
|
|
|
|
|
|
|
2021-05-11 18:30:36 -07:00
|
|
|
|
*Defined in [src/dynamics/World.ts:56](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L56)*
|
2020-07-28 20:21:55 -07:00
|
|
|
|
|
|
|
|
|
|
___
|
|
|
|
|
|
|
|
|
|
|
|
### `Optional` velocityIterations
|
|
|
|
|
|
|
|
|
|
|
|
• **velocityIterations**? : *number*
|
|
|
|
|
|
|
2021-05-11 18:30:36 -07:00
|
|
|
|
*Defined in [src/dynamics/World.ts:58](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L58)*
|
2020-07-28 20:21:55 -07:00
|
|
|
|
|
|
|
|
|
|
___
|
|
|
|
|
|
|
|
|
|
|
|
### `Optional` warmStarting
|
|
|
|
|
|
|
|
|
|
|
|
• **warmStarting**? : *boolean*
|
|
|
|
|
|
|
2021-05-11 18:30:36 -07:00
|
|
|
|
*Defined in [src/dynamics/World.ts:54](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L54)*
|