phaser - v3.90.0
    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.

    World

    Index

    Constructors

    Properties

    gravity: MatterJS.Gravity

    Methods

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

      Parameters

      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 MatterJS.World

      A new world

      create