phaser/docs/index.html
2016-06-09 17:13:31 +01:00

1516 lines
No EOL
70 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Phaser Index</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/default.css">
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
</head>
<body>
<div class="container-fluid">
<div class="navbar navbar-fixed-top navbar-inverse">
<div style="position: absolute; width: 143px; height: 31px; right: 10px; top: 10px; z-index: 1050"><a href="http://phaser.io"><img src="img/phaser.png" border="0" /></a></div>
<div class="navbar-inner">
<a class="brand" href="index.html">Phaser API</a>
<ul class="nav">
<li class="dropdown">
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
class="caret"></b></a>
<ul class="dropdown-menu ">
<li class="class-depth-0">
<a href="Phaser.html">Phaser</a>
</li>
<li class="class-depth-0">
<a href="Phaser.KeyCode.html">KeyCode</a>
</li>
<li class="class-depth-0">
<a href="PIXI.html">PIXI</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
class="caret"></b></a>
<ul class="dropdown-menu ">
<li class="class-depth-1">
<a href="Phaser.Animation.html">Animation</a>
</li>
<li class="class-depth-1">
<a href="Phaser.AnimationManager.html">AnimationManager</a>
</li>
<li class="class-depth-1">
<a href="Phaser.AnimationParser.html">AnimationParser</a>
</li>
<li class="class-depth-1">
<a href="Phaser.ArraySet.html">ArraySet</a>
</li>
<li class="class-depth-1">
<a href="Phaser.ArrayUtils.html">ArrayUtils</a>
</li>
<li class="class-depth-1">
<a href="Phaser.AudioSprite.html">AudioSprite</a>
</li>
<li class="class-depth-1">
<a href="Phaser.BitmapData.html">BitmapData</a>
</li>
<li class="class-depth-1">
<a href="Phaser.BitmapText.html">BitmapText</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Button.html">Button</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Cache.html">Cache</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Camera.html">Camera</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Canvas.html">Canvas</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Circle.html">Circle</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Color.html">Color</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Angle.html">Angle</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Animation.html">Animation</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.AutoCull.html">AutoCull</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Bounds.html">Bounds</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.BringToTop.html">BringToTop</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Core.html">Core</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Crop.html">Crop</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Delta.html">Delta</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Destroy.html">Destroy</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.FixedToCamera.html">FixedToCamera</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Health.html">Health</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.InCamera.html">InCamera</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.InputEnabled.html">InputEnabled</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.InWorld.html">InWorld</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.LifeSpan.html">LifeSpan</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.LoadTexture.html">LoadTexture</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Overlap.html">Overlap</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.PhysicsBody.html">PhysicsBody</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Reset.html">Reset</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.ScaleMinMax.html">ScaleMinMax</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Smoothed.html">Smoothed</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Create.html">Create</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Creature.html">Creature</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Device.html">Device</a>
</li>
<li class="class-depth-1">
<a href="Phaser.DeviceButton.html">DeviceButton</a>
</li>
<li class="class-depth-1">
<a href="Phaser.DOM.html">DOM</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Easing.html">Easing</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Back.html">Back</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Bounce.html">Bounce</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Circular.html">Circular</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Cubic.html">Cubic</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Elastic.html">Elastic</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Exponential.html">Exponential</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Linear.html">Linear</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Quartic.html">Quartic</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Quintic.html">Quintic</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Ellipse.html">Ellipse</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Events.html">Events</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Filter.html">Filter</a>
</li>
<li class="class-depth-1">
<a href="Phaser.FlexGrid.html">FlexGrid</a>
</li>
<li class="class-depth-1">
<a href="Phaser.FlexLayer.html">FlexLayer</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Frame.html">Frame</a>
</li>
<li class="class-depth-1">
<a href="Phaser.FrameData.html">FrameData</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Game.html">Game</a>
</li>
<li class="class-depth-1">
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
</li>
<li class="class-depth-1">
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Graphics.html">Graphics</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Group.html">Group</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Image.html">Image</a>
</li>
<li class="class-depth-1">
<a href="Phaser.ImageCollection.html">ImageCollection</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Input.html">Input</a>
</li>
<li class="class-depth-1">
<a href="Phaser.InputHandler.html">InputHandler</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Key.html">Key</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Line.html">Line</a>
</li>
<li class="class-depth-1">
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Loader.html">Loader</a>
</li>
<li class="class-depth-1">
<a href="Phaser.LoaderParser.html">LoaderParser</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Math.html">Math</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Matrix.html">Matrix</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Mouse.html">Mouse</a>
</li>
<li class="class-depth-1">
<a href="Phaser.MSPointer.html">MSPointer</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Net.html">Net</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Particle.html">Particle</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Particles.html">Particles</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Particles.Arcade.html">Arcade</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Physics.html">Physics</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Physics.Arcade.html">Arcade</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.Arcade.TilemapCollision.html">TilemapCollision</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Physics.Ninja.html">Ninja</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Physics.P2.html">P2</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.Body.html">Body</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.Material.html">Material</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.RotationalSpring.html">RotationalSpring</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Plugin.html">Plugin</a>
</li>
<li class="class-depth-1">
<a href="Phaser.PluginManager.html">PluginManager</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Point.html">Point</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Pointer.html">Pointer</a>
</li>
<li class="class-depth-1">
<a href="Phaser.PointerMode.html">PointerMode</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Polygon.html">Polygon</a>
</li>
<li class="class-depth-1">
<a href="Phaser.QuadTree.html">QuadTree</a>
</li>
<li class="class-depth-1">
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Rectangle.html">Rectangle</a>
</li>
<li class="class-depth-1">
<a href="Phaser.RenderTexture.html">RenderTexture</a>
</li>
<li class="class-depth-1">
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
</li>
<li class="class-depth-1">
<a href="Phaser.RetroFont.html">RetroFont</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Rope.html">Rope</a>
</li>
<li class="class-depth-1">
<a href="Phaser.RoundedRectangle.html">RoundedRectangle</a>
</li>
<li class="class-depth-1">
<a href="Phaser.ScaleManager.html">ScaleManager</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Signal.html">Signal</a>
</li>
<li class="class-depth-1">
<a href="Phaser.SignalBinding.html">SignalBinding</a>
</li>
<li class="class-depth-1">
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Sound.html">Sound</a>
</li>
<li class="class-depth-1">
<a href="Phaser.SoundManager.html">SoundManager</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Sprite.html">Sprite</a>
</li>
<li class="class-depth-1">
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Stage.html">Stage</a>
</li>
<li class="class-depth-1">
<a href="Phaser.State.html">State</a>
</li>
<li class="class-depth-1">
<a href="Phaser.StateManager.html">StateManager</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Text.html">Text</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Tile.html">Tile</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Tilemap.html">Tilemap</a>
</li>
<li class="class-depth-1">
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
</li>
<li class="class-depth-1">
<a href="Phaser.TilemapParser.html">TilemapParser</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Tileset.html">Tileset</a>
</li>
<li class="class-depth-1">
<a href="Phaser.TileSprite.html">TileSprite</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Time.html">Time</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Timer.html">Timer</a>
</li>
<li class="class-depth-1">
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Touch.html">Touch</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Tween.html">Tween</a>
</li>
<li class="class-depth-1">
<a href="Phaser.TweenData.html">TweenData</a>
</li>
<li class="class-depth-1">
<a href="Phaser.TweenManager.html">TweenManager</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Utils.html">Utils</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Utils.Debug.html">Debug</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Video.html">Video</a>
</li>
<li class="class-depth-1">
<a href="Phaser.World.html">World</a>
</li>
<li class="class-depth-1">
<a href="PIXI.AbstractFilter.html">AbstractFilter</a>
</li>
<li class="class-depth-1">
<a href="PIXI.BaseTexture.html">BaseTexture</a>
</li>
<li class="class-depth-1">
<a href="PIXI.CanvasBuffer.html">CanvasBuffer</a>
</li>
<li class="class-depth-1">
<a href="PIXI.CanvasGraphics.html">CanvasGraphics</a>
</li>
<li class="class-depth-1">
<a href="PIXI.CanvasMaskManager.html">CanvasMaskManager</a>
</li>
<li class="class-depth-1">
<a href="PIXI.CanvasPool.html">CanvasPool</a>
</li>
<li class="class-depth-1">
<a href="PIXI.CanvasRenderer.html">CanvasRenderer</a>
</li>
<li class="class-depth-1">
<a href="PIXI.CanvasTinter.html">CanvasTinter</a>
</li>
<li class="class-depth-1">
<a href="PIXI.ComplexPrimitiveShader.html">ComplexPrimitiveShader</a>
</li>
<li class="class-depth-1">
<a href="PIXI.DisplayObject.html">DisplayObject</a>
</li>
<li class="class-depth-1">
<a href="PIXI.DisplayObjectContainer.html">DisplayObjectContainer</a>
</li>
<li class="class-depth-1">
<a href="PIXI.EarCut.html">EarCut</a>
</li>
<li class="class-depth-1">
<a href="PIXI.Event.html">Event</a>
</li>
<li class="class-depth-1">
<a href="PIXI.EventTarget.html">EventTarget</a>
</li>
<li class="class-depth-1">
<a href="PIXI.FilterTexture.html">FilterTexture</a>
</li>
<li class="class-depth-1">
<a href="PIXI.Graphics.html">Graphics</a>
</li>
<li class="class-depth-1">
<a href="PIXI.GraphicsData.html">GraphicsData</a>
</li>
<li class="class-depth-1">
<a href="PIXI.PIXI.html">PIXI</a>
</li>
<li class="class-depth-1">
<a href="PIXI.PixiFastShader.html">PixiFastShader</a>
</li>
<li class="class-depth-1">
<a href="PIXI.PixiShader.html">PixiShader</a>
</li>
<li class="class-depth-1">
<a href="PIXI.PolyK.html">PolyK</a>
</li>
<li class="class-depth-1">
<a href="PIXI.PrimitiveShader.html">PrimitiveShader</a>
</li>
<li class="class-depth-1">
<a href="PIXI.RenderTexture.html">RenderTexture</a>
</li>
<li class="class-depth-1">
<a href="PIXI.Rope.html">Rope</a>
</li>
<li class="class-depth-1">
<a href="PIXI.Sprite.html">Sprite</a>
</li>
<li class="class-depth-1">
<a href="PIXI.SpriteBatch.html">SpriteBatch</a>
</li>
<li class="class-depth-1">
<a href="PIXI.Strip.html">Strip</a>
</li>
<li class="class-depth-1">
<a href="PIXI.StripShader.html">StripShader</a>
</li>
<li class="class-depth-1">
<a href="PIXI.Texture.html">Texture</a>
</li>
<li class="class-depth-1">
<a href="PIXI.TilingSprite.html">TilingSprite</a>
</li>
<li class="class-depth-1">
<a href="PIXI.WebGLBlendModeManager.html">WebGLBlendModeManager</a>
</li>
<li class="class-depth-1">
<a href="PIXI.WebGLFastSpriteBatch.html">WebGLFastSpriteBatch</a>
</li>
<li class="class-depth-1">
<a href="PIXI.WebGLFilterManager.html">WebGLFilterManager</a>
</li>
<li class="class-depth-1">
<a href="PIXI.WebGLRenderer.html">WebGLRenderer</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b
class="caret"></b></a>
<ul class="dropdown-menu ">
<li class="class-depth-0">
<a href="global.html#ANGLE_DOWN">ANGLE_DOWN</a>
</li>
<li class="class-depth-0">
<a href="global.html#ANGLE_LEFT">ANGLE_LEFT</a>
</li>
<li class="class-depth-0">
<a href="global.html#ANGLE_NORTH_EAST">ANGLE_NORTH_EAST</a>
</li>
<li class="class-depth-0">
<a href="global.html#ANGLE_NORTH_WEST">ANGLE_NORTH_WEST</a>
</li>
<li class="class-depth-0">
<a href="global.html#ANGLE_RIGHT">ANGLE_RIGHT</a>
</li>
<li class="class-depth-0">
<a href="global.html#ANGLE_SOUTH_EAST">ANGLE_SOUTH_EAST</a>
</li>
<li class="class-depth-0">
<a href="global.html#ANGLE_SOUTH_WEST">ANGLE_SOUTH_WEST</a>
</li>
<li class="class-depth-0">
<a href="global.html#ANGLE_UP">ANGLE_UP</a>
</li>
<li class="class-depth-0">
<a href="global.html#AUTO">AUTO</a>
</li>
<li class="class-depth-0">
<a href="global.html#BITMAPDATA">BITMAPDATA</a>
</li>
<li class="class-depth-0">
<a href="global.html#BITMAPTEXT">BITMAPTEXT</a>
</li>
<li class="class-depth-0">
<a href="global.html#blendModes">blendModes</a>
</li>
<li class="class-depth-0">
<a href="global.html#BUTTON">BUTTON</a>
</li>
<li class="class-depth-0">
<a href="global.html#CANVAS">CANVAS</a>
</li>
<li class="class-depth-0">
<a href="global.html#CANVAS_FILTER">CANVAS_FILTER</a>
</li>
<li class="class-depth-0">
<a href="global.html#CIRCLE">CIRCLE</a>
</li>
<li class="class-depth-0">
<a href="global.html#CREATURE">CREATURE</a>
</li>
<li class="class-depth-0">
<a href="global.html#displayList">displayList</a>
</li>
<li class="class-depth-0">
<a href="global.html#DOWN">DOWN</a>
</li>
<li class="class-depth-0">
<a href="global.html#ELLIPSE">ELLIPSE</a>
</li>
<li class="class-depth-0">
<a href="global.html#EMITTER">EMITTER</a>
</li>
<li class="class-depth-0">
<a href="global.html#GAMES">GAMES</a>
</li>
<li class="class-depth-0">
<a href="global.html#GRAPHICS">GRAPHICS</a>
</li>
<li class="class-depth-0">
<a href="global.html#GROUP">GROUP</a>
</li>
<li class="class-depth-0">
<a href="global.html#HEADLESS">HEADLESS</a>
</li>
<li class="class-depth-0">
<a href="global.html#HORIZONTAL">HORIZONTAL</a>
</li>
<li class="class-depth-0">
<a href="global.html#IMAGE">IMAGE</a>
</li>
<li class="class-depth-0">
<a href="global.html#intersectsRectangle">intersectsRectangle</a>
</li>
<li class="class-depth-0">
<a href="global.html#LANDSCAPE">LANDSCAPE</a>
</li>
<li class="class-depth-0">
<a href="global.html#LEFT">LEFT</a>
</li>
<li class="class-depth-0">
<a href="global.html#LINE">LINE</a>
</li>
<li class="class-depth-0">
<a href="global.html#MATRIX">MATRIX</a>
</li>
<li class="class-depth-0">
<a href="global.html#NONE">NONE</a>
</li>
<li class="class-depth-0">
<a href="global.html#PENDING_ATLAS">PENDING_ATLAS</a>
</li>
<li class="class-depth-0">
<a href="global.html#POINT">POINT</a>
</li>
<li class="class-depth-0">
<a href="global.html#POINTER">POINTER</a>
</li>
<li class="class-depth-0">
<a href="global.html#POLYGON">POLYGON</a>
</li>
<li class="class-depth-0">
<a href="global.html#PORTRAIT">PORTRAIT</a>
</li>
<li class="class-depth-0">
<a href="global.html#RECTANGLE">RECTANGLE</a>
</li>
<li class="class-depth-0">
<a href="global.html#RENDERTEXTURE">RENDERTEXTURE</a>
</li>
<li class="class-depth-0">
<a href="global.html#RETROFONT">RETROFONT</a>
</li>
<li class="class-depth-0">
<a href="global.html#RIGHT">RIGHT</a>
</li>
<li class="class-depth-0">
<a href="global.html#ROPE">ROPE</a>
</li>
<li class="class-depth-0">
<a href="global.html#ROUNDEDRECTANGLE">ROUNDEDRECTANGLE</a>
</li>
<li class="class-depth-0">
<a href="global.html#scaleModes">scaleModes</a>
</li>
<li class="class-depth-0">
<a href="global.html#SPRITE">SPRITE</a>
</li>
<li class="class-depth-0">
<a href="global.html#SPRITEBATCH">SPRITEBATCH</a>
</li>
<li class="class-depth-0">
<a href="global.html#TEXT">TEXT</a>
</li>
<li class="class-depth-0">
<a href="global.html#TILEMAP">TILEMAP</a>
</li>
<li class="class-depth-0">
<a href="global.html#TILEMAPLAYER">TILEMAPLAYER</a>
</li>
<li class="class-depth-0">
<a href="global.html#TILESPRITE">TILESPRITE</a>
</li>
<li class="class-depth-0">
<a href="global.html#UP">UP</a>
</li>
<li class="class-depth-0">
<a href="global.html#VERSION">VERSION</a>
</li>
<li class="class-depth-0">
<a href="global.html#VERTICAL">VERTICAL</a>
</li>
<li class="class-depth-0">
<a href="global.html#VIDEO">VIDEO</a>
</li>
<li class="class-depth-0">
<a href="global.html#WEBGL">WEBGL</a>
</li>
<li class="class-depth-0">
<a href="global.html#WEBGL_FILTER">WEBGL_FILTER</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Core<b class="caret"></b></a>
<ul class="dropdown-menu ">
<li class="class-depth-1"><a href="Phaser.Game.html">Game</a></li>
<li class="class-depth-1"><a href="Phaser.Group.html">Group</a></li>
<li class="class-depth-1"><a href="Phaser.World.html">World</a></li>
<li class="class-depth-1"><a href="Phaser.Loader.html">Loader</a></li>
<li class="class-depth-1"><a href="Phaser.Cache.html">Cache</a></li>
<li class="class-depth-1"><a href="Phaser.Time.html">Time</a></li>
<li class="class-depth-1"><a href="Phaser.Camera.html">Camera</a></li>
<li class="class-depth-1"><a href="Phaser.StateManager.html">State Manager</a></li>
<li class="class-depth-1"><a href="Phaser.TweenManager.html">Tween Manager</a></li>
<li class="class-depth-1"><a href="Phaser.SoundManager.html">Sound Manager</a></li>
<li class="class-depth-1"><a href="Phaser.Input.html">Input Manager</a></li>
<li class="class-depth-1"><a href="Phaser.ScaleManager.html">Scale Manager</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Game Objects<b class="caret"></b></a>
<ul class="dropdown-menu ">
<li class="class-depth-1"><a href="Phaser.GameObjectFactory.html">Factory (game.add)</a></li>
<li class="class-depth-1"><a href="Phaser.GameObjectCreator.html">Creator (game.make)</a></li>
<li class="class-depth-1"><a href="Phaser.Sprite.html">Sprite</a></li>
<li class="class-depth-1"><a href="Phaser.Image.html">Image</a></li>
<li class="class-depth-1"><a href="Phaser.Sound.html">Sound</a></li>
<li class="class-depth-1"><a href="Phaser.Video.html">Video</a></li>
<li class="class-depth-1"><a href="Phaser.Particles.Arcade.Emitter.html">Particle Emitter</a></li>
<li class="class-depth-1"><a href="Phaser.Particle.html">Particle</a></li>
<li class="class-depth-1"><a href="Phaser.Text.html">Text</a></li>
<li class="class-depth-1"><a href="Phaser.Tween.html">Tween</a></li>
<li class="class-depth-1"><a href="Phaser.BitmapText.html">BitmapText</a></li>
<li class="class-depth-1"><a href="Phaser.Tilemap.html">Tilemap</a></li>
<li class="class-depth-1"><a href="Phaser.BitmapData.html">BitmapData</a></li>
<li class="class-depth-1"><a href="Phaser.RetroFont.html">RetroFont</a></li>
<li class="class-depth-1"><a href="Phaser.Button.html">Button</a></li>
<li class="class-depth-1"><a href="Phaser.Animation.html">Animation</a></li>
<li class="class-depth-1"><a href="Phaser.Graphics.html">Graphics</a></li>
<li class="class-depth-1"><a href="Phaser.RenderTexture.html">RenderTexture</a></li>
<li class="class-depth-1"><a href="Phaser.TileSprite.html">TileSprite</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Geometry<b class="caret"></b></a>
<ul class="dropdown-menu ">
<li class="class-depth-1"><a href="Phaser.Circle.html">Circle</a></li>
<li class="class-depth-1"><a href="Phaser.Ellipse.html">Ellipse</a></li>
<li class="class-depth-1"><a href="Phaser.Line.html">Line</a></li>
<li class="class-depth-1"><a href="Phaser.Matrix.html">Matrix</a></li>
<li class="class-depth-1"><a href="Phaser.Point.html">Point</a></li>
<li class="class-depth-1"><a href="Phaser.Polygon.html">Polygon</a></li>
<li class="class-depth-1"><a href="Phaser.Rectangle.html">Rectangle</a></li>
<li class="class-depth-1"><a href="Phaser.RoundedRectangle.html">Rounded Rectangle</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Physics<b class="caret"></b></a>
<ul class="dropdown-menu ">
<li class="class-depth-1"><a href="Phaser.Physics.Arcade.html">Arcade Physics</a></li>
<li class="class-depth-2"><a href="Phaser.Physics.Arcade.Body.html">Body</a></li>
<li class="class-depth-1"><a href="Phaser.Physics.P2.html">P2 Physics</a></li>
<li class="class-depth-2"><a href="Phaser.Physics.P2.Body.html">Body</a></li>
<li class="class-depth-2"><a href="Phaser.Physics.P2.Spring.html">Spring</a></li>
<li class="class-depth-2"><a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a></li>
<li class="class-depth-2"><a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a></li>
<li class="class-depth-1"><a href="Phaser.Physics.Ninja.html">Ninja Physics</a></li>
<li class="class-depth-2"><a href="Phaser.Physics.Body.html">Body</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Input<b class="caret"></b></a>
<ul class="dropdown-menu ">
<li class="class-depth-1"><a href="Phaser.InputHandler.html">Input Handler</a></li>
<li class="class-depth-1"><a href="Phaser.Pointer.html">Pointer</a></li>
<li class="class-depth-1"><a href="Phaser.DeviceButton.html">Device Button</a></li>
<li class="class-depth-1"><a href="Phaser.Mouse.html">Mouse</a></li>
<li class="class-depth-1"><a href="Phaser.Keyboard.html">Keyboard</a></li>
<li class="class-depth-1"><a href="Phaser.Key.html">Key</a></li>
<li class="class-depth-1"><a href="Phaser.Gamepad.html">Gamepad</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Community<b class="caret"></b></a>
<ul class="dropdown-menu ">
<li class="class-depth-1"><a href="http://phaser.io">Phaser Web Site</a></li>
<li class="class-depth-1"><a href="https://github.com/photonstorm/phaser">Phaser Github</a></li>
<li class="class-depth-1"><a href="http://phaser.io/examples">Phaser Examples</a></li>
<li class="class-depth-1"><a href="https://github.com/photonstorm/phaser-plugins">Phaser Plugins</a></li>
<li class="class-depth-1"><a href="http://www.html5gamedevs.com/forum/14-phaser/">Forum</a></li>
<li class="class-depth-1"><a href="http://stackoverflow.com/questions/tagged/phaser-framework">Stack Overflow</a></li>
<li class="class-depth-1"><a href="http://phaser.io/learn">Tutorials</a></li>
<li class="class-depth-1"><a href="http://phaser.io/community/newsletter">Newsletter</a></li>
<li class="class-depth-1"><a href="http://phaser.io/community/twitter">Twitter</a></li>
<li class="class-depth-1"><a href="http://phaser.io/news/2015/08/phaser-slack-channel">Slack</a></li>
<li class="class-depth-1"><a href="https://www.codeandweb.com/texturepacker/phaser">Texture Packer</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="row-fluid">
<div class="span8">
<div id="main">
<!-- <span class="page-title">Index</span> -->
<section>
<article>
<h1>Phaser</h1><p><img src="http://phaser.io/images/github/jump.jpg" align="right"></p>
<p>Phaser is a fast, free and fun open source HTML5 game framework. It uses a custom build of <a href="https://github.com/GoodBoyDigital/pixi.js/">Pixi.js</a> for WebGL and Canvas rendering across desktop and mobile web browsers. Games can be compiled to iOS, Android and desktop apps via 3rd party tools like Cocoon, Cordova and Electron.</p>
<p>Along with the fantastic open source community Phaser is actively developed and maintained by <a href="http://www.photonstorm.com">Photon Storm Limited</a>. As a result of rapid support and a developer friendly API Phaser is currently one of the <a href="https://github.com/showcases/javascript-game-engines">most starred</a> game frameworks on GitHub.</p>
<p>Thousands of developers worldwide use it. From indies and multi-national digital agencies to schools and Universities. Each creating their own incredible games. Grab the source and join in the fun!</p>
<ul>
<li><strong>Visit:</strong> The <a href="http://phaser.io">Phaser website</a> and follow on <a href="https://twitter.com/photonstorm">Twitter</a> (#phaserjs)</li>
<li><strong>Learn:</strong> <a href="http://phaser.io/docs">API Documentation</a>, <a href="http://www.html5gamedevs.com/forum/14-phaser/">Support Forum</a> and <a href="http://stackoverflow.com/questions/tagged/phaser-framework">StackOverflow</a></li>
<li><strong>Code:</strong> 700+ <a href="http://phaser.io/examples">Source Examples</a> (also available in this <a href="https://github.com/photonstorm/phaser-examples">git repo</a>)</li>
<li><strong>Read:</strong> Subscribe to the weekly <a href="#phaserworld">Phaser World Newsletter</a></li>
<li><strong>Chat:</strong> Join our <a href="http://phaser.io/news/2015/08/phaser-slack-channel">Slack Channel</a>, or <a href="http://www.html5gamedevs.com/topic/4470-official-phaserio-irc-channel-phaserio-on-freenode/">#phaserio IRC channel</a></li>
<li><strong>Extend:</strong> With <a href="http://phaser.io/shop/plugins">Phaser Plugins</a></li>
<li><strong>Be awesome:</strong> Support the future of Phaser on <a href="https://www.patreon.com/photonstorm">Patreon</a> or by buying our <a href="http://phaser.io/shop/books">books</a></li>
</ul>
<h2>Index</h2><ul>
<li><a href="#whats-new">What's New?</a></li>
<li><a href="#patreon">Support Phaser</a></li>
<li><a href="#phaserworld">Phaser World</a></li>
<li><a href="#download">Download Phaser</a></li>
<li><a href="#getting-started">Getting Started</a></li>
<li><a href="#using-phaser">Using Phaser</a></li>
<li><a href="#games">Games made with Phaser</a></li>
<li><a href="#requirements">Requirements</a></li>
<li><a href="#road-map">Road Map</a></li>
<li><a href="#change-log">Change Log</a></li>
<li><a href="#lazer">Lazer</a></li>
<li><a href="#contributing">Contributing</a></li>
</ul>
<p><a name="whats-new"></a></p>
<h2>What's new in Phaser 2.4.9</h2><div align="center"><img src="http://phaser.io/images/github/news.jpg"></div>
<blockquote>
<p>In Development</p>
</blockquote>
<p>The release of Phaser 2.4.9 is currently in development. This README will be updated as development continues.</p>
<p>As always, keep you eyes on the Phaser web site and read our weekly <a href="#phaserworld">newsletter</a>. You can also follow me on <a href="https://twitter.com/photonstorm">Twitter</a> or chat to me in the Phaser <a href="http://phaser.io/news/2015/08/phaser-slack-channel">Slack</a> channel.</p>
<p>We'd be extremely grateful if you could get involved with our <a href="https://www.patreon.com/photonstorm">Phaser Patreon campaign</a>. The uptake so far has been fantastic. Thank you to everyone who now supports Phaser development and shares our belief in the future of HTML5 gaming, and Phasers role in that.</p>
<p>Happy coding everyone! See you on the forums.</p>
<p>Cheers,</p>
<p>Rich - <a href="https://twitter.com/photonstorm">@photonstorm</a></p>
<p><img src="http://www.phaser.io/images/spacedancer.gif" alt="boogie"></p>
<p><a name="patreon"></a></p>
<h2>Support Phaser on Patreon</h2><p><img src="http://www.phaser.io/images/patreon.png" alt="patreon"></p>
<p>Please help support the future development of Phaser / Lazer through our <a href="https://www.patreon.com/photonstorm">Patreon campaign</a>. We've some exciting plans and there's so much we'd like to do.</p>
<h3>Phaser Sponsors</h3><p>Phaser is <a href="https://www.patreon.com/photonstorm">sponsored</a> by the following great companies:</p>
<p><img src="http://www.phaser.io/images/sponsors/qici-100.png" alt="qici"></p>
<p>QICI Engine: <a href="http://www.qiciengine.com/">A powerful one-stop integrated Phaser game editor</a></p>
<p><img src="http://www.phaser.io/images/sponsors/zenva-100.png" alt="zenva"></p>
<p>Zenva Academy: <a href="https://academy.zenva.com/?zva_src=phaserpatreon">Online courses on Phaser, HTML5 and native app development</a></p>
<p><a name="phaserworld"></a></p>
<h2>Phaser World</h2><div align="center"><img src="http://phaser.io/images/github/phaser-world.png"></div>
<p>Every Friday we publish our newsletter: <a href="http://phaser.io/community/newsletter">Phaser World</a>. It's packed full of the latest Phaser games, tutorials, videos, meet-ups, conference talks and more. We also post regular development updates, and occasionally special offers.</p>
<p><a name="download"></a></p>
<h2>Download Phaser</h2><p>Phaser is <a href="https://github.com/photonstorm/phaser">hosted on Github</a>. There are a number of ways to download it:</p>
<ul>
<li>Clone the git repository via <a href="https://github.com/photonstorm/phaser.git">https</a>, <a href="git@github.com:photonstorm/phaser.git">ssh</a> or with the Github <a href="github-windows://openRepo/https://github.com/photonstorm/phaser">Windows</a> or <a href="github-mac://openRepo/https://github.com/photonstorm/phaser">Mac</a> clients.</li>
<li>Download as <a href="https://github.com/photonstorm/phaser/archive/v2.4.9.zip">zip</a> or <a href="https://github.com/photonstorm/phaser/archive/v2.4.9.tar.gz">tar.gz</a></li>
<li>Download just the build files: <a href="https://github.com/photonstorm/phaser/releases/download/v2.4.9/phaser.js">phaser.js</a> and <a href="https://github.com/photonstorm/phaser/releases/download/v2.4.9/phaser.min.js">phaser.min.js</a></li>
<li>Checkout with <a href="https://github.com/photonstorm/phaser">svn</a></li>
</ul>
<h3>Bower / npm</h3><p>Install via <a href="http://bower.io">bower</a></p>
<p><code>bower install phaser</code></p>
<p>Install via <a href="https://www.npmjs.com">npm</a></p>
<p><code>npm install phaser</code></p>
<p>Using Browserify? Please <a href="#browserify">read this</a>.</p>
<h3>CDN</h3><p><a href="http://www.jsdelivr.com/#!phaser">jsDelivr</a> is a &quot;super-fast CDN for developers&quot;. Include the following in your html:</p>
<p><code>&lt;script src=&quot;//cdn.jsdelivr.net/phaser/2.4.9/phaser.js&quot;&gt;&lt;/script&gt;</code></p>
<p>or the minified version:</p>
<p><code>&lt;script src=&quot;//cdn.jsdelivr.net/phaser/2.4.9/phaser.min.js&quot;&gt;&lt;/script&gt;</code></p>
<p><a href="https://cdnjs.com/libraries/phaser">cdnjs.com</a> also offers a free CDN service. They have all versions of Phaser and even the custom builds:</p>
<p><code>&lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/phaser/2.4.9/phaser.js&quot;&gt;&lt;/script&gt;</code></p>
<h3>Phaser Sandbox</h3><p>If you'd like to try coding in Phaser right now, with nothing more than your web browser, then you can head over to the <a href="http://phaser.io/sandbox">Phaser Sandbox</a>. You'll find Quick Start templates and a user-friendly editor filled with handy code-completion features.</p>
<h3>Koding</h3><p>Want to try Phaser without downloading anything? The site <a href="https://koding.com">Koding</a> offer a complete browser-based virtual machine to work in, allowing you to clone the Phaser repo and start work immediately.</p>
<h3>License</h3><p>Phaser is released under the <a href="http://opensource.org/licenses/MIT">MIT License</a>.</p>
<p><a name="getting-started"></a></p>
<h2>Getting Started</h2><p><img src="http://phaser.io/images/github/learn.jpg" align="right"></p>
<p>We have a <a href="http://phaser.io/tutorials/getting-started">Getting Started Guide</a> which covers all you need to begin developing games with Phaser. From setting up a web server, to picking an IDE and coding your first game. Please start here no matter what your game-dev experience, before diving in to the API.</p>
<p>The single biggest Phaser resource is the <a href="http://phaser.io/news">Phaser web site</a>. It has hundreds of tutorials listed and fresh ones are added every week. Keep coming back to see what's new!</p>
<p>Using Phaser with <strong>TypeScript</strong>? Check out this great series of <a href="http://www.gamefromscratch.com/page/Adventures-in-Phaser-with-TypeScript-tutorial-series.aspx">Game From Scratch</a> tutorials.</p>
<p>Prefer <strong>videos</strong> to reading? Lynda.com have published a video based course: <a href="http://www.lynda.com/Phaser-tutorials/HTML5-Game-Development-Phaser/163641-2.html">HTML5 Game Development with Phaser</a> (requires subscription)</p>
<h3>Source Code Examples</h3><p>Ever since we started Phaser we've been growing and expanding our extensive set of source code examples. Currently there are over 700 of them!</p>
<p>Browse the <a href="http://phaser.io/examples">Phaser Examples</a> or clone the <a href="https://github.com/photonstorm/phaser-examples">examples repo</a> and eat your heart out!</p>
<h3>Interphase</h3><div align="center"><img src="http://phaser.io/content/interphase/1/images/editorial/pages.jpg"></div>
<p><a href="http://phaser.io/interphase">Interphase</a> is a programming book for Phaser developers of all skill levels.</p>
<p>With 400 pages of content you'll find detailed articles, game development &quot;Making Of&quot; guides and tutorials. All were written using the latest version of Phaser, so you won't be learning any out-dated tricks here.</p>
<p>As well as the book you get all the source code, graphics and assets to go with it, and lots of extras too.</p>
<p><a href="http://phaser.io/interphase">Read More</a></p>
<h3>Phaser Editor - A complete Phaser Editor</h3><p><a href="http://phasereditor.boniatillo.com/">Phaser Editor</a> is a brand new Eclipse based editor that offers lots of built-in tools specifically for Phaser developers. Handy features include Smart code auto-completion, built-in web server, documentation search, asset management, texture atlas creator, audio sprite creator, asset previews and lots more.</p>
<h3>Game Mechanic Explorer</h3><p>The <a href="http://gamemechanicexplorer.com">Game Mechanic Explorer</a> is a great interactive way to learn how to develop specific game mechanics in Phaser. Well worth exploring once you've got your dev environment set-up.</p>
<h3>Mighty Editor - Visual Game Editor</h3><p><a href="http://mightyfingers.com/">MightyEditor</a> is a browser-based visual Phaser game editor. Create your maps with ease, position objects and share them in seconds. It also exports to native Phaser code. Excellent for quickly setting-up levels and scenes.</p>
<p><a name="using-phaser"></a></p>
<h2>Using Phaser</h2><p>Phaser is provided ready compiled in the <code>build</code> folder of the repository. There are both plain and minified versions. The plain version is for use during development and the minified version for production.</p>
<h3>Custom Builds</h3><p>Phaser includes a grunt based build system which allows you to strip out lots of additional features you may not require, saving hundreds of KB in the process. Don't use any Sound in your game? Then you can now exclude the entire sound system. Don't need Keyboard support? That can be stripped out too.</p>
<p>As a result of this work the minimum build size of Phaser is now just 80KB minified and gzipped.</p>
<p>See the <a href="http://phaser.io/tutorials/creating-custom-phaser-builds">Creating a Custom Phaser Build</a> tutorial for details.</p>
<p><a name="browserify"></a></p>
<h3>Browserify / CJS</h3><p>Phaser was never written to be modular. Everything exists under one single global namespace, and you cannot <code>require</code> selected parts of it into your builds. It expects 3 global vars to exist in order to work properly: <code>Phaser</code>, <code>PIXI</code> and <code>p2</code>. The following is one way of doing this:</p>
<pre class="prettyprint source"><code>window.PIXI = require('phaser/build/custom/pixi')
window.p2 = require('phaser/build/custom/p2')
window.Phaser = require('phaser/build/custom/phaser-split')</code></pre><p>If you build a custom version of Phaser (see above) it will split the 3 core libs out into their own files, allowing you to require them as above.</p>
<p>We appreciate this is just a band-aid and not a proper use of modules, but please understand it was never built to be used this way. You're trying to fit a square peg in a round browserify-shaped hole, so compromises have to be made. Please don't open GitHub issues about it. We've no intention of changing Phaser at this stage of its life. Full module based development is being undertaken in Lazer.</p>
<h3>Webpack</h3><p>Starting from Phaser 2.4.5 we now include a custom build for Webpack.</p>
<p>You need to add <code>p2</code> as a dependency.</p>
<h5>Webpack Config</h5><pre class="prettyprint source"><code>var path = require('path');
var webpack = require('webpack');
var phaserModule = path.join(__dirname, '/node_modules/phaser/');
var phaser = path.join(phaserModule, 'build/custom/phaser-split.js'),
pixi = path.join(phaserModule, 'build/custom/pixi.js'),
p2 = path.join(phaserModule, 'build/custom/p2.js');
module.exports = {
...
module: {
loaders: [
{ test: /pixi.js/, loader: &quot;script&quot; },
]
},
resolve: {
alias: {
'phaser': phaser,
'pixi.js': pixi,
'p2': p2,
}
}
...
}</code></pre><h5>Main js file</h5><pre class="prettyprint source"><code>require('pixi.js');
require('p2');
require('phaser');</code></pre><h3>Building from source</h3><p>Should you wish to build Phaser from source you can take advantage of the provided <a href="http://gruntjs.com/">Grunt</a> scripts. Ensure you have the required packages by running <code>npm install</code> first.</p>
<p>Run <code>grunt</code> to perform a default build to the <code>dist</code> folder.</p>
<p><a name="games"></a></p>
<h2>Games made with Phaser</h2><p>Thousands of games have been made in Phaser. From game jam entries to titles by some of the largest entertainment brands in the world. Here is a tiny sample:</p>
<p><a href="http://phaser.io/news/2015/06/bubble-academy"><img src="http://phaser.io/images/github/241/bubble-academy.png" alt="Game"></a>
<a href="http://phaser.io/news/2015/07/woodventure"><img src="http://phaser.io/images/github/241/woodventure.png" alt="Game"></a>
<a href="http://phaser.io/news/2015/04/hopsop-journey-to-the-top"><img src="http://phaser.io/images/github/241/hopsop.png" alt="Game"></a>
<a href="http://phaser.io/news/2015/05/banana-mania"><img src="http://phaser.io/images/github/241/banana-mania.png" alt="Game"></a>
<a href="http://phaser.io/news/2015/06/salazar-the-alchemist"><img src="http://phaser.io/images/github/241/salazar.png" alt="Game"></a>
<a href="http://phaser.io/news/2015/05/phaser-shmup"><img src="http://phaser.io/images/github/241/phaser-shmup.png" alt="Game"></a>
<a href="http://phaser.io/news/2015/05/trappy-trap"><img src="http://phaser.io/images/github/241/trappy-trap.png" alt="Game"></a>
<a href="http://phaser.io/news/2015/04/runaway-ruins"><img src="http://phaser.io/images/github/241/runaway-ruins.png" alt="Game"></a>
<a href="http://phaser.io/news/2015/04/ananias"><img src="http://phaser.io/images/github/241/ananias.png" alt="Game"></a>
<a href="https://www.prodigygame.com/Fun-Math-Games/"><img src="http://phaser.io/images/github/shot1a.jpg" alt="Game"></a>
<a href="http://www.bbc.co.uk/cbbc/games/deadly-defenders-game"><img src="http://phaser.io/images/github/shot2a.jpg" alt="Game"></a>
<a href="http://www.defiantfew.com/"><img src="http://phaser.io/images/github/shot3a.jpg" alt="Game"></a>
<a href="http://www.pawpatrol.com/fun.php"><img src="http://phaser.io/images/github/shot4a.jpg" alt="Game"></a>
<a href="http://www.fyretale.com/"><img src="http://phaser.io/images/github/shot5b.jpg" alt="Game"></a>
<a href="http://www.pocoyo.com/juegos-ninos/caramelos"><img src="http://phaser.io/images/github/shot6b.jpg" alt="Game"></a>
<a href="http://www.html5gamedevs.com/topic/11179-phaser-cocoonjs-tap-tap-submarine/"><img src="http://phaser.io/images/github/shot7b.jpg" alt="Game"></a>
<a href="http://www.gamepix.com/project/footchinko/"><img src="http://phaser.io/images/github/shot8.jpg" alt="Game"></a>
<a href="http://orcattack.thehobbit.com"><img src="http://phaser.io/images/github/shot9.jpg" alt="Game"></a></p>
<p>Artwork copyright their respective owners.</p>
<p>We add <a href="http://phaser.io/news/category/game">new games</a> to the Phaser site weekly, so be sure to send us yours when it's finished!</p>
<p><a name="requirements"></a></p>
<h2>Requirements</h2><p>Phaser requires a web browser that supports the <a href="http://caniuse.com/#feat=canvas">canvas tag</a>. This includes Internet Explorer 9+, Firefox, Chrome, Safari and Opera on desktop. iOS Safari, Android Browser and Chrome for Android are supported on mobile.</p>
<p>While Phaser does its best to ensure a consistent cross-platform experience, always be aware of browser and device limitations. This is especially important with regard to memory and GPU limitations on mobile, and legacy browser HTML5 compatibility.</p>
<h3>IE9</h3><p>If you need to support IE9 / Android 2.x <strong>and</strong> use P2 physics then you must use the polyfill in the <code>resources/IE9 Polyfill</code> folder. If you don't use P2 (or don't care about IE9!) you can skip this.</p>
<h3>JavaScript and TypeScript</h3><p>Phaser is developed in JavaScript. We've made no assumptions about how you like to code and were careful not to impose a strict structure upon you. You won't find Phaser split into modules, requiring a build step, or making you use a class / inheritance OOP approach. That doesn't mean you can't do so, it just means we don't <em>force</em> you to. It's your choice.</p>
<p>If you code with <a href="http://www.typescriptlang.org/">TypeScript</a> there are comprehensive definition files in the <code>typescript</code> folder. They are for TypeScript 1.4+.</p>
<p><a name="road-map"></a></p>
<h2>Road Map</h2><p>The majority of Phaser development is now taking place on the <a href="https://github.com/photonstorm/lazer">Lazer</a> (Phaser 3) project. The Phaser 2 branch will still be supported and issues fixed, but roadmap features have been migrated over.</p>
<p><a name="lazer"></a></p>
<h2>Lazer</h2><p><a href="https://github.com/photonstorm/lazer">Lazer</a> is the next generation of the Phaser game framework, and was previously called Phaser 3. Using a completely ES6 base it is renderer agnostic, allowing for DOM, SVG, Canvas and WebGL rendering, across desktop and mobile web browsers.</p>
<p><strong>Lazer is in active development but is not yet ready for production use.</strong></p>
<p>You can read all about the philosophy behind Lazer <a href="http://phaser.io/news/2016/01/phaser-in-2015-and-beyond">here</a> or join the Google Group <a href="https://groups.google.com/d/forum/phaser3-dev">mailing list</a> where progress reports are posted. You can also follow progress in the Phaser World newsletter.</p>
<p><a name="change-log"></a></p>
<h2>Change Log</h2><h2>Version 2.4.9 - &quot;Four Kings&quot; - In Development</h2><h3>New Features</h3><ul>
<li>Phaser.Line.intersectsRectangle checks for intersection between a Line and a Rectangle, or any Rectangle-like object such as a Sprite or Body.</li>
<li>Group.getClosestTo will return the child closest to the given point (thanks @Nuuf #2504)</li>
<li>Group.getFurthestFrom will return the child farthest away from the given point (thanks @Nuuf #2504)</li>
<li>Animation.reverse will reverse the currently playing animation direction (thanks @gotenxds #2505)</li>
<li>Animation.reverseOnce will reverse the animation direction for the current, or next animation only (thanks @gotenxds #2505)</li>
<li>The way the display list updates and Camera movements are handled has been completely revamped, which should result is significantly smoother motion when the Camera is following tweened or physics controlled sprites. The <code>Stage.postUpdate</code> function is now vastly reduced in complexity. It takes control over updating the display list (calling <code>updateTransform</code> on itself), rather than letting the Canvas or WebGL renderers do this. Because of this change, the <code>Camera.updateTarget</code> function uses the Sprites <code>worldPosition</code> property instead, which is now frame accurate (thanks @whig @Upperfoot @Whoisnt @hexus #2482)</li>
<li>Game Objects including Sprite, Image, Particle, TilemapLayer, Text, BitmapText and TileSprite have a new property called <code>data</code>. This is an empty Object that Phaser will never touch internally, but your own code, or Phaser Plugins, can store Game Object specific data within it. This allows you to associate data with a Game Object without having to pollute or change its class shape.</li>
<li>TilemapLayers will now collide properly when they have a position that isn't set to 0x0. For example if you're stitching together several maps, one after the other, and manually adjust their <code>scrollX/Y</code> properties (thanks @Upperfoot #2522)</li>
<li>There are a bunch of new Phaser consts available to help with setting the angle of a Game Object. They are <code>Phaser.ANGLE_UP</code>, <code>ANGLE_DOWN</code>, <code>ANGLE_LEFT</code>, <code>ANGLE_RIGHT</code>, <code>ANGLE_NORTH_EAST</code>, <code>ANGLE_NORTH_WEST</code>, <code>ANGLE_SOUTH_EAST</code> and <code>ANGLE_SOUTH_WEST</code>.</li>
<li>Math.between will return a value between the given <code>min</code> and <code>max</code> values.</li>
<li>InputHandler.dragDistanceThreshold gives you more fine control over when a Sprite Drag event will start. It allows you to specify a distance, in pixels, that the pointer must have moved before the drag will begin.</li>
<li>InputHandler.dragTimeThreshold gives you more fine control over when a Sprite Drag event will start. It allows you to specify a time, in ms that the pointer must have been held down for, before the drag will begin.</li>
<li>InputHandler.downPoint is a new Point object that contains the coordinates of the Pointer when it was first pressed down on the Sprite.</li>
<li>There are two new Phaser consts available, for help with orientation of games or Game Objects. They are <code>Phaser.HORIZONTAL</code>, <code>Phaser.VERTICAL</code>, <code>Phaser.LANDSCAPE</code> and <code>Phaser.PORTRAIT</code>.</li>
<li>InputHandler.dragStopBlocksInputUp is a boolean that allows you to control what happens with the input events. If <code>false</code> (the default) then both the <code>onInputUp</code> and <code>onDragStop</code> events will get dispatched when a Sprite stops being dragged. If <code>true</code> then only the <code>onDragStop</code> event is dispatched, and the <code>onInputUp</code> is skipped.</li>
<li>Group.inputEnableChildren is a new property. If set to <code>true</code> will automatically call <code>inputEnabled = true</code> on any children <em>added</em> to, or <em>created</em> by, the Group.</li>
<li>PIXI.DisplayObjectContainer.ignoreChildInput is a new property. If <code>true</code> then the children will <em>not</em> be considered as valid for Input events. Because this has been applied to <code>DisplayObjectContainer</code> it means it's available in Group, Sprite and any other display level object. Using this boolean you can disable input events for all children in an entire Group, without having to iterate anything or deep-set flags.</li>
<li>InputHandler._pointerOverHandler and _pointerOutHandler have new arguments <code>silent</code> - if <code>true</code> then they will not dispatch any Signals from the parent Sprite.</li>
<li>Pointer.interactiveCandidates is a new Array that is erased and re-populated every time this Pointer is updated. It contains references to all of the Game Objects that were considered as being valid for processing by this Pointer, during the most recent update. To be valid they must have suitable a <code>priorityID</code>, be Input enabled, be visible and actually have the Pointer over them. You can check the contents of this array in events such as <code>onInputDown</code>, but beware: it is reset every update.</li>
<li>Pointer.swapTarget allows you to change the <code>Pointer.targetObject</code> object to be the one provided. This allows you to have fine-grained control over which object the Pointer is targeting.</li>
<li>Input.setInteractiveCandidateHandler allows you to add a callback that is fired every time <code>Pointer.processInteractiveObjects</code> is called. The purpose of <code>processInteractiveObjects</code> is to work out which Game Object the Pointer is going to interact with. It works by polling all of the valid game objects, and then slowly discounting those that don't meet the criteria (i.e. they aren't under the Pointer, are disabled, invisible, etc). Eventually a short-list of 'candidates' is created. These are all of the Game Objects which are valid for input and overlap with the Pointer. If you need fine-grained control over which of the items is selected then you can use this callback to do so. The callback will be sent 3 parameters: 1) A reference to the Phaser.Pointer object that is processing the Items. 2) An array containing all potential interactive candidates. This is an array of <code>InputHandler</code> objects, not Sprites. 3) The current 'favorite' candidate, based on its priorityID and position in the display list. Your callback MUST return one of the candidates sent to it.</li>
<li>Group.onChildInputDown is a new Signal that you can listen to. It will be dispatched whenever any immediate child of the Group emits an <code>onInputDown</code> signal itself. This allows you to listen for a Signal from the Group, rather than every Sprite within it.</li>
<li>Group.onChildInputUp is a new Signal that you can listen to. It will be dispatched whenever any immediate child of the Group emits an <code>onInputUp</code> signal itself. This allows you to listen for a Signal from the Group, rather than every Sprite within it.</li>
<li>Group.onChildInputOver is a new Signal that you can listen to. It will be dispatched whenever any immediate child of the Group emits an <code>onInputOver</code> signal itself. This allows you to listen for a Signal from the Group, rather than every Sprite within it.</li>
<li>Group.onChildInputOut is a new Signal that you can listen to. It will be dispatched whenever any immediate child of the Group emits an <code>onInputOut</code> signal itself. This allows you to listen for a Signal from the Group, rather than every Sprite within it.</li>
</ul>
<h3>Updates</h3><ul>
<li>TypeScript definitions fixes and updates (thanks @wingyplus @monagames @marineorganism @obamor @BaroqueEngine)</li>
<li>Docs typo fixes (thanks @seanirby @johnrees)</li>
<li>The TypeScript defs ambient declaration has been updated to make it compatible with the SystemJS loader (thanks @monagames)</li>
<li>You can no longer intersect check a Body against itself (thanks @VitaZheltyakov #2514)</li>
<li>The mobile template has been updated (thanks @cryptographer #2518)</li>
<li>Video.onComplete wouldn't fire on iOS if the user hit the 'Done' button before the video had finished playing. It now uses the <code>webkitendfullscreen</code> event to detect this, and dispatches the <code>onComplete</code> signal should that event fire (thanks @kelu-smiley #2498)</li>
<li>Sound.addMarker now has a default value for the <code>duration</code> argument (1 second) to avoid the DOM Exception 11 error if you accidentally miss it out (thanks @mari8i #2508)</li>
<li>Removed the <code>Stage.updateTransform</code> calls from the main game loop, because it happens automatically as part of <code>Game.updateLogic</code> anyway, so was duplicating the workload for no reason.</li>
<li>TilemapLayer.postUpdate could potentially be called several times per frame (depending on device frame rate), which would cause multiple texture redraws, even though only the last texture is used during rendering. This has now been modified so that the local TilemapLayer canvas is only re-rendered once per frame, during the rendering phase, and not during the logic update phase.</li>
<li>Group.preUpdate now iterate through the display list forwards, instead of in reverse, to match it with how <code>Stage.preUpdate</code> works.</li>
<li>Stage.postUpdate is now a lot smaller, with no conditional branching if there is a Camera Target or not.</li>
<li>Within RequestAnimationFrame both <code>updateRAF</code> and <code>updateSetTimeout</code> now only call <code>game.update</code> if <code>isRunning</code> is true. This should avoid asynchronous Game destroy errors under environments like Angular (thanks @flogvit #2521)</li>
<li>Group.removeAll has a new argument <code>destroyTexture</code> which allows you to optionally destroy the BaseTexture of each child, as it is removed from the Group (thanks @stoneman1 #2487)</li>
<li>PluginManager.remove has a new argument <code>destroy</code> (defaults to <code>true</code>) which will let you optionally called the <code>destroy</code> method of the Plugin being removed.</li>
<li>Cache.getJSON used to incorrectly bring back a deep-copy of the Phaser.Utils object, instead of just a clone of the JSON object requested (thanks @drhayes #2524 #2526)</li>
<li>The <code>DisplayObject.renderOrderID</code> used to run in reverse. I.e. in a display list with 10 sprites on it, the first sprite (at the bottom of the list, rendering behind all the others) would have a <code>renderOrderID</code> of 9, where-as the top-most sprite, rendering above all others, would have a <code>renderOrderID</code> of 0. While this didn't cause any side-effects internally, it's arguably illogical. So the process has been reversed, and <code>renderOrderID</code>s are now accumulative, starting at zero each frame, and increasing as it iterates down the display list. So the higher the ID, the more &quot;on-top&quot; of the output the object is.</li>
<li><code>InputHandler.validForInput</code> and <code>Pointer.processInteractiveObjects</code> have been updated to reflect the new <code>renderOrderID</code> sequence (see above).</li>
<li>Group.add has a new optional argument <code>index</code> which controls the index within the group to insert the child to. Where 0 is the bottom of the Group.</li>
<li>Group.addAt has been refactored to be a simple call to <code>Group.add</code>, removing lots of duplicate code in the process.</li>
<li>Group.create has a new optional argument <code>index</code> which controls the index within the group to insert the child to. Where 0 is the bottom of the Group. It also now makes proper use of <code>Group.add</code>, cutting down on more duplicate code.</li>
<li>Group.createMultiple now returns an Array containing references to all of the children that the method created.</li>
<li>Keyboard now uses a new internal method <code>getKeyCode</code> to normalize the key code value based on browser support. It first checks for <code>event.key</code>, then <code>event.keyIdentifier</code> and finally <code>event.keyCode</code> (thanks @SVasilev #2542)</li>
</ul>
<h3>Bug Fixes</h3><ul>
<li>Arcade Physics Body incorrectly positioned if the Sprite had a negative scale (see http://www.html5gamedevs.com/topic/22695-247-248-body-anchoring-any-migration-tips/) (thanks @SBCGames @icameron @Nuuf @EvolViper #2488 #2490)</li>
<li>InputHandler.checkPointerDown had an incorrect single pipe character |, instead of an OR check ||, and an <code>isDown</code> check, causing Button Over events to fail (thanks @pengchuan #2486)</li>
<li>BitmapText objects with lines greater than <code>maxWidth</code> now handle alignment values correctly, causing them to properly center align (thanks @kevinleedrum #2499 @crippledcactus #2496)</li>
<li>Text has a new private method <code>measureLine</code> which is used to calculate the final Text line length, after factoring in color stops and other style changes. This should prevent characters from becoming truncated (thanks @TadejZupancic #2519 #2512)</li>
<li>Sometimes the browser would cause a race condition where any connected Game Pads were being detected before the callback had a chance to be established. Also sometimes the rawPad references would become stale, and are now checked constantly (thanks @cwleonard #2471)</li>
<li>Sound.isPlaying was set to false when doing an audio loop, but never set back to true if it's a sound not using a marker (thanks @TheJasonReynolds #2529)</li>
<li>Phaser.Rectangle.aabb would fail if the Rectangles used negative offsets. It now calculates the bounds accurately (thanks @fillmoreb #2545)</li>
</ul>
<h3>Pixi Updates</h3><p>Please note that Phaser uses a custom build of Pixi and always has done. The following changes have been made to our custom build, not to Pixi in general.</p>
<p><em>
</em>
*</p>
<p>For changes in previous releases please see the extensive <a href="https://github.com/photonstorm/phaser/blob/master/CHANGELOG.md">Version History</a>.</p>
<p><a name="contributing"></a></p>
<h2>Contributing</h2><p>Please read the <a href="https://github.com/photonstorm/phaser/blob/master/.github/CONTRIBUTING.md">Contributors Guide</a> for full details on helping with Phaser, but the main points are:</p>
<ul>
<li><p>Found a bug? Report it on <a href="https://github.com/photonstorm/phaser/issues">GitHub Issues</a> and include a code sample.</p>
</li>
<li><p>Pull Requests should only be made against the <code>dev</code> branch. <em>Never</em> against <code>master</code>.</p>
</li>
<li><p>Before submitting a Pull Request run your code through <a href="http://www.jshint.com/">JSHint</a> using our <a href="https://github.com/photonstorm/phaser/blob/master/.jshintrc">config</a>.</p>
</li>
<li><p>Before contributing please read the <a href="https://github.com/photonstorm/phaser/blob/master/CODE_OF_CONDUCT.md">code of conduct</a>.</p>
</li>
</ul>
<p>Written something cool that shows Phaser in use? Please tell us about it in our <a href="http://www.html5gamedevs.com/forum/14-phaser/">forum</a> or email: support@phaser.io</p>
<p><a href="https://travis-ci.org/photonstorm/phaser"><img src="https://travis-ci.org/photonstorm/phaser.png?branch=dev" alt="Build Status"></a></p>
<p><img src="http://www.phaser.io/images/github/photonstorm-x2.png" alt="storm"></p>
<p>Phaser is a <a href="http://www.photonstorm.com">Photon Storm</a> production.</p>
<p>Created by <a href="mailto:rich@photonstorm.com">Richard Davey</a>. Powered by coffee, anime, pixels and love.</p>
<p>The Phaser logo and characters are &copy; 2016 Photon Storm Limited.</p>
<p>All rights reserved.</p>
<p>&quot;Above all, video games are meant to be just one thing: fun. Fun for everyone.&quot; - Satoru Iwata</p>
<p><a href="https://github.com/igrigorik/ga-beacon"><img src="https://ga-beacon.appspot.com/UA-44006568-2/phaser/index" alt="Analytics"></a></p></article>
</section>
</article></div><div class="clearfix"></div><footer>
<span class="copyright">
Phaser Copyright © 2012-2016 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.2</a>
on Thu Jun 09 2016 17:12:12 GMT+0100 (GMT Daylight Time) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
<div class="span3">
<div id="toc"></div>
</div>
<br clear="both">
</div>
</div>
<script src="scripts/sunlight.js"></script>
<script src="scripts/sunlight.javascript.js"></script>
<script src="scripts/sunlight-plugin.doclinks.js"></script>
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
<script src="scripts/sunlight-plugin.menu.js"></script>
<script src="scripts/jquery.min.js"></script>
<script src="scripts/jquery.scrollTo.js"></script>
<script src="scripts/jquery.localScroll.js"></script>
<script src="scripts/bootstrap-dropdown.js"></script>
<script src="scripts/toc.js"></script>
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
<script>
$( function () {
$( "#toc" ).toc( {
anchorName : function(i, heading, prefix) {
return $(heading).attr("id") || ( prefix + i );
},
selectors : "h1,h2,h3,h4",
showAndHide : false,
scrollTo : 60
} );
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
} );
</script>
</body>
</html>