Physics.Ninja#enableAABB()

enableAABB(object, children) This will create a Ninja Physics AABB body on the given game object. Its dimensions will match the width and height of the object at the point it is created.A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed. Parameters Name Type Argument Default Description object object | array | Phaser.Group The game object to create the physics body on. Can also be an array or Group of objects, a body

Physics.Ninja#enable()

enable(object, type, id, radius, children) This will create a Ninja Physics body on the given game object or array of game objects.A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed. Parameters Name Type Argument Default Description object object | array | Phaser.Group The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a body propert

Physics.Ninja#convertTilemap()

convertTilemap(map, layer, slopeMap) → {array} Goes through all tiles in the given Tilemap and TilemapLayer and converts those set to collide into physics tiles.Only call this after you have specified all of the tiles you wish to collide with calls like Tilemap.setCollisionBetween, etc.Every time you call this method it will destroy any previously created bodies and remove them from the world.Therefore understand it's a very expensive operation and not to be done in a core game update loop. I

Physics.Ninja#collide()

collide(object1, object2, collideCallback, processCallback, callbackContext) → {boolean} Checks for collision between two game objects. You can perform Sprite vs. Sprite, Sprite vs. Group, Group vs. Group, Sprite vs. Tilemap Layer or Group vs. Tilemap Layer collisions.The second parameter can be an array of objects, of differing types.The objects are also automatically separated. If you don't require separation then use ArcadePhysics.overlap instead.An optional processCallback can be provided

Physics.Ninja#clearTilemapLayerBodies()

clearTilemapLayerBodies(map, layer) Clears all physics bodies from the given TilemapLayer that were created with World.convertTilemap. Parameters Name Type Argument Description map Phaser.Tilemap The Tilemap to get the map data from. layer number | string | Phaser.TilemapLayer <optional> The layer to operate on. If not given will default to map.currentLayer. Source code: physics/ninja/World.js (Line 224)

Physics.Ninja#bounds

bounds : Phaser.Rectangle The bounds inside of which the physics world exists. Defaults to match the world bounds. Source code: physics/ninja/World.js (Line 49)

Physics.NINJA

[static] NINJA : number Source code: physics/Physics.js (Line 85)

Physics.MATTERJS

[static] MATTERJS : number Source code: physics/Physics.js (Line 103)

Physics.CHIPMUNK

[static] CHIPMUNK : number Source code: physics/Physics.js (Line 97)

Physics.BOX2D

[static] BOX2D : number Source code: physics/Physics.js (Line 91)