phaser/docs/Phaser.Loader.html
2013-11-01 18:16:52 +00:00

5928 lines
No EOL
79 KiB
HTML

<!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]-->
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
</head>
<body>
<div class="container-fluid">
<div class="navbar navbar-fixed-top navbar-inverse">
<div class="navbar-inner">
<a class="brand" href="index.html">Phaser</a>
<ul class="nav">
<li class="dropdown">
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
class="caret"></b></a>
<ul class="dropdown-menu ">
<li>
<a href="Phaser.html">Phaser</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
class="caret"></b></a>
<ul class="dropdown-menu ">
<li>
<a href="Phaser.Animation.html">Animation</a>
</li>
<li>
<a href="Phaser.AnimationManager.html">AnimationManager</a>
</li>
<li>
<a href="Phaser.AnimationParser.html">AnimationParser</a>
</li>
<li>
<a href="Phaser.BitmapText.html">BitmapText</a>
</li>
<li>
<a href="Phaser.Button.html">Button</a>
</li>
<li>
<a href="Phaser.Cache.html">Cache</a>
</li>
<li>
<a href="Phaser.Camera.html">Camera</a>
</li>
<li>
<a href="Phaser.Canvas.html">Canvas</a>
</li>
<li>
<a href="Phaser.Circle.html">Circle</a>
</li>
<li>
<a href="Phaser.Color.html">Color</a>
</li>
<li>
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
<li>
<a href="Phaser.Easing.Back.html">Back</a>
</li>
<li>
<a href="Phaser.Easing.Bounce.html">Bounce</a>
</li>
<li>
<a href="Phaser.Easing.Circular.html">Circular</a>
</li>
<li>
<a href="Phaser.Easing.Cubic.html">Cubic</a>
</li>
<li>
<a href="Phaser.Easing.Elastic.html">Elastic</a>
</li>
<li>
<a href="Phaser.Easing.Exponential.html">Exponential</a>
</li>
<li>
<a href="Phaser.Easing.Linear.html">Linear</a>
</li>
<li>
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
</li>
<li>
<a href="Phaser.Easing.Quartic.html">Quartic</a>
</li>
<li>
<a href="Phaser.Easing.Quintic.html">Quintic</a>
</li>
<li>
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
</li>
<li>
<a href="Phaser.Events.html">Events</a>
</li>
<li>
<a href="Phaser.Frame.html">Frame</a>
</li>
<li>
<a href="Phaser.FrameData.html">FrameData</a>
</li>
<li>
<a href="Phaser.Game.html">Game</a>
</li>
<li>
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
<li>
<a href="Phaser.Group.html">Group</a>
</li>
<li>
<a href="Phaser.Input.html">Input</a>
</li>
<li>
<a href="Phaser.InputHandler.html">InputHandler</a>
</li>
<li>
<a href="Phaser.Key.html">Key</a>
</li>
<li>
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
<li>
<a href="Phaser.Loader.html">Loader</a>
</li>
<li>
<a href="Phaser.LoaderParser.html">LoaderParser</a>
</li>
<li>
<a href="Phaser.Math.html">Math</a>
</li>
<li>
<a href="Phaser.Mouse.html">Mouse</a>
</li>
<li>
<a href="Phaser.MSPointer.html">MSPointer</a>
</li>
<li>
<a href="Phaser.Net.html">Net</a>
</li>
<li>
<a href="Phaser.Particles.html">Particles</a>
</li>
<li>
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
</li>
<li>
<a href="Phaser.Physics.html">Physics</a>
</li>
<li>
<a href="Phaser.Physics.Arcade.html">Arcade</a>
</li>
<li>
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
</li>
<li>
<a href="Phaser.Plugin.html">Plugin</a>
</li>
<li>
<a href="Phaser.PluginManager.html">PluginManager</a>
</li>
<li>
<a href="Phaser.Point.html">Point</a>
</li>
<li>
<a href="Phaser.Pointer.html">Pointer</a>
</li>
<li>
<a href="Phaser.QuadTree.html">QuadTree</a>
</li>
<li>
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
</li>
<li>
<a href="Phaser.Rectangle.html">Rectangle</a>
</li>
<li>
<a href="Phaser.RenderTexture.html">RenderTexture</a>
</li>
<li>
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
</li>
<li>
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
<li>
<a href="Phaser.SoundManager.html">SoundManager</a>
</li>
<li>
<a href="Phaser.Sprite.html">Sprite</a>
</li>
<li>
<a href="Phaser.Stage.html">Stage</a>
</li>
<li>
<a href="Phaser.StageScaleMode.html">StageScaleMode</a>
</li>
<li>
<a href="Phaser.State.html">State</a>
</li>
<li>
<a href="Phaser.StateManager.html">StateManager</a>
</li>
<li>
<a href="Phaser.Text.html">Text</a>
</li>
<li>
<a href="Phaser.TileSprite.html">TileSprite</a>
</li>
<li>
<a href="Phaser.Time.html">Time</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
<li>
<a href="Phaser.Tween.html">Tween</a>
</li>
<li>
<a href="Phaser.TweenManager.html">TweenManager</a>
</li>
<li>
<a href="Phaser.Utils.html">Utils</a>
</li>
<li>
<a href="Phaser.Utils.Debug.html">Debug</a>
</li>
<li>
<a href="Phaser.World.html">World</a>
</li>
<li>
<a href="SignalBinding.html">SignalBinding</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b
class="caret"></b></a>
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#right">right</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="row-fluid">
<div class="span8">
<div id="main">
<h1 class="page-title">Class: Loader</h1>
<section>
<header>
<h2>
<span class="ancestors"><a href="Phaser.html">Phaser</a>.</span>
Loader
</h2>
<div class="class-description"><p>The Loader handles loading all external content such as Images, Sounds, Texture Atlases and data files.
It uses a combination of Image() loading and xhr and provides progress and completion callbacks.</p></div>
</header>
<article>
<div class="container-overview">
<dt>
<h4 class="name" id="Loader"><span class="type-signature"></span>new Loader<span class="signature">(game)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Phaser loader constructor.
The Loader handles loading all external content such as Images, Sounds, Texture Atlases and data files.
It uses a combination of Image() loading and xhr and provides progress and completion callbacks.</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>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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-17">line 17</a>
</li></ul></dd>
</dl>
</dd>
</div>
<h3 class="subsection-title">Members</h3>
<dl>
<dt>
<h4 class="name" id="TEXTURE_ATLAS_JSON_ARRAY"><span class="type-signature">&lt;static, constant> </span>TEXTURE_ATLAS_JSON_ARRAY<span class="type-signature"> :number</span></h4>
</dt>
<dd>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">number</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-121">line 121</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="TEXTURE_ATLAS_JSON_HASH"><span class="type-signature">&lt;static, constant> </span>TEXTURE_ATLAS_JSON_HASH<span class="type-signature"> :number</span></h4>
</dt>
<dd>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">number</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-127">line 127</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="TEXTURE_ATLAS_XML_STARLING"><span class="type-signature">&lt;static, constant> </span>TEXTURE_ATLAS_XML_STARLING<span class="type-signature"> :number</span></h4>
</dt>
<dd>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">number</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-133">line 133</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="baseURL"><span class="type-signature"></span>baseURL<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>If you want to append a URL before the path of any asset you can set this here.
Useful if you need to allow an asset url to be configured outside of the game code.
MUST have / on the end of it!</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>baseURL</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-93">line 93</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="crossOrigin"><span class="type-signature"></span>crossOrigin<span class="type-signature"></span></h4>
</dt>
<dd>
<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>crossOrigin</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>The crossOrigin value applied to loaded images</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-84">line 84</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="game"><span class="type-signature"></span>game<span class="type-signature"></span></h4>
</dt>
<dd>
<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>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>Local reference to game.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-22">line 22</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="hasLoaded"><span class="type-signature"></span>hasLoaded<span class="type-signature"></span></h4>
</dt>
<dd>
<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>hasLoaded</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>True if all assets in the queue have finished loading.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-65">line 65</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="isLoading"><span class="type-signature"></span>isLoading<span class="type-signature"></span></h4>
</dt>
<dd>
<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>isLoading</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>True if the Loader is in the process of loading the queue.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-59">line 59</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="onFileComplete"><span class="type-signature"></span>onFileComplete<span class="type-signature"></span></h4>
</dt>
<dd>
<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>onFileComplete</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Signal.html">Phaser.Signal</a></span>
</td>
<td class="description last"><p>Event signal.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-98">line 98</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="onFileError"><span class="type-signature"></span>onFileError<span class="type-signature"></span></h4>
</dt>
<dd>
<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>onFileError</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Signal.html">Phaser.Signal</a></span>
</td>
<td class="description last"><p>Event signal.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-103">line 103</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="onLoadComplete"><span class="type-signature"></span>onLoadComplete<span class="type-signature"></span></h4>
</dt>
<dd>
<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>onLoadComplete</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Signal.html">Phaser.Signal</a></span>
</td>
<td class="description last"><p>Event signal.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-113">line 113</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="onLoadStart"><span class="type-signature"></span>onLoadStart<span class="type-signature"></span></h4>
</dt>
<dd>
<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>onLoadStart</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Signal.html">Phaser.Signal</a></span>
</td>
<td class="description last"><p>Event signal.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-108">line 108</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="preloadSprite"><span class="type-signature"></span>preloadSprite<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>You can optionally link a sprite to the preloader.
If you do so the Sprite's width or height will be cropped based on the percentage loaded.</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>preloadSprite</code></td>
<td class="type">
<span class="param-type">Description</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>null</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-79">line 79</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="progress"><span class="type-signature"></span>progress<span class="type-signature"></span></h4>
</dt>
<dd>
<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>progress</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The Load progress percentage value (from 0 to 100)</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>0</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-71">line 71</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="queueSize"><span class="type-signature"></span>queueSize<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<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">number</span>
</td>
<td class="description last"><p>Length of assets queue.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>0</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-53">line 53</a>
</li></ul></dd>
</dl>
</dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<dl>
<dt>
<h4 class="name" id="addToFileList"><span class="type-signature">&lt;protected> </span>addToFileList<span class="signature">(type, key, url, properties)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Internal function that adds a new entry to the file list. 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">Description</span>
</td>
<td class="description last"><p>Description.</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>Description.</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>URL of Description.</p></td>
</tr>
<tr>
<td class="name"><code>properties</code></td>
<td class="type">
<span class="param-type">Description</span>
</td>
<td class="description last"><p>Description.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-201">line 201</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="atlas"><span class="type-signature"></span>atlas<span class="signature">(key, textureURL, <span class="optional">atlasURL</span>, <span class="optional">atlasData</span>, <span class="optional">format</span>)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Add a new texture atlas to the loader.</p>
</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>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<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">
</td>
<td class="description last"><p>The url of the texture atlas image file.</p></td>
</tr>
<tr>
<td class="name"><code>atlasURL</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last"><p>The url of the texture atlas data file (json/xml). You don't need this if you are passing an atlasData object instead.</p></td>
</tr>
<tr>
<td class="name"><code>atlasData</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<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>
</tr>
<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>
<td class="description last"><p>A value describing the format of the data, the default is Phaser.Loader.TEXTURE_ATLAS_JSON_ARRAY.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-512">line 512</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="atlasJSONArray"><span class="type-signature"></span>atlasJSONArray<span class="signature">(key, atlasURL, atlasData)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Add a new texture atlas to the loader. This atlas uses the JSON Array data format.</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>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>Unique asset key of the bitmap font.</p></td>
</tr>
<tr>
<td class="name"><code>atlasURL</code></td>
<td class="type">
<span class="param-type">Description</span>
</td>
<td class="description last"><p>The url of the Description.</p></td>
</tr>
<tr>
<td class="name"><code>atlasData</code></td>
<td class="type">
<span class="param-type">Description</span>
</td>
<td class="description last"><p>Description.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-470">line 470</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="atlasJSONHash"><span class="type-signature"></span>atlasJSONHash<span class="signature">(key, atlasURL, atlasData)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Add a new texture atlas to the loader. This atlas uses the JSON Hash data format.</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>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>Unique asset key of the bitmap font.</p></td>
</tr>
<tr>
<td class="name"><code>atlasURL</code></td>
<td class="type">
<span class="param-type">Description</span>
</td>
<td class="description last"><p>The url of the Description.</p></td>
</tr>
<tr>
<td class="name"><code>atlasData</code></td>
<td class="type">
<span class="param-type">Description</span>
</td>
<td class="description last"><p>Description.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-484">line 484</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="atlasXML"><span class="type-signature"></span>atlasXML<span class="signature">(key, atlasURL, atlasData)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Add a new texture atlas to the loader. This atlas uses the Starling XML data format.</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>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>Unique asset key of the bitmap font.</p></td>
</tr>
<tr>
<td class="name"><code>atlasURL</code></td>
<td class="type">
<span class="param-type">Description</span>
</td>
<td class="description last"><p>The url of the Description.</p></td>
</tr>
<tr>
<td class="name"><code>atlasData</code></td>
<td class="type">
<span class="param-type">Description</span>
</td>
<td class="description last"><p>Description.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-498">line 498</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="audio"><span class="type-signature"></span>audio<span class="signature">(key, urls, autoDecode)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Add a new audio file to the loader.</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>key</code></td>
<td class="type">
<span class="param-type">string</span>
</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>
</td>
<td class="description last"><p>An array containing the URLs of the audio files, i.e.: [ 'jump.mp3', 'jump.ogg', 'jump.m4a' ].</p></td>
</tr>
<tr>
<td class="name"><code>autoDecode</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>When using Web Audio the audio files can either be decoded at load time or run-time. They can't be played until they are decoded, but this let's you control when that happens. Decoding is a non-blocking async process.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-330">line 330</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="bitmapFont"><span class="type-signature"></span>bitmapFont<span class="signature">(key, textureURL, <span class="optional">xmlURL</span>, <span class="optional">xmlData</span>)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Add a new bitmap font loading request.</p>
</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>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>Unique asset key of the bitmap font.</p></td>
</tr>
<tr>
<td class="name"><code>textureURL</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>The url of the font image file.</p></td>
</tr>
<tr>
<td class="name"><code>xmlURL</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last"><p>The url of the font data file (xml/fnt)</p></td>
</tr>
<tr>
<td class="name"><code>xmlData</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last"><p>An optional XML data object.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-408">line 408</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="checkKeyExists"><span class="type-signature"></span>checkKeyExists<span class="signature">(key)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
</dt>
<dd>
<div class="description">
<p>Check whether asset exists with a specific key.</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>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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-168">line 168</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>Return true if exists, otherwise return false.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="csvLoadComplete"><span class="type-signature"></span>csvLoadComplete<span class="signature">(key)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Successfully loaded a CSV file.</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>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>Key of the loaded CSV file.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-975">line 975</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="dataLoadError"><span class="type-signature"></span>dataLoadError<span class="signature">(key)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Error occured when load a JSON.</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>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>Key of the error loading JSON file.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-992">line 992</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="fileComplete"><span class="type-signature"></span>fileComplete<span class="signature">(key)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Called when a file is successfully loaded.</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>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>Key of the successfully loaded file.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-814">line 814</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="fileError"><span class="type-signature"></span>fileError<span class="signature">(key)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Error occured when load a file.</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>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>Key of the error loading file.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-795">line 795</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="image"><span class="type-signature"></span>image<span class="signature">(key, url, overwrite)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Add an image to the Loader.</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>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>Unique asset key of this image file.</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>URL of image file.</p></td>
</tr>
<tr>
<td class="name"><code>overwrite</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>If an entry with a matching key already exists this will over-write it</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-238">line 238</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="jsonLoadComplete"><span class="type-signature"></span>jsonLoadComplete<span class="signature">(key)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Successfully loaded a JSON file.</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>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>Key of the loaded JSON file.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-951">line 951</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="removeAll"><span class="type-signature"></span>removeAll<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Remove all file loading requests.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-607">line 607</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="removeFile"><span class="type-signature"></span>removeFile<span class="signature">(key)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Remove loading request of a file.</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>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 remove.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-595">line 595</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="reset"><span class="type-signature"></span>reset<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Reset loader, this will remove all loaded assets.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-188">line 188</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<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>
</dt>
<dd>
<div class="description">
<p>You can set a Sprite to be a &quot;preload&quot; sprite by passing it to this method.
A &quot;preload&quot; sprite will have its width or height crop adjusted based on the percentage of the loader in real-time.
This allows you to easily make loading bars for games.</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>sprite</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The sprite that will be cropped during the load.</p></td>
</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>
<td class="description last"><p>A value of zero means the sprite width will be cropped, a value of 1 means its height will be cropped.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-137">line 137</a>
</li></ul></dd>
</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><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Add a new sprite sheet to the loader.</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 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 sheet file.</p></td>
</tr>
<tr>
<td class="name"><code>frameWidth</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>Width of each single frame.</p></td>
</tr>
<tr>
<td class="name"><code>frameHeight</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>Height of each single frame.</p></td>
</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>
</td>
<td class="default">
-1
</td>
<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>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-280">line 280</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="start"><span class="type-signature"></span>start<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-618">line 618</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="text"><span class="type-signature"></span>text<span class="signature">(key, url, overwrite)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Add a text file to the Loader.</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>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<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>
<td class="description last"><p>URL of the text file.</p></td>
</tr>
<tr>
<td class="name"><code>overwrite</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>True if Description.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-259">line 259</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="tilemap"><span class="type-signature"></span>tilemap<span class="signature">(key, tilesetURL, <span class="optional">mapDataURL</span>, <span class="optional">mapData</span>, <span class="optional">format</span>)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Add a new tilemap loading request.</p>
</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>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>Unique asset key of the tilemap data.</p></td>
</tr>
<tr>
<td class="name"><code>tilesetURL</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>The url of the tile set image file.</p></td>
</tr>
<tr>
<td class="name"><code>mapDataURL</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last"><p>The url of the map data file (csv/json)</p></td>
</tr>
<tr>
<td class="name"><code>mapData</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last"><p>An optional JSON data object (can be given in place of a URL).</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="description last"><p>The format of the map data.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-351">line 351</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="tileset"><span class="type-signature"></span>tileset<span class="signature">(key, url, tileWidth, tileHeight, <span class="optional">tileMax</span>, <span class="optional">tileMargin</span>, <span class="optional">tileSpacing</span>)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Add a new tile set to the loader. These are used in the rendering of tile maps.</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 tileset 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 tileset.</p></td>
</tr>
<tr>
<td class="name"><code>tileWidth</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>Width of each single tile in pixels.</p></td>
</tr>
<tr>
<td class="name"><code>tileHeight</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>Height of each single tile in pixels.</p></td>
</tr>
<tr>
<td class="name"><code>tileMax</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
-1
</td>
<td class="description last"><p>How many tiles in this tileset. If not specified it will divide the whole image into tiles.</p></td>
</tr>
<tr>
<td class="name"><code>tileMargin</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 tiles have been drawn with a margin, specify the amount here.</p></td>
</tr>
<tr>
<td class="name"><code>tileSpacing</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 tiles have been drawn with spacing between them, specify the amount here.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-303">line 303</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="xmlLoadComplete"><span class="type-signature"></span>xmlLoadComplete<span class="signature">(key)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Successfully loaded an XML file.</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>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>Key of the loaded XML file.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Loader.js.html">loader/Loader.js</a>, <a href="Loader.js.html#sunlight-1-line-1010">line 1010</a>
</li></ul></dd>
</dl>
</dd>
</dl>
</article>
</section>
</div>
<div class="clearfix"></div>
<footer>
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Fri Nov 01 2013 18:16:12 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
<div class="span3">
<div id="toc"></div>
</div>
<br clear="both">
</div>
</div>
<script src="scripts/sunlight.js"></script>
<script src="scripts/sunlight.javascript.js"></script>
<script src="scripts/sunlight-plugin.doclinks.js"></script>
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
<script src="scripts/sunlight-plugin.menu.js"></script>
<script src="scripts/jquery.min.js"></script>
<script src="scripts/jquery.scrollTo.js"></script>
<script src="scripts/jquery.localScroll.js"></script>
<script src="scripts/bootstrap-dropdown.js"></script>
<script src="scripts/toc.js"></script>
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
<script>
$( function () {
$( "#toc" ).toc( {
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>