PokéRogue
    Preparing search index...

    The Matter.World module contains methods for creating and manipulating the world composite. A Matter.World is a Matter.Composite body, which is a collection of Matter.Body, Matter.Constraint and other Matter.Composite. A Matter.World has a few additional properties including gravity and bounds. It is important to use the functions in the Matter.Composite module to modify the world composite, rather than directly modifying its properties. There are also a few methods here that alias those in Matter.Composite for easier readability.

    See the included usage examples.

    Index

    Constructors

    Properties

    bounds: Bounds
    gravity: Gravity

    Methods

    • An alias for Composite.addBody since World is also a Composite

      Parameters

      Returns World

      The original world with the body added

      addBody

    • An alias for Composite.add since World is also a Composite

      Parameters

      Returns World

      The original world with the objects from composite added

      addComposite

    • An alias for Composite.addConstraint since World is also a Composite

      Parameters

      Returns World

      The original world with the constraint added

      addConstraint

    • An alias for Composite.clear since World is also a Composite

      Parameters

      • world: World
      • keepStatic: boolean

      Returns void

      clear

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

      Parameters

      Returns World

      A new world

      create