Hierarchy

  • IComposite

Properties

bodies: IBody[]

An array of Body that are direct children of this composite. To add or remove bodies you should use Composite.add and Composite.remove methods rather than directly modifying this property. If you wish to recursively find all descendants, you should use the Composite.allBodies method.

Default

[]
cache: {
    allBodies: null | IBody[];
    allComposites: null | IComposite[];
    allConstraints: null | IConstraint[];
}

An object used for storing cached results for performance reasons. This is used internally only and is automatically managed.

Type declaration

composites: IComposite[]

An array of Composite that are direct children of this composite. To add or remove composites you should use Composite.add and Composite.remove methods rather than directly modifying this property. If you wish to recursively find all descendants, you should use the Composite.allComposites method.

Default

[]
constraints: IConstraint[]

An array of Constraint that are direct children of this composite. To add or remove constraints you should use Composite.add and Composite.remove methods rather than directly modifying this property. If you wish to recursively find all descendants, you should use the Composite.allConstraints method.

Default

[]
events: Record<CompositeEventName, Function[]>
gravity?: IEngineGravity
id: number

An integer Number uniquely identifying number generated in Composite.create by Common.nextId.

isModified: boolean

A flag that specifies whether the composite has been modified during the current step. This is automatically managed when bodies, constraints or composites are added or removed.

Default

false
label: string

An arbitrary String name to help the user identify and manage composites.

Default

"Composite"
parent: null | IComposite

The Composite that is the parent of this composite. It is automatically managed by the Matter.Composite methods.

Default

null
plugin: {} | IPlugin

An object reserved for storing plugin-specific properties.

Type declaration

    Default

    {}
    
    type: "composite"

    A String denoting the type of object.

    Generated using TypeDoc