phaser/docs/Phaser.Cache.html
2013-11-28 15:57:09 +00:00

7335 lines
No EOL
91 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Phaser Class: Cache</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.BitmapData.html">BitmapData</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.Filter.html">Filter</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.Polygon.html">Polygon</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.Tile.html">Tile</a>
</li>
<li>
<a href="Phaser.Tilemap.html">Tilemap</a>
</li>
<li>
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
</li>
<li>
<a href="Phaser.TilemapParser.html">TilemapParser</a>
</li>
<li>
<a href="Phaser.Tileset.html">Tileset</a>
</li>
<li>
<a href="Phaser.TileSprite.html">TileSprite</a>
</li>
<li>
<a href="Phaser.Time.html">Time</a>
</li>
<li>
<a href="Phaser.Timer.html">Timer</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#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</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: Cache</h1>
<section>
<header>
<h2>
<span class="ancestors"><a href="Phaser.html">Phaser</a>.</span>
Cache
</h2>
<div class="class-description"><p>A game only has one instance of a Cache and it is used to store all externally loaded assets such
as images, sounds and data files as a result of Loader calls. Cache items use string based keys for look-up.</p></div>
</header>
<article>
<div class="container-overview">
<dt>
<h4 class="name" id="Cache"><span class="type-signature"></span>new Cache<span class="signature">(game)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Phaser.Cache constructor.</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="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-16">line 16</a>
</li></ul></dd>
</dl>
</dd>
</div>
<h3 class="subsection-title">Members</h3>
<dl>
<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="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-21">line 21</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="onSoundUnlock"><span class="type-signature"></span>onSoundUnlock<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>onSoundUnlock</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Signal.html">Phaser.Signal</a></span>
</td>
<td class="description last"><p>This event is dispatched when the sound system is unlocked via a touch event on cellular devices.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-77">line 77</a>
</li></ul></dd>
</dl>
</dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<dl>
<dt>
<h4 class="name" id="addBitmapData"><span class="type-signature"></span>addBitmapData<span class="signature">(key, bitmapData)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Add a BitmapData object in to the cache.</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>Asset key for this BitmapData.</p></td>
</tr>
<tr>
<td class="name"><code>bitmapData</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</td>
<td class="description last"><p>The BitmapData object to be addded to the cache.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-96">line 96</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The BitmapData object to be addded to the cache.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="addBitmapFont"><span class="type-signature"></span>addBitmapFont<span class="signature">(key, url, data, xmlData)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Add a new Bitmap Font.</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>The unique key by which you will reference this object.</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 this font xml file.</p></td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>Extra font data.</p></td>
</tr>
<tr>
<td class="name"><code>xmlData</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>Texture atlas frames 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="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-221">line 221</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="addCanvas"><span class="type-signature"></span>addCanvas<span class="signature">(key, canvas, context)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Add a new canvas object in to the cache.</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>Asset key for this canvas.</p></td>
</tr>
<tr>
<td class="name"><code>canvas</code></td>
<td class="type">
<span class="param-type">HTMLCanvasElement</span>
</td>
<td class="description last"><p>Canvas DOM element.</p></td>
</tr>
<tr>
<td class="name"><code>context</code></td>
<td class="type">
<span class="param-type">CanvasRenderingContext2D</span>
</td>
<td class="description last"><p>Render context of this canvas.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-83">line 83</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="addDefaultImage"><span class="type-signature"></span>addDefaultImage<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Adds a default image to be used in special cases such as WebGL Filters. Is mapped to the key __default.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-242">line 242</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="addImage"><span class="type-signature"></span>addImage<span class="signature">(key, url, data)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Add a new image.</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>The unique key by which you will reference this object.</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 this image file.</p></td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>Extra image 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="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-295">line 295</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="addMissingImage"><span class="type-signature"></span>addMissingImage<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Adds an image to be used when a key is wrong / missing. Is mapped to the key __missing.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-260">line 260</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="addRenderTexture"><span class="type-signature"></span>addRenderTexture<span class="signature">(key, texture)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Add a new Phaser.RenderTexture in to the cache.</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>The unique key by which you will reference this object.</p></td>
</tr>
<tr>
<td class="name"><code>texture</code></td>
<td class="type">
<span class="param-type">Phaser.Texture</span>
</td>
<td class="description last"><p>The texture to use as the base of the RenderTexture.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-111">line 111</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="addSound"><span class="type-signature"></span>addSound<span class="signature">(key, url, data, webAudio, audioTag)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Add a new sound.</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>Asset key for the sound.</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 this sound file.</p></td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>Extra sound data.</p></td>
</tr>
<tr>
<td class="name"><code>webAudio</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>True if the file is using web audio.</p></td>
</tr>
<tr>
<td class="name"><code>audioTag</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>True if the file is using legacy HTML audio.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-314">line 314</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="addSpriteSheet"><span class="type-signature"></span>addSpriteSheet<span class="signature">(key, url, data, frameWidth, frameHeight, frameMax)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Add a new sprite sheet in to the cache.</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>The unique key by which you will reference this object.</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 this sprite sheet file.</p></td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>Extra sprite sheet data.</p></td>
</tr>
<tr>
<td class="name"><code>frameWidth</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Width of the sprite sheet.</p></td>
</tr>
<tr>
<td class="name"><code>frameHeight</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Height of the sprite sheet.</p></td>
</tr>
<tr>
<td class="name"><code>frameMax</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>How many frames stored in the sprite sheet.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-126">line 126</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="addText"><span class="type-signature"></span>addText<span class="signature">(key, url, data)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Add a new text data.</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>Asset key for the text data.</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 this text data file.</p></td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>Extra text 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="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-278">line 278</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="addTextureAtlas"><span class="type-signature"></span>addTextureAtlas<span class="signature">(key, url, data, atlasData, format)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Add a new texture atlas.</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>The unique key by which you will reference this object.</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 this texture atlas file.</p></td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>Extra texture atlas data.</p></td>
</tr>
<tr>
<td class="name"><code>atlasData</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>Texture atlas frames data.</p></td>
</tr>
<tr>
<td class="name"><code>format</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The format of the texture atlas.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-189">line 189</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="addTilemap"><span class="type-signature"></span>addTilemap<span class="signature">(key, url, mapData, format)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Add a new tilemap.</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>The unique key by which you will reference this object.</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 tilemap image.</p></td>
</tr>
<tr>
<td class="name"><code>mapData</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>The tilemap data object.</p></td>
</tr>
<tr>
<td class="name"><code>format</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The format of the tilemap 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="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-172">line 172</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="addTileset"><span class="type-signature"></span>addTileset<span class="signature">(key, url, data, tileWidth, tileHeight, tileMax, <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 in to the cache.</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>The unique key by which you will reference this object.</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 this tile set file.</p></td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>Extra tile set data.</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 the sprite sheet.</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 the sprite sheet.</p></td>
</tr>
<tr>
<td class="name"><code>tileMax</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>How many tiles stored in the sprite sheet.</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="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-148">line 148</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="checkImageKey"><span class="type-signature"></span>checkImageKey<span class="signature">(key)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
</dt>
<dd>
<div class="description">
<p>Checks if an image key exists.</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>Asset key of the image you want.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-441">line 441</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>True if the key exists, otherwise false.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="decodedSound"><span class="type-signature"></span>decodedSound<span class="signature">(key, data)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Add a new decoded sound.</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>Asset key for the sound.</p></td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>Extra sound 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="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-390">line 390</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="destroy"><span class="type-signature"></span>destroy<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Clears the cache. Removes every local cache object reference.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-828">line 828</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getBitmapData"><span class="type-signature"></span>getBitmapData<span class="signature">(key)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Get a BitmapData object from the cache by its 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>Asset key of the BitmapData object you want.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-423">line 423</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The requested BitmapData object if found, or null if not.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getCanvas"><span class="type-signature"></span>getCanvas<span class="signature">(key)</span><span class="type-signature"> &rarr; {object}</span></h4>
</dt>
<dd>
<div class="description">
<p>Get a canvas object from the cache by its 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>Asset key of the canvas you want.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-405">line 405</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The canvas you want.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">object</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getFrame"><span class="type-signature"></span>getFrame<span class="signature">(key)</span><span class="type-signature"> &rarr; {<a href="Phaser.Frame.html">Phaser.Frame</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Get a single frame by key. You'd only do this to get the default Frame created for a non-atlas/spritesheet image.</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>Asset key of the frame data you want.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-581">line 581</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The frame data you want.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.Frame.html">Phaser.Frame</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getFrameByIndex"><span class="type-signature"></span>getFrameByIndex<span class="signature">(key)</span><span class="type-signature"> &rarr; {<a href="Phaser.Frame.html">Phaser.Frame</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Get a single frame out of a frameData set by 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>Asset key of the frame data you want.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-547">line 547</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The frame data you want.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.Frame.html">Phaser.Frame</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getFrameByName"><span class="type-signature"></span>getFrameByName<span class="signature">(key)</span><span class="type-signature"> &rarr; {<a href="Phaser.Frame.html">Phaser.Frame</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Get a single frame out of a frameData set by 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>Asset key of the frame data you want.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-564">line 564</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The frame data you want.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.Frame.html">Phaser.Frame</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getFrameData"><span class="type-signature"></span>getFrameData<span class="signature">(key)</span><span class="type-signature"> &rarr; {<a href="Phaser.FrameData.html">Phaser.FrameData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Get frame data by 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>Asset key of the frame data you want.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-530">line 530</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The frame data you want.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.FrameData.html">Phaser.FrameData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getImage"><span class="type-signature"></span>getImage<span class="signature">(key)</span><span class="type-signature"> &rarr; {object}</span></h4>
</dt>
<dd>
<div class="description">
<p>Get image data by 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>Asset key of the image you want.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-459">line 459</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The image data you want.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">object</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getImageKeys"><span class="type-signature"></span>getImageKeys<span class="signature">()</span><span class="type-signature"> &rarr; {Array}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns an array containing all of the keys of Images in the Cache.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-758">line 758</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The string based keys in the Cache.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getKeys"><span class="type-signature"></span>getKeys<span class="signature">(array)</span><span class="type-signature"> &rarr; {Array}</span></h4>
</dt>
<dd>
<div class="description">
<p>Get the cache keys from a given array of objects.
Normally you don't call this directly but instead use getImageKeys, getSoundKeys, etc.</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>array</code></td>
<td class="type">
<span class="param-type">Array</span>
</td>
<td class="description last"><p>An array of items to return the keys for.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-734">line 734</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The array of item keys.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getSound"><span class="type-signature"></span>getSound<span class="signature">(key)</span><span class="type-signature"> &rarr; {<a href="Phaser.Sound.html">Phaser.Sound</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Get sound by 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>Asset key of the sound you want.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-633">line 633</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The sound you want.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.Sound.html">Phaser.Sound</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getSoundData"><span class="type-signature"></span>getSoundData<span class="signature">(key)</span><span class="type-signature"> &rarr; {object}</span></h4>
</dt>
<dd>
<div class="description">
<p>Get sound data by 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>Asset key of the sound you want.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-651">line 651</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The sound data you want.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">object</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getSoundKeys"><span class="type-signature"></span>getSoundKeys<span class="signature">()</span><span class="type-signature"> &rarr; {Array}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns an array containing all of the keys of Sounds in the Cache.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-768">line 768</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The string based keys in the Cache.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getText"><span class="type-signature"></span>getText<span class="signature">(key)</span><span class="type-signature"> &rarr; {object}</span></h4>
</dt>
<dd>
<div class="description">
<p>Get text data by 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>Asset key of the text data you want.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-716">line 716</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The text data you want.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">object</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getTextKeys"><span class="type-signature"></span>getTextKeys<span class="signature">()</span><span class="type-signature"> &rarr; {Array}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns an array containing all of the keys of Text Files in the Cache.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-778">line 778</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The string based keys in the Cache.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getTexture"><span class="type-signature"></span>getTexture<span class="signature">(key)</span><span class="type-signature"> &rarr; {<a href="Phaser.RenderTexture.html">Phaser.RenderTexture</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Get a RenderTexture by 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>Asset key of the RenderTexture you want.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-615">line 615</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The RenderTexture you want.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.RenderTexture.html">Phaser.RenderTexture</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getTextureFrame"><span class="type-signature"></span>getTextureFrame<span class="signature">(key)</span><span class="type-signature"> &rarr; {<a href="Phaser.Frame.html">Phaser.Frame</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Get a single frame by key. You'd only do this to get the default Frame created for a non-atlas/spritesheet image.</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>Asset key of the frame data you want.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-598">line 598</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The frame data you want.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.Frame.html">Phaser.Frame</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getTilemap"><span class="type-signature"></span>getTilemap<span class="signature">(key)</span><span class="type-signature"> &rarr; {Object}</span></h4>
</dt>
<dd>
<div class="description">
<p>Get tilemap data by 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>Asset key of the tilemap you want.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-513">line 513</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The tilemap data. The tileset image is in the data property, the map data in mapData.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Object</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getTileset"><span class="type-signature"></span>getTileset<span class="signature">(key)</span><span class="type-signature"> &rarr; {<a href="Phaser.Tileset.html">Phaser.Tileset</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Get tile set image data by 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>Asset key of the image you want.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-495">line 495</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The tileset data. The tileset image is in the data property, the tile data in tileData.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.Tileset.html">Phaser.Tileset</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getTileSetImage"><span class="type-signature"></span>getTileSetImage<span class="signature">(key)</span><span class="type-signature"> &rarr; {object}</span></h4>
</dt>
<dd>
<div class="description">
<p>Get tile set image data by 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>Asset key of the image you want.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-477">line 477</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The image data you want.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">object</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="isSoundDecoded"><span class="type-signature"></span>isSoundDecoded<span class="signature">(key)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
</dt>
<dd>
<div class="description">
<p>Check if the given sound has finished decoding.</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>Asset key of the sound you want.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-669">line 669</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The decoded state of the Sound object.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="isSoundReady"><span class="type-signature"></span>isSoundReady<span class="signature">(key)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
</dt>
<dd>
<div class="description">
<p>Check if the given sound is ready for playback. A sound is considered ready when it has finished decoding and the device is no longer touch locked.</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>Asset key of the sound you want.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-685">line 685</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>True if the sound is decoded and the device is not touch locked.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="isSpriteSheet"><span class="type-signature"></span>isSpriteSheet<span class="signature">(key)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
</dt>
<dd>
<div class="description">
<p>Check whether an image asset is sprite sheet or not.</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>Asset key of the sprite sheet you want.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-698">line 698</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>True if the image is a sprite sheet.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="reloadSound"><span class="type-signature"></span>reloadSound<span class="signature">(key)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Reload a sound.</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>Asset key for the sound.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-340">line 340</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="reloadSoundComplete"><span class="type-signature"></span>reloadSoundComplete<span class="signature">(key)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Description.</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>Asset key for the sound.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-361">line 361</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="removeCanvas"><span class="type-signature"></span>removeCanvas<span class="signature">(key)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Removes a canvas from the cache.</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 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="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-788">line 788</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="removeImage"><span class="type-signature"></span>removeImage<span class="signature">(key)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Removes an image from the cache.</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 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="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-798">line 798</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="removeSound"><span class="type-signature"></span>removeSound<span class="signature">(key)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Removes a sound from the cache.</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 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="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-808">line 808</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="removeText"><span class="type-signature"></span>removeText<span class="signature">(key)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Removes a text from the cache.</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 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="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-818">line 818</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="updateSound"><span class="type-signature"></span>updateSound<span class="signature">(key)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Description.</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>Asset key for the sound.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Cache.js.html">loader/Cache.js</a>, <a href="Cache.js.html#sunlight-1-line-376">line 376</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 Thu Nov 28 2013 15:56:27 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>