PokéRogue
    Preparing search index...

    Class CompositeFactory

    Index

    Constructors

    Methods

    • Returns all bodies in the given composite, including all bodies in its children, recursively.

      Parameters

      Returns BodyType[]

      All the bodies

      allBodies

    • Returns all composites in the given composite, including all composites in its children, recursively.

      Parameters

      Returns CompositeType[]

      All the composites

      allComposites

    • Returns all constraints in the given composite, including all constraints in its children, recursively.

      Parameters

      Returns ConstraintType[]

      All the constraints

      allConstraints

    • Removes all bodies, constraints and composites from the given composite. Optionally clearing its children recursively.

      Parameters

      Returns void

      clear

    • Creates a new composite. The options parameter is an object that specifies any properties you wish to override the defaults. See the properites section below for detailed information on what you can pass via the options object.

      Parameters

      Returns CompositeType

      A new composite

      create

    • Assigns new ids for all objects in the composite, recursively.

      Parameters

      Returns CompositeType

      Returns composite

      rebase

    • Generic remove function. Removes one or many body(s), constraint(s) or a composite(s) to the given composite. Optionally searching its children recursively. Triggers beforeRemove and afterRemove events on the composite.

      Parameters

      Returns CompositeType

      The original composite with the objects removed

      remove

    • Rotates all children in the composite by a given angle about the given point, without imparting any angular velocity.

      Parameters

      Returns void

      rotate

    • Scales all children in the composite, including updating physical properties (mass, area, axes, inertia), from a world-space point.

      Parameters

      Returns void

      scale

    • Sets the composite's isModified flag. If updateParents is true, all parents will be set (default: false). If updateChildren is true, all children will be set (default: false).

      Parameters

      • composite: CompositeType
      • isModified: boolean
      • OptionalupdateParents: boolean
      • OptionalupdateChildren: boolean

      Returns void

      setModified

    • Translates all children in the composite by a given vector relative to their current positions, without imparting any velocity.

      Parameters

      Returns void

      translate