Professional Documents
Culture Documents
2
"Via": If a class has an entry in the via column it means you can quickly access it through a local reference. I.e. you can control the camera via this.camera from
any state, or game.camera if game has been globally defined.
Game game Manages booting, creating subsystems and running the logic and render
loop.
World world The Game World in which all Game Objects live.
Camera camera The Camera is your view into the Game World.
Game States
Cache cache The Cache is where all loaded assets are stored and retrieved from.
Loader load Loads all external asset types (images, audio, json, xml, txt) and
adds them to the Cache. Automatically invoked by a
States preload method.
Game Scaling
ScaleManager scale Manages the sizing and scaling of your game across devices.
Class Description
Plugins
Game Objects
Class Via Description
GameObjectFactory add A helper class that can create any of the Phaser
Game Objects and adds them to the Game World.
GameObjectCreator make A helper class that can creates and returns any
Phaser Game Object.
Display
Class Description
Sprite A Game Object with a texture, capable of running animation, input events and
physics.
Image A lighter Game Object with a texture and input, but no physics or animation
handlers.
TileSprite A Game Object with a repeating texture that can be scrolled and scaled.
Button An Image Game Object with helper methods and events to turn it into a UI Button.
SpriteBatch A custom Sprite Batch. Can render multiple Sprites significantly faster if they
share the same texture.
Graphics
Class Description
Graphics Allows you to draw primitive shapes (lines, rects, circles), setting color, stroke
and fills.
Class Description
RenderTexture A special kind of texture you can draw Sprites to extremely quickly.
Text
Class Description
Text Displays text using system fonts or Web Fonts, with optional fills, shadows and
strokes.
BitmapText A texture based text object that uses a Bitmap Font file.
RetroFont Similar to a BitmapText object but uses a classic sprite sheet. Each character is a
fixed-width.
Animation
Class Via Description
Geometry
Class Description
Line A Line object consisting of two points at the start and end of the Line.
Time
Time time The core internal clock on which all Phaser time related
operations rely.
Timer time.create A custom Timer that contains one or more TimerEvents. Can
be used either once or be set to repeat.
Class Via Description
Tilemaps
Class Description
Tilemap A Tilemap consists of one or more TilemapLayers and associated tile data.
Contains methods for tile data manipulation and TilemapLayer generation.
TilemapLayer A single layer within a Tilemap. Extends from Phaser.Sprite and is responsible
for rendering itself.
Tileset An object containing a texture and data used for rendering tiles by a
TilemapLayer.
Tile A single Tile object with related properties. One of these exists for every tile in
a map.
TilemapParser A Static class used to parse externally loaded map data. Typically called
directly by Phaser.Loader.
Math
Network
Particles
Class Via Description
Particles particles The Phaser Particle Manager. Called during the game loop and
updates any associated Particle Emitters.
Physics
Physics physics The core Physics Manager. Provides access to all of the physics sub-
systems.
Arcade Physics
Class Via Description
Arcade physics.arcade The Arcade Physics handler. Contains collision, overlap and
movement related methods.
Weapon game.add.weapon An Arcade Physics powered Weapon plugin, for easy bullet
pool management.
Ninja Physics
Ninja Physics is not bundled in Phaser by default. Please see the README custom build details section.
Ninja physics.ninja The Ninja Physics handler. Contains collision, overlap and
movement related methods.
Body sprite.body A Ninja Physics Body. Contains velocity, acceleration, drag and
other related properties.
Class Via Description
P2 Physics
P2 phyiscs.p2 The P2 Physics World. Contains collision, overlap and movement related
methods.
Body sprite.bod A P2 Physics Body. Contains velocity, acceleration, drag and other related
y properties.
BodyDebug A Debug specific version of a P2 Body object. Renders out its shape for
visual debugging.
Material A P2 Material used for world responses, such as friction and restitution.
Class Via Description
Constraints: Distance
Constraint, GearConstraint, LockConstraint,PrismaticConstraint, RevoluteCo
nstraint
InversePointPro Responsible for proxing Phaser Game World to inversed P2 Physics values.
xy
Input
Class Via Description
Gamepads
Tweens
TweenManager tweens The Tween Manager creates, updates and destroys all active
tweens.
SoundManager sound The Sound Manager controls all Sound objects and can play, loop,
fade and stop Sounds.
Sound A Sound object. Can be played, paused and stopped directly, and
have its volume adjusted.
System
Utils
ArraySet ArraySet is a Set data structure (items must be unique within the
set) that also maintains order.
Utils Utility methods for Object and String inspection and modification.
Including getProperty, pad, isPlainObject, extend and mixin.