mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 13:13:43 +00:00
1641 lines
No EOL
103 KiB
HTML
1641 lines
No EOL
103 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="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.html#TilemapCollision">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.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.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.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.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.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#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#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#IMAGE">IMAGE</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#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#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#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="https://confirmsubscription.com/h/r/369DE48E3E86AF1E">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/community/irc">IRC</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 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 and Android apps via 3rd party tools.</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> 500+ <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 <a href="https://confirmsubscription.com/h/r/369DE48E3E86AF1E">Newsletter</a> and grab our <a href="http://phaser.io/shop">Phaser Books</a></li>
|
|
<li><strong>Chat:</strong> <a href="http://www.html5gamedevs.com/topic/4470-official-phaserio-irc-channel-phaserio-on-freenode/">#phaserio IRC channel</a> on freenode</li>
|
|
<li><strong>Extend:</strong> With <a href="https://github.com/photonstorm/phaser-plugins">Phaser Plugins</a></li>
|
|
<li><strong>Be awesome:</strong> Support our work by buying our <a href="http://phaser.io/shop/books">books</a> and <a href="http://phaser.io/shop/plugins">plugins</a></li>
|
|
</ul>
|
|
|
|
<h2>Index</h2><ul>
|
|
<li><a href="#whats-new">What's New?</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="#contributing">Contributing</a></li>
|
|
</ul>
|
|
|
|
<p><a name="whats-new"></a></p>
|
|
<h2>What's new in Phaser 2.4.1</h2><div align="center"><img src="http://phaser.io/images/github/news.jpg"></div>
|
|
|
|
<blockquote>
|
|
<p>24th July 2015</p>
|
|
</blockquote>
|
|
<p>Phaser 2.4 is another huge update. We had to bump the version number from 2.3 directly to 2.4 because of some API adjustments, all of which are fully detailed in the <a href="#change-log">Change Log</a>. While it's true we could have released it over a few smaller point releases, that just isn't how the cookie crumbled this time. <em>Be sure to pay attention to the previous deprecated API calls that have been removed in 2.4.</em></p>
|
|
<p>So although you had to wait for it a couple months more than usual, Phaser 2.4 is quite simply an <strong>epic release</strong> - there is no two ways about it! Brand new video component? Check. Support for fully boned Creature animations? Check. Brand new Cache and Loader updates? Check. Dynamic sprite and gradient generator? Check. Literally hundreds of updates, enhancements and fixes across the entire codebase? Yup, those too! The Change Log seems to scroll on forever, yet the overall package size continues to come down as we optimise and streamline our code too (this release actually builds smaller than 2.3 did, just 80KB min + gz)</p>
|
|
<p>A few people on the forum have asked how Phaser is funded: Phaser is a fully open-source project and as such we have no <em>direct</em> income from it at all. All development is funded by the client work that <a href="http://www.photonstorm.com">my company</a> takes on. And of course the contributions from the incredible community (who also volunteer their skills for free).</p>
|
|
<p>Sometimes this work directly impacts on Phaser. For example we recently built <a href="http://www.insideouthq.com">5 games</a> for the new Pixar film Inside Out. Being Pixar they of course had high video requirements, so we literally coded from scratch the way videos were handled and added in video stream support in the process. Very often though our work simply uses Phaser but doesn't enhance it. Which is why if you buy any of the books or plugins we have on sale it really does make a difference! It buys us time to work on Phaser un-interrupted, which in turn benefits everyone. Some have asked if we could add a 'donate' button to the site, but instead I'd rather you get value from your money - so if we release a new plugin, book or magazine you like the look of, please do consider it a donation towards the continued work we all put in.</p>
|
|
<p>Money stuff aside please enjoy this brand new release. We'll carry on supporting Phaser 2 for the rest of 2015 <em>at least</em>, while development of the Phaser 3 renderer proceeds at a rapid pace too.</p>
|
|
<p>Make sure you check out the Phaser web site. We are going to be adding in stacks of new examples and features in the coming weeks.</p>
|
|
<p>But that's all for now. I hope you enjoy Phaser 2.4. Happy coding everyone! See you on the forums.</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="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.3.0.zip">zip</a> or <a href="https://github.com/photonstorm/phaser/archive/v2.3.0.tar.gz">tar.gz</a></li>
|
|
<li>Download just the build files: <a href="https://github.com/photonstorm/phaser/releases/download/v2.3.0/phaser.js">phaser.js</a> and <a href="https://github.com/photonstorm/phaser/releases/download/v2.3.0/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>
|
|
<h3>CDN</h3><p><a href="http://www.jsdelivr.com/#!phaser">jsDelivr</a> is a "super-fast CDN for developers". Include the following in your html:</p>
|
|
<p><code><script src="//cdn.jsdelivr.net/phaser/2.4.1/phaser.js"></script></code></p>
|
|
<p>or the minified version:</p>
|
|
<p><code><script src="//cdn.jsdelivr.net/phaser/2.4.1/phaser.min.js"></script></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><script src="https://cdnjs.cloudflare.com/ajax/libs/phaser/2.4.1/phaser.js"></script></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? <a href="https://koding.com/Teamwork?import=https://github.com/photonstorm/phaser/archive/master.zip&c=git1">Clone Phaser in Koding</a> and start working right away in their web based development system.</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.</p>
|
|
<p>Prefer <strong>videos</strong> to reading? Lynda.com have published a free course: <a href="http://www.lynda.com/Phaser-tutorials/HTML5-Game-Development-Phaser/163641-2.html">HTML5 Game Development with Phaser</a></p>
|
|
<p>The single biggest Phaser resource is the new <a href="http://phaser.io/news">Phaser web site</a>. It has hundreds of tutorials listed and fresh ones are added every week, so 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>
|
|
<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 500 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>Phaser Books</h3><div align="center"><img src="http://phaser.io/images/github/books.jpg"></div>
|
|
|
|
<p>We've been busy writing books about Phaser. Available now:</p>
|
|
<ul>
|
|
<li><a href="https://leanpub.com/phasertweenmanager">A Guide to the Phaser Tween Manager</a> Book + Code Bundle</li>
|
|
<li><a href="https://leanpub.com/phaserscalemanager">A Guide to the Phaser Scale Manager</a></li>
|
|
</ul>
|
|
<p>With more on the way. <a href="http://www.html5gamedevs.com/topic/10962-which-phaser-book-would-you-like-to-see-next/">Vote on the next title</a> to be written.</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>Starting from Phaser 2.3.0 we now include a brand new 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>
|
|
<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. This is just 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 regularly, 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>All Phaser development is now taking place on the Phaser 3 project. The Phaser 2 branch will still be supported and issues fixed, but roadmap features have been migrated over to Phaser 3.</p>
|
|
<p><a name="phaser3"></a></p>
|
|
<h2>Phaser 3</h2><p>We're now a good way in to development of Phaser 3. We've been working hard on creating a brand new and extremely powerful renderer. Progress reports are posted to the <a href="http://phaser.io/labs">web site</a> and <a href="https://github.com/photonstorm/phaser3">Phaser 3 repo</a>.</p>
|
|
<p>There is still plenty of time to add your suggestions and feedback in <a href="http://www.html5gamedevs.com/topic/7949-the-phaser-3-wishlist-thread/">this forum thread</a>.</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>
|
|
|
|
<p><a name="change-log"></a></p>
|
|
<h2>Change Log</h2><h2>Version 2.4.1 - "Ionin Spring" - 24th July 2015</h2><p>This is a small point release that updates the Creature runtimes and fixes a couple of small cache issues.</p>
|
|
<p>It also modifies the Grunt build scripts so that all third party libs (such as Creature, P2, gl-matrix and PIXI) are now kept well and truly outside of Phaser. They are defined and placed first in the build files. So no more PIXI hiding within the Phaser namespace or UMD patching for Phaser required.</p>
|
|
<h3>Updates</h3><ul>
|
|
<li>The Creature Runtimes have been updated to the latest versions and the <code>Phaser.Creature</code> class updated to use them.</li>
|
|
<li>GameObjectFactory.creature is a new method to help with quick Creature animation object creation.</li>
|
|
<li>Cache.getPixiTexture will now search the image cache if it couldn't find a texture in the PIXI.TextureCache global array, if it finds a matching image in the image cache then it returns a new PIXI.Texture based on it.</li>
|
|
<li>Cache.getPixiBaseTexture will now search the image cache if it couldn't find a BaseTexture in the PIXI.BaseTextureCache global array.</li>
|
|
</ul>
|
|
<h3>Bug Fixes</h3><ul>
|
|
<li>Fixed Cache.getKeys to use the <code>_cacheMap</code> (thanks @jamesgroat #1929)</li>
|
|
<li>Safari on OSX wouldn't recognise button presses on trackpads (thanks JakeCake)</li>
|
|
<li>Cache.removeImage now calls destroy on the image BaseTexture, removing it from the PIXI global caches without throwing a warning.</li>
|
|
</ul>
|
|
<h2>Version 2.4.0 - "Katar" - 22nd July 2015</h2><h3>API Changes</h3><ul>
|
|
<li>RenderTexture.render now takes a Matrix as its second parameter, not a Point object. This brings it in line with Pixi and allows you to perform much more complex transformations on the object being rendered. If you need to replicate the old behavior please use RenderTexture.renderXY(sprite, point.x, point.y) instead.</li>
|
|
<li>PIXI.DisplayObject.updateTransform has a new optional parameter <code>parent</code>. If the DisplayObject doesn't have a parent (i.e. it isn't on the display list yet) then in the past <code>updateTransform</code> would fail. This meant you couldn't do things like scale or rotate a Sprite and then draw it to a RenderTexture or BitmapData, as calls to updateTransform would be ignored. The new checks now look to see if the <code>parent</code> parameter is set. If so this takes priority over the actual parent and is used to modify the transform (note that it <strong>doesn't</strong> reparent the DisplayObject, it merely uses it for the transform.) If there is no parent (explicitly or via the parameter) then it falls back to use Phaser.World as the parent. If it can't reach that then no transform takes place.</li>
|
|
<li>If Phaser.Sound.noAudio has been set then Phaser.Loader will not load any audio files. No errors are thrown, but all calls to Loader.audio and Loader.audiosprite are silently ignored. <code>noAudio</code> can be set either via the <code>PhaserGlobal</code> global var or is set if the device your game is running on has no audio playback support.</li>
|
|
<li>Files can now be added to the Loader with an absolute URL even if you have a Loader.baseURL set. In previous versions the baseURL would still be prepended to the file URL, but the Loader now checks if the a file URL begins with <code>http</code> or <code>//</code> and skips prepending the baseURL to it.</li>
|
|
<li>Phaser.StateManager would incorrectly call <code>loadUpdate</code> and <code>loadRender</code> while the game was paused or if the State didn't have an <code>update</code> or <code>render</code> method defined, even after the loader was completed. Although this is a bug fix it's still an API change should you have been using the <code>loadUpdate/Render</code> calls in the old way. Also the StateManager no longer calls <code>preRender</code> unless the State <code>create</code> method has <em>finished</em>. If the State doesn't have a <code>create</code> method then <code>preRender</code> runs immediately.</li>
|
|
<li>Frame.uuid has been removed (was flagged as deprecated for several releases). This has a two-fold effect: First it means that the property no longer exists and secondly it means that the AnimationParser (the class responsible for loading sprite sheets and texture atlases) no longer has to call either RandomDataGenerator.uuid OR populates the PIXI.TextureCache. The first saves some CPU time and the second saves memory by not creating references to textures it doesn't ever use. The PIXI.TextureCache is now ignored by Phaser other than for the <code>__missing</code> and <code>__default</code> textures.</li>
|
|
<li>Phaser.AnimationParser methods <code>JSONData</code>, <code>JSONDataHash</code> and <code>XMLData</code> have all had their <code>cacheKey</code> parameter removed as it's no longer used.</li>
|
|
<li>Input.deleteMoveCallback no longer takes an integer as its parameter. Now you have to give it the original callback and context in order to remove it. This is to protect against index invalidation (see the fixed Bugs list)</li>
|
|
<li>Group.add and Group.addAt will only create a Physics Body on the child if it doesn't already have one. This is a change from 2.3 where it would replace the physics body property with the new body, but this could lead to garbage build-up over time, so you should now properly destroy the body before changing it.</li>
|
|
<li>Button game objects now have <code>Input.useHandCursor</code> set to <code>true</code> by default.</li>
|
|
<li>Phaser.BitmapText no longer extends PIXI.BitmapText but replaces it entirely.</li>
|
|
<li>Phaser.Text no longer extends PIXI.Text but replaces it entirely. Phaser.Text now natively extends a Phaser Sprite, meaning it can be enabled for physics, damaged, etc.</li>
|
|
<li>Mouse.button and MSPointer.button have been deprecated and are no longer set (they remain at -1). They never supported complex button events such as holding down 2 buttons and releasing just one, or any buttons other than left and right. They have been replaced with the far more robust and accurate Pointer DeviceButton properties such as <code>Pointer.leftButton</code>, <code>Pointer.rightButton</code> and so on.</li>
|
|
<li>Phaser.DeviceButton is a new class that handles a specific button on an input device, for example the middle button of a mouse, the eraser button of a stylus or a shoulder button on a Gamepad.</li>
|
|
<li>Phaser.DeviceButton.shiftKey is a boolean that holds if the shift key was held down or not during the last button event.</li>
|
|
<li>Phaser.DeviceButton.altKey is a boolean that holds if the alt key was held down or not during the last button event.</li>
|
|
<li>Phaser.DeviceButton.ctrlKey is a boolean that holds if the control key was held down or not during the last button event.</li>
|
|
<li>Phaser.GamepadButton has been removed and now uses DeviceButton instead. Three internal API changes took place: <code>processButtonDown</code> is renamed to <code>start</code>, <code>processButtonUp</code> is renamed to <code>stop</code> and <code>processButtonFloat</code> is renamed to <code>padFloat</code>. If you extended GamepadButton in your own code you need to replace it with DeviceButton.</li>
|
|
<li>MSPointer now checks the <code>pointerType</code> property of the DOM event and if it matches 'mouse' it will update <code>Input.mousePointer</code>, rather than <code>Input.pointer1</code> (or whatever the next free Pointer was).</li>
|
|
<li>Time.suggestedFps is now only populated if <code>Time.advancedTiming</code> is enabled.</li>
|
|
</ul>
|
|
<h3>p2.js Upgraded to version 0.7.0</h3><p>Phaser has been upgraded internally to use the new release of p2 physics. All Phaser based API call signatures remain unchanged unless listed below.</p>
|
|
<p>For the full list of p2 additions please read <a href="https://github.com/schteppe/p2.js/releases/tag/v0.7.0">their change log</a>.</p>
|
|
<ul>
|
|
<li>The P2.Body.onBeginContact arguments have changed. It now sends 5 arguments: The Phaser.P2.Body, the p2.Body, the p2 Shape from Body A, the p2 Shape from Body B and the contact equations array. Note that the Phaser.P2.Body may be null if you collide with a 'native' p2 body (such as the world bounds). However the p2.Body argument will always be populated.</li>
|
|
<li>The P2.Body.onEndContact arguments have changed. It now sends 4 arguments: The Phaser.P2.Body, the p2.Body, the p2 Shape from Body A and the p2 Shape from Body B. Note that the Phaser.P2.Body may be null if this is the end of a contact with a 'native' p2 body (such as the world bounds). However the p2.Body argument will always be populated.</li>
|
|
<li>P2.Body.applyImpulse allows you to apply an impulse to a Body. An impulse is a force added to a body during a short period of time.</li>
|
|
<li>P2.Body.applyImpulseLocal allows you to apply an impulse to a point local to the Body. An impulse is a force added to a body during a short period of time.</li>
|
|
<li>P2.Body.getVelocityAtPoint gets the velocity of a point in the body.</li>
|
|
</ul>
|
|
<h3>Build Updates</h3><ul>
|
|
<li>The Grunt build script now lets you exclude four new modules: rope, tilesprite, creature and video.</li>
|
|
<li>Rope removes the ability to create Rope sprites and also removes the PIXI.Rope and PIXI.Strip classes.</li>
|
|
<li>TileSprite removes the ability to create Tile Sprites and also removes the PIXI.TilingSprite class.</li>
|
|
<li>Creature is not enabled by default, but allows you to control support for Creature bone based animations.</li>
|
|
<li>Video removes the ability to render Videos and video streams to textures.</li>
|
|
<li>Pixi is no longer an optional module. Phaser no longer uses any main stream branch of Pixi and has multiple fixes and tweaks internally through-out it. Therefore it's now no longer possible to replace the version of Pixi that Phaser uses with any other version, so we removed the option from the custom list. Over time we will do away with the Pixi globals and merge it fully into Phaser to avoid conflicts with any other version of Pixi present.</li>
|
|
</ul>
|
|
<h3>New Features</h3><ul>
|
|
<li>All calls to Loader methods that add files to the queue, such as <code>Loader.image</code> or <code>Loader.atlas</code>, now have the URL as an optional parameter. If not set Loader will assume the URL to be based on the key given. For example the following: <code>game.load.image("boom", "boom.png")</code> can now be expressed as just <code>game.load.image("boom")</code>, or <code>game.load.atlas("player", "player.png", "player.json")</code> can now be shortened to <code>game.load.atlas("player")</code>. Please see the freshly updated jsdocs for full details.</li>
|
|
<li>Loader.atlas and <code>Cache.addTextureAtlas</code> will now automatically determine the format of the JSON data (array or hash) when added to the Cache. You no longer need to specify it explicitly if JSON, only if XML.</li>
|
|
<li>Added support for the <a href="http://www.kestrelmoon.com/creature/">Creature Automated Animation Tool</a>. You can now create a Phaser.Creature object which uses json data and a texture atlas for the animations. Creature is a powerful animation tool, similar to Spriter or Spine. It is currently limited to WebGL games only, but the new libs should prove a solid starting point for anyone wanting to incorporate Creature animations into their games.</li>
|
|
<li>Tilemap.getTileWorldXY has a new optional parameter: <code>nonNull</code> which if set makes it behave in the same way as <code>getTile</code> does (thanks @GGAlanSmithee #1722)</li>
|
|
<li>Group.hash is an array (previously available as <code>Group._hash</code>, but protected) into which you can add any of its children via <code>Group.addToHash</code> and <code>Group.removeFromHash</code>. Only children of the Group can be added to and removed from the hash. The hash is used automatically by Arcade Physics in order to perform non z-index based destructive sorting. However if you don't use Arcade Physics, or it isn't a physics enabled Group, then you can use the hash to perform your own sorting and filtering of Group children without touching their z-index (and therefore display draw order).</li>
|
|
<li>Group.physicsSortDirection is a new property allowing you to set a custom sort direction for Arcade Physics Sprites within the Group hash. Previously Arcade Physics used one single sort direction (defined on <code>Phaser.Physics.Arcade.sortDirection</code>) but this change allows you to specifically control how each and every Group is sorted, so you can now combine tall and wide Groups with narrow and thin in a single system.</li>
|
|
<li>Cache.getPixiTexture will return a PIXI.Texture from the cache based on the given key. A PIXI Texture is created automatically for all images loaded and added to the cache.</li>
|
|
<li>Cache.getPixiBaseTexture will return a PIXI.BaseTexture from the cache based on the given key. A PIXI BaseTexture is created automatically for all images loaded and added to the cache.</li>
|
|
<li>Phaser.Matrix.clone allows you to clone the Matrix to a new object, or copy its values into the given Matrix.</li>
|
|
<li>Phaser.Matrix.copyFrom and copyTo allow you to copy Matrix values from and to other Matrix objects.</li>
|
|
<li>Phaser.Matrix.setTo allows you to set all properties of a Matrix in a single call.</li>
|
|
<li>The Phaser.Matrix constructor now allows you to optionally set all Matrix properties on instantiation.</li>
|
|
<li>Text.setShadow has two new optional parameters: <code>shadowStroke</code> and <code>shadowFill</code>. These allow you to set if the drop shadow is applied to the Text stroke, the Text fill or both of them (thanks @qdrj #1766)</li>
|
|
<li>Text.shadowStroke and Text.shadowFill allow you to toggle if the drop shadow is applied to the Text stroke or fill independently.</li>
|
|
<li>ArcadePhysics.Body.syncBounds is a new property that if true forces the Body to check itself against the Sprite.getBounds() dimensions and adjust its width and height accordingly. If false it will compare its dimensions against the Sprite scale instead, and adjust its width height if the scale has changed. Typically you would need to enable <code>syncBounds</code> if your sprite is the child of a responsive display object such as a FlexLayer, or in any situation where the sprite scale doesn't change, but its parents scale is effecting the dimensions regardless.</li>
|
|
<li>Rectangle.ceil runs Math.ceil() on both the x and y values of the Rectangle.</li>
|
|
<li>Rectangle.ceilAll runs Math.ceil() on the x, y, width and height values of the Rectangle.</li>
|
|
<li>The Net and Debug classes have been stubbed out, so they can be properly excluded during a custom build (thanks @soldoutactivist #1772)</li>
|
|
<li>Device.oggVideo indicates if the browser can play back ogg video files.</li>
|
|
<li>Device.h264Video indicates if the browser can play back H264 (mp4) video files.</li>
|
|
<li>Device.mp4Video indicates if the browser can play back H264 (mp4) video files.</li>
|
|
<li>Device.webmVideo indicates if the browser can play back webm video files with the vp8 codec.</li>
|
|
<li>Device.vp9Video indicates if the browser can play back webm video files with the vp9 codec.</li>
|
|
<li>Device.hlsVideo indicates if the browser can play back mpeg video files.</li>
|
|
<li>PIXI.DisplayObject.worldPosition contains the position of the DisplayObject (and therefore any object that inherits from it, such as Phaser.Sprite) taking into account all transforms in the display list. It is updated at the end of <code>DisplayObject.updateTransform</code>. DisplayObject.position reflects only the position applied to the object directly, whereas worldPosition includes the positions that may have been applied to its ancestors.</li>
|
|
<li>PIXI.DisplayObject.worldScale contains the scale of the DisplayObject (and therefore any object that inherits from it, such as Phaser.Sprite) taking into account all transforms in the display list. It is updated at the end of <code>DisplayObject.updateTransform</code>. DisplayObject.scale reflects only the scale applied to the object directly, whereas worldScale includes any scales that may have been applied to its ancestors.</li>
|
|
<li>PIXI.DisplayObject.worldRotation contains the rotation of the DisplayObject (and therefore any object that inherits from it, such as Phaser.Sprite) taking into account all transforms in the display list. It is updated at the end of <code>DisplayObject.updateTransform</code>. DisplayObject.rotation reflects only the rotation applied to the object directly, whereas worldRotation includes any rotations that may have been applied to its ancestors.</li>
|
|
<li>Loader.video allows you to load a video file into Phaser. It works in the same way as Loader.audio, allowing you to pass an array of video files - and it will load the first one the device is capable of playing back. You can optionally load the video via xhr where the video data is converted to a Blob upon successful load.</li>
|
|
<li>Cache.addVideo allows you to add a loaded video into the Phaser Cache. This is called automatically by the Phaser Loader, but may be invoked directly as well.</li>
|
|
<li>Cache.checkVideoKey allows you to check if a video is stored in the cache based on the given key.</li>
|
|
<li>Cache.getVideo allows you to extract a video from the Cache based on its key. The video element itself (or the Blob is loaded with asBlob true) will be found in the <code>data</code> property of the returned object.</li>
|
|
<li>Cache.removeVideo will remove a video from the Cache based on the given key.</li>
|
|
<li>SoundManager.onVolumeChange is a new signal that is dispatched whenever the global volume changes. The new volume is passed as the only parameter to your callback.</li>
|
|
<li>SoundManager.onMute is a new signal that is dispatched when the SoundManager is globally muted, either directly via game code or as a result of the game pausing.</li>
|
|
<li>SoundManager.onUnMute is a new signal that is dispatched when the SoundManager is globally un-muted, either directly via game code or as a result of the game resuming from a pause.</li>
|
|
<li>Input.Touch.addTouchLockCallback allows you to add a callback that will be invoked automatically upon a touchstart event. This is used internally by the SoundManager and Video objects to handle mobile device unlocking, but is exposed publicly as well.</li>
|
|
<li>Frame.resize allows you to change the dimensions of a Frame object and recalculate all of its internal properties (such as <code>bottom</code> and <code>distance</code>).</li>
|
|
<li>LoadTexture.resizeFrame lets you resize the Frame dimensions that the Game Object uses for rendering. You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData it can be useful to adjust the dimensions directly in this way.</li>
|
|
<li>Rectangle.bottomLeft has been added (thanks @mattmogford #1788)</li>
|
|
<li>Device.firefoxVersion is a new property that contains the major Firefox version number if running within Firefox, otherwise zero.</li>
|
|
<li>Math.distanceSq will return the euclidean distance squared between the two given set of coordinates (thanks @jeremyosborne #1761 #1770)</li>
|
|
<li>StateManager.onStateChange is a new signal which is dispatched whenever the State changes from one to another. The callback you specify is sent two parameters: the string based key of the new state, and the second parameter is the string based key of the old / previous state. </li>
|
|
<li>onDragUpdate is a new signal that is dispatched whenever a Game object enabled for input and drag is moved by a pointer (i.e. during a drag event). See the <code>Phaser.InputHandler.enableDrag</code> docs for parameter details and the new Phaser Example.</li>
|
|
<li>Rectangle.resize allows you to resize a Rectangle to the new given dimensions without altering its position.</li>
|
|
<li>Cache.getJSON has a new parameter: <code>clone</code>. If set it will return a clone of the object stored in the Cache rather than a reference to it.</li>
|
|
<li>Circle.random will return a uniformly distributed random point from anywhere within the circle.</li>
|
|
<li>Line.random will return a random point from anywhere on the Line segment.</li>
|
|
<li>Ellipse.random will return a uniformly distributed random point from anywhere within the ellipse.</li>
|
|
<li>Rectangle.random will return a uniformly distributed random point from anywhere within the rectangle.</li>
|
|
<li>Line.rotate allows you to rotate a line by the given amount around its center point.</li>
|
|
<li>Device.chromeVersion will return the major version number of Chrome.</li>
|
|
<li>TilingSprite.textureDebug is a new boolean that allows you to visually debug the generated texture a TilingSprite creates.</li>
|
|
<li>Device.electron will return true if running under GitHub Electron (thanks @rblopes #1851)</li>
|
|
<li>When loading a BitmapText you can now specify either an XML file or a JSON file for the font data. This is useful in environments such as Cocoon where you don't have a native XML parser. If you wish to use JSON the formatting should be equal to the result of running a valid XML file through X2JS (thanks @Feenposhleen #1837)</li>
|
|
<li>Game Objects that have the Health component (such as Sprites) now have a new method: <code>heal</code> which adds the given amount to the health property, i.e. is the opposite of <code>damage</code> (thanks @stephandesouza #1794)</li>
|
|
<li>maxHealth is a new property that Game Objects with the Health component receive and works in combination with the <code>heal</code> method to ensure a health limit cap.</li>
|
|
<li>Text.setTextBounds is a rectangular region that allows you to align your text within it, regardless of the number of lines of text or position within the world. For example in an 800x600 sized game if you set the textBounds to be 0,0,800,600 and text alignment to 'left' and vertical alignment to 'bottom' then the text will render in the bottom-right hand corner of the game, regardless of the size of font you're using or the number of lines in the text itself (thanks @boostermedia for the idea #1824)</li>
|
|
<li>Text.autoRound allows you to control if the text is allowed to render at sub-pixel coordinates or not. Set to <code>true</code> to round the coordinates, often eliminating anti-aliasing from certain font types (#1867)</li>
|
|
<li>Tiled Image Collection support is now available and has been added to the TilemapParser and Tilemap classes (thanks @asyed94 #1879)</li>
|
|
<li>Keyboard.addKeys is a practical way to create an object containing user selected hotkeys. For example: <code>addKeys( { 'up': Phaser.Keyboard.W, 'down': Phaser.Keyboard.S, 'left': Phaser.Keyboard.A, 'right': Phaser.Keyboard.D } );</code> would return an object containing the properties <code>up</code>, <code>down</code>, <code>left</code> and <code>right</code> that you could poll just like a Phaser.Key object. (thanks @Mourtz #1857)</li>
|
|
<li>TilemapLayer.resize allows you to resize a TilemapLayer. It will update the internal canvas object and corresponding texture dimensions (#1881)</li>
|
|
<li>Pointer button handling has been given an overhaul. It has the following new DeviceButton properties: <code>leftButton</code>, <code>rightButton</code>, <code>middleButton</code>, <code>backButton</code>, <code>forwardButton</code> and <code>eraserButton</code>. So you can now easily check which buttons are active and build right or middle click support into your games. The Pointer object normalises these properties for you, regardless if they came from a MouseEvent or PointerEvent (thanks @youssefdetovernickr for the idea #1848)</li>
|
|
<li>Text has a new style property: tabs. This allows you to specify a pixel value (or values) that allows you to space out text that contains tab characters within it. <code>Text.tabs</code> can be either an integer, in which case all tabs share the same spacing, or an array of pixel values corresponding exactly to the number of tabs per line of text. This allows you to easily align columns of data in a single Text object.</li>
|
|
<li>BitmapData.move(x, y) allows you to shift the contents of the BitmapData horizontally and vertically by the given amounts. The image wraps-around the edges of the BitmapData.</li>
|
|
<li>BitmapData.moveH(distance) allows you to horizontally shift the BitmapData with wrap-around the edges.</li>
|
|
<li>BitmapData.moveV(distance) allows you to vertically shift the BitmapData with wrap-around the edges.</li>
|
|
<li>Text.addStrokeColor works in the same way as <code>Text.addColor</code> but allows you to define a color stop for the stroke color instead of the fill color.</li>
|
|
<li>All Game Objects and Groups have a new boolean property called <code>pendingDestroy</code>. If you set this to <code>true</code> then the object will automatically destroy itself in the <em>next</em> logic update, rather than immediately. This is useful for cases when you wish to destroy an object from within one of its own callbacks, such as with buttons or other input events (thanks @alamboley #1748)</li>
|
|
<li>BitmapData.generateTexture will take a snapshot of the BitmapDatas canvas at that moment in time and convert it into an Image, which is then stored in the Phaser image Cache based on the key given. You can then use the new texture for any future sprites or texture based objects.</li>
|
|
<li>All Signals now have the ability to carry extra custom arguments with them, which are passed on to the callback you define after any internal arguments. For example a Phaser.Key has an onDown signal. When dispatched onDown sends a reference to the Key as the first and only argument. But you can now set the callback like this: <code>fireKey.onDown.add(shoot, this, 0, 'lazer', 64)</code>. So when the onDown signal is dispatched internally the callback (<code>shoot</code> in this case) will receive 3 arguments: the Key reference that is raised internally and the string 'lazer' and value 64, which were the custom arguments provided when setting-up the callback.</li>
|
|
<li>Group.moveAll allows you to move all of the children of a Group into another Group.</li>
|
|
<li>Loader.path is a string and if set it is placed before any <em>relative</em> file path given to the Loader. For example: <code>load.path = "images/sprites/";</code> followed by <code>load.image("ball", "ball.png");</code> and <code>load.image("tree", "level1/oaktree.png");</code> would load the <code>ball</code> file from <code>images/sprites/ball.png</code> and the tree from <code>images/sprites/level1/oaktree.png</code>. The path is added before the filename but <em>after</em> the <code>Loader.baseURL</code>. The path <em>must</em> end with a "/". Set it to nothing to disable the path.</li>
|
|
<li>Loader.shader allows you to load a fragment shader from an external file.</li>
|
|
<li>Cache.addShader adds a fragment shader into the cache.</li>
|
|
<li>Cache.getShader gets a fragment shader from the cache.</li>
|
|
<li>The Cache has been internally refactored considerably. Image data is now all stored in the same object, rather than being split across the PIXI global caches (such as PIXI.TextureCache and PIXI.BaseTextureCache), which are no longer used by Phaser.</li>
|
|
<li>Internally the Cache now uses a single _cache object, which is partitioned to store the various different object types. Before the cache used lots of private objects, one per data type, but it's now a lot cleaner and we've managed to cut out hundreds of lines of duplicate code in the process.</li>
|
|
<li>Cache.getImage has a new argument which lets you return either just the HTML Image element or the entire image cache object, which includes the baseTexture and frame data.</li>
|
|
<li>Cache.getImage will return a <strong>default image if the key isn't given, or a </strong>missing image if the key is given but not found in the cache. This means it will always return a valid image and no longer cause Phaser to throw runtime errors deeper down with invalid image objects.</li>
|
|
<li>AABB vs. AABB collisions now work in Ninja Physics. <code>reportCollisionVsWorld</code> already worked, and contained all of the logic required to resolve a collision once the appropriate vectors had been established. <code>reportCollisionVsBody</code> was refactored to use that function (now generically named <code>reportCollision</code>), and now AABBs can collide properly, including bouncing and friction. reportCollisionVsWorld is now just a wrapper around reportCollision to maintain compatibility (thanks @standardgaussian #1905)</li>
|
|
<li>Phaser.Create is a new class that allows you to dynamically generate sprite textures from an array of pixel data, without needing any external files. We'll continue to improve this over the coming releases, but for now please see the new examples showing how to use it.</li>
|
|
</ul>
|
|
<h3>Updates</h3><ul>
|
|
<li>TypeScript definitions fixes and updates (thanks @clark-stevenson @isuda @ggarek @jamesgroat)</li>
|
|
<li>JSDoc typo fixes (thanks @robertpenner @luckylooke @asyncanup @muzuiget @danxexe @rgk @matugm)</li>
|
|
<li>Added missing <code>resumed</code> method to Phaser.State class template.</li>
|
|
<li>Color.webToColor and Color.updateColor now updates the <code>out.color</code> and <code>out.color32</code> properties (thanks @cuixiping #1728)</li>
|
|
<li>Tilemap.createFromObjects has been updated for Tiled 0.11 and can now look-up object layers based on id, uid or name. It will also now copy over Sprite scaling properties if set (thanks @mandarinx #1738)</li>
|
|
<li>Graphics.drawPolygon can now accept a Phaser.Polygon or PIXI.Polygon object, as well as a points array (#1712)</li>
|
|
<li>Phaser.Physics hooks added in for MatterJS support (coming soon)</li>
|
|
<li>Body.destroy now automatically calls <code>Group.removeFromHash</code>.</li>
|
|
<li>Physics.Arcade.sort has a new property 'sortDirection'. If not specified it will use World.sortDirection. If the Group given as the first parameter has its <code>physicsSortDirection</code> property set that will override any other setting.</li>
|
|
<li>Physics.Arcade.sort now calls one of four functions: sortLeftRight, sortRightLeft, sortTopBottom and sortBottomTop. Each of which takes 2 Sprites as arguments.</li>
|
|
<li>Physics.Arcade.sort now doesn't bail out if the Group contains a mixture of physics and non-physics enabled objects, as the Group hash is now only ever populated with physics enabled objects. Also the sort comparison functions no longer return -1 if the bodies are invalid, but zero instead (#1721)</li>
|
|
<li>Phaser.Group would automatically add a child into the _hash array as soon as the child was created (or moved into the Group). This no longer happens. Instead the child is only added to <code>Group.hash</code> if it is enabled for Arcade Physics. However <code>Group.addToHash</code> and the hash array have been exposed as public in case you were taking advantage of the _hash even though it was a previously marked as private.</li>
|
|
<li>Cache.getTexture has now been removed (it was deprecated several versions ago). Use Cache.getRenderTexture instead.</li>
|
|
<li>Removed duplicate methods from PIXI.Text such as wordWrap and updateText as Phaser overrides them, so it was wasting bytes.</li>
|
|
<li>Phaser.StateManager no longer calls <code>preRender</code> unless the State <code>create</code> method has finished. If the State doesn't have a <code>create</code> method then <code>preRender</code> runs immediately.</li>
|
|
<li>Phaser.StateManager.created is a new read-only boolean that tells you if the State has finished running its <code>create</code> method. If it doesn't have one it's always true.</li>
|
|
<li>RenderTexture.render and <code>renderXY</code> would ignore the Sprites rotation or scale. The full Sprite transform is now used correctly when the Sprite is drawn to the texture. If you wish to replicate the old behavior please use <code>RenderTexture.renderRawXY</code> instead.</li>
|
|
<li>Pixi.Sprite.renderCanvas and renderWebGL now has a new optional matrix parameter. You can use this to render the Sprite with an alternative transform matrix without actually adjusting the Sprite matrix at all.</li>
|
|
<li>RenderTexture.matrix has been removed as it's no longer used.</li>
|
|
<li>SoundManager.pauseAll, resumeAll and stopAll now checks if the SoundManager.noAudio is set and ignores the calls.</li>
|
|
<li>SoundManager.usingWebAudio is set to <code>false</code> by default (used to be <code>true</code>) and is only explicitly set if Web Audio is available and hasn't been disabled in the PhaserGlobal object.</li>
|
|
<li>SoundManager.touchLocked is now set to <code>false</code> should the device be using legacy Audio, avoiding the unlock call running without need.</li>
|
|
<li>Added <code>type</code> parameter to <code>VideoTexture.fromUrl</code> allowing you to define the mime-type of the video file, which is required for Firefox and Safari in most cases.</li>
|
|
<li>PIXI.BaseTexture.forceLoaded allows you to set a BaseTexture as loaded, with the given width and height. It then calls <code>BaseTexture.dirty</code>. This is important for when you don't want to modify the shape of the source object by forcing in <code>complete</code> or dimension properties it may not naturally have, but still wish to use it as a base texture.</li>
|
|
<li>SoundManager.volume now has its input value clamped to ensure it's between 0 and 1 (inclusive)</li>
|
|
<li>Removed <code>Input.moveCallback</code> and <code>Input.moveCallbackContext</code> as neither are used any longer. Use <code>Input.addMoveCallback</code>.</li>
|
|
<li>SoundManager now uses the new <code>Touch.addTouchLockCallback</code> methods to handle mobile device audio unlocking.</li>
|
|
<li>If a BitmapData is created with a width or height set to zero then the width and/or height are set to a default value (256) instead to avoid getContext errors.</li>
|
|
<li>RetroFont has been updated to use RenderTexture.renderXY, removing the need for creating a Point object each update.</li>
|
|
<li>RetroFont no longer puts any entries into the TextureCache or generates any UUIDs on instantiation, speeding up creation and lowering memory use.</li>
|
|
<li>BitmapData.update now validates the <code>width</code> and <code>height</code> values to ensure they aren't lower than 1, which would previously cause a context error.</li>
|
|
<li>Texture.requiresReTint is a new property that controls if a texture requires the display object to be re-tinted having been updated internally. The LoadTexture component now sets this.</li>
|
|
<li>PIXI.Sprite.tintedTexture contains a canvas object that holds the tinted version of the Sprite. This is only populated in Canvas, not in WebGL.</li>
|
|
<li>ScaleManager.scaleSprite will no longer try and scale a display object that doesn't have a scale property.</li>
|
|
<li>The LoadTexture component has a new property <code>customRender</code> which is checked for in the Core postUpdate to know when to render custom elements like Videos.</li>
|
|
<li>BitmapText line spacing and word wrapping has been vastly improved and bought in-line with how Pixi 3 handles it, but with additional anchor support.</li>
|
|
<li>P2.Body.loadPolygon now allows the <code>key</code> parameter to be passed as <code>null</code> - when this happens the <code>object</code> parameter can be the actual physics object data instead of a string pointing to the cache, allowing you to take advantage of adding multiple convex shapes with automatic adjustments for center of mass #1801</li>
|
|
<li>Tilemap.addTilesetImage can now accept a BitmapData as the <code>key</code> parameter and will use the BitmapData to render the tileset with instead of an image from the cache (thanks to @unstoppablecarl for the idea #1838)</li>
|
|
<li>Device now uses a new way to detect when Phaser is running under a NW.js (formerly Node-WebKit) environment, using feature detection, instead of relying on a guarded require statement. The former way was the source of a known incompatibility with browserify and similar tools (thanks @rblopes #1851)</li>
|
|
<li>Sprite vs. Tilemap collision can now check if the sprite overlaps the tilemap without trying to separate it (thanks @Preece #1810)</li>
|
|
<li>The Asset Pack JSON Format example has been updated to include new and missing file formats (thanks @rblopes #1808)</li>
|
|
<li>RenderTexture now takes the display objects alpha into consideration when rendering it, before it would always reset worldAlpha to 1 before rendering, thus ignoring any alpha that may be set.</li>
|
|
<li>P2.enableBody now checks if an anchor exists on target object before attempting to set its value (thanks @standardgaussian #1885)</li>
|
|
<li>Debug.currentAlpha wasn't being used to set the alpha of the Debug context at all (was always set to 1) but now updates the alpha of the Debug context before anything is rendered to it (thanks @wayfu #1888)</li>
|
|
<li>If the device is detected as a Windows Phone the renderer is automatically set to use Canvas, even if WebGL or AUTO was requested (thanks @ramarro123 #1706)</li>
|
|
<li>RandomDataGenerator.weightedPick has been tweaked slightly to allow for a more even distribution of weights. It still favors the earlier array elements, but will accurately include 'distance' elements as well (thanks @gingerbeardman #1751)</li>
|
|
<li>BitmapData.clear has 4 new optional parameters: x, y, width and height, that define the area to be cleared. If left undefined it works exactly the same as before and clears the entire canvas.</li>
|
|
<li>Added Phaser.Keyboard.COMMA and Phaser.Keyboard.PERIOD to the consts list.</li>
|
|
<li>Canvas.setSmoothingEnabled only applies the value of the property exists, which avoids the Chrome webkit prefix deprecation warnings.</li>
|
|
<li>PIXI._CompileShader can now take an array or a string for the fragment src.</li>
|
|
<li>AnimationParser.spriteSheet can now accept either a string-based key or an HTML Image object as the key argument.</li>
|
|
<li>LoaderParser.bitmapFont, xmlBitmapFont and jsonBitmapFont all now return the font data rather than write it to the now deprecated PIXI.BitmapText.fonts global array.</li>
|
|
<li>PIXI.BitmapText has been removed as a global array, as it is no longer used.</li>
|
|
<li>PIXI has been made available for Phaser when using requireJS (thanks @mkristo #1923)</li>
|
|
<li>Internally the Time class has been updated to split out the RAF and SetTimeout implementations. This cuts down the update loop workload significantly, which was causing a performance optimization bottleneck in V8.</li>
|
|
<li>TweenData.update now uses the <code>Time.elapsedMS</code> value for its delta calculation, instead of the physicsStep - this is because tweens are inherently time duration based and on a lagging system they were not properly completing when they should do (also addresses #1819)</li>
|
|
<li>World.stateChange is a new method that is called whenever the state changes or restarts. It resets the world x/y coordinates back to zero and then resets the Camera.</li>
|
|
<li>All undefined argument checks were changed from <code>if (typeof x === 'undefined')</code> to <code>if (x === undefined)</code> removing the typeof check and saving some bytes across the codebase in the process.</li>
|
|
<li>Text.updateText will now check the width and height values of the Text canvas and if either are zero it sets <code>Text.renderable = false</code> to avoid throwing WebGL texture binding errors.</li>
|
|
<li>WebGL context loss and restoration is now handled directly by Phaser.</li>
|
|
<li>Cache.clearGLTextures empties out all of the GL Textures from Images stored in the cache. This is called automatically when the WebGL context is lost and then restored.</li>
|
|
</ul>
|
|
<h3>Bug Fixes</h3><ul>
|
|
<li>The LoadTexture component has had a redundant <code>dirty</code> call removed from it that was causing textures to be re-uploaded to the GPU even though they may already have been on it.</li>
|
|
<li>TileSprites were missing a <code>physicsType</code> property, causing them to not collide with anything (thanks @numbofathma #1702)</li>
|
|
<li>Sprite was missing the Health and InCamera components.</li>
|
|
<li>A Tween could be incorrectly set to never end if it was given a duration of zero (thanks @hardalias #1710)</li>
|
|
<li>Added guards around <code>context.getImageData</code> calls in BitmapData, Text and Canvas Tinting classes to avoid crashing restricted browsers like Epic Browser. Please understand that several Phaser features won't work correctly with this browser (thanks @Erik3000 #1714)</li>
|
|
<li>P2 Body.destroy now checks for the existence of a <code>sprite</code> property on the body before nulling it (thanks @englercj #1736)</li>
|
|
<li>The version of p2.js being used in 2.3.0 wasn't correctly declaring itself as a global for browserify / requireJS. This update resolves that (thanks @dgoemans #1723)</li>
|
|
<li>AnimationManager.frameName setter wasn't checking if <code>_frameData</code> existed before accessing it (thanks @nesukun #1727)</li>
|
|
<li>P2.getConstraints would return an array of null objects. It now returns the raw p2 constraint objects (thanks @valueerrorx #1726)</li>
|
|
<li>TilemapLayer docs incorrectly reported it as extending Phaser.Image, but it doesn't share the same components so has been updated.</li>
|
|
<li>TilemapLayer was missing the Input component (thanks @uhe1231 #1700)</li>
|
|
<li>PIXI.Graphics in Canvas mode wouldn't respect the objects visible or alpha zero properties, rendering it regardless (thanks @TimvdEijnden #1720)</li>
|
|
<li>Enabling Arcade Physics would add the deltaCap property onto Phaser.Time, even though the property doesn't exist any more, changing the class shape in the process.</li>
|
|
<li>Phaser.StateManager would incorrectly call <code>loadUpdate</code> while the game was paused or if the State didn't have an <code>update</code> method defined even after the loader was completed.</li>
|
|
<li>Phaser.StateManager would incorrectly call <code>loadRender</code> while the game was paused or if the State didn't have an <code>render</code> method defined even after the loader was completed.</li>
|
|
<li>Added the missing <code>preRender</code> function to the Phaser.State class template.</li>
|
|
<li>Fixed bug in Pixi where RenderTexture.render would ignore the given matrix.</li>
|
|
<li>Fixed a bug in Pixi where drawing a Sprite to a RenderTexture would reset the Sprites transform to an identity Matrix.</li>
|
|
<li>The SoundManager didn't accurately detect devices or browser environments with no sound card present and would try to carry on using a null Web Audio context (thanks @englercj #1746)</li>
|
|
<li>The Tween.onStart signal wasn't dispatched if the Tween had a delay set. It's now dispatched immediately if no delay, or after the delay if set. It also respects the <code>autoStart</code> parameter and will still dispatch even if <code>autoStart</code> is true.</li>
|
|
<li>Input.addMoveCallback used to return the index of the callback entry in the internal <code>moveCallbacks</code> array. However as callbacks were removed the indexes became invalid, potentially causing a future <code>Input.deleteMoveCallback</code> to remove the wrong callback entirely or error. Input.deleteMoveCallback now takes the original callback and context as its parameters to ensure deletion safety.</li>
|
|
<li>Graphics constructor now sets x/y parameters to zero if undefined. Before it would set them to undefined as the type check wasn't strict.</li>
|
|
<li>Math.isOdd now returns an actual boolean value instead of 1 (thanks @formigone #1792)</li>
|
|
<li>Rope constructor was fixed enabling it again (thanks @gionatan7 #1799)</li>
|
|
<li>FrameData.getFrameIndexes when called with a partial array (such as creating an animation out of a set of frames) would return the indexes array padded out with 'undefined' entries, causing short animations to never fully play through.</li>
|
|
<li>AnimationManager.add no longer sets the <code>currentFrame</code> property when just adding an Animation to a Sprite. The <code>currentFrame</code> property is now only set when the animation begins playing. This avoids the Sprite.frame and Sprite.frameName properties from returning incorrect results after adding (but not playing) an Animation. It also allows very short animations (2 frames) to play correctly without needing to loop.</li>
|
|
<li>PIXI.Graphics was calling Polygon.flatten in its drawShape call, causing the original Polygon object to internally change. It now takes a clone of the polygon and only flattens that (#1779)</li>
|
|
<li>Tween.generateData didn't set a default value for the <code>frameRate</code> parameter if undefined, causing an infinite loop (thanks @rblopes #1782 #1785)</li>
|
|
<li>Fixed the Pixelate filter, changing the <code>dimensions</code> uniform to a 2f and removing un-needed vecs from the fragment src. Also fixed the size getter and added sizeX and sizeY getters/setters (#1780)</li>
|
|
<li>Tween.to and Tween.from can now accept <code>null</code> as the ease parameter value. If <code>null</code> it will use the default tween, as per the documentation (thanks @nkovacs #1817)</li>
|
|
<li>TilemapParser.parseTiledJSON would ignore 'falsey' properties set on Objects in Tiled JSON tilemaps, such as <code>x: 0</code> or <code>visible: false</code>. These properties are now accurately copied over to the destination map data (thanks @MaksJS #1818)</li>
|
|
<li>Removed un-necessary PIXI.TextureCache pollution in Phaser.LoaderParser.bitmapFont.</li>
|
|
<li>Sound.resume wouldn't properly restart looped sounds in Chrome after being paused. Phaser now specifically handles the Chrome 42 bug and later fix (thanks @nkovacs #1820)</li>
|
|
<li>Setting the BitmapText.maxWidth property would throw an error (thanks @drhayes #1807)</li>
|
|
<li>If running under Cordova and iOS the Game.lockRender boolean will be set to <code>true</code> when the game pauses and <code>false</code> when it resumes. This avoids the <code>gpus_ReturnNotPermittedKillClient</code> app crash on iOS (thanks @cncolder #1800)</li>
|
|
<li>Sound.restart and Sound.stop now properly disconnect the sound from the gainNode (or external node) before stopping it, allowing restart to work correctly (thanks @eofs #1796)</li>
|
|
<li>When loading an Audio Sprite from an Asset Pack the wrong Loader method was being used (thanks @boniatillo-com #1777)</li>
|
|
<li>Due to a Pixi 2 issue TileSprite when running under WebGL didn't respect the world alpha setting and would only work with its own alpha (thanks @hanenbro #1774)</li>
|
|
<li>TileSprite now fully supports animation again, having been broken for several versions due to a Pixi upgrade. We've updated the way TileSprites generate their textures internally considerably and animation support is back across both Canvas and WebGL as a result (#1653)</li>
|
|
<li>Setting mute to false on Sound that was never muted caused its volume to be set to zero (thanks @brianbunch #1870)</li>
|
|
<li>P2.Body.createGroupCallback incorrectly referenced the <code>_groupCallbackContext</code> when deleting it (thanks @Langerz82 #1886)</li>
|
|
<li>When reusing a Tween created with an array of properties the values would get exponentially added to the TweenData internal array each time the tween was re-run (thanks @SBCGames #1747)</li>
|
|
<li>Reading the dimensions of a Text object would reset its resolution property (thanks @joelika #1717)</li>
|
|
<li>Text.addColor would incorrectly color the text stroke if set (thanks @llevkin #1893)</li>
|
|
<li>Setting the scaleMode property of a Game configuration object would cause a ScaleManager TypeError in the resize method. It now stores the scale mode locally and applies it after boot (thanks @Mickawesomesque #1534)</li>
|
|
<li>Device.windowsPhone should now correctly identify Windows Phone 8.1 devices, which also think they are iOS and Androids. If you find a device that gets around this check please send us its ua string! (thanks @jounii #1496)</li>
|
|
<li>Rope.segments used the wrong vertices property, causing a runtime error.</li>
|
|
<li>Debug.ropeSegments didn't take the scale of the Rope object into consideration, causing incorrect debug rendering.</li>
|
|
<li>If a Sound was muted, or had its volume changed while it was still decoding (i.e. before it started playback) then the mute and/or volume were ignored and the sound would play anyway (thanks @brianbunch #1872)</li>
|
|
<li>Group.addMultiple if given a Group.children array as the first parameter would fail as the original group length was decreased out of line with the children being added. Group.addMultiple now checks if the children argument is a Phaser.Group instance, and if so it uses Group.moveAll instead on it (thanks @AnderbergE #1898)</li>
|
|
<li>PIXI.DisplayObject.updateTransform now nulls the _currentBounds property (thanks @gaufqwi #1906)</li>
|
|
<li>Improved the JSON BitmapText implementation (thanks @Feenposhleen #1912 #1837)</li>
|
|
<li>game.make.group did not setup parent correctly (thanks @mthurlin #1911)</li>
|
|
<li>Fix reference error for process in the Device class (thanks @mkristo #1922)</li>
|
|
<li>Sprites with Arcade Physics bodies that had <code>collideWorldBounds</code> enabled would be moved to the wrong position if you restarted a State (or swapped to a new State) that reset the world bounds (thanks @vulvulune #1775)</li>
|
|
<li>PIXI.BaseTexture.fromCanvas now checks the canvas dimensions and if either face is zero it sets them to 1px to avoid WebGL texture binding errors.</li>
|
|
</ul>
|
|
<h3>Deprecated</h3><p>All of the following have been removed from Phaser 2.4.
|
|
They were flagged as deprecated in Phaser 2.2 or earlier.</p>
|
|
<ul>
|
|
<li>Camera.screenView</li>
|
|
<li>ScaleManager.maxIterations</li>
|
|
<li>ScaleManager.enterPortrait (see onOrientationChange)</li>
|
|
<li>ScaleManager.enterLandscape (see onOrientationChange)</li>
|
|
<li>ScaleManager.enterFullScreen (see onFullScreenChange)</li>
|
|
<li>ScaleManager.leaveFullScreen (see onFullScreenChange)</li>
|
|
<li>ScaleManager.fullScreenFailed (see onFullScreenError)</li>
|
|
<li>ScaleManager.checkResize</li>
|
|
<li>ScaleManager.checkOrientation</li>
|
|
<li>ScaleManager.setScreenSize (see updateLayout)</li>
|
|
<li>ScaleManager.setSize (see reflowCanvas)</li>
|
|
<li>ScaleManager.checkOrientationState (see reflowCanvas)</li>
|
|
<li>ScaleManager.orientation (see screenOrientation)</li>
|
|
<li>Gamepad.disabled (see enabled)</li>
|
|
<li>Input.currentPointers (see totalActivePointers)</li>
|
|
<li>Input.disabled (see enabled)</li>
|
|
<li>Keyboard.disabled (see enabled)</li>
|
|
<li>Mouse.disabled (see enabled)</li>
|
|
<li>Mouse.mouseMoveCallback (see Input.addMoveCallback)</li>
|
|
<li>MSPointer.disabled (see enabled)</li>
|
|
<li>Touch.disabled (see enabled)</li>
|
|
<li>Cache.getUrl (see getURL)</li>
|
|
<li>Math.truncate (see Math.trunc)</li>
|
|
<li>Math.snapToInArray (see Phaser.ArrayUtils.findClosest)</li>
|
|
<li>Math.interpolateFloat (see Math.linear)</li>
|
|
<li>Math.normalizeLatitude (use Phaser.Math.clamp(lat, -90, 90))</li>
|
|
<li>Math.normalizeLongitude (use Phaser.Math.wrap(lng, -180, 180))</li>
|
|
<li>Math.chanceRoll (use Phaser.Utils.chanceRoll)</li>
|
|
<li>Math.numberArray (use Phaser.ArrayUtils.numberArray)</li>
|
|
<li>Math.numberArrayStep (use Phaser.ArrayUtils.numberArrayStep)</li>
|
|
<li>Math.limitValue (use Phaser.Math.clamp)</li>
|
|
<li>Math.randomSign (use Phaser.Utils.randomChoice(-1, 1))</li>
|
|
<li>Math.angleLimit (use Phaser.Math.clamp)</li>
|
|
<li>Math.getRandom (use Phaser.ArrayUtils.getRandomItem)</li>
|
|
<li>Math.removeRandom (use Phaser.ArrayUtils.removeRandomItem)</li>
|
|
<li>Math.floor (use Math.trunc)</li>
|
|
<li>Math.ceil (use Phaser.Math.roundAwayFromZero)</li>
|
|
<li>Math.shift (use Phaser.ArrayUtils.rotate)</li>
|
|
<li>Math.shuffleArray (use Phaser.ArrayUtils.shuffle)</li>
|
|
<li>Math.distanceRounded (do the rounding locally)</li>
|
|
<li>Canvas.getOffset (see Phaser.DOM.getOffset)</li>
|
|
<li>Canvas.getAspectRatio (see Phaser.DOM.getAspectRatio)</li>
|
|
<li>TilemapLayer.tileColor (use TilemapLayer.debugSettings.missingImageFill)</li>
|
|
<li>Phaser.ArrayList alias removed, now use Phaser.ArraySet</li>
|
|
<li>Utils.transposeArray (see Phaser.ArrayUtils.transposeMatrix)</li>
|
|
<li>Utils.rotateArray (see Phaser.ArrayUtils.rotateMatrix)</li>
|
|
<li>Utils.shuffle (see Phaser.ArrayUtils.shuffle)</li>
|
|
</ul>
|
|
<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/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 © 2015 Photon Storm Limited.</p>
|
|
<p>All rights reserved.</p>
|
|
<p>"Above all, video games are meant to be just one thing: fun. Fun for everyone." - 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-2015 Photon Storm Ltd.
|
|
</span>
|
|
<br />
|
|
|
|
<span class="jsdoc-message">
|
|
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha10</a>
|
|
on Fri Jul 24 2015 13:29:46 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> |