Hierarchy

  • IEngine

Properties

broadphase: IGrid

Replaced by and now alias for engine.grid.

Deprecated

replaced by engine.detector

constraintIterations: number

An integer Number that specifies 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. The default value of 2 is usually very adequate.

Default

2
detector: IDetector

A Matter.Detector instance.

enableSleeping: boolean

A flag that specifies whether the engine should allow sleeping via the Matter.Sleeping module. Sleeping can improve stability and performance, but often at the expense of accuracy.

Default

false

An optional gravitational acceleration applied to all bodies in engine.world on every update.

This models a uniform gravitational field, similar to near the surface of a planet. For gravity in other contexts, disable this and apply forces as needed.

To disable set the scale component to 0.

This is split into three components for ease of use: a normalised direction (x and y) and magnitude (scale).

grid: IGrid

A Matter.Grid instance.

Deprecated

replaced by engine.detector

metrics: any
mouse?: IMouse
pairs: IPairs
plugin: {} | IPlugin

An object reserved for storing plugin-specific properties.

Type declaration

    positionIterations: number

    An integer Number that specifies 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.

    Default

    6
    
    render?: IRender

    An Object containing properties regarding the timing systems of the engine.

    velocityIterations: number

    An integer Number that specifies 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.

    Default

    4
    
    world: IComposite

    The root Matter.Composite instance that will contain all bodies, constraints and other composites to be simulated by this engine.

    Generated using TypeDoc