Interface LayerOptions

For configuring the properties of a Layer in a scene

LayerOptions

interface LayerOptions {
    bounds?: number[];
    boundsActive?: boolean;
    objects?: GameObject[];
    parallax?: Vec2;
    physics?: boolean;
    physicsOptions?: any;
}

Properties

bounds?: number[]

Set the bounds of the layer, by default bounds are not enabled

boundsActive?: boolean

Set to true to enable bounds, default is false

objects?: GameObject[]

Array of GameObjects in the layer

parallax?: Vec2

Set the parallax of the layer, by default parallax is [1, 1]

physics?: boolean

Set to true to enable physics, default is false

physicsOptions?: any

Options passed to matter.js engine

Generated using TypeDoc