Physics.Ninja#quadTree

quadTree : Phaser.QuadTree The world QuadTree. Source code: physics/ninja/World.js (Line 64)

Physics.Ninja#overlap()

overlap(object1, object2, overlapCallback, processCallback, callbackContext) → {boolean} Checks for overlaps between two game objects. The objects can be Sprites, Groups or Emitters.You can perform Sprite vs. Sprite, Sprite vs. Group and Group vs. Group overlap checks.Unlike collide the objects are NOT automatically separated or have any physics applied, they merely test for overlap results.The second parameter can be an array of objects, of differing types. Parameters Name Type Argument Def

Physics.Ninja#Ninja

new Ninja(game) Ninja Physics. The Ninja Physics system was created in Flash by Metanet Software and ported to JavaScript by Richard Davey. It allows for AABB and Circle to Tile collision. Tiles can be any of 34 different types, including slopes, convex and concave shapes. It does what it does very well, but is ripe for expansion and optimisation. Here are some features that I'd love to see the community add: AABB to AABB collision AABB to Circle collision AABB and Circle 'immovable' property

Physics.Ninja#maxObjects

maxObjects : number Used by the QuadTree to set the maximum number of objects per quad. Source code: physics/ninja/World.js (Line 54)

Physics.Ninja#maxLevels

maxLevels : number Used by the QuadTree to set the maximum number of iteration levels. Source code: physics/ninja/World.js (Line 59)

Physics.Ninja#gravity

gravity : number The World gravity setting. Source code: physics/ninja/World.js (Line 44)

Physics.Ninja#game

game : Phaser.Game Local reference to game. Source code: physics/ninja/World.js (Line 34)

Physics.Ninja#enableTile()

enableTile(object, id, children) This will create a Ninja Physics Tile body on the given game object. There are 34 different types of tile you can create, including 45 degree slopes,convex and concave circles and more. The id parameter controls which Tile type is created, but you can also change it at run-time.Note that for all degree based tile types they need to have an equal width and height. If the given object doesn't have equal width and height it will use the width.A game object can on

Physics.Ninja#enableCircle()

enableCircle(object, radius, children) This will create a Ninja Physics Circle body on the given game object.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 property. radius number

Physics.Ninja#enableBody()

enableBody(object) Creates a Ninja Physics body on the given game object.A game object can only have 1 physics body active at any one time, and it can't be changed until the body is nulled. Parameters Name Type Description object object The game object to create the physics body on. A body will only be created if this object has a null body property. Source code: physics/ninja/World.js (Line 181)