phaser/docs/Phaser.Loader.html

11687 lines
219 KiB
HTML
Raw Normal View History

2013-10-02 14:05:55 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Phaser Class: Loader</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
2014-11-15 20:01:46 +00:00
<link type="text/css" rel="stylesheet" href="styles/default.css">
2013-10-02 14:05:55 +00:00
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
</head>
<body>
2014-11-25 00:23:44 +00:00
2013-10-02 14:05:55 +00:00
<div class="container-fluid">
<div class="navbar navbar-fixed-top navbar-inverse">
2014-11-25 00:23:44 +00:00
<div style="position: absolute; width: 143px; height: 31px; right: 10px; top: 10px; z-index: 1050"><a href="http://phaser.io"><img src="img/phaser.png" border="0" /></a></div>
2013-10-02 14:05:55 +00:00
<div class="navbar-inner">
2014-11-25 00:23:44 +00:00
<a class="brand" href="index.html">Phaser API</a>
2013-10-02 14:05:55 +00:00
<ul class="nav">
2014-11-25 00:23:44 +00:00
2013-10-02 14:05:55 +00:00
<li class="dropdown">
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
2013-10-02 14:05:55 +00:00
class="caret"></b></a>
<ul class="dropdown-menu ">
2014-04-10 22:13:43 +00:00
<li class="class-depth-0">
<a href="Phaser.html">Phaser</a>
2013-10-02 14:05:55 +00:00
</li>
2014-11-15 20:01:46 +00:00
<li class="class-depth-0">
<a href="PIXI.html">PIXI</a>
</li>
2013-10-02 14:05:55 +00:00
</ul>
</li>
<li class="dropdown">
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
class="caret"></b></a>
<ul class="dropdown-menu ">
2016-08-26 00:18:47 +00:00
<li class="class-depth-0">
<a href="Event.html">Event</a>
</li>
<li class="class-depth-0">
<a href="EventTarget.html">EventTarget</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.Animation.html">Animation</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.AnimationManager.html">AnimationManager</a>
2013-10-02 14:05:55 +00:00
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.AnimationParser.html">AnimationParser</a>
2013-10-02 14:05:55 +00:00
</li>
2014-11-25 00:23:44 +00:00
<li class="class-depth-1">
<a href="Phaser.ArraySet.html">ArraySet</a>
</li>
2014-11-15 20:01:46 +00:00
<li class="class-depth-1">
<a href="Phaser.ArrayUtils.html">ArrayUtils</a>
</li>
2014-10-09 15:12:53 +00:00
<li class="class-depth-1">
<a href="Phaser.AudioSprite.html">AudioSprite</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.BitmapData.html">BitmapData</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.BitmapText.html">BitmapText</a>
</li>
2016-06-17 00:11:24 +00:00
<li class="class-depth-1">
<a href="Phaser.Bullet.html">Bullet</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Button.html">Button</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Cache.html">Cache</a>
2013-10-02 14:05:55 +00:00
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Camera.html">Camera</a>
2013-10-02 14:05:55 +00:00
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Canvas.html">Canvas</a>
2013-10-02 14:05:55 +00:00
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Circle.html">Circle</a>
2013-10-02 14:05:55 +00:00
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Color.html">Color</a>
2013-10-03 00:21:08 +00:00
</li>
2015-03-23 23:46:30 +00:00
<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>
2015-07-22 14:31:30 +00:00
<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>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Device.html">Device</a>
2013-10-02 14:05:55 +00:00
</li>
2015-07-22 14:31:30 +00:00
<li class="class-depth-1">
<a href="Phaser.DeviceButton.html">DeviceButton</a>
</li>
2014-11-15 20:01:46 +00:00
<li class="class-depth-1">
<a href="Phaser.DOM.html">DOM</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Easing.html">Easing</a>
</li>
2015-03-23 23:46:30 +00:00
<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>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Ellipse.html">Ellipse</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Events.html">Events</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Filter.html">Filter</a>
</li>
2014-09-09 14:36:56 +00:00
<li class="class-depth-1">
<a href="Phaser.FlexGrid.html">FlexGrid</a>
</li>
<li class="class-depth-1">
<a href="Phaser.FlexLayer.html">FlexLayer</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Frame.html">Frame</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.FrameData.html">FrameData</a>
2013-10-03 00:21:08 +00:00
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.Game.html">Game</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2014-02-05 06:29:17 +00:00
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Graphics.html">Graphics</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.Group.html">Group</a>
</li>
2016-08-26 00:18:47 +00:00
<li class="class-depth-1">
<a href="Phaser.Hermite.html">Hermite</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Image.html">Image</a>
</li>
2015-07-22 14:31:30 +00:00
<li class="class-depth-1">
<a href="Phaser.ImageCollection.html">ImageCollection</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.Input.html">Input</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.InputHandler.html">InputHandler</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.Key.html">Key</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
2016-08-26 00:18:47 +00:00
<li class="class-depth-1">
<a href="Phaser.KeyCode.html">KeyCode</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2014-02-05 06:29:17 +00:00
<a href="Phaser.Line.html">Line</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.Loader.html">Loader</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.LoaderParser.html">LoaderParser</a>
2013-10-02 14:05:55 +00:00
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.Math.html">Math</a>
</li>
2015-07-22 14:31:30 +00:00
<li class="class-depth-1">
<a href="Phaser.Matrix.html">Matrix</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.Mouse.html">Mouse</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.MSPointer.html">MSPointer</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 19:18:24 +00:00
<a href="Phaser.Net.html">Net</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Particle.html">Particle</a>
</li>
<li class="class-depth-1">
2013-10-02 19:18:24 +00:00
<a href="Phaser.Particles.html">Particles</a>
</li>
2014-10-09 15:12:53 +00:00
<li class="class-depth-2">
<a href="Phaser.Particles.Arcade.html">Arcade</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
2013-10-02 19:18:24 +00:00
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
</li>
2016-08-26 00:18:47 +00:00
<li class="class-depth-1">
<a href="Phaser.Path.html">Path</a>
</li>
<li class="class-depth-1">
<a href="Phaser.PathFollower.html">PathFollower</a>
</li>
<li class="class-depth-1">
<a href="Phaser.PathPoint.html">PathPoint</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Physics.html">Physics</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Physics.Arcade.html">Arcade</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-3">
2015-08-24 14:43:45 +00:00
<a href="Phaser.Physics.Arcade.TilemapCollision.html">TilemapCollision</a>
2015-03-23 23:46:30 +00:00
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
<a href="Phaser.Physics.Ninja.html">Ninja</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
<a href="Phaser.Physics.P2.html">P2</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.Body.html">Body</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.Material.html">Material</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
</li>
2014-09-09 14:36:56 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.RotationalSpring.html">RotationalSpring</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.Plugin.html">Plugin</a>
</li>
2016-08-26 00:18:47 +00:00
<li class="class-depth-2">
<a href="Phaser.Plugin.PathManager.html">PathManager</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.PluginManager.html">PluginManager</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.Point.html">Point</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.Pointer.html">Pointer</a>
</li>
2015-10-15 11:06:38 +00:00
<li class="class-depth-1">
<a href="Phaser.PointerMode.html">PointerMode</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Polygon.html">Polygon</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.QuadTree.html">QuadTree</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.Rectangle.html">Rectangle</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.RenderTexture.html">RenderTexture</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-03 00:21:08 +00:00
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.RetroFont.html">RetroFont</a>
</li>
2014-09-09 14:36:56 +00:00
<li class="class-depth-1">
<a href="Phaser.Rope.html">Rope</a>
</li>
2015-07-22 14:31:30 +00:00
<li class="class-depth-1">
<a href="Phaser.RoundedRectangle.html">RoundedRectangle</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.ScaleManager.html">ScaleManager</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.Signal.html">Signal</a>
</li>
<li class="class-depth-1">
<a href="Phaser.SignalBinding.html">SignalBinding</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2014-02-05 06:29:17 +00:00
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-03 00:21:08 +00:00
<a href="Phaser.Sound.html">Sound</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-03 00:21:08 +00:00
<a href="Phaser.SoundManager.html">SoundManager</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Sprite.html">Sprite</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.Stage.html">Stage</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.State.html">State</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.StateManager.html">StateManager</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.Text.html">Text</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Tile.html">Tile</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Tilemap.html">Tilemap</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.TilemapParser.html">TilemapParser</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Tileset.html">Tileset</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-25 15:54:40 +00:00
<a href="Phaser.TileSprite.html">TileSprite</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Time.html">Time</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Timer.html">Timer</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2014-02-05 06:29:17 +00:00
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-10-02 14:05:55 +00:00
<a href="Phaser.Touch.html">Touch</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Tween.html">Tween</a>
</li>
2014-11-25 00:23:44 +00:00
<li class="class-depth-1">
<a href="Phaser.TweenData.html">TweenData</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.TweenManager.html">TweenManager</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Utils.html">Utils</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
<a href="Phaser.Utils.Debug.html">Debug</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2015-07-22 14:31:30 +00:00
<a href="Phaser.Video.html">Video</a>
2013-10-02 14:05:55 +00:00
</li>
2016-06-17 00:11:24 +00:00
<li class="class-depth-1">
<a href="Phaser.Weapon.html">Weapon</a>
</li>
2014-11-15 20:01:46 +00:00
<li class="class-depth-1">
2015-07-22 14:31:30 +00:00
<a href="Phaser.World.html">World</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-07-22 14:31:30 +00:00
<a href="PIXI.AbstractFilter.html">AbstractFilter</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-07-22 14:31:30 +00:00
<a href="PIXI.BaseTexture.html">BaseTexture</a>
2014-11-15 20:01:46 +00:00
</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>
2015-08-24 14:43:45 +00:00
<li class="class-depth-1">
<a href="PIXI.CanvasPool.html">CanvasPool</a>
</li>
2014-11-15 20:01:46 +00:00
<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.DisplayObjectContainer.html">DisplayObjectContainer</a>
</li>
2016-02-08 17:01:36 +00:00
<li class="class-depth-1">
<a href="PIXI.EarCut.html">EarCut</a>
</li>
2014-11-15 20:01:46 +00:00
<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">
2015-03-23 23:46:30 +00:00
<a href="PIXI.PIXI.html">PIXI</a>
2014-11-15 20:01:46 +00:00
</li>
2016-07-01 15:57:13 +00:00
<li class="class-depth-2">
<a href="PIXI.PIXI.DisplayObject.html">DisplayObject</a>
</li>
2014-11-15 20:01:46 +00:00
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.PixiFastShader.html">PixiFastShader</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.PixiShader.html">PixiShader</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.PrimitiveShader.html">PrimitiveShader</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.RenderTexture.html">RenderTexture</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.Rope.html">Rope</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.Sprite.html">Sprite</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.SpriteBatch.html">SpriteBatch</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.Strip.html">Strip</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.StripShader.html">StripShader</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.Texture.html">Texture</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.TilingSprite.html">TilingSprite</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.WebGLBlendModeManager.html">WebGLBlendModeManager</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.WebGLFastSpriteBatch.html">WebGLFastSpriteBatch</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.WebGLFilterManager.html">WebGLFilterManager</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.WebGLRenderer.html">WebGLRenderer</a>
2014-11-15 20:01:46 +00:00
</li>
2015-03-23 23:46:30 +00:00
</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 ">
2014-11-15 20:01:46 +00:00
2016-06-03 17:48:34 +00:00
<li class="class-depth-0">
<a href="global.html#ANGLE_DOWN">ANGLE_DOWN</a>
</li>
<li class="class-depth-0">
<a href="global.html#ANGLE_LEFT">ANGLE_LEFT</a>
</li>
<li class="class-depth-0">
<a href="global.html#ANGLE_NORTH_EAST">ANGLE_NORTH_EAST</a>
</li>
<li class="class-depth-0">
<a href="global.html#ANGLE_NORTH_WEST">ANGLE_NORTH_WEST</a>
</li>
<li class="class-depth-0">
<a href="global.html#ANGLE_RIGHT">ANGLE_RIGHT</a>
</li>
<li class="class-depth-0">
<a href="global.html#ANGLE_SOUTH_EAST">ANGLE_SOUTH_EAST</a>
</li>
<li class="class-depth-0">
<a href="global.html#ANGLE_SOUTH_WEST">ANGLE_SOUTH_WEST</a>
</li>
<li class="class-depth-0">
<a href="global.html#ANGLE_UP">ANGLE_UP</a>
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-0">
2015-07-22 14:31:30 +00:00
<a href="global.html#AUTO">AUTO</a>
2014-11-15 20:01:46 +00:00
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-0">
2015-07-22 14:31:30 +00:00
<a href="global.html#BITMAPDATA">BITMAPDATA</a>
2014-11-15 20:01:46 +00:00
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-0">
2015-07-22 14:31:30 +00:00
<a href="global.html#BITMAPTEXT">BITMAPTEXT</a>
2014-11-15 20:01:46 +00:00
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-0">
<a href="global.html#blendModes">blendModes</a>
2014-11-15 20:01:46 +00:00
</li>
2016-06-17 00:11:24 +00:00
<li class="class-depth-0">
<a href="global.html#BOTTOM_CENTER">BOTTOM_CENTER</a>
</li>
<li class="class-depth-0">
<a href="global.html#BOTTOM_LEFT">BOTTOM_LEFT</a>
</li>
<li class="class-depth-0">
<a href="global.html#BOTTOM_RIGHT">BOTTOM_RIGHT</a>
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-0">
2015-07-22 14:31:30 +00:00
<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>
2016-06-17 00:11:24 +00:00
<li class="class-depth-0">
<a href="global.html#CENTER">CENTER</a>
</li>
2015-07-22 14:31:30 +00:00
<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>
2016-06-09 16:13:31 +00:00
<li class="class-depth-0">
<a href="global.html#displayList">displayList</a>
</li>
2015-07-22 14:31:30 +00:00
<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>
2016-08-26 00:18:47 +00:00
<li class="class-depth-0">
<a href="global.html#emit">emit</a>
</li>
2015-07-22 14:31:30 +00:00
<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>
2016-06-09 16:13:31 +00:00
<li class="class-depth-0">
<a href="global.html#HORIZONTAL">HORIZONTAL</a>
</li>
2015-07-22 14:31:30 +00:00
<li class="class-depth-0">
<a href="global.html#IMAGE">IMAGE</a>
</li>
2016-06-09 16:13:31 +00:00
<li class="class-depth-0">
<a href="global.html#LANDSCAPE">LANDSCAPE</a>
</li>
2015-07-22 14:31:30 +00:00
<li class="class-depth-0">
<a href="global.html#LEFT">LEFT</a>
</li>
2016-06-17 00:11:24 +00:00
<li class="class-depth-0">
<a href="global.html#LEFT_BOTTOM">LEFT_BOTTOM</a>
</li>
<li class="class-depth-0">
<a href="global.html#LEFT_CENTER">LEFT_CENTER</a>
</li>
<li class="class-depth-0">
<a href="global.html#LEFT_TOP">LEFT_TOP</a>
</li>
2015-07-22 14:31:30 +00:00
<li class="class-depth-0">
<a href="global.html#LINE">LINE</a>
</li>
2016-08-26 00:18:47 +00:00
<li class="class-depth-0">
<a href="global.html#listeners">listeners</a>
</li>
2015-07-22 14:31:30 +00:00
<li class="class-depth-0">
<a href="global.html#MATRIX">MATRIX</a>
</li>
2016-08-26 00:18:47 +00:00
<li class="class-depth-0">
<a href="global.html#mixin">mixin</a>
</li>
2015-07-22 14:31:30 +00:00
<li class="class-depth-0">
<a href="global.html#NONE">NONE</a>
</li>
2016-08-26 00:18:47 +00:00
<li class="class-depth-0">
<a href="global.html#off">off</a>
</li>
<li class="class-depth-0">
<a href="global.html#on">on</a>
</li>
<li class="class-depth-0">
<a href="global.html#once">once</a>
</li>
2016-02-08 17:01:36 +00:00
<li class="class-depth-0">
<a href="global.html#PENDING_ATLAS">PENDING_ATLAS</a>
</li>
2016-08-26 00:18:47 +00:00
<li class="class-depth-2">
<a href="global.html#Phaser.Path#numPointsreturn%257Bnumber%257DThetotalnumberofPathPointsinthisPath.">Phaser.Path#numPoints
return {number} The total number of PathPoints in this Path.</a>
</li>
2015-07-22 14:31:30 +00:00
<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>
2014-11-15 20:01:46 +00:00
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-0">
2015-07-22 14:31:30 +00:00
<a href="global.html#POLYGON">POLYGON</a>
2014-11-15 20:01:46 +00:00
</li>
2016-06-09 16:13:31 +00:00
<li class="class-depth-0">
<a href="global.html#PORTRAIT">PORTRAIT</a>
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-0">
2015-07-22 14:31:30 +00:00
<a href="global.html#RECTANGLE">RECTANGLE</a>
2014-11-15 20:01:46 +00:00
</li>
2016-08-26 00:18:47 +00:00
<li class="class-depth-0">
<a href="global.html#removeAllListeners">removeAllListeners</a>
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-0">
2015-07-22 14:31:30 +00:00
<a href="global.html#RENDERTEXTURE">RENDERTEXTURE</a>
2014-11-15 20:01:46 +00:00
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-0">
2015-07-22 14:31:30 +00:00
<a href="global.html#RETROFONT">RETROFONT</a>
2014-11-15 20:01:46 +00:00
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-0">
2015-07-22 14:31:30 +00:00
<a href="global.html#RIGHT">RIGHT</a>
</li>
2016-06-17 00:11:24 +00:00
<li class="class-depth-0">
<a href="global.html#RIGHT_BOTTOM">RIGHT_BOTTOM</a>
</li>
<li class="class-depth-0">
<a href="global.html#RIGHT_CENTER">RIGHT_CENTER</a>
</li>
<li class="class-depth-0">
<a href="global.html#RIGHT_TOP">RIGHT_TOP</a>
</li>
2015-07-22 14:31:30 +00:00
<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>
2014-11-15 20:01:46 +00:00
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-0">
<a href="global.html#scaleModes">scaleModes</a>
2014-11-15 20:01:46 +00:00
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-0">
2015-07-22 14:31:30 +00:00
<a href="global.html#SPRITE">SPRITE</a>
</li>
<li class="class-depth-0">
<a href="global.html#SPRITEBATCH">SPRITEBATCH</a>
</li>
2016-08-26 00:18:47 +00:00
<li class="class-depth-0">
<a href="global.html#stopImmediatePropagation">stopImmediatePropagation</a>
</li>
<li class="class-depth-0">
<a href="global.html#stopPropagation">stopPropagation</a>
</li>
2015-07-22 14:31:30 +00:00
<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>
2016-06-17 00:11:24 +00:00
<li class="class-depth-0">
<a href="global.html#TOP_CENTER">TOP_CENTER</a>
</li>
<li class="class-depth-0">
<a href="global.html#TOP_LEFT">TOP_LEFT</a>
</li>
<li class="class-depth-0">
<a href="global.html#TOP_RIGHT">TOP_RIGHT</a>
</li>
2015-07-22 14:31:30 +00:00
<li class="class-depth-0">
<a href="global.html#UP">UP</a>
2014-11-15 20:01:46 +00:00
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-0">
2015-07-22 14:31:30 +00:00
<a href="global.html#VERSION">VERSION</a>
2014-11-15 20:01:46 +00:00
</li>
2016-06-09 16:13:31 +00:00
<li class="class-depth-0">
<a href="global.html#VERTICAL">VERTICAL</a>
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-0">
2015-07-22 14:31:30 +00:00
<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>
2014-11-15 20:01:46 +00:00
</li>
2013-10-02 14:05:55 +00:00
</ul>
</li>
2014-11-25 00:23:44 +00:00
2014-11-15 20:01:46 +00:00
<li class="dropdown">
2014-11-25 00:23:44 +00:00
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Core<b class="caret"></b></a>
<ul class="dropdown-menu ">
2014-12-03 10:39:11 +00:00
<li class="class-depth-1"><a href="Phaser.Game.html">Game</a></li>
2014-11-25 00:23:44 +00:00
<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>
2015-07-22 14:31:30 +00:00
<li class="class-depth-1"><a href="Phaser.Cache.html">Cache</a></li>
2014-11-25 00:23:44 +00:00
<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>
2015-01-06 06:57:25 +00:00
<li class="class-depth-1"><a href="Phaser.Input.html">Input Manager</a></li>
2014-11-25 00:23:44 +00:00
<li class="class-depth-1"><a href="Phaser.ScaleManager.html">Scale Manager</a></li>
</ul>
</li>
2014-11-15 20:01:46 +00:00
2014-11-25 00:23:44 +00:00
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Game Objects<b class="caret"></b></a>
2014-11-15 20:01:46 +00:00
<ul class="dropdown-menu ">
2014-11-25 00:23:44 +00:00
<li class="class-depth-1"><a href="Phaser.GameObjectFactory.html">Factory (game.add)</a></li>
<li class="class-depth-1"><a href="Phaser.GameObjectCreator.html">Creator (game.make)</a></li>
<li class="class-depth-1"><a href="Phaser.Sprite.html">Sprite</a></li>
<li class="class-depth-1"><a href="Phaser.Image.html">Image</a></li>
<li class="class-depth-1"><a href="Phaser.Sound.html">Sound</a></li>
2015-07-22 14:31:30 +00:00
<li class="class-depth-1"><a href="Phaser.Video.html">Video</a></li>
2015-01-06 06:57:25 +00:00
<li class="class-depth-1"><a href="Phaser.Particles.Arcade.Emitter.html">Particle Emitter</a></li>
2014-12-03 10:39:11 +00:00
<li class="class-depth-1"><a href="Phaser.Particle.html">Particle</a></li>
2014-11-25 00:23:44 +00:00
<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>
2015-07-22 14:31:30 +00:00
<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>
2014-11-25 00:23:44 +00:00
<li class="class-depth-1"><a href="Phaser.Polygon.html">Polygon</a></li>
2015-07-22 14:31:30 +00:00
<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>
2014-11-25 00:23:44 +00:00
</ul>
</li>
2014-11-15 20:01:46 +00:00
2014-11-25 00:23:44 +00:00
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">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>
2016-06-17 00:11:24 +00:00
<li class="class-depth-2"><a href="Phaser.Weapon.html">Weapon</a></li>
2014-11-25 00:23:44 +00:00
<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>
2014-11-15 20:01:46 +00:00
</ul>
</li>
2014-11-25 00:23:44 +00:00
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">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>
2015-07-22 14:31:30 +00:00
<li class="class-depth-1"><a href="Phaser.DeviceButton.html">Device Button</a></li>
2014-11-25 00:23:44 +00:00
<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>
2016-08-26 00:18:47 +00:00
<li class="class-depth-1"><a href="Phaser.KeyCode.html">Key Codes</a></li>
2014-11-25 00:23:44 +00:00
<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 ">
2015-03-26 02:55:18 +00:00
<li class="class-depth-1"><a href="http://phaser.io">Phaser Web Site</a></li>
2014-11-25 00:23:44 +00:00
<li class="class-depth-1"><a href="https://github.com/photonstorm/phaser">Phaser Github</a></li>
2015-03-26 02:55:18 +00:00
<li class="class-depth-1"><a href="http://phaser.io/examples">Phaser Examples</a></li>
2014-11-25 00:23:44 +00:00
<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>
2015-07-22 14:31:30 +00:00
<li class="class-depth-1"><a href="http://phaser.io/learn">Tutorials</a></li>
2016-05-19 11:36:51 +00:00
<li class="class-depth-1"><a href="http://phaser.io/community/newsletter">Newsletter</a></li>
2015-03-26 02:55:18 +00:00
<li class="class-depth-1"><a href="http://phaser.io/community/twitter">Twitter</a></li>
2016-06-17 00:11:24 +00:00
<li class="class-depth-1"><a href="http://phaser.io/community/slack">Slack</a></li>
<li class="class-depth-1"><a href="http://phaser.io/community/donate">Donate</a></li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-1"><a href="https://www.codeandweb.com/texturepacker/phaser">Texture Packer</a></li>
2014-11-25 00:23:44 +00:00
</ul>
</li>
2014-11-15 20:01:46 +00:00
</ul>
</div>
</div>
<div class="row-fluid">
2013-10-02 14:05:55 +00:00
<div class="span8">
<div id="main">
2014-11-25 00:23:44 +00:00
<!--<h1 class="page-title">Class: Loader</h1>-->
2013-10-02 14:05:55 +00:00
<section>
<header>
<h2>
<span class="ancestors"><a href="Phaser.html">Phaser</a>.</span>
2013-10-02 14:05:55 +00:00
Loader
</h2>
</header>
<article>
<div class="container-overview">
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
id="Loader"><span class="type-signature"></span>new Loader<span class="signature">(game)</span><span class="type-signature"></span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
<div class="description">
2015-03-23 23:46:30 +00:00
<p>The Loader handles loading all external content such as Images, Sounds, Texture Atlases and data files.</p>
<p>The loader uses a combination of tag loading (eg. Image elements) and XHR and provides progress and completion callbacks.</p>
2016-08-26 00:18:47 +00:00
<p>Parallel loading (see <a href="Phaser.Loader.html#enableParallel">enableParallel</a>) is supported and enabled by default.<br>Load-before behavior of parallel resources is controlled by synchronization points as discussed in withSyncPoint.</p>
<p>Texture Atlases can be created with tools such as <a href="https://www.codeandweb.com/texturepacker/phaser">Texture Packer</a> and<br><a href="http://renderhjs.net/shoebox/">Shoebox</a></p>
2013-10-02 14:05:55 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>game</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Game.html">Phaser.Game</a></span>
</td>
<td class="description last"><p>A reference to the currently running game.</p></td>
</tr>
</tbody>
</table>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2015-03-23 23:46:30 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-22">line 22</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
</dl>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
</dd>
</div>
<h3 class="subsection-title">Members</h3>
<dl>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-08-24 14:43:45 +00:00
id=".PHYSICS_LIME_CORONA_JSON"><span class="type-signature">&lt;static, constant> </span>PHYSICS_LIME_CORONA_JSON<span class="type-signature"> :number</span></h4>
</dt>
<dd>
2014-11-15 20:01:46 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-322">line 322</a>
2014-11-15 20:01:46 +00:00
</dt>
2014-04-10 22:13:43 +00:00
</dl>
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-08-24 14:43:45 +00:00
id=".PHYSICS_PHASER_JSON"><span class="type-signature">&lt;static, constant> </span>PHYSICS_PHASER_JSON<span class="type-signature"> :number</span></h4>
2014-04-10 22:13:43 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2014-04-10 22:13:43 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-328">line 328</a>
2014-11-15 20:01:46 +00:00
</dt>
2014-04-10 22:13:43 +00:00
</dl>
</dd>
2013-10-02 14:05:55 +00:00
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-08-24 14:43:45 +00:00
id=".TEXTURE_ATLAS_JSON_ARRAY"><span class="type-signature">&lt;static, constant> </span>TEXTURE_ATLAS_JSON_ARRAY<span class="type-signature"> :number</span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-304">line 304</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
</dl>
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-08-24 14:43:45 +00:00
id=".TEXTURE_ATLAS_JSON_HASH"><span class="type-signature">&lt;static, constant> </span>TEXTURE_ATLAS_JSON_HASH<span class="type-signature"> :number</span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-310">line 310</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
2015-10-15 11:06:38 +00:00
</dl>
</dd>
<dt>
<h4 class="name "
id=".TEXTURE_ATLAS_JSON_PYXEL"><span class="type-signature">&lt;static, constant> </span>TEXTURE_ATLAS_JSON_PYXEL<span class="type-signature"> :number</span></h4>
</dt>
<dd>
<dl class="details">
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-334">line 334</a>
2015-10-15 11:06:38 +00:00
</dt>
2013-10-02 14:05:55 +00:00
</dl>
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-08-24 14:43:45 +00:00
id=".TEXTURE_ATLAS_XML_STARLING"><span class="type-signature">&lt;static, constant> </span>TEXTURE_ATLAS_XML_STARLING<span class="type-signature"> :number</span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-316">line 316</a>
2015-03-23 23:46:30 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="_withSyncPointDepth"><span class="type-signature"></span>_withSyncPointDepth<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>A counter: if more than zero, files will be automatically added as a synchronization point.</p>
</div>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>_withSyncPointDepth;</code></td>
<td class="type">
<span class="param-type">integer</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-227">line 227</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
</dl>
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
id="baseURL"><span class="type-signature"></span>baseURL<span class="type-signature"> :string</span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
<div class="description">
2016-08-26 00:18:47 +00:00
<p>If you want to append a URL before the path of any asset you can set this here.<br>Useful if allowing the asset base url to be configured outside of the game code.<br>The string <em>must</em> end with a &quot;/&quot;.</p>
2013-10-02 14:05:55 +00:00
</div>
<dl class="details">
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2015-07-22 14:31:30 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-83">line 83</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="cache"><span class="type-signature">&lt;internal> </span>cache<span class="type-signature"> :<a href="Phaser.Cache.html">Phaser.Cache</a></span></h4>
</dt>
<dd>
<div class="description">
<p>Local reference to the Phaser.Cache.</p>
</div>
<dl class="details">
<dt class="important tag-deprecated">Internal:</dt>
<dd class="tag-deprecated"><ul>
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
</ul></dd>
<dt class="tag-source">Source -
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-36">line 36</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
</dl>
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
</dd>
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<dt>
<h4 class="name "
id="crossOrigin"><span class="type-signature"></span>crossOrigin<span class="type-signature"> :boolean|string</span></h4>
</dt>
<dd>
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<div class="description">
<p>The crossOrigin value applied to loaded images. Very often this needs to be set to 'anonymous'.</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">boolean</span>
|
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<span class="param-type">string</span>
</li>
</ul>
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<dl class="details">
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2015-07-22 14:31:30 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-74">line 74</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
</dl>
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2016-02-08 17:01:36 +00:00
id="enableParallel"><span class="type-signature"></span>enableParallel<span class="type-signature"> :boolean</span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
<div class="description">
2015-03-23 23:46:30 +00:00
<p>If true (the default) then parallel downloading will be enabled.</p>
<p>To disable all parallel downloads this must be set to false prior to any resource being loaded.</p>
2014-11-15 20:01:46 +00:00
</div>
2013-10-02 14:05:55 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-211">line 211</a>
2014-11-15 20:01:46 +00:00
</dt>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
</dl>
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
</dd>
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<dt>
<h4 class="name "
2015-03-23 23:46:30 +00:00
id="game"><span class="type-signature">&lt;internal> </span>game<span class="type-signature"> :<a href="Phaser.Game.html">Phaser.Game</a></span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<div class="description">
2015-03-23 23:46:30 +00:00
<p>Local reference to game.</p>
2014-11-15 20:01:46 +00:00
</div>
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<dl class="details">
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<dt class="important tag-deprecated">Internal:</dt>
<dd class="tag-deprecated"><ul>
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
</ul></dd>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2015-03-23 23:46:30 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-29">line 29</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
</dl>
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-03-23 23:46:30 +00:00
id="hasLoaded"><span class="type-signature"></span>hasLoaded<span class="type-signature"> :boolean</span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
<div class="description">
2015-03-23 23:46:30 +00:00
<p>True if all assets in the queue have finished loading.</p>
2014-11-15 20:01:46 +00:00
</div>
2013-10-02 14:05:55 +00:00
2014-04-15 14:39:23 +00:00
2014-11-15 20:01:46 +00:00
<dl class="details">
2014-04-15 14:39:23 +00:00
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2015-07-22 14:31:30 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-57">line 57</a>
2014-11-15 20:01:46 +00:00
</dt>
2014-04-15 14:39:23 +00:00
2016-07-01 15:57:13 +00:00
</dl>
</dd>
<dt>
<h4 class="name "
id="headers"><span class="type-signature"></span>headers<span class="type-signature"> :object</span></h4>
</dt>
<dd>
<div class="description">
2016-08-26 00:18:47 +00:00
<p>Used to map the application mime-types to to the Accept header in XHR requests.<br>If you don't require these mappings, or they cause problems on your server, then<br>remove them from the headers object and the XHR request will not try to use them.</p>
<p>This object can also be used to set the <code>X-Requested-With</code> header to<br><code>XMLHttpRequest</code> (or any other value you need). To enable this do:</p>
<p><code>this.load.headers.requestedWith = 'XMLHttpRequest'</code></p>
<p>before adding anything to the Loader. The XHR loader will then call:</p>
<p><code>setRequestHeader('X-Requested-With', this.headers['requestedWith'])</code></p>
2016-07-01 15:57:13 +00:00
</div>
<dl class="details">
<dt class="tag-default">Default Value:</dt>
2016-08-26 00:18:47 +00:00
<dd class="tag-default"><ul class="dummy"><li>{"undefined":"application/xml"}</li></ul></dd>
2016-07-01 15:57:13 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-122">line 122</a>
2016-07-01 15:57:13 +00:00
</dt>
2014-04-15 14:39:23 +00:00
</dl>
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-03-23 23:46:30 +00:00
id="isLoading"><span class="type-signature"></span>isLoading<span class="type-signature"> :boolean</span></h4>
2014-04-15 14:39:23 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2014-04-15 14:39:23 +00:00
2014-11-15 20:01:46 +00:00
<div class="description">
2015-03-23 23:46:30 +00:00
<p>True if the Loader is in the process of loading the queue.</p>
2014-11-15 20:01:46 +00:00
</div>
2014-04-15 14:39:23 +00:00
2014-11-15 20:01:46 +00:00
<dl class="details">
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2015-07-22 14:31:30 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-50">line 50</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
</dl>
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-03-23 23:46:30 +00:00
id="maxParallelDownloads"><span class="type-signature">&lt;internal> </span>maxParallelDownloads<span class="type-signature"> :integer</span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<div class="description">
2015-03-23 23:46:30 +00:00
<p>The number of concurrent / parallel resources to try and fetch at once.</p>
<p>Many current browsers limit 6 requests per domain; this is slightly conservative.</p>
2014-11-15 20:01:46 +00:00
</div>
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<dl class="details">
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<dt class="important tag-deprecated">Internal:</dt>
<dd class="tag-deprecated"><ul>
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
</ul></dd>
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-221">line 221</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
</dl>
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-03-23 23:46:30 +00:00
id="onFileComplete"><span class="type-signature"></span>onFileComplete<span class="type-signature"> :<a href="Phaser.Signal.html">Phaser.Signal</a></span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<div class="description">
2015-03-23 23:46:30 +00:00
<p>This event is dispatched when a file has either loaded or failed to load.</p>
2015-07-22 14:31:30 +00:00
<p>Any function bound to this will receive the following parameters:</p>
<p>progress, file key, success?, total loaded files, total files</p>
<p>Where progress is a number between 1 and 100 (inclusive) representing the percentage of the load.</p>
2014-11-15 20:01:46 +00:00
</div>
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<dl class="details">
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-175">line 175</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
2014-07-18 11:45:51 +00:00
</dl>
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-03-23 23:46:30 +00:00
id="onFileError"><span class="type-signature"></span>onFileError<span class="type-signature"> :<a href="Phaser.Signal.html">Phaser.Signal</a></span></h4>
2014-07-18 11:45:51 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
<div class="description">
2015-03-23 23:46:30 +00:00
<p>This event is dispatched when a file (or pack) errors as a result of the load request.</p>
<p>For files it will be triggered before <code>onFileComplete</code>. For packs it will be triggered before <code>onPackComplete</code>.</p>
<p>Params: <code>(file key, file)</code></p>
2014-11-15 20:01:46 +00:00
</div>
2014-07-18 11:45:51 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
2014-07-18 11:45:51 +00:00
2014-11-15 20:01:46 +00:00
2014-07-18 11:45:51 +00:00
2014-11-15 20:01:46 +00:00
2014-07-18 11:45:51 +00:00
2014-11-15 20:01:46 +00:00
2014-07-18 11:45:51 +00:00
2014-11-15 20:01:46 +00:00
2014-07-18 11:45:51 +00:00
2014-11-15 20:01:46 +00:00
2014-07-18 11:45:51 +00:00
2014-11-15 20:01:46 +00:00
2014-07-18 11:45:51 +00:00
2014-11-15 20:01:46 +00:00
2014-07-18 11:45:51 +00:00
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-186">line 186</a>
2014-11-15 20:01:46 +00:00
</dt>
2014-07-18 11:45:51 +00:00
2014-11-15 20:01:46 +00:00
2014-07-18 11:45:51 +00:00
2014-11-15 20:01:46 +00:00
2014-07-18 11:45:51 +00:00
2014-11-15 20:01:46 +00:00
</dl>
2014-07-18 11:45:51 +00:00
2014-11-15 20:01:46 +00:00
</dd>
2014-07-18 11:45:51 +00:00
2014-11-15 20:01:46 +00:00
2014-07-18 11:45:51 +00:00
2014-11-15 20:01:46 +00:00
<dt>
<h4 class="name "
2015-03-23 23:46:30 +00:00
id="onFileStart"><span class="type-signature"></span>onFileStart<span class="type-signature"> :<a href="Phaser.Signal.html">Phaser.Signal</a></span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
2014-07-18 11:45:51 +00:00
2014-11-15 20:01:46 +00:00
<div class="description">
2016-08-26 00:18:47 +00:00
<p>This event is dispatched immediately before a file starts loading.<br>It's possible the file may fail (eg. download error, invalid format) after this event is sent.</p>
2015-03-23 23:46:30 +00:00
<p>Params: <code>(progress, file key, file url)</code></p>
2014-11-15 20:01:46 +00:00
</div>
2014-07-18 11:45:51 +00:00
2014-11-15 20:01:46 +00:00
<dl class="details">
2014-07-18 11:45:51 +00:00
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-162">line 162</a>
2014-11-15 20:01:46 +00:00
</dt>
2014-07-18 11:45:51 +00:00
2013-10-02 14:05:55 +00:00
</dl>
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-03-23 23:46:30 +00:00
id="onLoadComplete"><span class="type-signature"></span>onLoadComplete<span class="type-signature"> :<a href="Phaser.Signal.html">Phaser.Signal</a></span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
<div class="description">
2015-03-23 23:46:30 +00:00
<p>This event is dispatched when the final file in the load queue has either loaded or failed.</p>
2013-10-02 14:05:55 +00:00
</div>
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-141">line 141</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
</dl>
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-03-23 23:46:30 +00:00
id="onLoadStart"><span class="type-signature"></span>onLoadStart<span class="type-signature"> :<a href="Phaser.Signal.html">Phaser.Signal</a></span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
<div class="description">
2016-08-26 00:18:47 +00:00
<p>This event is dispatched when the loading process starts: before the first file has been requested,<br>but after all the initial packs have been loaded.</p>
2014-11-15 20:01:46 +00:00
</div>
2013-10-02 14:05:55 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-134">line 134</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
</dl>
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
</dd>
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<dt>
<h4 class="name "
2015-03-23 23:46:30 +00:00
id="onPackComplete"><span class="type-signature"></span>onPackComplete<span class="type-signature"> :<a href="Phaser.Signal.html">Phaser.Signal</a></span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<div class="description">
2015-03-23 23:46:30 +00:00
<p>This event is dispatched when an asset pack has either loaded or failed to load.</p>
<p>This is called when the asset pack manifest file has loaded and successfully added its contents to the loader queue.</p>
<p>Params: <code>(pack key, success?, total packs loaded, total packs)</code></p>
2014-11-15 20:01:46 +00:00
</div>
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<dl class="details">
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-152">line 152</a>
2015-07-22 14:31:30 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="path"><span class="type-signature"></span>path<span class="type-signature"> :string</span></h4>
</dt>
<dd>
<div class="description">
<p>The value of <code>path</code>, if set, is placed before any <em>relative</em> file path given. For example:</p>
<p><code>load.path = &quot;images/sprites/&quot;;
load.image(&quot;ball&quot;, &quot;ball.png&quot;);
load.image(&quot;tree&quot;, &quot;level1/oaktree.png&quot;);
load.image(&quot;boom&quot;, &quot;http://server.com/explode.png&quot;);</code></p>
2016-08-26 00:18:47 +00:00
<p>Would load the <code>ball</code> file from <code>images/sprites/ball.png</code> and the tree from<br><code>images/sprites/level1/oaktree.png</code> but the file <code>boom</code> would load from the URL<br>given as it's an absolute URL.</p>
2015-07-22 14:31:30 +00:00
<p>Please note that the path is added before the filename but <em>after</em> the baseURL (if set.)</p>
<p>The string <em>must</em> end with a &quot;/&quot;.</p>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-103">line 103</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
2014-02-05 06:29:17 +00:00
</dl>
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-03-23 23:46:30 +00:00
id="preloadSprite"><span class="type-signature">&lt;internal> </span>preloadSprite<span class="type-signature"> :object</span></h4>
2014-02-05 06:29:17 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
<div class="description">
2015-03-23 23:46:30 +00:00
<p>You can optionally link a progress sprite with <a href="Phaser.Loader.html#setPreloadSprite">setPreloadSprite</a>.</p>
<p>This property is an object containing: sprite, rect, direction, width and height</p>
2014-11-15 20:01:46 +00:00
</div>
2014-02-05 06:29:17 +00:00
<dl class="details">
2015-03-23 23:46:30 +00:00
<dt class="important tag-deprecated">Internal:</dt>
<dd class="tag-deprecated"><ul>
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
</ul></dd>
2014-02-05 06:29:17 +00:00
2015-03-23 23:46:30 +00:00
2014-02-05 06:29:17 +00:00
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2015-07-22 14:31:30 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-67">line 67</a>
2014-11-15 20:01:46 +00:00
</dt>
2014-02-05 06:29:17 +00:00
2014-09-09 14:36:56 +00:00
</dl>
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-03-23 23:46:30 +00:00
id="progress"><span class="type-signature"></span>progress<span class="type-signature"></span></h4>
2014-09-09 14:36:56 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2014-09-09 14:36:56 +00:00
2014-11-15 20:01:46 +00:00
<div class="description">
2015-03-23 23:46:30 +00:00
<p>The rounded load progress percentage value (from 0 to 100). See <a href="Phaser.Loader.html#progressFloat">Phaser.Loader#progressFloat</a>.</p>
2014-11-15 20:01:46 +00:00
</div>
2014-09-09 14:36:56 +00:00
2014-11-15 20:01:46 +00:00
<dl class="details">
2014-09-09 14:36:56 +00:00
2015-03-23 23:46:30 +00:00
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="type">
<span class="param-type">integer</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
</dl>
2014-09-09 14:36:56 +00:00
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-3060">line 3060</a>
2014-11-15 20:01:46 +00:00
</dt>
2014-09-09 14:36:56 +00:00
2013-10-02 14:05:55 +00:00
</dl>
</dd>
2015-03-23 23:46:30 +00:00
2013-10-02 14:05:55 +00:00
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-03-23 23:46:30 +00:00
id="progressFloat"><span class="type-signature"></span>progressFloat<span class="type-signature"></span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
<div class="description">
2015-03-23 23:46:30 +00:00
<p>The non-rounded load progress value (from 0.0 to 100.0).</p>
2016-08-26 00:18:47 +00:00
<p>A general indicator of the progress.<br>It is possible for the progress to decrease, after <code>onLoadStart</code>, if more files are dynamically added.</p>
2013-10-02 14:05:55 +00:00
</div>
2015-03-23 23:46:30 +00:00
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<dl class="details">
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
2013-10-02 14:05:55 +00:00
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="type">
2015-03-23 23:46:30 +00:00
<span class="param-type">number</span>
2013-10-02 14:05:55 +00:00
</td>
2015-03-23 23:46:30 +00:00
<td class="description last"></td>
2013-10-02 14:05:55 +00:00
</tr>
2015-03-23 23:46:30 +00:00
</tbody>
</table>
</dl>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-3042">line 3042</a>
2015-03-23 23:46:30 +00:00
</dt>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
</dl>
</dd>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<dt>
<h4 class="name "
id="resetLocked"><span class="type-signature"></span>resetLocked<span class="type-signature"> :boolean</span></h4>
</dt>
<dd>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<div class="description">
<p>If true all calls to Loader.reset will be ignored. Useful if you need to create a load queue before swapping to a preloader state.</p>
</div>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<dl class="details">
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<dt class="tag-source">Source -
2015-07-22 14:31:30 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-43">line 43</a>
2015-03-23 23:46:30 +00:00
</dt>
</dl>
</dd>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<dt>
<h4 class="name toc-deprecated"
id="useXDomainRequest"><span class="type-signature"></span>useXDomainRequest<span class="type-signature"> :boolean</span></h4>
</dt>
<dd>
<dt class="important deprecated-notice">
This method is <em>deprecated</em> and should not be used. It may be removed in the future.
</dt>
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
2015-03-23 23:46:30 +00:00
<div class="description">
<p>If true and if the browser supports XDomainRequest, it will be used in preference for XHR.</p>
<p>This is only relevant for IE 9 and should <em>only</em> be enabled for IE 9 clients when required by the server/CDN.</p>
</div>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
2013-10-02 14:05:55 +00:00
<dl class="details">
2015-03-23 23:46:30 +00:00
<dt class="important tag-deprecated">Deprecated:</dt>
2014-11-15 20:01:46 +00:00
<dd class="tag-deprecated"><ul>
2015-03-23 23:46:30 +00:00
<li>This is only relevant for IE 9.</li>
2014-11-15 20:01:46 +00:00
</ul></dd>
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-196">line 196</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
</dl>
2015-03-23 23:46:30 +00:00
</dd>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
</dl>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<h3 class="subsection-title">Methods</h3>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<dl>
2013-10-02 14:05:55 +00:00
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="addSyncPoint"><span class="type-signature"></span>addSyncPoint<span class="signature">(type, key)</span><span class="type-signature"> &rarr; {<a href="Phaser.Loader.html">Phaser.Loader</a>}</span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Add a synchronization point to a specific file/asset in the load queue.</p>
<p>This has no effect on already loaded assets.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>The type of resource to turn into a sync point (image, audio, xml, etc).</p></td>
</tr>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>Key of the file you want to turn into a sync point.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This Loader instance.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-1675">line 1675</a>
2015-07-22 14:31:30 +00:00
</dt>
<dt class="tag-see">See:</dt>
<dd class="tag-see">
<ul>
<li>withSyncPoint</li>
</ul>
</dd>
</dl>
</dd>
<dt>
<h4 class="name "
id="addToFileList"><span class="type-signature">&lt;internal> </span>addToFileList<span class="signature">(type, key, <span class="optional">url</span>, <span class="optional">properties</span>, <span class="optional">overwrite</span>, <span class="optional">extension</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Loader.html">Phaser.Loader</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Internal function that adds a new entry to the file list. Do not call directly.</p>
2013-10-02 14:05:55 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
2015-03-23 23:46:30 +00:00
<th>Default</th>
2013-10-02 14:05:55 +00:00
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2015-03-23 23:46:30 +00:00
<td class="name"><code>type</code></td>
2013-10-02 14:05:55 +00:00
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
2015-03-23 23:46:30 +00:00
<td class="default">
</td>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<td class="description last"><p>The type of resource to add to the list (image, audio, xml, etc).</p></td>
2013-10-02 14:05:55 +00:00
</tr>
<tr>
2015-03-23 23:46:30 +00:00
<td class="name"><code>key</code></td>
2013-10-02 14:05:55 +00:00
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
2015-03-23 23:46:30 +00:00
<td class="default">
</td>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<td class="description last"><p>The unique Cache ID key of this resource.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
<tr>
2015-03-23 23:46:30 +00:00
<td class="name"><code>url</code></td>
2013-10-02 14:05:55 +00:00
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
2015-07-22 14:31:30 +00:00
&lt;optional><br>
2013-10-02 14:05:55 +00:00
</td>
2015-03-23 23:46:30 +00:00
<td class="default">
</td>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<td class="description last"><p>The URL the asset will be loaded from.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
<tr>
2015-03-23 23:46:30 +00:00
<td class="name"><code>properties</code></td>
2013-10-02 14:05:55 +00:00
<td class="type">
<span class="param-type">object</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
2015-03-23 23:46:30 +00:00
<td class="default">
(none)
</td>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<td class="description last"><p>Any additional properties needed to load the file. These are added directly to the added file object and overwrite any defaults.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
<tr>
2015-03-23 23:46:30 +00:00
<td class="name"><code>overwrite</code></td>
2013-10-02 14:05:55 +00:00
<td class="type">
2015-03-23 23:46:30 +00:00
<span class="param-type">boolean</span>
2013-10-02 14:05:55 +00:00
</td>
<td class="attributes">
&lt;optional><br>
</td>
2015-03-23 23:46:30 +00:00
<td class="default">
false
</td>
2013-10-02 14:05:55 +00:00
2015-10-15 11:06:38 +00:00
<td class="description last"><p>If true then this will overwrite a file asset of the same type/key. Otherwise it will only add a new asset. If overwrite is true, and the asset is already being loaded (or has been loaded), then it is appended instead.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
2015-07-22 14:31:30 +00:00
<tr>
<td class="name"><code>extension</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>If no URL is given the Loader will sometimes auto-generate the URL based on the key, using this as the extension.</p></td>
</tr>
2013-10-02 14:05:55 +00:00
</tbody>
</table>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This instance of the Phaser Loader.</p>
</div>
</div>
2013-10-02 14:05:55 +00:00
<dl class="details">
2015-03-23 23:46:30 +00:00
<dt class="important tag-deprecated">Internal:</dt>
<dd class="tag-deprecated"><ul>
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
</ul></dd>
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-515">line 515</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
</dl>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="atlas"><span class="type-signature"></span>atlas<span class="signature">(key, <span class="optional">textureURL</span>, <span class="optional">atlasURL</span>, <span class="optional">atlasData</span>, <span class="optional">format</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Loader.html">Phaser.Loader</a>}</span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Adds a Texture Atlas file to the current load queue.</p>
<p>To create the Texture Atlas you can use tools such as:</p>
2016-08-26 00:18:47 +00:00
<p><a href="https://www.codeandweb.com/texturepacker/phaser">Texture Packer</a><br><a href="http://renderhjs.net/shoebox/">Shoebox</a></p>
<p>If using Texture Packer we recommend you enable &quot;Trim sprite names&quot;.<br>If your atlas software has an option to &quot;rotate&quot; the resulting frames, you must disable it.</p>
<p>You can choose to either load the data externally, by providing a URL to a json file.<br>Or you can pass in a JSON object or String via the <code>atlasData</code> parameter.<br>If you pass a String the data is automatically run through <code>JSON.parse</code> and then immediately added to the Phaser.Cache.</p>
2015-07-22 14:31:30 +00:00
<p>If URLs are provided the files are <strong>not</strong> loaded immediately after calling this method, but are added to the load queue.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
2016-08-26 00:18:47 +00:00
<p>Retrieve the file via <code>Cache.getImage(key)</code>. JSON files are automatically parsed upon load.<br>If you need to control when the JSON is parsed then use <code>Loader.text</code> instead and parse the JSON file as needed.</p>
2015-07-22 14:31:30 +00:00
<p>The URLs can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
2016-08-26 00:18:47 +00:00
<p>If the textureURL isn't specified then the Loader will take the key and create a filename from that.<br>For example if the key is &quot;player&quot; and textureURL is null then the Loader will set the URL to be &quot;player.png&quot;.<br>The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will<br>set the atlasURL to be the key. For example if the key is &quot;player&quot; the atlasURL will be set to &quot;player.json&quot;.</p>
2015-07-22 14:31:30 +00:00
<p>If you do not desire this action then provide URLs and / or a data object.</p>
2013-10-02 14:05:55 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
2013-11-28 15:57:09 +00:00
<th>Argument</th>
2013-10-02 14:05:55 +00:00
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
2013-11-28 15:57:09 +00:00
<td class="attributes">
</td>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
<td class="description last"><p>Unique asset key of the texture atlas file.</p></td>
</tr>
<tr>
<td class="name"><code>textureURL</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
2015-07-22 14:31:30 +00:00
&lt;optional><br>
2013-11-28 15:57:09 +00:00
</td>
2015-07-22 14:31:30 +00:00
<td class="description last"><p>URL of the texture atlas image file. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.png</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.png&quot;.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
<tr>
<td class="name"><code>atlasURL</code></td>
<td class="type">
2013-11-28 15:57:09 +00:00
<span class="param-type">string</span>
2013-10-02 14:05:55 +00:00
</td>
2013-11-28 15:57:09 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2013-10-02 14:05:55 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>URL of the texture atlas data file. If undefined or <code>null</code> and no atlasData is given, the url will be set to <code>&lt;key&gt;.json</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.json&quot;.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
<tr>
<td class="name"><code>atlasData</code></td>
<td class="type">
2013-11-28 15:57:09 +00:00
<span class="param-type">object</span>
2013-10-02 14:05:55 +00:00
</td>
2013-11-28 15:57:09 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
<td class="description last"><p>A JSON or XML data object. You don't need this if the data is being loaded from a URL.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
2015-03-23 23:46:30 +00:00
<tr>
<td class="name"><code>format</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
2015-07-22 14:31:30 +00:00
<td class="description last"><p>The format of the data. Can be Phaser.Loader.TEXTURE_ATLAS_JSON_ARRAY (the default), Phaser.Loader.TEXTURE_ATLAS_JSON_HASH or Phaser.Loader.TEXTURE_ATLAS_XML_STARLING.</p></td>
2015-03-23 23:46:30 +00:00
</tr>
2013-10-02 14:05:55 +00:00
</tbody>
</table>
2014-11-15 20:01:46 +00:00
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This Loader instance.</p>
</div>
</div>
2013-10-02 14:05:55 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-1544">line 1544</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
</dl>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="atlasJSONArray"><span class="type-signature"></span>atlasJSONArray<span class="signature">(key, <span class="optional">textureURL</span>, <span class="optional">atlasURL</span>, <span class="optional">atlasData</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Loader.html">Phaser.Loader</a>}</span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Adds a Texture Atlas file to the current load queue.</p>
<p>Unlike <code>Loader.atlasJSONHash</code> this call expects the atlas data to be in a JSON Array format.</p>
<p>To create the Texture Atlas you can use tools such as:</p>
2016-08-26 00:18:47 +00:00
<p><a href="https://www.codeandweb.com/texturepacker/phaser">Texture Packer</a><br><a href="http://renderhjs.net/shoebox/">Shoebox</a></p>
<p>If using Texture Packer we recommend you enable &quot;Trim sprite names&quot;.<br>If your atlas software has an option to &quot;rotate&quot; the resulting frames, you must disable it.</p>
<p>You can choose to either load the data externally, by providing a URL to a json file.<br>Or you can pass in a JSON object or String via the <code>atlasData</code> parameter.<br>If you pass a String the data is automatically run through <code>JSON.parse</code> and then immediately added to the Phaser.Cache.</p>
2015-07-22 14:31:30 +00:00
<p>If URLs are provided the files are <strong>not</strong> loaded immediately after calling this method, but are added to the load queue.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
2016-08-26 00:18:47 +00:00
<p>Retrieve the file via <code>Cache.getImage(key)</code>. JSON files are automatically parsed upon load.<br>If you need to control when the JSON is parsed then use <code>Loader.text</code> instead and parse the JSON file as needed.</p>
2015-07-22 14:31:30 +00:00
<p>The URLs can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
2016-08-26 00:18:47 +00:00
<p>If the textureURL isn't specified then the Loader will take the key and create a filename from that.<br>For example if the key is &quot;player&quot; and textureURL is null then the Loader will set the URL to be &quot;player.png&quot;.<br>The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will<br>set the atlasURL to be the key. For example if the key is &quot;player&quot; the atlasURL will be set to &quot;player.json&quot;.</p>
2015-07-22 14:31:30 +00:00
<p>If you do not desire this action then provide URLs and / or a data object.</p>
2013-10-02 14:05:55 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
2013-11-28 15:57:09 +00:00
<th>Argument</th>
2013-10-02 14:05:55 +00:00
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
2013-11-28 15:57:09 +00:00
<td class="attributes">
</td>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
<td class="description last"><p>Unique asset key of the texture atlas file.</p></td>
</tr>
<tr>
<td class="name"><code>textureURL</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
2015-07-22 14:31:30 +00:00
&lt;optional><br>
2013-11-28 15:57:09 +00:00
</td>
2015-07-22 14:31:30 +00:00
<td class="description last"><p>URL of the texture atlas image file. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.png</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.png&quot;.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
<tr>
<td class="name"><code>atlasURL</code></td>
<td class="type">
2013-11-28 15:57:09 +00:00
<span class="param-type">string</span>
2013-10-02 14:05:55 +00:00
</td>
2013-11-28 15:57:09 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2013-10-02 14:05:55 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>URL of the texture atlas data file. If undefined or <code>null</code> and no atlasData is given, the url will be set to <code>&lt;key&gt;.json</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.json&quot;.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
<tr>
<td class="name"><code>atlasData</code></td>
<td class="type">
2013-11-28 15:57:09 +00:00
<span class="param-type">object</span>
2013-10-02 14:05:55 +00:00
</td>
2013-11-28 15:57:09 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2013-10-02 14:05:55 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>A JSON data object. You don't need this if the data is being loaded from a URL.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
</tbody>
</table>
2014-11-15 20:01:46 +00:00
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This Loader instance.</p>
</div>
</div>
2013-10-02 14:05:55 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-1398">line 1398</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
</dl>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="atlasJSONHash"><span class="type-signature"></span>atlasJSONHash<span class="signature">(key, <span class="optional">textureURL</span>, <span class="optional">atlasURL</span>, <span class="optional">atlasData</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Loader.html">Phaser.Loader</a>}</span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Adds a Texture Atlas file to the current load queue.</p>
<p>Unlike <code>Loader.atlas</code> this call expects the atlas data to be in a JSON Hash format.</p>
<p>To create the Texture Atlas you can use tools such as:</p>
2016-08-26 00:18:47 +00:00
<p><a href="https://www.codeandweb.com/texturepacker/phaser">Texture Packer</a><br><a href="http://renderhjs.net/shoebox/">Shoebox</a></p>
<p>If using Texture Packer we recommend you enable &quot;Trim sprite names&quot;.<br>If your atlas software has an option to &quot;rotate&quot; the resulting frames, you must disable it.</p>
<p>You can choose to either load the data externally, by providing a URL to a json file.<br>Or you can pass in a JSON object or String via the <code>atlasData</code> parameter.<br>If you pass a String the data is automatically run through <code>JSON.parse</code> and then immediately added to the Phaser.Cache.</p>
2015-07-22 14:31:30 +00:00
<p>If URLs are provided the files are <strong>not</strong> loaded immediately after calling this method, but are added to the load queue.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
2016-08-26 00:18:47 +00:00
<p>Retrieve the file via <code>Cache.getImage(key)</code>. JSON files are automatically parsed upon load.<br>If you need to control when the JSON is parsed then use <code>Loader.text</code> instead and parse the JSON file as needed.</p>
2015-07-22 14:31:30 +00:00
<p>The URLs can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
2016-08-26 00:18:47 +00:00
<p>If the textureURL isn't specified then the Loader will take the key and create a filename from that.<br>For example if the key is &quot;player&quot; and textureURL is null then the Loader will set the URL to be &quot;player.png&quot;.<br>The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will<br>set the atlasURL to be the key. For example if the key is &quot;player&quot; the atlasURL will be set to &quot;player.json&quot;.</p>
2015-07-22 14:31:30 +00:00
<p>If you do not desire this action then provide URLs and / or a data object.</p>
2013-10-02 14:05:55 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
2013-11-28 15:57:09 +00:00
<th>Argument</th>
2013-10-02 14:05:55 +00:00
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
2013-11-28 15:57:09 +00:00
<td class="attributes">
</td>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
<td class="description last"><p>Unique asset key of the texture atlas file.</p></td>
</tr>
<tr>
<td class="name"><code>textureURL</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
2015-07-22 14:31:30 +00:00
&lt;optional><br>
2013-11-28 15:57:09 +00:00
</td>
2015-07-22 14:31:30 +00:00
<td class="description last"><p>URL of the texture atlas image file. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.png</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.png&quot;.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
<tr>
<td class="name"><code>atlasURL</code></td>
<td class="type">
2013-11-28 15:57:09 +00:00
<span class="param-type">string</span>
2013-10-02 14:05:55 +00:00
</td>
2013-11-28 15:57:09 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2013-10-02 14:05:55 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>URL of the texture atlas data file. If undefined or <code>null</code> and no atlasData is given, the url will be set to <code>&lt;key&gt;.json</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.json&quot;.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
<tr>
<td class="name"><code>atlasData</code></td>
<td class="type">
2013-11-28 15:57:09 +00:00
<span class="param-type">object</span>
2013-10-02 14:05:55 +00:00
</td>
2013-11-28 15:57:09 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2013-10-02 14:05:55 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>A JSON data object. You don't need this if the data is being loaded from a URL.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
</tbody>
</table>
2014-11-15 20:01:46 +00:00
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This Loader instance.</p>
</div>
</div>
2013-10-02 14:05:55 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-1444">line 1444</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
</dl>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="atlasXML"><span class="type-signature"></span>atlasXML<span class="signature">(key, <span class="optional">textureURL</span>, <span class="optional">atlasURL</span>, <span class="optional">atlasData</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Loader.html">Phaser.Loader</a>}</span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Adds a Texture Atlas file to the current load queue.</p>
<p>This call expects the atlas data to be in the Starling XML data format.</p>
<p>To create the Texture Atlas you can use tools such as:</p>
2016-08-26 00:18:47 +00:00
<p><a href="https://www.codeandweb.com/texturepacker/phaser">Texture Packer</a><br><a href="http://renderhjs.net/shoebox/">Shoebox</a></p>
<p>If using Texture Packer we recommend you enable &quot;Trim sprite names&quot;.<br>If your atlas software has an option to &quot;rotate&quot; the resulting frames, you must disable it.</p>
<p>You can choose to either load the data externally, by providing a URL to an xml file.<br>Or you can pass in an XML object or String via the <code>atlasData</code> parameter.<br>If you pass a String the data is automatically run through <code>Loader.parseXML</code> and then immediately added to the Phaser.Cache.</p>
2015-07-22 14:31:30 +00:00
<p>If URLs are provided the files are <strong>not</strong> loaded immediately after calling this method, but are added to the load queue.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
2016-08-26 00:18:47 +00:00
<p>Retrieve the file via <code>Cache.getImage(key)</code>. XML files are automatically parsed upon load.<br>If you need to control when the XML is parsed then use <code>Loader.text</code> instead and parse the XML file as needed.</p>
2015-07-22 14:31:30 +00:00
<p>The URLs can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
2016-08-26 00:18:47 +00:00
<p>If the textureURL isn't specified then the Loader will take the key and create a filename from that.<br>For example if the key is &quot;player&quot; and textureURL is null then the Loader will set the URL to be &quot;player.png&quot;.<br>The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will<br>set the atlasURL to be the key. For example if the key is &quot;player&quot; the atlasURL will be set to &quot;player.xml&quot;.</p>
2015-07-22 14:31:30 +00:00
<p>If you do not desire this action then provide URLs and / or a data object.</p>
2013-10-02 14:05:55 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
2015-03-23 23:46:30 +00:00
<th>Argument</th>
2013-10-02 14:05:55 +00:00
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
2015-03-23 23:46:30 +00:00
<td class="attributes">
</td>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<td class="description last"><p>Unique asset key of the texture atlas file.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
<tr>
2015-03-23 23:46:30 +00:00
<td class="name"><code>textureURL</code></td>
2013-10-02 14:05:55 +00:00
<td class="type">
2013-11-28 15:57:09 +00:00
<span class="param-type">string</span>
2013-10-02 14:05:55 +00:00
</td>
2015-03-23 23:46:30 +00:00
<td class="attributes">
2015-07-22 14:31:30 +00:00
&lt;optional><br>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
</td>
2013-10-02 14:05:55 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>URL of the texture atlas image file. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.png</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.png&quot;.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
<tr>
2015-03-23 23:46:30 +00:00
<td class="name"><code>atlasURL</code></td>
2013-10-02 14:05:55 +00:00
<td class="type">
2015-03-23 23:46:30 +00:00
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
2015-07-22 14:31:30 +00:00
<td class="description last"><p>URL of the texture atlas data file. If undefined or <code>null</code> and no atlasData is given, the url will be set to <code>&lt;key&gt;.json</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.xml&quot;.</p></td>
2015-03-23 23:46:30 +00:00
</tr>
<tr>
<td class="name"><code>atlasData</code></td>
<td class="type">
<span class="param-type">object</span>
2013-10-02 14:05:55 +00:00
</td>
2015-03-23 23:46:30 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2013-10-02 14:05:55 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>An XML data object. You don't need this if the data is being loaded from a URL.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
</tbody>
</table>
2014-11-15 20:01:46 +00:00
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This Loader instance.</p>
</div>
</div>
2013-10-02 14:05:55 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-1490">line 1490</a>
2014-11-15 20:01:46 +00:00
</dt>
2014-10-09 15:12:53 +00:00
</dl>
2014-11-15 20:01:46 +00:00
2014-10-09 15:12:53 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-03-23 23:46:30 +00:00
id="audio"><span class="type-signature"></span>audio<span class="signature">(key, urls, <span class="optional">autoDecode</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Loader.html">Phaser.Loader</a>}</span></h4>
2014-10-09 15:12:53 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2014-10-09 15:12:53 +00:00
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Adds an audio file to the current load queue.</p>
<p>The file is <strong>not</strong> loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
<p>Retrieve the file via <code>Cache.getSound(key)</code>.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
2016-08-26 00:18:47 +00:00
<p>Mobile warning: There are some mobile devices (certain iPad 2 and iPad Mini revisions) that cannot play 48000 Hz audio.<br>When they try to play the audio becomes extremely distorted and buzzes, eventually crashing the sound system.<br>The solution is to use a lower encoding rate such as 44100 Hz.</p>
2014-10-09 15:12:53 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
2015-03-23 23:46:30 +00:00
<th>Argument</th>
2014-10-09 15:12:53 +00:00
2015-03-23 23:46:30 +00:00
<th>Default</th>
2014-10-09 15:12:53 +00:00
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
2015-03-23 23:46:30 +00:00
<td class="attributes">
</td>
2014-10-09 15:12:53 +00:00
2015-03-23 23:46:30 +00:00
<td class="default">
</td>
2014-10-09 15:12:53 +00:00
<td class="description last"><p>Unique asset key of the audio file.</p></td>
</tr>
<tr>
<td class="name"><code>urls</code></td>
<td class="type">
2015-03-23 23:46:30 +00:00
<span class="param-type">string</span>
2014-10-09 15:12:53 +00:00
|
2015-03-23 23:46:30 +00:00
<span class="param-type">Array.&lt;string></span>
|
<span class="param-type">Array.&lt;object></span>
2014-10-09 15:12:53 +00:00
</td>
2015-03-23 23:46:30 +00:00
<td class="attributes">
</td>
2014-10-09 15:12:53 +00:00
2015-03-23 23:46:30 +00:00
<td class="default">
</td>
2014-10-09 15:12:53 +00:00
2016-08-26 00:18:47 +00:00
<td class="description last"><p>Either a single string or an array of URIs or pairs of <code>{uri: .., type: ..}</code>.<br> If an array is specified then the first URI (or URI + mime pair) that is device-compatible will be selected.<br> For example: <code>&quot;jump.mp3&quot;</code>, <code>['jump.mp3', 'jump.ogg', 'jump.m4a']</code>, or <code>[{uri: &quot;data:&lt;opus_resource&gt;&quot;, type: 'opus'}, 'fallback.mp3']</code>.<br> BLOB and DATA URIs can be used but only support automatic detection when used in the pair form; otherwise the format must be manually checked before adding the resource.</p></td>
2014-10-09 15:12:53 +00:00
</tr>
<tr>
2015-03-23 23:46:30 +00:00
<td class="name"><code>autoDecode</code></td>
2014-10-09 15:12:53 +00:00
<td class="type">
2015-03-23 23:46:30 +00:00
<span class="param-type">boolean</span>
2014-10-09 15:12:53 +00:00
</td>
2015-03-23 23:46:30 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2014-10-09 15:12:53 +00:00
2015-03-23 23:46:30 +00:00
<td class="default">
true
</td>
2014-10-09 15:12:53 +00:00
2016-08-26 00:18:47 +00:00
<td class="description last"><p>When using Web Audio the audio files can either be decoded at load time or run-time.<br> Audio files can't be played until they are decoded and, if specified, this enables immediate decoding. Decoding is a non-blocking async process, however it consumes huge amounts of CPU time on mobiles especially.</p></td>
2014-10-09 15:12:53 +00:00
</tr>
</tbody>
</table>
2014-11-15 20:01:46 +00:00
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This Loader instance.</p>
</div>
</div>
2014-10-09 15:12:53 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-991">line 991</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
</dl>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2016-08-26 00:18:47 +00:00
id="audioSprite"><span class="type-signature"></span>audioSprite<span class="signature">(key, urls, <span class="optional">jsonURL</span>, <span class="optional">jsonData</span>, <span class="optional">autoDecode</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Loader.html">Phaser.Loader</a>}</span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
<div class="description">
2016-06-03 17:48:34 +00:00
<p>Adds an audio sprite file to the current load queue.</p>
<p>The file is <strong>not</strong> loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
<p>Audio Sprites are a combination of audio files and a JSON configuration.</p>
<p>The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite</p>
<p>Retrieve the file via <code>Cache.getSoundData(key)</code>.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
2013-10-02 14:05:55 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
2015-03-23 23:46:30 +00:00
<th>Default</th>
2013-10-02 14:05:55 +00:00
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
2015-03-23 23:46:30 +00:00
<td class="default">
</td>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<td class="description last"><p>Unique asset key of the audio file.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
<tr>
2015-03-23 23:46:30 +00:00
<td class="name"><code>urls</code></td>
2013-10-02 14:05:55 +00:00
<td class="type">
2015-03-23 23:46:30 +00:00
<span class="param-type">Array</span>
|
2013-10-02 14:05:55 +00:00
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
2015-03-23 23:46:30 +00:00
<td class="default">
</td>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<td class="description last"><p>An array containing the URLs of the audio files, i.e.: [ 'audiosprite.mp3', 'audiosprite.ogg', 'audiosprite.m4a' ] or a single string containing just one URL.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
<tr>
2015-03-23 23:46:30 +00:00
<td class="name"><code>jsonURL</code></td>
2013-10-02 14:05:55 +00:00
<td class="type">
2015-03-23 23:46:30 +00:00
<span class="param-type">string</span>
2013-10-02 14:05:55 +00:00
</td>
<td class="attributes">
&lt;optional><br>
</td>
2015-03-23 23:46:30 +00:00
<td class="default">
null
</td>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<td class="description last"><p>The URL of the audiosprite configuration JSON object. If you wish to pass the data directly set this parameter to null.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
<tr>
2015-03-23 23:46:30 +00:00
<td class="name"><code>jsonData</code></td>
2013-10-02 14:05:55 +00:00
<td class="type">
2015-03-23 23:46:30 +00:00
<span class="param-type">string</span>
|
<span class="param-type">object</span>
2013-10-02 14:05:55 +00:00
</td>
<td class="attributes">
&lt;optional><br>
</td>
2015-03-23 23:46:30 +00:00
<td class="default">
null
</td>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<td class="description last"><p>A JSON object or string containing the audiosprite configuration data. This is ignored if jsonURL is not null.</p></td>
</tr>
<tr>
<td class="name"><code>autoDecode</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
true
</td>
2016-08-26 00:18:47 +00:00
<td class="description last"><p>When using Web Audio the audio files can either be decoded at load time or run-time.<br> Audio files can't be played until they are decoded and, if specified, this enables immediate decoding. Decoding is a non-blocking async process, however it consumes huge amounts of CPU time on mobiles especially.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
</tbody>
</table>
2014-11-15 20:01:46 +00:00
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This Loader instance.</p>
</div>
</div>
2013-10-02 14:05:55 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-1034">line 1034</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
</dl>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2016-02-08 17:01:36 +00:00
</dd>
<dt>
<h4 class="name "
id="audiosprite"><span class="type-signature"></span>audiosprite<span class="signature">(key, urls, <span class="optional">jsonURL</span>, <span class="optional">jsonData</span>, <span class="optional">autoDecode</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Loader.html">Phaser.Loader</a>}</span></h4>
</dt>
<dd>
<div class="description">
2016-06-03 17:48:34 +00:00
<p>A legacy alias for Loader.audioSprite. Please see that method for documentation.</p>
2016-02-08 17:01:36 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>Unique asset key of the audio file.</p></td>
</tr>
<tr>
<td class="name"><code>urls</code></td>
<td class="type">
<span class="param-type">Array</span>
|
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>An array containing the URLs of the audio files, i.e.: [ 'audiosprite.mp3', 'audiosprite.ogg', 'audiosprite.m4a' ] or a single string containing just one URL.</p></td>
</tr>
<tr>
<td class="name"><code>jsonURL</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
null
</td>
<td class="description last"><p>The URL of the audiosprite configuration JSON object. If you wish to pass the data directly set this parameter to null.</p></td>
</tr>
<tr>
<td class="name"><code>jsonData</code></td>
<td class="type">
<span class="param-type">string</span>
|
<span class="param-type">object</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
null
</td>
<td class="description last"><p>A JSON object or string containing the audiosprite configuration data. This is ignored if jsonURL is not null.</p></td>
</tr>
<tr>
<td class="name"><code>autoDecode</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
true
</td>
2016-08-26 00:18:47 +00:00
<td class="description last"><p>When using Web Audio the audio files can either be decoded at load time or run-time.<br> Audio files can't be played until they are decoded and, if specified, this enables immediate decoding. Decoding is a non-blocking async process, however it consumes huge amounts of CPU time on mobiles especially.</p></td>
2016-02-08 17:01:36 +00:00
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This Loader instance.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-1093">line 1093</a>
2016-02-08 17:01:36 +00:00
</dt>
</dl>
2013-10-02 14:05:55 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="binary"><span class="type-signature"></span>binary<span class="signature">(key, <span class="optional">url</span>, <span class="optional">callback</span>, <span class="optional">callbackContext</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Loader.html">Phaser.Loader</a>}</span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Adds a binary file to the current load queue.</p>
<p>The file is <strong>not</strong> loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
<p>Retrieve the file via <code>Cache.getBinary(key)</code>.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
2016-08-26 00:18:47 +00:00
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;<br>and no URL is given then the Loader will set the URL to be &quot;alien.bin&quot;. It will always add <code>.bin</code> as the extension.<br>If you do not desire this action then provide a URL.</p>
<p>It will be loaded via xhr with a responseType of &quot;arraybuffer&quot;. You can specify an optional callback to process the file after load.<br>When the callback is called it will be passed 2 parameters: the key of the file and the file data.</p>
2015-03-23 23:46:30 +00:00
<p>WARNING: If a callback is specified the data will be set to whatever it returns. Always return the data object, even if you didn't modify it.</p>
2013-10-02 14:05:55 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
2014-02-05 06:29:17 +00:00
<th>Argument</th>
2013-10-02 14:05:55 +00:00
<th>Default</th>
2013-10-02 14:05:55 +00:00
<th class="last">Description</th>
</tr>
</thead>
<tbody>
2013-11-28 15:57:09 +00:00
<tr>
2014-02-05 06:29:17 +00:00
<td class="name"><code>key</code></td>
2013-11-28 15:57:09 +00:00
<td class="type">
<span class="param-type">string</span>
</td>
2014-02-05 06:29:17 +00:00
<td class="attributes">
2013-11-28 15:57:09 +00:00
2014-02-05 06:29:17 +00:00
</td>
2013-11-28 15:57:09 +00:00
2014-02-05 06:29:17 +00:00
<td class="default">
</td>
2014-02-05 06:29:17 +00:00
2015-03-23 23:46:30 +00:00
<td class="description last"><p>Unique asset key of the binary file.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
2013-10-02 14:05:55 +00:00
<tr>
2015-03-23 23:46:30 +00:00
<td class="name"><code>url</code></td>
2013-10-02 14:05:55 +00:00
<td class="type">
<span class="param-type">string</span>
</td>
2014-02-05 06:29:17 +00:00
<td class="attributes">
2015-07-22 14:31:30 +00:00
&lt;optional><br>
2014-02-05 06:29:17 +00:00
</td>
2013-10-02 14:05:55 +00:00
<td class="default">
</td>
2013-10-02 14:05:55 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>URL of the binary file. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.bin</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.bin&quot;.</p></td>
2014-02-05 06:29:17 +00:00
</tr>
<tr>
2015-03-23 23:46:30 +00:00
<td class="name"><code>callback</code></td>
2014-02-05 06:29:17 +00:00
<td class="type">
2015-03-23 23:46:30 +00:00
<span class="param-type">function</span>
2014-02-05 06:29:17 +00:00
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
2015-03-23 23:46:30 +00:00
(none)
</td>
2014-02-05 06:29:17 +00:00
2015-03-23 23:46:30 +00:00
<td class="description last"><p>Optional callback that will be passed the file after loading, so you can perform additional processing on it.</p></td>
2014-02-05 06:29:17 +00:00
</tr>
<tr>
2015-03-23 23:46:30 +00:00
<td class="name"><code>callbackContext</code></td>
2014-02-05 06:29:17 +00:00
<td class="type">
<span class="param-type">object</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
2014-02-05 06:29:17 +00:00
2015-03-23 23:46:30 +00:00
<td class="description last"><p>The context under which the callback will be applied. If not specified it will use the callback itself as the context.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
2015-03-23 23:46:30 +00:00
</tbody>
</table>
2015-03-23 23:46:30 +00:00
2015-03-23 23:46:30 +00:00
<h5>Returns:</h5>
<div class="returns">
2015-03-23 23:46:30 +00:00
<div class="returns-type">
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>
2015-03-23 23:46:30 +00:00
-
</div>
<div class="returns-desc param-desc">
<p>This Loader instance.</p>
</div>
2015-03-23 23:46:30 +00:00
</div>
<dl class="details">
2015-03-23 23:46:30 +00:00
2015-03-23 23:46:30 +00:00
2013-10-02 14:05:55 +00:00
2014-02-05 06:29:17 +00:00
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-911">line 911</a>
2014-11-15 20:01:46 +00:00
</dt>
2014-02-05 06:29:17 +00:00
2014-11-15 20:01:46 +00:00
2014-02-05 06:29:17 +00:00
2014-11-15 20:01:46 +00:00
2014-02-05 06:29:17 +00:00
2014-11-15 20:01:46 +00:00
2014-02-05 06:29:17 +00:00
</dl>
2014-11-15 20:01:46 +00:00
2014-02-05 06:29:17 +00:00
2014-11-15 20:01:46 +00:00
2014-02-05 06:29:17 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="bitmapFont"><span class="type-signature"></span>bitmapFont<span class="signature">(key, textureURL, atlasURL, atlasData, <span class="optional">xSpacing</span>, <span class="optional">ySpacing</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Loader.html">Phaser.Loader</a>}</span></h4>
2014-02-05 06:29:17 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2014-02-05 06:29:17 +00:00
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Adds Bitmap Font files to the current load queue.</p>
<p>To create the Bitmap Font files you can use:</p>
2016-08-26 00:18:47 +00:00
<p>BMFont (Windows, free): http://www.angelcode.com/products/bmfont/<br>Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner<br>Littera (Web-based, free): http://kvazars.com/littera/</p>
<p>You can choose to either load the data externally, by providing a URL to an xml file.<br>Or you can pass in an XML object or String via the <code>xmlData</code> parameter.<br>If you pass a String the data is automatically run through <code>Loader.parseXML</code> and then immediately added to the Phaser.Cache.</p>
2015-07-22 14:31:30 +00:00
<p>If URLs are provided the files are <strong>not</strong> loaded immediately after calling this method, but are added to the load queue.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
2016-08-26 00:18:47 +00:00
<p>Retrieve the file via <code>Cache.getBitmapFont(key)</code>. XML files are automatically parsed upon load.<br>If you need to control when the XML is parsed then use <code>Loader.text</code> instead and parse the XML file as needed.</p>
2015-07-22 14:31:30 +00:00
<p>The URLs can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
2016-08-26 00:18:47 +00:00
<p>If the textureURL isn't specified then the Loader will take the key and create a filename from that.<br>For example if the key is &quot;megaFont&quot; and textureURL is null then the Loader will set the URL to be &quot;megaFont.png&quot;.<br>The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will<br>set the atlasURL to be the key. For example if the key is &quot;megaFont&quot; the atlasURL will be set to &quot;megaFont.xml&quot;.</p>
2015-07-22 14:31:30 +00:00
<p>If you do not desire this action then provide URLs and / or a data object.</p>
2014-02-05 06:29:17 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
2015-03-23 23:46:30 +00:00
<th>Argument</th>
2014-02-05 06:29:17 +00:00
2015-03-23 23:46:30 +00:00
<th>Default</th>
2014-02-05 06:29:17 +00:00
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2015-03-23 23:46:30 +00:00
<td class="name"><code>key</code></td>
2014-02-05 06:29:17 +00:00
<td class="type">
<span class="param-type">string</span>
</td>
2015-03-23 23:46:30 +00:00
<td class="attributes">
2014-02-05 06:29:17 +00:00
2015-03-23 23:46:30 +00:00
</td>
2014-02-05 06:29:17 +00:00
2015-03-23 23:46:30 +00:00
<td class="default">
</td>
<td class="description last"><p>Unique asset key of the bitmap font.</p></td>
2014-02-05 06:29:17 +00:00
</tr>
<tr>
2015-03-23 23:46:30 +00:00
<td class="name"><code>textureURL</code></td>
2014-02-05 06:29:17 +00:00
<td class="type">
<span class="param-type">string</span>
</td>
2015-03-23 23:46:30 +00:00
<td class="attributes">
2014-02-05 06:29:17 +00:00
2015-03-23 23:46:30 +00:00
2014-11-15 20:01:46 +00:00
2015-03-23 23:46:30 +00:00
</td>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<td class="default">
</td>
2013-10-02 14:05:55 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>URL of the Bitmap Font texture file. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.png</code>, i.e. if <code>key</code> was &quot;megaFont&quot; then the URL will be &quot;megaFont.png&quot;.</p></td>
2015-03-23 23:46:30 +00:00
</tr>
2013-10-02 14:05:55 +00:00
<tr>
2015-07-22 14:31:30 +00:00
<td class="name"><code>atlasURL</code></td>
2013-10-02 14:05:55 +00:00
<td class="type">
2015-03-23 23:46:30 +00:00
<span class="param-type">string</span>
2013-10-02 14:05:55 +00:00
</td>
2015-03-23 23:46:30 +00:00
<td class="attributes">
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
</td>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<td class="default">
</td>
2013-10-02 14:05:55 +00:00
2015-10-15 11:06:38 +00:00
<td class="description last"><p>URL of the Bitmap Font atlas file (xml/json). If undefined or <code>null</code> AND <code>atlasData</code> is null, the url will be set to <code>&lt;key&gt;.xml</code>, i.e. if <code>key</code> was &quot;megaFont&quot; then the URL will be &quot;megaFont.xml&quot;.</p></td>
2015-03-23 23:46:30 +00:00
</tr>
2013-10-02 14:05:55 +00:00
<tr>
2015-07-22 14:31:30 +00:00
<td class="name"><code>atlasData</code></td>
2013-10-02 14:05:55 +00:00
<td class="type">
2015-03-23 23:46:30 +00:00
<span class="param-type">object</span>
2013-10-02 14:05:55 +00:00
</td>
2015-03-23 23:46:30 +00:00
<td class="attributes">
</td>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<td class="default">
</td>
2013-10-02 14:05:55 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>An optional Bitmap Font atlas in string form (stringified xml/json).</p></td>
2013-10-02 14:05:55 +00:00
</tr>
2015-03-23 23:46:30 +00:00
<tr>
<td class="name"><code>xSpacing</code></td>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<td class="type">
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<span class="param-type">number</span>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
</td>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<td class="attributes">
&lt;optional><br>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
</td>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<td class="default">
0
</td>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<td class="description last"><p>If you'd like to add additional horizontal spacing between the characters then set the pixel value here.</p></td>
</tr>
2013-10-02 14:05:55 +00:00
<tr>
2015-03-23 23:46:30 +00:00
<td class="name"><code>ySpacing</code></td>
2013-10-02 14:05:55 +00:00
<td class="type">
2013-11-28 15:57:09 +00:00
<span class="param-type">number</span>
2013-10-02 14:05:55 +00:00
</td>
2015-03-23 23:46:30 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<td class="default">
0
</td>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<td class="description last"><p>If you'd like to add additional vertical spacing between the lines then set the pixel value here.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
</tbody>
</table>
2014-11-15 20:01:46 +00:00
2015-03-23 23:46:30 +00:00
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This Loader instance.</p>
</div>
</div>
2013-10-02 14:05:55 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-1307">line 1307</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
</dl>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-03-23 23:46:30 +00:00
id="checkKeyExists"><span class="type-signature"></span>checkKeyExists<span class="signature">(type, key)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
<div class="description">
2015-03-23 23:46:30 +00:00
<p>Check whether a file/asset with a specific key is queued to be loaded.</p>
<p>To access a loaded asset use Phaser.Cache, eg. <a href="Phaser.Cache.html#checkImageKey">Phaser.Cache#checkImageKey</a></p>
2013-10-02 14:05:55 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2015-03-23 23:46:30 +00:00
<td class="name"><code>type</code></td>
2013-10-02 14:05:55 +00:00
<td class="type">
2015-03-23 23:46:30 +00:00
<span class="param-type">string</span>
</td>
<td class="description last"><p>The type asset you want to check.</p></td>
</tr>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
2013-10-02 14:05:55 +00:00
</td>
2015-03-23 23:46:30 +00:00
<td class="description last"><p>Key of the asset you want to check.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
</tbody>
</table>
2014-11-15 20:01:46 +00:00
2015-03-23 23:46:30 +00:00
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type">boolean</span>
-
</div>
<div class="returns-desc param-desc">
<p>Return true if exists, otherwise return false.</p>
</div>
</div>
2013-10-02 14:05:55 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-390">line 390</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
</dl>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
id="getAsset"><span class="type-signature"></span>getAsset<span class="signature">(type, key)</span><span class="type-signature"> &rarr; {any}</span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
<div class="description">
2015-03-23 23:46:30 +00:00
<p>Find a file/asset with a specific key.</p>
<p>Only assets in the download file queue will be found.</p>
2013-10-02 14:05:55 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2013-11-28 15:57:09 +00:00
<td class="name"><code>type</code></td>
2013-10-02 14:05:55 +00:00
<td class="type">
<span class="param-type">string</span>
</td>
2013-11-28 15:57:09 +00:00
<td class="description last"><p>The type asset you want to check.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
<tr>
2013-11-28 15:57:09 +00:00
<td class="name"><code>key</code></td>
2013-10-02 14:05:55 +00:00
<td class="type">
<span class="param-type">string</span>
</td>
2013-11-28 15:57:09 +00:00
<td class="description last"><p>Key of the asset you want to check.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
</tbody>
</table>
2014-11-15 20:01:46 +00:00
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type">any</span>
-
</div>
<div class="returns-desc param-desc">
2016-08-26 00:18:47 +00:00
<p>Returns an object if found that has 2 properties: <code>index</code> and <code>file</code>; otherwise a non-true value is returned.<br> The index may change and should only be used immediately following this call.</p>
2014-11-15 20:01:46 +00:00
</div>
</div>
2013-10-02 14:05:55 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-441">line 441</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
</dl>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
id="getAssetIndex"><span class="type-signature"></span>getAssetIndex<span class="signature">(type, key)</span><span class="type-signature"> &rarr; {number}</span></h4>
</dt>
<dd>
2014-11-15 20:01:46 +00:00
<div class="description">
2015-03-23 23:46:30 +00:00
<p>Get the queue-index of the file/asset with a specific key.</p>
<p>Only assets in the download file queue will be found.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>The type asset you want to check.</p></td>
</tr>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>Key of the asset you want to check.</p></td>
</tr>
</tbody>
</table>
2014-11-15 20:01:46 +00:00
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type">number</span>
-
</div>
<div class="returns-desc param-desc">
2016-08-26 00:18:47 +00:00
<p>The index of this key in the filelist, or -1 if not found.<br> The index may change and should only be used immediately following this call</p>
2014-11-15 20:01:46 +00:00
</div>
</div>
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-406">line 406</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="image"><span class="type-signature"></span>image<span class="signature">(key, <span class="optional">url</span>, <span class="optional">overwrite</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Loader.html">Phaser.Loader</a>}</span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Adds an Image to the current load queue.</p>
<p>The file is <strong>not</strong> loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.</p>
<p>Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
<p>Retrieve the image via <code>Cache.getImage(key)</code></p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
2016-08-26 00:18:47 +00:00
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;<br>and no URL is given then the Loader will set the URL to be &quot;alien.png&quot;. It will always add <code>.png</code> as the extension.<br>If you do not desire this action then provide a URL.</p>
2013-10-02 14:05:55 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
2013-11-28 15:57:09 +00:00
<th>Argument</th>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
<th>Default</th>
2013-10-02 14:05:55 +00:00
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
2013-11-28 15:57:09 +00:00
<td class="attributes">
</td>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
<td class="default">
</td>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
<td class="description last"><p>Unique asset key of this image file.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
2013-11-28 15:57:09 +00:00
<tr>
<td class="name"><code>url</code></td>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
<td class="type">
<span class="param-type">string</span>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
</td>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
<td class="attributes">
2015-07-22 14:31:30 +00:00
&lt;optional><br>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
</td>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
<td class="default">
</td>
2013-10-02 14:05:55 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>URL of an image file. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.png</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.png&quot;.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
<tr>
<td class="name"><code>overwrite</code></td>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
<td class="type">
<span class="param-type">boolean</span>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
</td>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
<td class="attributes">
&lt;optional><br>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
</td>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
<td class="default">
false
</td>
<td class="description last"><p>If an unloaded file with a matching key already exists in the queue, this entry will overwrite it.</p></td>
</tr>
</tbody>
</table>
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This Loader instance.</p>
</div>
</div>
2013-10-02 14:05:55 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-693">line 693</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
2014-11-15 20:01:46 +00:00
2015-08-24 14:43:45 +00:00
</dd>
<dt>
<h4 class="name "
id="images"><span class="type-signature"></span>images<span class="signature">(keys, <span class="optional">urls</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Loader.html">Phaser.Loader</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Adds an array of images to the current load queue.</p>
<p>It works by passing each element of the array to the Loader.image method.</p>
<p>The files are <strong>not</strong> loaded immediately after calling this method. The files are added to the queue ready to be loaded when the loader starts.</p>
<p>Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.</p>
<p>The keys must be unique Strings. They are used to add the files to the Phaser.Cache upon successful load.</p>
<p>Retrieve the images via <code>Cache.getImage(key)</code></p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
2016-08-26 00:18:47 +00:00
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;<br>and no URL is given then the Loader will set the URL to be &quot;alien.png&quot;. It will always add <code>.png</code> as the extension.<br>If you do not desire this action then provide a URL.</p>
2015-08-24 14:43:45 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>keys</code></td>
<td class="type">
<span class="param-type">array</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>An array of unique asset keys of the image files.</p></td>
</tr>
<tr>
<td class="name"><code>urls</code></td>
<td class="type">
<span class="param-type">array</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last"><p>Optional array of URLs. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.png</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.png&quot;. If provided the URLs array length must match the keys array length.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This Loader instance.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-722">line 722</a>
2015-08-24 14:43:45 +00:00
</dt>
</dl>
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="json"><span class="type-signature"></span>json<span class="signature">(key, <span class="optional">url</span>, <span class="optional">overwrite</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Loader.html">Phaser.Loader</a>}</span></h4>
</dt>
<dd>
2014-11-15 20:01:46 +00:00
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Adds a JSON file to the current load queue.</p>
<p>The file is <strong>not</strong> loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
2016-08-26 00:18:47 +00:00
<p>Retrieve the file via <code>Cache.getJSON(key)</code>. JSON files are automatically parsed upon load.<br>If you need to control when the JSON is parsed then use <code>Loader.text</code> instead and parse the text file as needed.</p>
2015-07-22 14:31:30 +00:00
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
2016-08-26 00:18:47 +00:00
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;<br>and no URL is given then the Loader will set the URL to be &quot;alien.json&quot;. It will always add <code>.json</code> as the extension.<br>If you do not desire this action then provide a URL.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>Unique asset key of the json file.</p></td>
</tr>
<tr>
<td class="name"><code>url</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
2015-07-22 14:31:30 +00:00
&lt;optional><br>
</td>
<td class="default">
</td>
2015-07-22 14:31:30 +00:00
<td class="description last"><p>URL of the JSON file. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.json</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.json&quot;.</p></td>
2015-03-23 23:46:30 +00:00
</tr>
2013-10-02 14:05:55 +00:00
<tr>
2015-03-23 23:46:30 +00:00
<td class="name"><code>overwrite</code></td>
2013-10-02 14:05:55 +00:00
<td class="type">
2015-03-23 23:46:30 +00:00
<span class="param-type">boolean</span>
2013-10-02 14:05:55 +00:00
</td>
2015-03-23 23:46:30 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<td class="default">
false
</td>
2013-10-02 14:05:55 +00:00
2015-03-23 23:46:30 +00:00
<td class="description last"><p>If an unloaded file with a matching key already exists in the queue, this entry will overwrite it.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
</tbody>
</table>
2014-11-15 20:01:46 +00:00
2015-03-23 23:46:30 +00:00
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This Loader instance.</p>
</div>
</div>
2013-10-02 14:05:55 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-794">line 794</a>
2014-11-15 20:01:46 +00:00
</dt>
2014-07-10 19:31:11 +00:00
</dl>
2014-11-15 20:01:46 +00:00
2014-07-10 19:31:11 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
id="pack"><span class="type-signature"></span>pack<span class="signature">(key, <span class="optional">url</span>, <span class="optional">data</span>, <span class="optional">callbackContext</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Loader.html">Phaser.Loader</a>}</span></h4>
2014-07-10 19:31:11 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2014-07-10 19:31:11 +00:00
<div class="description">
2015-03-23 23:46:30 +00:00
<p>Add a JSON resource pack ('packfile') to the Loader.</p>
2016-08-26 00:18:47 +00:00
<p>A packfile is a JSON file that contains a list of assets to the be loaded.<br>Please see the example 'loader/asset pack' in the Phaser Examples repository.</p>
2015-07-22 14:31:30 +00:00
<p>Packs are always put before the first non-pack file that is not loaded / loading.</p>
2016-08-26 00:18:47 +00:00
<p>This means that all packs added before any loading has started are added to the front<br>of the file queue, in the order added.</p>
2015-07-22 14:31:30 +00:00
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
<p>The URL of the packfile can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
2014-07-10 19:31:11 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
2015-03-23 23:46:30 +00:00
<th>Default</th>
2014-07-10 19:31:11 +00:00
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
2015-03-23 23:46:30 +00:00
<td class="default">
</td>
2014-07-10 19:31:11 +00:00
2015-03-23 23:46:30 +00:00
<td class="description last"><p>Unique asset key of this resource pack.</p></td>
2014-07-10 19:31:11 +00:00
</tr>
<tr>
<td class="name"><code>url</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
2015-03-23 23:46:30 +00:00
<td class="default">
</td>
2014-07-10 19:31:11 +00:00
<td class="description last"><p>URL of the Asset Pack JSON file. If you wish to pass a json object instead set this to null and pass the object as the data parameter.</p></td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
2015-03-23 23:46:30 +00:00
<td class="default">
</td>
2014-07-10 19:31:11 +00:00
<td class="description last"><p>The Asset Pack JSON data. Use this to pass in a json data object rather than loading it from a URL. TODO</p></td>
</tr>
<tr>
<td class="name"><code>callbackContext</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
2015-03-23 23:46:30 +00:00
<td class="default">
(loader)
</td>
2014-07-10 19:31:11 +00:00
<td class="description last"><p>Some Loader operations, like Binary and Script require a context for their callbacks. Pass the context here.</p></td>
</tr>
</tbody>
</table>
2014-11-15 20:01:46 +00:00
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This Loader instance.</p>
</div>
</div>
2014-07-10 19:31:11 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-613">line 613</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
</dl>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
id="physics"><span class="type-signature"></span>physics<span class="signature">(key, <span class="optional">url</span>, <span class="optional">data</span>, <span class="optional">format</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Loader.html">Phaser.Loader</a>}</span></h4>
</dt>
<dd>
2014-11-15 20:01:46 +00:00
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Adds a physics data file to the current load queue.</p>
<p>The data must be in <code>Lime + Corona</code> JSON format. <a href="https://www.codeandweb.com">Physics Editor</a> by code'n'web exports in this format natively.</p>
2016-08-26 00:18:47 +00:00
<p>You can choose to either load the data externally, by providing a URL to a json file.<br>Or you can pass in a JSON object or String via the <code>data</code> parameter.<br>If you pass a String the data is automatically run through <code>JSON.parse</code> and then immediately added to the Phaser.Cache.</p>
2015-07-22 14:31:30 +00:00
<p>If a URL is provided the file is <strong>not</strong> loaded immediately after calling this method, but is added to the load queue.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
2016-08-26 00:18:47 +00:00
<p>Retrieve the file via <code>Cache.getJSON(key)</code>. JSON files are automatically parsed upon load.<br>If you need to control when the JSON is parsed then use <code>Loader.text</code> instead and parse the text file as needed.</p>
2015-07-22 14:31:30 +00:00
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
2016-08-26 00:18:47 +00:00
<p>If the URL isn't specified and no data is given then the Loader will take the key and create a filename from that.<br>For example if the key is &quot;alien&quot; and no URL or data is given then the Loader will set the URL to be &quot;alien.json&quot;.<br>It will always use <code>.json</code> as the extension.</p>
2015-07-22 14:31:30 +00:00
<p>If you do not desire this action then provide a URL or data object.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>Unique asset key of the physics json data.</p></td>
</tr>
<tr>
2014-07-10 19:31:11 +00:00
<td class="name"><code>url</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
2015-07-22 14:31:30 +00:00
<td class="description last"><p>URL of the physics data file. If undefined or <code>null</code> and no data is given the url will be set to <code>&lt;key&gt;.json</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.json&quot;.</p></td>
</tr>
<tr>
2014-07-10 19:31:11 +00:00
<td class="name"><code>data</code></td>
<td class="type">
<span class="param-type">object</span>
2015-07-22 14:31:30 +00:00
|
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
2014-07-10 19:31:11 +00:00
<td class="description last"><p>An optional JSON data object. If given then the url is ignored and this JSON object is used for physics data instead.</p></td>
</tr>
<tr>
<td class="name"><code>format</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
Phaser.Physics.LIME_CORONA_JSON
</td>
2014-11-15 20:01:46 +00:00
<td class="description last"><p>The format of the physics data.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This Loader instance.</p>
</div>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-1246">line 1246</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-03-23 23:46:30 +00:00
id="removeAll"><span class="type-signature">&lt;internal> </span>removeAll<span class="signature">()</span><span class="type-signature"></span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
<div class="description">
2015-03-23 23:46:30 +00:00
<p>Remove all file loading requests - this is <em>insufficient</em> to stop current loading. Use <code>reset</code> instead.</p>
2013-10-02 14:05:55 +00:00
</div>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
<dl class="details">
2015-03-23 23:46:30 +00:00
<dt class="important tag-deprecated">Internal:</dt>
<dd class="tag-deprecated"><ul>
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
</ul></dd>
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-1722">line 1722</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
</dl>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-03-23 23:46:30 +00:00
id="removeFile"><span class="type-signature">&lt;internal> </span>removeFile<span class="signature">(type, key)</span><span class="type-signature"></span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
<div class="description">
2015-03-23 23:46:30 +00:00
<p>Remove a file/asset from the loading queue.</p>
<p>A file that is loaded or has started loading cannot be removed.</p>
2013-10-02 14:05:55 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2013-11-28 15:57:09 +00:00
<td class="name"><code>type</code></td>
2013-10-02 14:05:55 +00:00
<td class="type">
2013-11-28 15:57:09 +00:00
<span class="param-type">string</span>
2013-10-02 14:05:55 +00:00
</td>
2013-11-28 15:57:09 +00:00
<td class="description last"><p>The type of resource to add to the list (image, audio, xml, etc).</p></td>
2013-10-02 14:05:55 +00:00
</tr>
<tr>
2013-11-28 15:57:09 +00:00
<td class="name"><code>key</code></td>
2013-10-02 14:05:55 +00:00
<td class="type">
2013-11-28 15:57:09 +00:00
<span class="param-type">string</span>
2013-10-02 14:05:55 +00:00
</td>
2013-11-28 15:57:09 +00:00
<td class="description last"><p>Key of the file you want to remove.</p></td>
</tr>
</tbody>
</table>
2014-11-15 20:01:46 +00:00
2013-11-28 15:57:09 +00:00
<dl class="details">
2015-03-23 23:46:30 +00:00
<dt class="important tag-deprecated">Internal:</dt>
<dd class="tag-deprecated"><ul>
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
</ul></dd>
2013-11-28 15:57:09 +00:00
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-1698">line 1698</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-11-28 15:57:09 +00:00
</dl>
2014-11-15 20:01:46 +00:00
2013-11-28 15:57:09 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
id="replaceInFileList"><span class="type-signature">&lt;internal> </span>replaceInFileList<span class="signature">(type, key, url, properties)</span><span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-11-28 15:57:09 +00:00
<div class="description">
<p>Internal function that replaces an existing entry in the file list with a new one. Do not call directly.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>The type of resource to add to the list (image, audio, xml, etc).</p></td>
</tr>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>The unique Cache ID key of this resource.</p></td>
</tr>
<tr>
<td class="name"><code>url</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>The URL the asset will be loaded from.</p></td>
</tr>
<tr>
<td class="name"><code>properties</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>Any additional properties needed to load the file.</p></td>
</tr>
</tbody>
</table>
2014-11-15 20:01:46 +00:00
2013-11-28 15:57:09 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="important tag-deprecated">Internal:</dt>
<dd class="tag-deprecated"><ul>
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
</ul></dd>
2013-11-28 15:57:09 +00:00
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-597">line 597</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-11-28 15:57:09 +00:00
</dl>
2014-11-15 20:01:46 +00:00
</dd>
<dt>
<h4 class="name "
2015-03-23 23:46:30 +00:00
id="reset"><span class="type-signature">&lt;internal> </span>reset<span class="signature">(<span class="optional">hard</span>, <span class="optional">clearEvents</span>)</span><span class="type-signature"></span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-03-23 23:46:30 +00:00
<p>Reset the loader and clear any queued assets. If <code>Loader.resetLocked</code> is true this operation will abort.</p>
<p>This will abort any loading and clear any queued assets.</p>
<p>Optionally you can clear any associated events.</p>
2014-11-15 20:01:46 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
2015-03-23 23:46:30 +00:00
<th>Argument</th>
2014-11-15 20:01:46 +00:00
2015-03-23 23:46:30 +00:00
<th>Default</th>
2014-11-15 20:01:46 +00:00
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2015-03-23 23:46:30 +00:00
<td class="name"><code>hard</code></td>
2014-11-15 20:01:46 +00:00
<td class="type">
2015-03-23 23:46:30 +00:00
<span class="param-type">boolean</span>
2014-11-15 20:01:46 +00:00
</td>
2015-03-23 23:46:30 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2014-11-15 20:01:46 +00:00
2015-03-23 23:46:30 +00:00
<td class="default">
false
</td>
2014-11-15 20:01:46 +00:00
2015-03-23 23:46:30 +00:00
<td class="description last"><p>If true then the preload sprite and other artifacts may also be cleared.</p></td>
2014-11-15 20:01:46 +00:00
</tr>
<tr>
2015-03-23 23:46:30 +00:00
<td class="name"><code>clearEvents</code></td>
2014-11-15 20:01:46 +00:00
<td class="type">
2015-03-23 23:46:30 +00:00
<span class="param-type">boolean</span>
2014-11-15 20:01:46 +00:00
</td>
2015-03-23 23:46:30 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2014-11-15 20:01:46 +00:00
2015-03-23 23:46:30 +00:00
<td class="default">
false
</td>
2014-11-15 20:01:46 +00:00
2015-03-23 23:46:30 +00:00
<td class="description last"><p>If true then the all Loader signals will have removeAll called on them.</p></td>
2014-11-15 20:01:46 +00:00
</tr>
2015-03-23 23:46:30 +00:00
</tbody>
</table>
<dl class="details">
<dt class="important tag-deprecated">Internal:</dt>
<dd class="tag-deprecated"><ul>
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
</ul></dd>
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-465">line 465</a>
2015-03-23 23:46:30 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="resize"><span class="type-signature">&lt;internal> </span>resize<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Called automatically by ScaleManager when the game resizes in RESIZE scalemode.</p>
<p>This can be used to adjust the preloading sprite size, eg.</p>
</div>
2014-11-15 20:01:46 +00:00
2015-03-23 23:46:30 +00:00
2014-11-15 20:01:46 +00:00
<dl class="details">
2015-03-23 23:46:30 +00:00
<dt class="important tag-deprecated">Internal:</dt>
<dd class="tag-deprecated"><ul>
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
</ul></dd>
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-373">line 373</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
2013-11-28 15:57:09 +00:00
2014-11-15 20:01:46 +00:00
2013-11-28 15:57:09 +00:00
2014-11-15 20:01:46 +00:00
2013-11-28 15:57:09 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="script"><span class="type-signature"></span>script<span class="signature">(key, <span class="optional">url</span>, <span class="optional">callback</span>, <span class="optional">callbackContext</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Loader.html">Phaser.Loader</a>}</span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-11-28 15:57:09 +00:00
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Adds a JavaScript file to the current load queue.</p>
<p>The file is <strong>not</strong> loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.</p>
<p>The key must be a unique String.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
2016-08-26 00:18:47 +00:00
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;<br>and no URL is given then the Loader will set the URL to be &quot;alien.js&quot;. It will always add <code>.js</code> as the extension.<br>If you do not desire this action then provide a URL.</p>
2015-07-22 14:31:30 +00:00
<p>Upon successful load the JavaScript is automatically turned into a script tag and executed, so be careful what you load!</p>
2016-08-26 00:18:47 +00:00
<p>A callback, which will be invoked as the script tag has been created, can also be specified.<br>The callback must return relevant <code>data</code>.</p>
2013-11-28 15:57:09 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
2013-11-28 15:57:09 +00:00
2015-03-23 23:46:30 +00:00
<th>Default</th>
2013-11-28 15:57:09 +00:00
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
2013-11-28 15:57:09 +00:00
2015-03-23 23:46:30 +00:00
<td class="default">
</td>
2013-11-28 15:57:09 +00:00
<td class="description last"><p>Unique asset key of the script file.</p></td>
</tr>
<tr>
<td class="name"><code>url</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
2015-07-22 14:31:30 +00:00
&lt;optional><br>
</td>
2013-11-28 15:57:09 +00:00
2015-03-23 23:46:30 +00:00
<td class="default">
</td>
2013-11-28 15:57:09 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>URL of the JavaScript file. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.js</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.js&quot;.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
2015-03-23 23:46:30 +00:00
<td class="default">
(none)
</td>
<td class="description last"><p>Optional callback that will be called after the script tag has loaded, so you can perform additional processing.</p></td>
</tr>
<tr>
<td class="name"><code>callbackContext</code></td>
<td class="type">
2015-03-23 23:46:30 +00:00
<span class="param-type">object</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
2015-03-23 23:46:30 +00:00
<td class="default">
(loader)
</td>
2015-07-22 14:31:30 +00:00
<td class="description last"><p>The context under which the callback will be applied. If not specified it will use the Phaser Loader as the context.</p></td>
</tr>
2013-11-28 15:57:09 +00:00
</tbody>
</table>
2014-11-15 20:01:46 +00:00
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This Loader instance.</p>
</div>
</div>
2013-11-28 15:57:09 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-876">line 876</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-11-28 15:57:09 +00:00
</dl>
2014-11-15 20:01:46 +00:00
2013-11-28 15:57:09 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
id="setPreloadSprite"><span class="type-signature"></span>setPreloadSprite<span class="signature">(sprite, <span class="optional">direction</span>)</span><span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-11-28 15:57:09 +00:00
<div class="description">
2015-03-23 23:46:30 +00:00
<p>Set a Sprite to be a &quot;preload&quot; sprite by passing it to this method.</p>
2016-08-26 00:18:47 +00:00
<p>A &quot;preload&quot; sprite will have its width or height crop adjusted based on the percentage of the loader in real-time.<br>This allows you to easily make loading bars for games.</p>
2015-03-23 23:46:30 +00:00
<p>The sprite will automatically be made visible when calling this.</p>
2013-11-28 15:57:09 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>sprite</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|
<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
2013-11-28 15:57:09 +00:00
</td>
<td class="attributes">
</td>
<td class="default">
</td>
2014-03-24 12:41:45 +00:00
<td class="description last"><p>The sprite or image that will be cropped during the load.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
<tr>
<td class="name"><code>direction</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
2013-10-02 14:05:55 +00:00
2014-03-24 12:41:45 +00:00
<td class="description last"><p>A value of zero means the sprite will be cropped horizontally, a value of 1 means its will be cropped vertically.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
</tbody>
</table>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-338">line 338</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
</dl>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="shader"><span class="type-signature"></span>shader<span class="signature">(key, <span class="optional">url</span>, <span class="optional">overwrite</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Loader.html">Phaser.Loader</a>}</span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Adds a fragment shader file to the current load queue.</p>
<p>The file is <strong>not</strong> loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
<p>Retrieve the file via <code>Cache.getShader(key)</code>.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
2016-08-26 00:18:47 +00:00
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;blur&quot;<br>and no URL is given then the Loader will set the URL to be &quot;blur.frag&quot;. It will always add <code>.frag</code> as the extension.<br>If you do not desire this action then provide a URL.</p>
2013-10-02 14:05:55 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
2013-10-02 14:05:55 +00:00
<th>Default</th>
2013-10-02 14:05:55 +00:00
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
2013-10-02 14:05:55 +00:00
</td>
<td class="default">
</td>
2013-10-02 14:05:55 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>Unique asset key of the fragment file.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
<tr>
<td class="name"><code>url</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
2015-07-22 14:31:30 +00:00
&lt;optional><br>
2013-10-02 14:05:55 +00:00
</td>
<td class="default">
</td>
2013-10-02 14:05:55 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>URL of the fragment file. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.frag</code>, i.e. if <code>key</code> was &quot;blur&quot; then the URL will be &quot;blur.frag&quot;.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
<tr>
2015-07-22 14:31:30 +00:00
<td class="name"><code>overwrite</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>If an unloaded file with a matching key already exists in the queue, this entry will overwrite it.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This Loader instance.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-822">line 822</a>
2015-07-22 14:31:30 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="spritesheet"><span class="type-signature"></span>spritesheet<span class="signature">(key, url, frameWidth, frameHeight, <span class="optional">frameMax</span>, <span class="optional">margin</span>, <span class="optional">spacing</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Loader.html">Phaser.Loader</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Adds a Sprite Sheet to the current load queue.</p>
<p>The file is <strong>not</strong> loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.</p>
2016-08-26 00:18:47 +00:00
<p>To clarify the terminology that Phaser uses: A Sprite Sheet is an image containing frames, usually of an animation, that are all equal<br>dimensions and often in sequence. For example if the frame size is 32x32 then every frame in the sprite sheet will be that size.<br>Sometimes (outside of Phaser) the term &quot;sprite sheet&quot; is used to refer to a texture atlas.<br>A Texture Atlas works by packing together images as best it can, using whatever frame sizes it likes, often with cropping and trimming<br>the frames in the process. Software such as Texture Packer, Flash CC or Shoebox all generate texture atlases, not sprite sheets.<br>If you've got an atlas then use <code>Loader.atlas</code> instead.</p>
2015-07-22 14:31:30 +00:00
<p>The key must be a unique String. It is used to add the image to the Phaser.Cache upon successful load.</p>
<p>Retrieve the file via <code>Cache.getImage(key)</code>. Sprite sheets, being image based, live in the same Cache as all other Images.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
2016-08-26 00:18:47 +00:00
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;<br>and no URL is given then the Loader will set the URL to be &quot;alien.png&quot;. It will always add <code>.png</code> as the extension.<br>If you do not desire this action then provide a URL.</p>
2015-07-22 14:31:30 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>Unique asset key of the sheet file.</p></td>
</tr>
<tr>
<td class="name"><code>url</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>URL of the sprite sheet file. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.png</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.png&quot;.</p></td>
</tr>
<tr>
<td class="name"><code>frameWidth</code></td>
2013-10-02 14:05:55 +00:00
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
2013-10-02 14:05:55 +00:00
</td>
<td class="default">
</td>
2013-10-02 14:05:55 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>Width in pixels of a single frame in the sprite sheet.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
<tr>
<td class="name"><code>frameHeight</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
</td>
2013-10-02 14:05:55 +00:00
<td class="default">
</td>
2013-10-02 14:05:55 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>Height in pixels of a single frame in the sprite sheet.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
<tr>
<td class="name"><code>frameMax</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
2013-10-02 14:05:55 +00:00
</td>
<td class="default">
-1
</td>
2013-10-02 14:05:55 +00:00
<td class="description last"><p>How many frames in this sprite sheet. If not specified it will divide the whole image into frames.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
2014-02-05 06:29:17 +00:00
<tr>
<td class="name"><code>margin</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last"><p>If the frames have been drawn with a margin, specify the amount here.</p></td>
</tr>
<tr>
<td class="name"><code>spacing</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last"><p>If the frames have been drawn with spacing between them, specify the amount here.</p></td>
</tr>
2013-10-02 14:05:55 +00:00
</tbody>
</table>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<h5>Returns:</h5>
<div class="returns">
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<div class="returns-type">
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
-
</div>
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<div class="returns-desc param-desc">
<p>This Loader instance.</p>
</div>
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
</div>
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<dl class="details">
2013-10-02 14:05:55 +00:00
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-949">line 949</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
2014-11-15 20:01:46 +00:00
2013-11-28 15:57:09 +00:00
2014-11-15 20:01:46 +00:00
2013-11-28 15:57:09 +00:00
2014-11-15 20:01:46 +00:00
2013-11-28 15:57:09 +00:00
</dl>
2014-11-15 20:01:46 +00:00
2013-11-28 15:57:09 +00:00
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
id="start"><span class="type-signature"></span>start<span class="signature">()</span><span class="type-signature"></span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
<div class="description">
<p>Start loading the assets. Normally you don't need to call this yourself as the StateManager will do so.</p>
</div>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-1735">line 1735</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
</dl>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="text"><span class="type-signature"></span>text<span class="signature">(key, <span class="optional">url</span>, <span class="optional">overwrite</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Loader.html">Phaser.Loader</a>}</span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Adds a Text file to the current load queue.</p>
<p>The file is <strong>not</strong> loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
<p>Retrieve the file via <code>Cache.getText(key)</code></p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
2016-08-26 00:18:47 +00:00
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;<br>and no URL is given then the Loader will set the URL to be &quot;alien.txt&quot;. It will always add <code>.txt</code> as the extension.<br>If you do not desire this action then provide a URL.</p>
2013-10-02 14:05:55 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
2013-11-28 15:57:09 +00:00
<th>Argument</th>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
<th>Default</th>
2013-10-02 14:05:55 +00:00
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
2013-11-28 15:57:09 +00:00
<td class="attributes">
</td>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
<td class="default">
</td>
2013-10-02 14:05:55 +00:00
<td class="description last"><p>Unique asset key of the text file.</p></td>
</tr>
<tr>
<td class="name"><code>url</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
2013-11-28 15:57:09 +00:00
<td class="attributes">
2015-07-22 14:31:30 +00:00
&lt;optional><br>
2013-11-28 15:57:09 +00:00
</td>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
<td class="default">
</td>
2013-10-02 14:05:55 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>URL of the text file. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.txt</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.txt&quot;.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
<tr>
<td class="name"><code>overwrite</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
2013-11-28 15:57:09 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
<td class="default">
false
</td>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
<td class="description last"><p>If an unloaded file with a matching key already exists in the queue, this entry will overwrite it.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
</tbody>
</table>
2014-11-15 20:01:46 +00:00
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This Loader instance.</p>
</div>
</div>
2013-10-02 14:05:55 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-767">line 767</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
</dl>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
id="tilemap"><span class="type-signature"></span>tilemap<span class="signature">(key, <span class="optional">url</span>, <span class="optional">data</span>, <span class="optional">format</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Loader.html">Phaser.Loader</a>}</span></h4>
2013-10-02 14:05:55 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Adds a Tile Map data file to the current load queue.</p>
2016-08-26 00:18:47 +00:00
<p>Phaser can load data in two different formats: CSV and Tiled JSON.</p>
<p>Tiled is a free software package, specifically for creating tilemaps, and is available from http://www.mapeditor.org</p>
<p>You can choose to either load the data externally, by providing a URL to a json file.<br>Or you can pass in a JSON object or String via the <code>data</code> parameter.<br>If you pass a String the data is automatically run through <code>JSON.parse</code> and then immediately added to the Phaser.Cache.</p>
2015-07-22 14:31:30 +00:00
<p>If a URL is provided the file is <strong>not</strong> loaded immediately after calling this method, but is added to the load queue.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
2016-08-26 00:18:47 +00:00
<p>Retrieve the file via <code>Cache.getTilemapData(key)</code>. JSON files are automatically parsed upon load.<br>If you need to control when the JSON is parsed then use <code>Loader.text</code> instead and parse the text file as needed.</p>
2015-07-22 14:31:30 +00:00
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
2016-08-26 00:18:47 +00:00
<p>If the URL isn't specified and no data is given then the Loader will take the key and create a filename from that.<br>For example if the key is &quot;level1&quot; and no URL or data is given then the Loader will set the URL to be &quot;level1.json&quot;.<br>If you set the format to be Tilemap.CSV it will set the URL to be &quot;level1.csv&quot; instead.</p>
2015-07-22 14:31:30 +00:00
<p>If you do not desire this action then provide a URL or data object.</p>
2013-10-02 14:05:55 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
2013-11-28 15:57:09 +00:00
<th>Argument</th>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
<th>Default</th>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
<th class="last">Description</th>
</tr>
</thead>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
<tbody>
2013-10-02 14:05:55 +00:00
<tr>
2013-11-28 15:57:09 +00:00
<td class="name"><code>key</code></td>
2013-10-02 14:05:55 +00:00
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
2013-11-28 15:57:09 +00:00
<td class="default">
</td>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
<td class="description last"><p>Unique asset key of the tilemap data.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
<tr>
2014-07-10 19:31:11 +00:00
<td class="name"><code>url</code></td>
2013-10-02 14:05:55 +00:00
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
2013-11-28 15:57:09 +00:00
<td class="default">
</td>
2013-10-02 14:05:55 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>URL of the tile map file. If undefined or <code>null</code> and no data is given the url will be set to <code>&lt;key&gt;.json</code>, i.e. if <code>key</code> was &quot;level1&quot; then the URL will be &quot;level1.json&quot;.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
<tr>
2014-07-10 19:31:11 +00:00
<td class="name"><code>data</code></td>
2013-10-02 14:05:55 +00:00
<td class="type">
<span class="param-type">object</span>
2015-07-22 14:31:30 +00:00
|
<span class="param-type">string</span>
2013-10-02 14:05:55 +00:00
</td>
<td class="attributes">
&lt;optional><br>
</td>
2013-11-28 15:57:09 +00:00
<td class="default">
</td>
2013-10-02 14:05:55 +00:00
2014-07-10 19:31:11 +00:00
<td class="description last"><p>An optional JSON data object. If given then the url is ignored and this JSON object is used for map data instead.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
<tr>
<td class="name"><code>format</code></td>
<td class="type">
<span class="param-type">number</span>
2013-10-02 14:05:55 +00:00
</td>
<td class="attributes">
&lt;optional><br>
</td>
2013-11-28 15:57:09 +00:00
<td class="default">
Phaser.Tilemap.CSV
</td>
2013-10-02 14:05:55 +00:00
2013-11-28 15:57:09 +00:00
<td class="description last"><p>The format of the map data. Either Phaser.Tilemap.CSV or Phaser.Tilemap.TILED_JSON.</p></td>
2013-10-02 14:05:55 +00:00
</tr>
</tbody>
</table>
2014-11-15 20:01:46 +00:00
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This Loader instance.</p>
</div>
</div>
2013-10-02 14:05:55 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-1165">line 1165</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-11-28 15:57:09 +00:00
</dl>
2014-11-15 20:01:46 +00:00
2013-11-28 15:57:09 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-03-23 23:46:30 +00:00
id="totalLoadedFiles"><span class="type-signature">&lt;internal> </span>totalLoadedFiles<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-11-28 15:57:09 +00:00
<div class="description">
<p>Returns the number of files that have already been loaded, even if they errored.</p>
</div>
2014-11-15 20:01:46 +00:00
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type">number</span>
-
</div>
<div class="returns-desc param-desc">
<p>The number of files that have already been loaded (even if they errored)</p>
</div>
</div>
2013-11-28 15:57:09 +00:00
<dl class="details">
2015-03-23 23:46:30 +00:00
<dt class="important tag-deprecated">Internal:</dt>
<dd class="tag-deprecated"><ul>
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
</ul></dd>
2013-11-28 15:57:09 +00:00
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-2988">line 2988</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-11-28 15:57:09 +00:00
</dl>
2014-11-15 20:01:46 +00:00
2013-11-28 15:57:09 +00:00
2014-07-10 19:31:11 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-03-23 23:46:30 +00:00
id="totalLoadedPacks"><span class="type-signature">&lt;internal> </span>totalLoadedPacks<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
2014-07-10 19:31:11 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2014-07-10 19:31:11 +00:00
<div class="description">
<p>Returns the number of asset packs that have already been loaded, even if they errored.</p>
</div>
2014-11-15 20:01:46 +00:00
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type">number</span>
-
</div>
<div class="returns-desc param-desc">
<p>The number of asset packs that have already been loaded (even if they errored)</p>
</div>
</div>
2014-07-10 19:31:11 +00:00
<dl class="details">
2015-03-23 23:46:30 +00:00
<dt class="important tag-deprecated">Internal:</dt>
<dd class="tag-deprecated"><ul>
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
</ul></dd>
2014-07-10 19:31:11 +00:00
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-3014">line 3014</a>
2014-11-15 20:01:46 +00:00
</dt>
2014-07-10 19:31:11 +00:00
</dl>
2014-11-15 20:01:46 +00:00
2014-07-10 19:31:11 +00:00
2013-11-28 15:57:09 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-03-23 23:46:30 +00:00
id="totalQueuedFiles"><span class="type-signature">&lt;internal> </span>totalQueuedFiles<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2013-11-28 15:57:09 +00:00
<div class="description">
2014-07-10 19:31:11 +00:00
<p>Returns the number of files still waiting to be processed in the load queue. This value decreases as each file in the queue is loaded.</p>
2013-11-28 15:57:09 +00:00
</div>
2014-11-15 20:01:46 +00:00
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type">number</span>
-
</div>
<div class="returns-desc param-desc">
<p>The number of files that still remain in the load queue.</p>
</div>
</div>
2013-11-28 15:57:09 +00:00
<dl class="details">
2015-03-23 23:46:30 +00:00
<dt class="important tag-deprecated">Internal:</dt>
<dd class="tag-deprecated"><ul>
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
</ul></dd>
2013-11-28 15:57:09 +00:00
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-3001">line 3001</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
</dl>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
2014-07-10 19:31:11 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-03-23 23:46:30 +00:00
id="totalQueuedPacks"><span class="type-signature">&lt;internal> </span>totalQueuedPacks<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
2014-07-10 19:31:11 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2014-07-10 19:31:11 +00:00
<div class="description">
<p>Returns the number of asset packs still waiting to be processed in the load queue. This value decreases as each pack in the queue is loaded.</p>
</div>
2014-11-15 20:01:46 +00:00
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type">number</span>
-
</div>
<div class="returns-desc param-desc">
<p>The number of asset packs that still remain in the load queue.</p>
</div>
</div>
2014-07-10 19:31:11 +00:00
<dl class="details">
2015-03-23 23:46:30 +00:00
<dt class="important tag-deprecated">Internal:</dt>
<dd class="tag-deprecated"><ul>
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
</ul></dd>
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-3027">line 3027</a>
2015-03-23 23:46:30 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="transformUrl"><span class="type-signature">&lt;internal> </span>transformUrl<span class="signature">(url, file)</span><span class="type-signature"> &rarr; {string}</span></h4>
2015-03-23 23:46:30 +00:00
</dt>
<dd>
<div class="description">
2015-10-15 11:06:38 +00:00
<p>Transforms the asset URL.</p>
<p>The default implementation prepends the baseURL if the url doesn't begin with http or //</p>
2015-03-23 23:46:30 +00:00
</div>
2015-07-22 14:31:30 +00:00
<h5>Parameters:</h5>
2015-03-23 23:46:30 +00:00
2015-07-22 14:31:30 +00:00
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
2015-03-23 23:46:30 +00:00
2015-07-22 14:31:30 +00:00
<th>Type</th>
2015-03-23 23:46:30 +00:00
2015-07-22 14:31:30 +00:00
2015-03-23 23:46:30 +00:00
2015-07-22 14:31:30 +00:00
2015-03-23 23:46:30 +00:00
2015-07-22 14:31:30 +00:00
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>url</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>The url to transform.</p></td>
</tr>
<tr>
<td class="name"><code>file</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>The file object being transformed.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type">string</span>
-
</div>
<div class="returns-desc param-desc">
<p>The transformed url. In rare cases where the url isn't specified it will return false instead.</p>
</div>
</div>
<dl class="details">
<dt class="important tag-deprecated">Internal:</dt>
<dd class="tag-deprecated"><ul>
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
2015-03-23 23:46:30 +00:00
</ul></dd>
2014-07-10 19:31:11 +00:00
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-2063">line 2063</a>
2015-07-22 14:31:30 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="video"><span class="type-signature"></span>video<span class="signature">(key, urls, <span class="optional">loadEvent</span>, <span class="optional">asBlob</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Loader.html">Phaser.Loader</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Adds a video file to the current load queue.</p>
<p>The file is <strong>not</strong> loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
<p>Retrieve the file via <code>Cache.getVideo(key)</code>.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>You don't need to preload a video in order to play it in your game. See <code>Video.createVideoFromURL</code> for details.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>Unique asset key of the video file.</p></td>
</tr>
<tr>
<td class="name"><code>urls</code></td>
<td class="type">
<span class="param-type">string</span>
|
<span class="param-type">Array.&lt;string></span>
|
<span class="param-type">Array.&lt;object></span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
2016-08-26 00:18:47 +00:00
<td class="description last"><p>Either a single string or an array of URIs or pairs of <code>{uri: .., type: ..}</code>.<br> If an array is specified then the first URI (or URI + mime pair) that is device-compatible will be selected.<br> For example: <code>&quot;boom.mp4&quot;</code>, <code>['boom.mp4', 'boom.ogg', 'boom.webm']</code>, or <code>[{uri: &quot;data:&lt;opus_resource&gt;&quot;, type: 'opus'}, 'fallback.mp4']</code>.<br> BLOB and DATA URIs can be used but only support automatic detection when used in the pair form; otherwise the format must be manually checked before adding the resource.</p></td>
2015-07-22 14:31:30 +00:00
</tr>
<tr>
<td class="name"><code>loadEvent</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
'canplaythrough'
</td>
2016-08-26 00:18:47 +00:00
<td class="description last"><p>This sets the Video source event to listen for before the load is considered complete.<br> 'canplaythrough' implies the video has downloaded enough, and bandwidth is high enough that it can be played to completion.<br> 'canplay' implies the video has downloaded enough to start playing, but not necessarily to finish.<br> 'loadeddata' just makes sure that the video meta data and first frame have downloaded. Phaser uses this value automatically if the<br> browser is detected as being Firefox and no <code>loadEvent</code> is given, otherwise it defaults to <code>canplaythrough</code>.</p></td>
2015-07-22 14:31:30 +00:00
</tr>
<tr>
<td class="name"><code>asBlob</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
false
</td>
2016-08-26 00:18:47 +00:00
<td class="description last"><p>Video files can either be loaded via the creation of a video element which has its src property set.<br> Or they can be loaded via xhr, stored as binary data in memory and then converted to a Blob. This isn't supported in IE9 or Android 2.<br> If you need to have the same video playing at different times across multiple Sprites then you need to load it as a Blob.</p></td>
2015-07-22 14:31:30 +00:00
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This Loader instance.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-1111">line 1111</a>
2015-07-22 14:31:30 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="withSyncPoints"><span class="type-signature"></span>withSyncPoints<span class="signature">(callback, <span class="optional">callbackContext</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Loader.html">Phaser.Loader</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Add a synchronization point to the assets/files added within the supplied callback.</p>
2016-08-26 00:18:47 +00:00
<p>A synchronization point denotes that an asset <em>must</em> be completely loaded before<br>subsequent assets can be loaded. An asset marked as a sync-point does not need to wait<br>for previous assets to load (unless they are sync-points). Resources, such as packs, may still<br>be downloaded around sync-points, as long as they do not finalize loading.</p>
2015-07-22 14:31:30 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The callback is invoked and is supplied with a single argument: the loader.</p></td>
</tr>
<tr>
<td class="name"><code>callbackContext</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
(loader)
</td>
<td class="description last"><p>Context for the callback.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This Loader instance.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-1649">line 1649</a>
2014-11-15 20:01:46 +00:00
</dt>
2014-07-10 19:31:11 +00:00
</dl>
2014-11-15 20:01:46 +00:00
2014-07-10 19:31:11 +00:00
2014-10-09 15:12:53 +00:00
</dd>
<dt>
2014-11-15 20:01:46 +00:00
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="xml"><span class="type-signature"></span>xml<span class="signature">(key, <span class="optional">url</span>, <span class="optional">overwrite</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Loader.html">Phaser.Loader</a>}</span></h4>
2014-10-09 15:12:53 +00:00
</dt>
<dd>
2014-11-15 20:01:46 +00:00
2014-10-09 15:12:53 +00:00
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Adds an XML file to the current load queue.</p>
<p>The file is <strong>not</strong> loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.</p>
<p>The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.</p>
<p>Retrieve the file via <code>Cache.getXML(key)</code>.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
2016-08-26 00:18:47 +00:00
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;<br>and no URL is given then the Loader will set the URL to be &quot;alien.xml&quot;. It will always add <code>.xml</code> as the extension.<br>If you do not desire this action then provide a URL.</p>
2014-10-09 15:12:53 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>Unique asset key of the xml file.</p></td>
</tr>
<tr>
<td class="name"><code>url</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
2015-07-22 14:31:30 +00:00
&lt;optional><br>
2014-10-09 15:12:53 +00:00
</td>
<td class="default">
</td>
2015-07-22 14:31:30 +00:00
<td class="description last"><p>URL of the XML file. If undefined or <code>null</code> the url will be set to <code>&lt;key&gt;.xml</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.xml&quot;.</p></td>
2014-10-09 15:12:53 +00:00
</tr>
<tr>
<td class="name"><code>overwrite</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>If an unloaded file with a matching key already exists in the queue, this entry will overwrite it.</p></td>
</tr>
</tbody>
</table>
2014-11-15 20:01:46 +00:00
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.Loader.html">Phaser.Loader</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This Loader instance.</p>
</div>
</div>
2014-10-09 15:12:53 +00:00
<dl class="details">
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2016-08-26 00:18:47 +00:00
<a href="src_loader_Loader.js.html">loader/Loader.js</a>, <a href="src_loader_Loader.js.html#sunlight-1-line-849">line 849</a>
2014-11-15 20:01:46 +00:00
</dt>
2013-10-02 14:05:55 +00:00
</dl>
2014-11-15 20:01:46 +00:00
2013-10-02 14:05:55 +00:00
</dd>
</dl>
</article>
</section>
</div>
<div class="clearfix"></div>
<footer>
<span class="copyright">
2016-04-22 14:15:28 +00:00
Phaser Copyright © 2012-2016 Photon Storm Ltd.
2013-10-02 14:05:55 +00:00
</span>
<br />
<span class="jsdoc-message">
2016-08-26 00:18:47 +00:00
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a>
on Fri Aug 26 2016 01:16:14 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
2013-10-02 14:05:55 +00:00
</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( {
2014-04-10 22:13:43 +00:00
anchorName : function(i, heading, prefix) {
return $(heading).attr("id") || ( prefix + i );
},
2013-10-02 14:05:55 +00:00
selectors : "h1,h2,h3,h4",
showAndHide : false,
scrollTo : 60
} );
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
} );
</script>
</body>
</html>