phaser/docs/index.html

1487 lines
75 KiB
HTML
Raw Normal View History

2013-10-01 15:15:45 +00:00
<!DOCTYPE html>
2013-10-02 11:11:22 +00:00
2013-10-01 15:15:45 +00:00
<html lang="en">
<head>
2013-10-02 11:11:22 +00:00
<meta charset="utf-8">
<title>Phaser Index</title>
2013-10-01 15:15:45 +00:00
2013-10-02 11:11:22 +00:00
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
2014-11-15 20:01:46 +00:00
<link type="text/css" rel="stylesheet" href="styles/default.css">
2013-10-02 11:11:22 +00:00
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
2013-10-01 15:15:45 +00:00
2013-10-02 11:11:22 +00:00
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
</head>
2013-10-01 15:15:45 +00:00
2013-10-02 11:11:22 +00:00
<body>
2014-11-25 00:23:44 +00:00
2013-10-02 11:11:22 +00:00
<div class="container-fluid">
<div class="navbar navbar-fixed-top navbar-inverse">
2014-11-25 00:23:44 +00:00
<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>
2013-10-02 11:11:22 +00:00
<div class="navbar-inner">
2014-11-25 00:23:44 +00:00
<a class="brand" href="index.html">Phaser API</a>
2013-10-02 11:11:22 +00:00
<ul class="nav">
2014-11-25 00:23:44 +00:00
2013-10-02 11:11:22 +00:00
<li class="dropdown">
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
2013-10-02 11:11:22 +00:00
class="caret"></b></a>
<ul class="dropdown-menu ">
2014-04-10 22:13:43 +00:00
<li class="class-depth-0">
<a href="Phaser.html">Phaser</a>
2013-10-02 11:11:22 +00:00
</li>
2014-11-15 20:01:46 +00:00
<li class="class-depth-0">
<a href="PIXI.html">PIXI</a>
</li>
2013-10-02 11:11:22 +00:00
</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 ">
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 11:11:22 +00:00
<a href="Phaser.Animation.html">Animation</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.AnimationManager.html">AnimationManager</a>
2013-10-02 11:11:22 +00:00
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.AnimationParser.html">AnimationParser</a>
2013-10-02 11:11:22 +00:00
</li>
2014-04-29 14:39:02 +00:00
<li class="class-depth-1">
<a href="Phaser.ArrayList.html">ArrayList</a>
</li>
2014-11-25 00:23:44 +00:00
<li class="class-depth-1">
<a href="Phaser.ArraySet.html">ArraySet</a>
</li>
2014-11-15 20:01:46 +00:00
<li class="class-depth-1">
<a href="Phaser.ArrayUtils.html">ArrayUtils</a>
</li>
2014-10-09 15:12:53 +00:00
<li class="class-depth-1">
<a href="Phaser.AudioSprite.html">AudioSprite</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.BitmapData.html">BitmapData</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.BitmapText.html">BitmapText</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Button.html">Button</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Cache.html">Cache</a>
2013-10-02 11:11:22 +00:00
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Camera.html">Camera</a>
2013-10-02 11:11:22 +00:00
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Canvas.html">Canvas</a>
2013-10-02 14:05:55 +00:00
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Circle.html">Circle</a>
2013-10-02 11:11:22 +00:00
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Color.html">Color</a>
2013-10-03 00:21:08 +00:00
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Device.html">Device</a>
2013-10-02 11:11:22 +00:00
</li>
2014-11-15 20:01:46 +00:00
<li class="class-depth-1">
<a href="Phaser.DOM.html">DOM</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Easing.html">Easing</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
<a href="Phaser.Easing.Back.html">Back</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
<a href="Phaser.Easing.Bounce.html">Bounce</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
<a href="Phaser.Easing.Circular.html">Circular</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
<a href="Phaser.Easing.Cubic.html">Cubic</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
<a href="Phaser.Easing.Elastic.html">Elastic</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
<a href="Phaser.Easing.Exponential.html">Exponential</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
<a href="Phaser.Easing.Linear.html">Linear</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
<a href="Phaser.Easing.Quartic.html">Quartic</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
<a href="Phaser.Easing.Quintic.html">Quintic</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Ellipse.html">Ellipse</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Events.html">Events</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Filter.html">Filter</a>
</li>
2014-09-09 14:36:56 +00:00
<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>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Frame.html">Frame</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.FrameData.html">FrameData</a>
2013-10-03 00:21:08 +00:00
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 11:11:22 +00:00
<a href="Phaser.Game.html">Game</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2014-02-05 06:29:17 +00:00
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2014-02-05 06:29:17 +00:00
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Graphics.html">Graphics</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 11:11:22 +00:00
<a href="Phaser.Group.html">Group</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Image.html">Image</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 12:18:58 +00:00
<a href="Phaser.Input.html">Input</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.InputHandler.html">InputHandler</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.Key.html">Key</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2014-02-05 06:29:17 +00:00
<a href="Phaser.Line.html">Line</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 11:11:22 +00:00
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.Loader.html">Loader</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.LoaderParser.html">LoaderParser</a>
2013-10-02 14:05:55 +00:00
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.Math.html">Math</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.Mouse.html">Mouse</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.MSPointer.html">MSPointer</a>
2013-10-02 11:11:22 +00:00
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 19:18:24 +00:00
<a href="Phaser.Net.html">Net</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Particle.html">Particle</a>
</li>
<li class="class-depth-1">
2013-10-02 19:18:24 +00:00
<a href="Phaser.Particles.html">Particles</a>
</li>
2014-10-09 15:12:53 +00:00
<li class="class-depth-2">
<a href="Phaser.Particles.Arcade.html">Arcade</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
2013-10-02 19:18:24 +00:00
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Physics.html">Physics</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Physics.Arcade.html">Arcade</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
<a href="Phaser.Physics.Ninja.html">Ninja</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
<a href="Phaser.Physics.P2.html">P2</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.Body.html">Body</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
</li>
2014-04-10 22:13:43 +00:00
<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>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.Material.html">Material</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
</li>
2014-09-09 14:36:56 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.RotationalSpring.html">RotationalSpring</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 11:11:22 +00:00
<a href="Phaser.Plugin.html">Plugin</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.PluginManager.html">PluginManager</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 11:11:22 +00:00
<a href="Phaser.Point.html">Point</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.Pointer.html">Pointer</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Polygon.html">Polygon</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.QuadTree.html">QuadTree</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 11:11:22 +00:00
<a href="Phaser.Rectangle.html">Rectangle</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.RenderTexture.html">RenderTexture</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-03 00:21:08 +00:00
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.RetroFont.html">RetroFont</a>
</li>
2014-09-09 14:36:56 +00:00
<li class="class-depth-1">
<a href="Phaser.Rope.html">Rope</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.ScaleManager.html">ScaleManager</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 11:11:22 +00:00
<a href="Phaser.Signal.html">Signal</a>
</li>
<li class="class-depth-1">
<a href="Phaser.SignalBinding.html">SignalBinding</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2014-02-05 06:29:17 +00:00
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-03 00:21:08 +00:00
<a href="Phaser.Sound.html">Sound</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-03 00:21:08 +00:00
<a href="Phaser.SoundManager.html">SoundManager</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Sprite.html">Sprite</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 11:11:22 +00:00
<a href="Phaser.Stage.html">Stage</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 11:11:22 +00:00
<a href="Phaser.State.html">State</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 11:11:22 +00:00
<a href="Phaser.StateManager.html">StateManager</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Text.html">Text</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Tile.html">Tile</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Tilemap.html">Tilemap</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.TilemapParser.html">TilemapParser</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Tileset.html">Tileset</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.TileSprite.html">TileSprite</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Time.html">Time</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Timer.html">Timer</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2014-02-05 06:29:17 +00:00
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.Touch.html">Touch</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Tween.html">Tween</a>
</li>
2014-11-25 00:23:44 +00:00
<li class="class-depth-1">
<a href="Phaser.TweenData.html">TweenData</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.TweenManager.html">TweenManager</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Utils.html">Utils</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
<a href="Phaser.Utils.Debug.html">Debug</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 11:11:22 +00:00
<a href="Phaser.World.html">World</a>
</li>
2014-11-15 20:01:46 +00:00
<li class="class-depth-1">
<a href="PIXI.AbstractFilter.html">AbstractFilter</a>
</li>
<li class="class-depth-1">
<a href="PIXI.AjaxRequest.html">AjaxRequest</a>
</li>
<li class="class-depth-1">
<a href="PIXI.AlphaMaskFilter.html">AlphaMaskFilter</a>
</li>
<li class="class-depth-1">
<a href="PIXI.AsciiFilter.html">AsciiFilter</a>
</li>
<li class="class-depth-1">
<a href="PIXI.AssetLoader.html">AssetLoader</a>
</li>
<li class="class-depth-1">
<a href="PIXI.AtlasLoader.html">AtlasLoader</a>
</li>
<li class="class-depth-1">
<a href="PIXI.BaseTexture.html">BaseTexture</a>
</li>
<li class="class-depth-1">
<a href="PIXI.BitmapFontLoader.html">BitmapFontLoader</a>
</li>
<li class="class-depth-1">
<a href="PIXI.BitmapText.html">BitmapText</a>
</li>
<li class="class-depth-1">
<a href="PIXI.BlurFilter.html">BlurFilter</a>
</li>
<li class="class-depth-1">
<a href="PIXI.BlurXFilter.html">BlurXFilter</a>
</li>
<li class="class-depth-1">
<a href="PIXI.BlurYFilter.html">BlurYFilter</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.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.Circle.html">Circle</a>
</li>
<li class="class-depth-1">
<a href="PIXI.ColorMatrixFilter.html">ColorMatrixFilter</a>
</li>
<li class="class-depth-1">
<a href="PIXI.ColorStepFilter.html">ColorStepFilter</a>
</li>
<li class="class-depth-1">
<a href="PIXI.ComplexPrimitiveShader.html">ComplexPrimitiveShader</a>
</li>
<li class="class-depth-1">
<a href="PIXI.ConvolutionFilter.html">ConvolutionFilter</a>
</li>
<li class="class-depth-1">
<a href="PIXI.CrossHatchFilter.html">CrossHatchFilter</a>
</li>
<li class="class-depth-1">
<a href="PIXI.DisplacementFilter.html">DisplacementFilter</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.DotScreenFilter.html">DotScreenFilter</a>
</li>
<li class="class-depth-1">
<a href="PIXI.Ellipse.html">Ellipse</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.FilterBlock.html">FilterBlock</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.GrayFilter.html">GrayFilter</a>
</li>
<li class="class-depth-1">
<a href="PIXI.ImageLoader.html">ImageLoader</a>
</li>
<li class="class-depth-1">
<a href="PIXI.InteractionData.html">InteractionData</a>
</li>
<li class="class-depth-1">
<a href="PIXI.InteractionManager.html">InteractionManager</a>
</li>
<li class="class-depth-1">
<a href="PIXI.InvertFilter.html">InvertFilter</a>
</li>
<li class="class-depth-1">
<a href="PIXI.JsonLoader.html">JsonLoader</a>
</li>
<li class="class-depth-1">
<a href="PIXI.Matrix.html">Matrix</a>
</li>
<li class="class-depth-1">
<a href="PIXI.MovieClip.html">MovieClip</a>
</li>
<li class="class-depth-1">
<a href="PIXI.NoiseFilter.html">NoiseFilter</a>
</li>
<li class="class-depth-1">
<a href="PIXI.NormalMapFilter.html">NormalMapFilter</a>
</li>
<li class="class-depth-1">
<a href="PIXI.PixelateFilter.html">PixelateFilter</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.Point.html">Point</a>
</li>
<li class="class-depth-1">
<a href="PIXI.Polygon.html">Polygon</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.Rectangle.html">Rectangle</a>
</li>
<li class="class-depth-1">
<a href="PIXI.RenderTexture.html">RenderTexture</a>
</li>
<li class="class-depth-1">
<a href="PIXI.RGBSplitFilter.html">RGBSplitFilter</a>
</li>
<li class="class-depth-1">
<a href="PIXI.Rope.html">Rope</a>
</li>
<li class="class-depth-1">
<a href="PIXI.RoundedRectangle.html">RoundedRectangle</a>
</li>
<li class="class-depth-1">
<a href="PIXI.SepiaFilter.html">SepiaFilter</a>
</li>
<li class="class-depth-1">
<a href="PIXI.SmartBlurFilter.html">SmartBlurFilter</a>
</li>
<li class="class-depth-1">
<a href="PIXI.Spine.html">Spine</a>
</li>
<li class="class-depth-1">
<a href="PIXI.SpineLoader.html">SpineLoader</a>
</li>
2014-11-25 00:23:44 +00:00
<li class="class-depth-1">
<a href="PIXI.SpineTextureLoader.html">SpineTextureLoader</a>
</li>
2014-11-15 20:01:46 +00:00
<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.SpriteSheetLoader.html">SpriteSheetLoader</a>
</li>
<li class="class-depth-1">
<a href="PIXI.Stage.html">Stage</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.Text.html">Text</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.TiltShiftFilter.html">TiltShiftFilter</a>
</li>
<li class="class-depth-1">
<a href="PIXI.TiltShiftXFilter.html">TiltShiftXFilter</a>
</li>
<li class="class-depth-1">
<a href="PIXI.TiltShiftYFilter.html">TiltShiftYFilter</a>
</li>
<li class="class-depth-1">
<a href="PIXI.TwistFilter.html">TwistFilter</a>
</li>
<li class="class-depth-1">
<a href="PIXI.VideoTexture.html">VideoTexture</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>
2013-10-02 11:11:22 +00:00
</ul>
</li>
2014-11-25 00:23:44 +00:00
2014-11-15 20:01:46 +00:00
<li class="dropdown">
2014-11-25 00:23:44 +00:00
<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.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.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.InputManager.html">Input Manager</a></li>
<li class="class-depth-1"><a href="Phaser.ScaleManager.html">Scale Manager</a></li>
</ul>
</li>
2014-11-15 20:01:46 +00:00
2014-11-25 00:23:44 +00:00
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Game Objects<b class="caret"></b></a>
2014-11-15 20:01:46 +00:00
<ul class="dropdown-menu ">
2014-11-25 00:23:44 +00:00
<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.Emitter.html">Emitter</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>
2014-11-15 20:01:46 +00:00
2014-11-25 00:23:44 +00:00
<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.Rectangle.html">Rectangle</a></li>
<li class="class-depth-1"><a href="Phaser.Point.html">Point</a></li>
<li class="class-depth-1"><a href="Phaser.Line.html">Line</a></li>
<li class="class-depth-1"><a href="Phaser.Ellipse.html">Ellipse</a></li>
<li class="class-depth-1"><a href="Phaser.Polygon.html">Polygon</a></li>
2014-11-15 20:01:46 +00:00
</ul>
</li>
2014-11-25 00:23:44 +00:00
<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.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="https://github.com/photonstorm/phaser">Phaser Github</a></li>
<li class="class-depth-1"><a href="http://examples.phaser.io">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="https://confirmsubscription.com/h/r/369DE48E3E86AF1E">Newsletter</a></li>
<li class="class-depth-1"><a href="https://twitter.com/photonstorm">Twitter</a></li>
<li class="class-depth-1"><a href="http://www.html5gamedevs.com/topic/4470-official-phaserio-irc-channel-phaserio-on-freenode/">IRC</a></li>
<li class="class-depth-1"><a href="https://www.gittip.com/photonstorm/">GitTip</a></li>
</ul>
</li>
2014-11-15 20:01:46 +00:00
</ul>
</div>
</div>
<div class="row-fluid">
2013-10-02 11:11:22 +00:00
<div class="span8">
<div id="main">
2014-11-25 00:23:44 +00:00
<!-- <span class="page-title">Index</span> -->
2013-10-02 11:11:22 +00:00
2014-02-05 06:29:17 +00:00
<section>
2014-11-25 00:23:44 +00:00
<article>
2014-11-15 20:01:46 +00:00
<h1>Phaser 2.2.0</h1>
2014-02-05 06:29:17 +00:00
<p>Phaser is a fast, free and fun open source game framework for making desktop and mobile browser HTML5 games. It uses <a href="https://github.com/GoodBoyDigital/pixi.js/">Pixi.js</a> internally for fast 2D Canvas and WebGL rendering.</p>
2014-11-15 20:01:46 +00:00
<p>Version: 2.2.0 &quot;Bethal&quot; - Released: -in development-</p>
2014-02-05 06:29:17 +00:00
<p>By Richard Davey, <a href="http://www.photonstorm.com">Photon Storm</a></p>
<ul>
<li>View the <a href="http://phaser.io">Official Website</a></li>
<li>Follow on <a href="https://twitter.com/photonstorm">Twitter</a></li>
<li>Join the <a href="http://www.html5gamedevs.com/forum/14-phaser/">Forum</a></li>
2014-07-10 19:31:11 +00:00
<li>StackOverflow tag: <a href="http://stackoverflow.com/questions/tagged/phaser-framework">phaser-framework</a></li>
<li>Source code for 320+ <a href="https://github.com/photonstorm/phaser-examples">Phaser Examples</a> or <a href="http://examples.phaser.io">browse them online</a></li>
2014-05-20 09:12:48 +00:00
<li>View the growing list of <a href="https://github.com/photonstorm/phaser-plugins">Phaser Plugins</a></li>
2014-02-05 06:29:17 +00:00
<li>Read the <a href="http://docs.phaser.io">documentation online</a></li>
<li>Join our <a href="http://www.html5gamedevs.com/topic/4470-official-phaserio-irc-channel-phaserio-on-freenode/">#phaserio IRC channel</a> on freenode</li>
2014-04-29 14:39:02 +00:00
<li>Subscribe to the <a href="https://confirmsubscription.com/h/r/369DE48E3E86AF1E">Phaser Newsletter</a> and we'll email you when new versions are released.</li>
2014-07-10 19:31:11 +00:00
<li>Please help support our work via <a href="https://www.gittip.com/photonstorm/">Gittip</a></li>
2014-02-05 06:29:17 +00:00
</ul>
2014-04-29 14:39:02 +00:00
<p><img src="http://phaser.io/images/div4.png" alt="div"></p>
2014-11-25 00:23:44 +00:00
2014-11-15 20:01:46 +00:00
<h2>Welcome to Phaser and What's new in 2.2.0?</h2>
2014-10-22 20:49:44 +00:00
<p><img src="http://www.phaser.io/images/pixi-v2.png" alt="Pixi 2.0"></p>
2014-09-09 14:36:56 +00:00
<p>Until then happy coding everyone! And we hope to see you on the forums.</p>
<p><img src="http://www.phaser.io/images/spacedancer.gif" alt="boogie"></p>
2014-04-29 14:39:02 +00:00
<p><img src="http://phaser.io/images/div1.png" alt="div"></p>
2014-11-25 00:23:44 +00:00
<h2>Getting Started Guides</h2>
2014-04-29 14:39:02 +00:00
<p>We have a <a href="http://phaser.io/getting-started-js.php">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. If you're new to HTML5 game development, or are coming from another language like AS3, then we recommend starting there.</p>
2014-04-15 14:39:23 +00:00
<p>We wrote a comprehensive <a href="http://gamedevelopment.tutsplus.com/articles/how-to-learn-the-phaser-html5-game-engine--gamedev-13643">How to Learn Phaser</a> guide for GameDevTuts+ which covers finding tutorials, examples and support.</p>
2014-04-29 14:39:02 +00:00
<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>
<p>Finally the list of <a href="http://www.lessmilk.com/phaser-tutorial/">community authored Phaser Tutorials</a> is growing fast!</p>
<p><img src="http://www.photonstorm.com/wp-content/uploads/2013/09/phaser_10_release.jpg" alt="Phaser Logo"></p>
2014-04-29 14:39:02 +00:00
<p><img src="http://phaser.io/images/div2.png" alt="div"></p>
2014-11-25 00:23:44 +00:00
<h2>Change Log</h2>
2014-11-15 20:01:46 +00:00
<p>Version 2.2.0 - &quot;Bethal&quot; - in development</p>
2014-09-09 14:36:56 +00:00
<h3>New Features</h3>
2014-02-05 06:29:17 +00:00
<ul>
2014-11-15 20:01:46 +00:00
<li>Updated to Pixi v2.1.0 - see seprate change log entry below.</li>
<li>Cache.getRenderTexture will retrieve a RenderTexture that is stored in the Phaser Cache. This method replaces Cache.getTexture which is now deprecated.</li>
<li>Cache.autoResolveURL is a new boolean (default <code>false</code>) that automatically builds a cached map of all loaded assets vs. their absolute URLs, for use with Cache.getURL and Cache.checkURL. Note that in 2.1.3 and earlier this was enabled by default, but has since been moved behind this property which needs to be set to <code>true</code> <em>before</em> you load any assets to enable.</li>
<li>You can now call Tween.to again on a Tween that has already completed. This will re-use the same tween, on the original object, without having to recreate the Tween again. This allows a single tween instance to be re-used multiple times, providing they are linked to the same object (thanks InsaneHero)</li>
<li>Phaser.Color.valueToColor converts a value: a &quot;hex&quot; string, a &quot;CSS 'web' string&quot;, or a number - into red, green, blue, and alpha components (thanks @pnstickne #1264)</li>
<li>Stage.backgroundColor now supports CSS 'rgba' values, as well as hex strings and hex numbers (thanks @pnstickne #1234)</li>
<li>Pointer.addClickTrampoline now adds in support for click trampolines. These raise pointer events into click events, which are required internally for a few edge cases like IE11 full screen mode support, but are also useful if you know you specifically need a DOM click event from a pointer (thanks @pnstickne #1282)</li>
<li>Point.floor will Math.floor both the <code>x</code> and <code>y</code> values of the Point.</li>
<li>Point.ceil will Math.ceil both the <code>x</code> and <code>y</code> values of the Point.</li>
<li>ScaleManager.scaleSprite takes a Sprite or Image object and scales it to fit the given dimensions. Scaling happens proportionally without distortion to the sprites texture. The letterBox parameter controls if scaling will produce a letter-box effect or zoom the sprite until it fills the given values.</li>
<li>Phaser.DOM.getBounds is a cross-browser element.getBoundingClientRect method with optional cushion.</li>
<li>Phaser.DOM.calibrate is a private method that calibrates element coordinates for viewport checks.</li>
<li>Phaser.DOM.aspect gets the viewport aspect ratio (or the aspect ratio of an object or element)</li>
<li>Phaser.DOM.inViewport tests if the given DOM element is within the viewport, with an optional cushion parameter that allows you to specify a distance.</li>
<li>Phaser.DOM.viewportWidth returns the viewport width in pixels.</li>
<li>Phaser.DOM.viewportHeight returns the viewport height in pixels.</li>
<li>Phaser.DOM.documentWidth returns the document width in pixels.</li>
<li>Phaser.DOM.documentHeight returns the document height in pixels.</li>
<li>TilemapLayers have been given a decent performance boost on canvas with map shifting edge-redraw (thanks @pnstickne #1250)</li>
<li>A large refactor to how the internal game timers and physics calculations has been made. We've now swapped to using a fixed time step internally across Phaser, instead of the variable one we had before that caused glitchse on low-fps systems. Thanks to pjbaron for his help with all of these related changes.</li>
<li>We have separated the logic and render updates to permit slow motion and time slicing effects. We've fixed time calling to fix physics problems caused by variable time updates (i.e. collisions sometimes missing, objects tunneling, etc)</li>
<li>Once per frame calling for rendering and tweening to keep things as smooth as possible</li>
<li>Calculates a <code>suggestedFps</code> value (in multiples of 5 fps) based on a 2 second average of actual elapsed time values in the <code>Time.update</code> method. This is recalculated every 2 seconds so it could be used on a level-by-level basis if a game varies dramatically. I.e. if the fps rate consistently drops, you can adjust your game effects accordingly.</li>
<li>Game loop now tries to &quot;catch up&quot; frames if it is falling behind by iterating the logic update. This will help if the logic is occasionally causing things to run too slow, or if the renderer occasionally pushes the combined frame time over the FPS time. It's not a band-aid for a game that floods a low powered device however, so you still need to code accordingly. But it should help capture issues such as gc spikes or temporarily overloaded CPUs.</li>
<li>It now detects 'spiralling' which happens if a lot of frames are pushed out in succession meaning the CPU can never &quot;catch up&quot;. It skips frames instead of trying to catch them up in this case. Note: the time value passed to the logic update functions is always constant regardless of these shenanigans.</li>
<li>Signals to the game program if there is a problem which might be fixed by lowering the desiredFps</li>
<li>Time.desiredFps is the new desired frame rate for your game.</li>
<li>Time.suggestedFps is the suggested frame rate for the game based on system load.</li>
<li>Time.slowMotion allows you to push the game into a slow motion mode. The default value is 1.0. 2.0 would be half speed, and so on.</li>
<li>Time.timeCap is no longer used and now deprecated. All timing is now handled by the fixed time-step code we've introduced.</li>
<li>Time.now can no longer be relied upon to contain a timestamp value. If the browser supports requestAnimationFrame then <code>Time.now</code> will contain the high resolution timer value that rAf generates. Otherwise it will contain the value of Date.now. If you require the actual time value (in milliseconds) then please use <code>Time.time</code> instead. Note that all Phaser sub-systems that used to rely on <code>Time.now</code> have been updated, so if you have any code that extends these please be sure to check it.</li>
<li>Game.forceSingleUpdate will force just a single logic update, regardless of the delta timer values. You can use this in extremely heavy CPU situations where you know you're about to flood the CPU but don't want Phaser to get stuck in a spiral.</li>
<li>Tilemap.createFromTiles will convert all tiles matching the given tile index (or an array of indexes) into Sprites. You can optionally then replace these tiles if you wish. This is perfect for games when you want to turn specific tiles into Sprites for extra control. The Sprites have an optional properties object which they can be populated with.</li>
<li>Added support for the Wheel Event, which is the DOM3 spec (thanks @pnstickne #1318)</li>
<li>Wheel Scroll Event (old non-FF) and DOM Mouse Wheel (old FF) are
supported via a non-exported reused wrapper object; WheelEventProxy.
The proxy methods are generated one-time dynamically but only when needed.</li>
<li>Key.justDown allows you to test if a Key has just been pressed down or not. You can only call justDown once per key press. It will only return <code>true</code> once, until the Key is released and pressed down again. This allows you to use it in situations where you want to check if this key is down without using a Signal, such as in a core game loop (thanks @pjbaron #1321)</li>
<li>Key.justUp allows you to test if a Key has just been released or not. You can only call justUp once per key press. It will only return <code>true</code> once, until the Key is pressed down and released again. This allows you to use it in situations where you want to check if this key is up without using a Signal, such as in a core game loop (thanks @pjbaron #1321)</li>
<li>Device.whenReady is a new signal that you can use to tell when the device is initialised.</li>
<li>Device.onInitialized is dispatched after device initialization occurs but before any of the ready callbacks have been invoked. Local &quot;patching&quot; for a particular device can/should be done in this event.</li>
2014-11-25 00:23:44 +00:00
<li>TweenManager.removeFrom method allows you to remove a tween from a game object such as a Sprite (thanks @lewster32 #1279)</li>
<li>Tweens have been completely rewritten. They're now much more flexible and efficient than before:</li>
<li>When specifying the ease in <code>Tween.to</code> or <code>Tween.from</code> you can now use a string instead of the Function. This makes your code less verbose. For example instead of <code>Phaser.Easing.Sinusoidal.Out</code> and you can now just use the string &quot;Sine&quot;.The string names match those used by TweenMax and includes: &quot;Linear&quot;, &quot;Quad&quot;, &quot;Cubic&quot;, &quot;Quart&quot;, &quot;Quint&quot;, &quot;Sine&quot;, &quot;Expo&quot;, &quot;Circ&quot;, &quot;Elastic&quot;, &quot;Back&quot;, &quot;Bounce&quot;, &quot;Power0&quot;, &quot;Power1&quot;, &quot;Power2&quot;, &quot;Power3&quot; and &quot;Power4&quot;. You can append &quot;.easeIn&quot;, &quot;.easeOut&quot; and &quot;easeInOut&quot; variants. All are supported for each ease types.</li>
<li>Tweens now create a TweenData object. The Tween object itself acts like more of a timeline, managing multiple TweenData objects. You can now call <code>Tween.to</code> and each call will create a new child tween that is added to the timeline, which are played through in sequence.</li>
<li>Tweens are now bound to the new Time.desiredFps value and update based on the new Game core loop, rather than being bound to time calculations. This means that tweens are now running with the same update logic as physics and the core loop.</li>
<li>Tween.timeScale allows you to scale the duration of a tween (and any child tweens it may have). A value of 1.0 means it should play at the desiredFps rate. A value of 0.5 will run at half the frame rate, 2 at double and so on. You can even tween the timeScale value for interesting effects!</li>
<li>Tween.reverse allows you to instantly reverse an active tween. If the Tween has children then it will smoothly reverse through all child tweens as well.</li>
<li>Tween.repeatAll allows you to control how many times all child tweens will repeat before firing the Tween.onComplete event. You can set the value to -1 to repeat forever.</li>
<li>Tween.loop now controls the looping of all child tweens.</li>
<li>Tween.onRepeat is a new signal that is dispatched whenever a Tween repeats. If a Tween has many child tweens its dispatched once the sequence has repeated.</li>
<li>Tween.onChildComplete is a new signal that is dispatched whenever any child tweens have completed. If a Tween consists of 4 sections you will get 3 onChildComplete events followed by 1 onComplete event as the final tween finishes.</li>
<li>Chained tweens are now more intelligently handled. Because you can easily create child tweens (by simply calling Tween.to multiple times) chained tweens are now used to kick-off longer sequences. You can pass as many Tween objects to <code>Tween.chain</code> as you like as they'll all be played in sequence. As one Tween completes it passes on to the next until the entire chain is finished.</li>
<li>Tween.stop has a new <code>complete</code> parameter that if set will still fire the onComplete event and start the next chained tween, if there is one.</li>
<li>Tween.delay, Tween.repeat, Tween.yoyo, Tween.easing and Tween.interpolation all have a new <code>index</code> parameter. This allows you to target specific child tweens, or if set to -1 it will update all children at once.</li>
<li>Tween.totalDuration reports the total duration of all child tweens in ms.</li>
<li>There are new easing aliases:</li>
<li><ul>
<li>Phaser.Easing.Power0 = Phaser.Easing.Linear.None</li>
</ul>
</li>
<li><ul>
<li>Phaser.Easing.Power1 = Phaser.Easing.Quadratic.Out</li>
</ul>
</li>
<li><ul>
<li>Phaser.Easing.Power2 = Phaser.Easing.Cubic.Out</li>
</ul>
</li>
<li><ul>
<li>Phaser.Easing.Power3 = Phaser.Easing.Quartic.Out</li>
</ul>
</li>
<li><ul>
<li>Phaser.Easing.Power4 = Phaser.Easing.Quintic.Out</li>
</ul>
</li>
<li>ScaleManager.windowContraints now allows specifing 'visual' or 'layout' as
the constraint. Using the 'layout' constraint should prevent a mobile
device from trying to resize the game when zooming.</li>
2014-02-05 06:29:17 +00:00
</ul>
2014-11-25 00:23:44 +00:00
<p>Including the the new changes the defaults have been changed to</p>
<p>windowContraints = { right: 'layout', bottom: '' }</p>
<p>This changes the current scaling behavior as seen in &quot;Game Scaling&quot; (as it
will only scale for the right edge) but also prevents such scaling from
going wonkers in some mobile environtments like the newer Android browser.
(Automatic scroll-to-top, albeit configurable, enabled for non-desktop by
default is not a fun situation here.)</p>
<p>To obtain the current semantics on a desktop the bottom should be changed
to 'layout'; although this will result in different behavior depending on
mobile device. To make the sizing also follow mobile zooming they should
be changed to 'visual'.</p>
<p>Also added temp Rectangle re-used for various internal calculations.</p>
<p>Phaser.DOM now also special-cases desktops to align the layout bounds
correctly (this may disagree with CSS breakpoints but it aligns the with
actual CSS width), without applying a window height/width expansion as
required on mobile browsers.</p>
2014-09-09 14:36:56 +00:00
<h3>Updates</h3>
2014-02-05 06:29:17 +00:00
<ul>
2014-11-25 00:23:44 +00:00
<li>TypeScript definitions fixes and updates (thanks @clark-stevenson @draconisNoctis)</li>
2014-11-15 20:01:46 +00:00
<li>The TypeScript definitions have moved to the <code>typescript</code> folder in the root of the repository.</li>
<li>Cache._resolveUrl has been renamed to Cache._resolveURL internally and gained a new parameter. This method is a private internal one.</li>
<li>Cache.getUrl is deprecated. The same method is now available as Cache.getURL.</li>
<li>Loader.useXDomainRequest used to be enabled automatically for IE9 but is now always set to <code>false</code>. Please enable it only if you know your server set-up / CDN requires it, as some most certainly do, but we're finding them to be less and less used these days, so we feel it's safe to now disable this by default (#1248)</li>
<li>Game.destroy now destroys either the WebGLRenderer or CanvasRenderer, whichever Pixi was using.</li>
<li>Particle.Emitter will now automatically set <code>particle.body.skipQuadTree</code> to <code>true</code> to help with collision speeds within Arcade Physics.</li>
<li>Particle.Emitter.explode (or <code>Emitter.start</code> with the <code>explode</code> parameter set to <code>true</code>) will immediately emit the required quantity of particles and not delay until the next frame to do so. This means you can re-use a single emitter across multiple places in your game that require explode-style emissions, just by adjusting the <code>emitter.x</code> and <code>emitter.y</code> properties before calling explode (thanks Insanehero)</li>
<li>Phaser.Polygon has been refactored to address some Pixi v2 migration issues (thanks @pnstickne for the original implementation #1267)</li>
<li>Polygon.area is now only calculated when the Polygon points list is modified, rather than on every call.</li>
<li>Phaser.Polygon can now accept the points list in a variety of formats: Arrays of Points, numbers, objects with public x/y properties or any combination of, or as a parameter list (thanks @pnstickne for the original implementation #1267)</li>
<li>All of the Input classes now use the more consistent <code>enabled</code> property instead of <code>disabled</code>. I.e. you can now check <code>if (input.mouse.enabled)</code> rather than <code>if (!input.mouse.disabled)</code>. The disabled property has been moved to a getter for backwards compatibility but is deprecated and will be removed in a future version (thanks @pnstickne #1257)</li>
<li>The Input class has been given a minor refactor to tidy things up. Specifically:<ul>
<li>pointerN are aliases to backed pointers[N-1] array. This simplifies (and increases the efficiency of) looping through all the pointers when applicable; also eliminates pointer-existance checks Removes various hard-coded limits (added MAX_POINTERS); changed maxPointers default</li>
<li>Removed some special-casing from cases where it did not matter</li>
<li>Removed === false/true, == usage for consistency, changed missing value check to typeof, etc.</li>
<li>Updated documentation for specificty; added @public\@protected</li>
<li>@deprecated currentPointers due to odd set pattern; totalCurrentPointers is more appropriate.
(thanks @pnstickne #1283)</li>
</ul>
</li>
<li>Various ScaleManager fixes and updates (thanks @pnstickne):<ul>
<li>Scale modes can now be set independently</li>
<li>Switching between fullscreen and normal correctly restores modes</li>
<li>Alignment does not incorrectly offset in fullscreen mode (#1255)</li>
<li>Changing scale/alignment promptly refreshes layout</li>
<li><code>isFullScreen</code> returns a boolean, as it should</li>
<li>Faster parent checks (if required)</li>
<li>NO_SCALE should not not scale (vs previous behavior of having no behavior)</li>
<li>Correct usage of scaleMode depending on mode</li>
<li>Fullscreen Mode always scaling to fill screen in Firefox (#1256)</li>
</ul>
</li>
<li>AudioSprite - removed an unnecessary if-statement (thanks @DaanHaaz #1312)</li>
<li>ArcadePhysics.skipQuadTree is now set to <code>true</code> by default. A QuadTree is a wonderful thing if the objects in your game are well spaced out. But in tightly packed games, especially those with tilemaps or single-screen games, they are a considerable performance drain and eat up CPU. We've taken the decision to disable the Arcade Physics QuadTree by default. It's all still in there and can be re-enabled via <code>game.physics.arcade.skipQuadTree = false</code>, but please only do so if you're sure your game benefits from this.</li>
<li>Phaser.DOM now houses new DOM functions. Some have been moved over from ScaleManager as appropriate.</li>
<li>Key.justPressed has bee renamed to Key.downDuration which is a much clearer name for what the method actually does. See Key.justDown for a nice clean alternative.</li>
<li>Key.justReleased has bee renamed to Key.upDuration which is a much clearer name for what the method actually does. See Key.justUp for a nice clean alternative.</li>
2014-11-25 00:23:44 +00:00
<li>Keyboard.justPressed has bee renamed to Keyboard.downDuration which is a much clearer name for what the method actually does.</li>
<li>Keyboard.justReleased has bee renamed to Keyboard.upDuration which is a much clearer name for what the method actually does.</li>
<li>Keyboard.downDuration, Keyboard.upDuration and Keyboard.isDown now all return <code>null</code> if the Key wasn't found in the local keys array.</li>
2014-11-15 20:01:46 +00:00
<li>The Phaser.Device class has been made into a singleton and removed it's dependancy on Phaser.Game (thanks @pnstickne #1328)</li>
2014-11-25 00:23:44 +00:00
<li>ArrayList has been renamed to <code>ArraySet</code> (as it's actually a data set implementation) and moved from the <code>core</code> folder to the <code>utils</code> folder (thanks @pnstickne)</li>
<li>If you are reloading a Phaser Game on a page that never properly refreshes (such as in an AngularJS project) then you will quickly run out of AudioContext nodes. If this is the case create a global var called <code>PhaserGlobal</code> on the window object before creating the game. The active AudioContext will then be saved to <code>window.PhaserGlobal.audioContext</code> when the Phaser game is destroyed, and re-used when it starts again (#1233)</li>
<li>Camera.screenView is now deprecated. All Camera culling checks are made against Camera.view now instead.</li>
<li>Various CocoonJS related hacks removed thanks to fixes from Ludei directly in CocoonJS! Woohoo :)</li>
<li>Phaser.HEADLESS check removed from the core game loop. If you need to disable rendering you can now override the Phaser.Game.updateRender method instead with your own.</li>
<li>Group.forEach fixed against browser de-optimization (thanks @pnstickne #1357)</li>
<li>Phaser.Signals have been taken on a diet. They have been updated such that there is significantly less penalty for having many unusued signals. The changes include:</li>
<li><ul>
<li>Changing it so there is no dispatch <em>closure</em> created. This is a
potentially breaking change for third party code.</li>
</ul>
</li>
<li><ul>
<li>In the rare case that code needs to obtain a dispatch-closure, the
<code>boundDispatch</code> property can be used to trivially obtain a cached
closure.</li>
</ul>
</li>
<li><ul>
<li>The properties and default values are moved into the prototype; and the
_bindings array creation is deferred. This change, coupled with the
removal of the automatic closure, results in a very lightweight
~24bytes/object (in Chrome) for unbound signals.</li>
</ul>
</li>
<li>With this change in place Signals now consume less than 50KB / 50KB (shallow / retained memory) for 200 sprites, where-as before they used 300KB / 600KB (thanks @pnstickne #1359)</li>
<li>Time.elapsedMS holds the number of milliseconds since the last Game loop, regardless of raF or setTimout being used.</li>
2014-07-10 19:31:11 +00:00
</ul>
<h3>Bug Fixes</h3>
<ul>
2014-11-15 20:01:46 +00:00
<li>Tilemaps in WebGL wouldn't update after the first frame due to a subtle change in how Pixi uploads new textures to the GPU.</li>
<li>XML files weren't being added to the URL map.</li>
<li>Cache._resolveURL was causing a Sound double-load in Firefox and causing errors (thanks @domonyiv #1253)</li>
<li>Loader.json was using the wrong context in IE9 with XDomainRequest calls (thanks @pnstickne #1258)</li>
<li>Text.updateText was incorrectly increasing the size of the texture each time it was called (thanks @spayton #1261)</li>
<li>Polygon.contains now correctly calculates the result (thanks @pnstickne @BurnedToast #1267)</li>
<li>Setting Key.enabled = false while it is down did not reset the isDown state (thanks @pnstickne #1190 #1271)</li>
<li>The Gamepad.addCallbacks context parameter was never actually remembered, causing the callbacks to run in the wrong context (thanks @englercj #1285)</li>
<li>Animation.setFrame used the wrong frames array if <code>useLocalFrameIndex</code> was <code>false</code> and a numeric frame ID was given (thanks @Skeptron #1284)</li>
<li>Fullscreen mode in IE11 now works (thanks @pnstickne)</li>
<li>Cache.addBitmapData now auto-creates a FrameData (thanks @pnstickne #1294 #1300)</li>
<li>P2.BodyDebug circles were drawing at half widths (thanks @enriqueto #1288)</li>
<li>FrameData.clone fixed when cloning data using frame names rather than indexes (thanks pjbaron)</li>
<li>Lots of the Cache getters (such as <code>Cache.getbitmapData</code>) would return <code>undefined</code> if the asset couldn't be found. They now all consistently return <code>null</code> for missing entries (thanks @Matoking #1305)</li>
<li>Phaser games should now work again from the CocoonJS Launcher.</li>
<li>Only one of the mouse wheel events is listened to, newest standard first.
This fixes a bug in FF where it would use the default DOMMouseWheel (thanks @pnstickne #1313)</li>
<li>Stage.smoothed needed to modify the value of PIXI.scaleMode.DEFAULT instead of PIXI.scaleMode.LINEAR (thanks @pixelpicosean #1322)</li>
<li>Newly created Groups always had zero z index (thanks @spayton #1291)</li>
2014-11-25 00:23:44 +00:00
<li>Sprite.autoCull now properly works if the camera moves around the world.</li>
<li>Sprite.inCamera uses a much faster check if auto culling or world bounds checks are enabled and properly adjusts for camera position.</li>
<li>Camera.totalInView is a new property that contains the total number of Sprites rendered that have <code>autoCull</code> set to true and are within the Cameras view.</li>
<li>Emitter.setScale fixed minX minY order presedence (thanks spayton)</li>
<li>Group.iterate can now accept undefined/null as the arguments (thanks @pnstickne #1353 @tasos-ch #1352)</li>
2014-10-22 20:49:44 +00:00
</ul>
2014-11-15 20:01:46 +00:00
<h3>Pixi 2.1.0 New Features</h3>
2014-10-22 20:49:44 +00:00
<ul>
2014-11-15 20:01:46 +00:00
<li>unloadFromGPU added to PIXI.BaseTexture</li>
<li>PIXI.VideoTexture added</li>
<li>PIXI.RoundedRectangle added</li>
<li>Ensured all float32arrays use PIXI.Float32Array</li>
<li>Removed the use of call in updateTransform (as its 10x faster to run the function directly)</li>
<li>autoResize option added to renderer options (default is false). Pixi no longer automatically changes the style of the canvas.</li>
<li>PIXI.RenderTexture.getCanvas optimized</li>
2014-10-22 20:49:44 +00:00
</ul>
2014-11-15 20:01:46 +00:00
<h3>Pixi 2.1.0 Bug Fixes</h3>
2014-10-22 20:49:44 +00:00
<ul>
2014-11-15 20:01:46 +00:00
<li>Fix destroy method of PIXI.WebGLRenderer</li>
<li>Fixed Graphics.drawRoundedRectangle </li>
<li>Fixed Graphics.arcTo issue</li>
<li>Fixed Graphics.arc issue</li>
<li>Fixed Graphics.cacheAsBitmap alpha issue</li>
<li>Fixed PIXI.Strip alpha issue</li>
<li>Fixed PIXI.DisplayObject.cacheAsBitmap alpha issue</li>
<li>Fixed PIXI.RenderTexture Canvas Clear bug</li>
<li>Fixed PIXI.DisplayObject.updateTransform issue </li>
<li>Fixed webGL Shader textures issue</li>
<li>Fixed PIXI.DisplayObject.getLocalPosition()</li>
<li>Fixed CocoonJS crashing, when loading destroyed texture</li>
<li>Fix eventTarget emit bug</li>
2014-09-09 14:36:56 +00:00
</ul>
<p>For details about changes made in previous versions of Phaser see the full Change Log at <a href="https://github.com/photonstorm/phaser/blob/master/CHANGELOG.md">https://github.com/photonstorm/phaser/blob/master/CHANGELOG.md</a></p>
2014-04-29 14:39:02 +00:00
<p><img src="http://phaser.io/images/div3.png" alt="div"></p>
2014-11-25 00:23:44 +00:00
<h2>How to Build</h2>
<p>We provide a fully compiled version of Phaser in the <code>build</code> folder, in both plain and minified formats.</p>
<p>You will also find custom builds in the <code>build\custom</code> folder, that split phaser up into components.</p>
<p>We also provide a Grunt script that will build Phaser from source.</p>
<p>Run <code>grunt</code> to perform a default build to the <code>dist</code> folder.</p>
<p>If you replace Pixi or p2 then run <code>grunt replace</code> to patch their UMD strings so they work properly with Phaser and requireJS.</p>
2014-11-25 00:23:44 +00:00
<p>Note: Some of you may not be aware, but the <code>phaser.min.js</code> file in the build folder contains both Arcade Physics and P2 Physics bundled in. If you only need Arcade Physics then you can use <code>build\custom\phaser-arcade-physics.min.js</code> instead. This will save you 180KB from the minified file size.</p>
2014-04-29 14:39:02 +00:00
<p><img src="http://phaser.io/images/div4.png" alt="div"></p>
2014-11-25 00:23:44 +00:00
<h2>Koding</h2>
2014-07-10 19:31:11 +00:00
<p>You can <a href="https://koding.com/Teamwork?import=https://github.com/photonstorm/phaser/archive/master.zip&amp;c=git1">clone the Phaser repo in Koding</a> and then start editing and previewing code right away using their web based VM development system.</p>
2014-04-29 14:39:02 +00:00
<p><img src="http://phaser.io/images/div5.png" alt="div"></p>
2014-11-25 00:23:44 +00:00
2014-09-09 14:36:56 +00:00
<h2>Bower / NPM</h2>
2014-07-18 11:45:51 +00:00
<p>If you use bower you can install phaser with:</p>
2014-09-09 14:36:56 +00:00
<p><code>bower install phaser</code></p>
<p>If you use NPM you can install phaser with:</p>
<p><code>npm install phaser</code></p>
2014-02-05 06:29:17 +00:00
<p>Nice and easy :)</p>
<p><img src="http://www.photonstorm.com/wp-content/uploads/2013/10/phaser_tanks-640x480.png" alt="Tanks"></p>
2014-04-29 14:39:02 +00:00
<p><img src="http://phaser.io/images/div6.png" alt="div"></p>
2014-11-25 00:23:44 +00:00
<h2>CDNJS</h2>
2014-04-29 14:39:02 +00:00
<p>Phaser is now available on <a href="http://cdnjs.com">CDNJS</a>. You can include the following in your html:</p>
2014-11-15 20:01:46 +00:00
<p><code>http://cdnjs.cloudflare.com/ajax/libs/phaser/2.2.0/phaser.min.js</code></p>
2014-02-05 06:29:17 +00:00
<p>Or if you prefer you can leave the protocol off, so it works via http and https:</p>
2014-11-15 20:01:46 +00:00
<p><code>//cdnjs.cloudflare.com/ajax/libs/phaser/2.2.0/phaser.min.js</code></p>
2014-04-29 14:39:02 +00:00
<p><img src="http://phaser.io/images/div1.png" alt="div"></p>
2014-11-25 00:23:44 +00:00
<h2>Requirements</h2>
2014-04-29 14:39:02 +00:00
<p>Games created with Phaser require a modern web browser that supports the canvas tag. This includes Internet Explorer 9+, Firefox, Chrome, Safari and Opera. It also works on mobile web browsers including stock Android 2.x browser and above and iOS5 Mobile Safari and above. But as always be aware of browser limitations. Not all features of Phaser work on all browsers.</p>
<h3>IE9</h3>
<p>If you need to support IE9 or Android 2.x and want to use P2 physics then you must use the polyfill found in the <code>resources/IE9 Polyfill</code> folder. If you don't require P2 Physics (or don't care about IE9!) then you don't need this polyfill.</p>
<h3>JavaScript and TypeScript</h3>
<p>Phaser is developed in JavaScript. We've made no assumptions about how you like to code your games, and were careful not to impose any form of class / inheritance / structure upon you. So you won't find it split into require modules or pull in 3rd party npm packages for example. That doesn't mean you can't, it just means we don't force you to do so. If you're a requireJS user you'll find a new template in the <code>resources\Project Templates</code> folder just for you.</p>
2014-11-15 20:01:46 +00:00
<p>If you code with <a href="http://www.typescriptlang.org/">TypeScript</a> you'll find a comprehensive definitions file inside the <code>typescript</code> folder and tutorials on getting started on our site. This definitions file is for TypeScript 1.0+. If you are using an earlier version of TypeScript (i.e. 0.9.5) you will need to include the WebGL definitions into your project first. This file isn't included with Phaser.</p>
2014-11-25 00:23:44 +00:00
2014-09-09 14:36:56 +00:00
<h3>Build Files and Custom Builds</h3>
<p>The <code>build</code> folder contains the pre-built packaged versions of Phaser.</p>
<p>Phaser is 143 KB gzipped (675 KB minified) when including <em>both</em> Arcade Physics and the full P2 Physics engine.</p>
<p>If you don't require P2 you can save yourself nearly 200 KB from the minified size and instead use the <code>phaser-arcade-physics.min.js</code> file found inside the <code>build/custom</code> folder. This version is only 109 KB gzipped (504 KB minified).</p>
<p>If you don't need any physics system at all, or are implementing your own, there is an even smaller build: <code>phaser-no-physics.min.js</code> in the <code>custom</code> folder that is only 95 KB gzipped (443 KB minified). Please note that this build doesn't include Tilemaps or Particle Emitter support either, as both rely on Arcade Physics.</p>
<p>You can create your own custom build of Phaser by looking at the grunt options and manifests in the tasks folder.</p>
2014-04-29 14:39:02 +00:00
<p><img src="http://phaser.io/images/div3.png" alt="div"></p>
2014-11-25 00:23:44 +00:00
<h2>Learn By Example</h2>
2014-07-10 19:31:11 +00:00
<p>Ever since we started Phaser we've been growing and expanding our extensive set of Examples. Currently over 320 of them!</p>
<p>They used to be bundled in the main Phaser repo, but because they got so large and in order to help with versioning we've moved them to their own repo.</p>
<p>So please checkout <a href="https://github.com/photonstorm/phaser-examples">https://github.com/photonstorm/phaser-examples</a></p>
<p>Here you'll find an ever growing suite of Examples. Personally I feel that developers tend to learn better by looking at small refined code examples, so we created hundreds of them, and create new ones to test new features and updates. Inside the <code>examples</code> repo you'll find the current set. If you write a particularly good example then please send it to us.</p>
2014-02-05 06:29:17 +00:00
<p>The examples need to be run through a local web server (in order to avoid file access permission errors from your browser). You can use your own web server, or start the included web server using grunt.</p>
<p>Using a locally installed web server browse to the examples folder:</p>
<pre><code>examples/index.html</code></pre>
<p>Alternatively in order to start the included web server, after you've cloned the repo, run <code>npm install</code> to install all dependencies, then <code>grunt connect</code> to start a local server. After running this command you should be able to access your local webserver at <code>http://127.0.0.1:8000</code>. Then browse to the examples folder: <code>http://127.0.0.1:8000/examples/index.html</code></p>
2014-04-29 14:39:02 +00:00
<p>There is a 'Side View' example viewer as well. This loads all the examples into a left-hand frame for faster navigation. And if you've got php installed into your web server you may want to try <code>debug.php</code>, which provides a minimal examples list and debug interface.</p>
<p>You can also browse all <a href="http://examples.phaser.io">Phaser Examples</a> online.</p>
2014-04-29 14:39:02 +00:00
<p><img src="http://phaser.io/images/div4.png" alt="div"></p>
2014-11-25 00:23:44 +00:00
<h2>Features</h2>
2014-02-05 06:29:17 +00:00
<p><strong>WebGL &amp; Canvas</strong></p>
<p>Phaser uses both a Canvas and WebGL renderer internally and can automatically swap between them based on browser support. This allows for lightning fast rendering across Desktop and Mobile. When running under WebGL Phaser now supports shaders, allowing for some incredible in-game effects. Phaser uses and contributes towards the excellent Pixi.js library for rendering.</p>
<p><strong>Preloader</strong></p>
<p>We've made the loading of assets as simple as one line of code. Images, Sounds, Sprite Sheets, Tilemaps, JSON data, XML and JavaScript files - all parsed and handled automatically, ready for use in game and stored in a global Cache for Sprites to share.</p>
2014-02-05 06:29:17 +00:00
<p><strong>Physics</strong></p>
<p>Phaser ships with our Arcade Physics system, Ninja Physics and P2.JS - a full body physics system. Arcade Physics is for high-speed AABB collision only. Ninja Physics allows for complex tiles and slopes, perfect for level scenery, and P2.JS is a full-body physics system, with constraints, springs, polygon support and more.</p>
2014-02-05 06:29:17 +00:00
<p><strong>Sprites</strong></p>
<p>Sprites are the life-blood of your game. Position them, tween them, rotate them, scale them, animate them, collide them, paint them onto custom textures and so much more!
Sprites also have full Input support: click them, touch them, drag them around, snap them - even pixel perfect click detection if needed.</p>
<p><strong>Groups</strong></p>
<p>Group bundles of Sprites together for easy pooling and recycling, avoiding constant object creation. Groups can also be collided: for example a &quot;Bullets&quot; group checking for collision against the &quot;Aliens&quot; group, with a custom collision callback to handle the outcome.</p>
<p><strong>Animation</strong></p>
<p>Phaser supports classic Sprite Sheets with a fixed frame size, Texture Packer and Flash CS6/CC JSON files (both Hash and Array formats) and Starling XML files. All of these can be used to easily create animation for Sprites.</p>
<p><strong>Particles</strong></p>
<p>An Arcade Particle system is built-in, which allows you to create fun particle effects easily. Create explosions or constant streams for effects like rain or fire. Or attach the Emitter to a Sprite for a jet trail.</p>
<p><strong>Camera</strong></p>
<p>Phaser has a built-in Game World. Objects can be placed anywhere within the world and you've got access to a powerful Camera to look into that world. Pan around and follow Sprites with ease.</p>
<p><strong>Input</strong></p>
<p>Talk to a Phaser.Pointer and it doesn't matter if the input came from a touch-screen or mouse, it can even change mid-game without dropping a beat. Multi-touch, Mouse, Keyboard and lots of useful functions allow you to code custom gesture recognition.</p>
<p><strong>Sound</strong></p>
<p>Phaser supports both Web Audio and legacy HTML Audio. It automatically handles mobile device locking, easy Audio Sprite creation, looping, streaming and volume. We know how much of a pain dealing with audio on mobile is, so we did our best to resolve that!</p>
<p><strong>Tilemaps</strong></p>
<p>Phaser can load, render and collide with a tilemap with just a couple of lines of code. We support CSV and Tiled map data formats with multiple tile layers. There are lots of powerful tile manipulation functions: swap tiles, replace them, delete them, add them and update the map in realtime.</p>
<p><strong>Device Scaling</strong></p>
<p>Phaser has a built-in Scale Manager which allows you to scale your game to fit any size screen. Control aspect ratios, minimum and maximum scales and full-screen support.</p>
<p><strong>Plugin system</strong></p>
<p>We are trying hard to keep the core of Phaser limited to only essential classes, so we built a smart Plugin system to handle everything else. Create your own plugins easily and share them with the community.</p>
<p><strong>Mobile Browser</strong></p>
<p>Phaser was built specifically for Mobile web browsers. Of course it works blazingly fast on Desktop too, but unlike lots of frameworks mobile was our main focus. If it doesn't perform well on mobile then we don't add it into the Core.</p>
<p><strong>Developer Support</strong></p>
<p>We use Phaser every day on our many client projects. As a result it's constantly evolving and improving and we jump on bugs and pull requests quickly. This is a living, breathing framework maintained by a commercial company with custom feature development and support packages available. We live and breathe HTML5 games.</p>
<p><strong>Battle Tested</strong></p>
<p>Phaser has been used to create hundreds of games, which receive millions of plays per month. We're not saying it is 100% bug free, but we use it for our client work every day, so issues get resolved &lt;em&gt;fast&lt;/em&gt; and we stay on-top of the changing browser landscape.</p>
2014-02-05 06:29:17 +00:00
<p><img src="http://www.photonstorm.com/wp-content/uploads/2013/10/phaser_fruit_particles-640x480.png" alt="FruitParty"></p>
2014-04-29 14:39:02 +00:00
<p><img src="http://phaser.io/images/div6.png" alt="div"></p>
2014-11-25 00:23:44 +00:00
<h2>Road Map</h2>
2014-11-25 00:23:44 +00:00
<p>Here are some of the features planned for future releases. Not all features are promised to be delivered, and no timescale is put against any of them either.</p>
<h3>Version 2.3 (&quot;Tarabon&quot;)</h3>
2014-02-05 06:29:17 +00:00
<ul>
2014-11-25 00:23:44 +00:00
<li>Look carefully at the internal structure of Phaser to avoid method repetition (such as Sprite.crop and Image.crop), investigate using mixins to help reduce overall codebase size.</li>
<li>Support for parallel asset loading.</li>
2014-10-22 20:49:44 +00:00
<li>Restore Math.interpolateAngles and Math.nearestAngleBetween</li>
2014-09-09 14:36:56 +00:00
<li>Enhance the State Management, so you can perform non-destructive State swaps and persistence.</li>
<li>Scene Manager - json scene parser.</li>
2014-02-05 06:29:17 +00:00
<li>Touch Gestures.</li>
2014-07-10 19:31:11 +00:00
<li>Optimised global Animation manager to cut down on object creation.</li>
2014-02-05 06:29:17 +00:00
<li>Flash CC HTML5 export integration.</li>
<li>Massively enhance the audio side of Phaser. Take more advantage of Web Audio: echo effects, positional sound, etc.</li>
2014-09-09 14:36:56 +00:00
<li>DragonBones support.</li>
2014-02-05 06:29:17 +00:00
<li>Game parameters stored in Google Docs.</li>
2014-11-25 00:23:44 +00:00
<li>Adjust how Pointers and Interactive Objects work. Allow an IO to be flagged as &quot;on click only&quot;, so it doesn't ever get processed during normal Pointer move events (unless being dragged)</li>
<li>Allow multiple drag items - no longer bind just 1 to a Pointer</li>
<li>Allow Groups to have Priority IDs too and input disable entire Groups and all children (let it flow down the chain)</li>
<li>Allow Groups to be InputEnabled? Dragging a Group would be really useful.</li>
<li>Ability to control DOM elements from the core game and layer them into the game.</li>
<li>Cache to localStorage using If-Modified-Since. <a href="https://github.com/photonstorm/phaser/issues/495">See github request</a></li>
<li>Allow for complex assets like Bitmap Fonts to be stored within a texture atlas.</li>
2014-02-05 06:29:17 +00:00
</ul>
2014-09-09 14:36:56 +00:00
<h3>Phaser 3</h3>
2014-11-25 00:23:44 +00:00
<p>Development has now begun on Phaser 3. At the moment it's still in the very early stages. We are asking for suggestions and feedback in <a href="http://www.html5gamedevs.com/topic/7949-the-phaser-3-wishlist-thread/">this forum thread</a> so be sure to add your voice.</p>
<p>We are currently experimenting with an ES6 based module system and we're keen for Phaser 3 to use as many native ES6 features as possible. It will be a significant refactoring of the code base, but never at the expense of features or ease-of-use. Development will be made public when the time is right.</p>
<p>We don't anticipate a release until Summer 2015. Phaser 2 still has roadmap features left that we'd like to implement, but after 2.3 it will be in pure maintenance mode as we work on Phaser 3.</p>
<p>If you are an exceptional JavaScript developer and would like to join the Phaser 3 development team then let us know. We have a limited budget available to pay towards your time.</p>
2014-04-29 14:39:02 +00:00
<p><img src="http://phaser.io/images/div1.png" alt="div"></p>
2014-11-25 00:23:44 +00:00
2014-09-09 14:36:56 +00:00
<h2>Mighty Editor - A Visual Phaser Game Editor</h2>
2014-05-20 09:12:48 +00:00
<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>
2014-04-29 14:39:02 +00:00
<p><img src="http://phaser.io/images/div2.png" alt="div"></p>
2014-11-25 00:23:44 +00:00
<h2>Contributing</h2>
2014-02-05 06:29:17 +00:00
<p>We now have a full <a href="https://github.com/photonstorm/phaser/blob/master/CONTRIBUTING.md">Contributors Guide</a> which goes into the process in more detail, but here are the headlines:</p>
<ul>
<li><p>If you find a bug then please report it on <a href="https://github.com/photonstorm/phaser/issues">GitHub Issues</a> or our <a href="http://www.html5gamedevs.com/forum/14-phaser/">Support Forum</a>.</p>
</li>
<li><p>If you have a feature request, or have written a game or demo that shows Phaser in use, then please get in touch. We'd love to hear from you! Either post to our <a href="http://www.html5gamedevs.com/forum/14-phaser/">forum</a> or email: rich@photonstorm.com</p>
</li>
<li><p>If you issue a Pull Request for Phaser, please only do so againt the <code>dev</code> branch and <em>not</em> against the <code>master</code> branch.</p>
</li>
<li><p>Before submitting a Pull Request please run your code through <a href="http://www.jshint.com/">JSHint</a> to check for stylistic or formatting errors. To use JSHint, run <code>grunt jshint</code>. This isn't a strict requirement and we are happy to receive Pull Requests that haven't been JSHinted, so don't let it put you off contributing, but do know that we'll reformat your source before going live with it.</p>
2014-02-05 06:29:17 +00:00
</li>
</ul>
2014-04-29 14:39:02 +00:00
<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://phaser.io/images/div3.png" alt="div"></p>
2014-11-25 00:23:44 +00:00
<h2>Bugs?</h2>
2014-02-05 06:29:17 +00:00
<p>Please add them to the <a href="https://github.com/photonstorm/phaser/issues">Issue Tracker</a> with as much info as possible, especially source code demonstrating the issue.</p>
<p><img src="http://www.photonstorm.com/wp-content/uploads/2013/04/phaser_tilemap_collision.png" alt="Phaser Tilemap"></p>
<p>&quot;Being negative is not how we make progress&quot; - Larry Page, Google</p>
2014-04-29 14:39:02 +00:00
<p><img src="http://phaser.io/images/div4.png" alt="div"></p>
2014-11-25 00:23:44 +00:00
<h2>License</h2>
2014-02-05 06:29:17 +00:00
<p>Phaser is released under the <a href="http://opensource.org/licenses/MIT">MIT License</a>.</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>
2013-10-02 11:11:22 +00:00
2013-10-02 14:05:55 +00:00
2013-10-02 11:11:22 +00:00
2014-11-15 20:01:46 +00:00
2014-11-25 00:23:44 +00:00
</article></div><div class="clearfix"></div><footer>
<span class="copyright">
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Tue Nov 25 2014 00:17:20 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
2014-11-15 20:01:46 +00:00
2014-11-25 00:23:44 +00:00
<div class="span3">
<div id="toc"></div>
</div>
<br clear="both">
</div>
2013-10-01 15:15:45 +00:00
2013-10-02 11:11:22 +00:00
</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>
2013-10-01 15:15:45 +00:00
2013-10-02 11:11:22 +00:00
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
2013-10-01 15:15:45 +00:00
2013-10-02 11:11:22 +00:00
<script>
$( function () {
$( "#toc" ).toc( {
2014-04-10 22:13:43 +00:00
anchorName : function(i, heading, prefix) {
return $(heading).attr("id") || ( prefix + i );
},
2013-10-02 11:11:22 +00:00
selectors : "h1,h2,h3,h4",
showAndHide : false,
scrollTo : 60
} );
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
2013-10-01 15:15:45 +00:00
2013-10-02 11:11:22 +00:00
} );
</script>
2013-10-01 15:15:45 +00:00
2013-10-02 11:11:22 +00:00
2013-10-01 15:15:45 +00:00
</body>
</html>