StaticaddAdd objects or arrays of objects of types: Body, Constraint, Composite
world
StaticaddStaticaddStaticaddStaticclearStaticcreateCreates 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.
A new world
The
Matter.Worldmodule contains methods for creating and manipulating the world composite. AMatter.Worldis aMatter.Compositebody, which is a collection ofMatter.Body,Matter.Constraintand otherMatter.Composite. AMatter.Worldhas a few additional properties includinggravityandbounds. It is important to use the functions in theMatter.Compositemodule to modify the world composite, rather than directly modifying its properties. There are also a few methods here that alias those inMatter.Compositefor easier readability.See the included usage examples.
World