<!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/default.css"> <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css"> <link type="text/css" rel="stylesheet" href="styles/site.cerulean.css"> </head> <body> <div class="container-fluid"> <div class="navbar navbar-fixed-top navbar-inverse"> <div style="position: absolute; width: 143px; height: 31px; right: 10px; top: 10px; z-index: 1050"><a href="http://phaser.io"><img src="img/phaser.png" border="0" /></a></div> <div class="navbar-inner"> <a class="brand" href="index.html">Phaser API</a> <ul class="nav"> <li class="dropdown"> <a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b class="caret"></b></a> <ul class="dropdown-menu "> <li class="class-depth-0"> <a href="Phaser.html">Phaser</a> </li> <li class="class-depth-0"> <a href="PIXI.html">PIXI</a> </li> </ul> </li> <li class="dropdown"> <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a> <ul class="dropdown-menu "> <li class="class-depth-0"> <a href="EarCut.html">EarCut</a> </li> <li class="class-depth-0"> <a href="Event.html">Event</a> </li> <li class="class-depth-0"> <a href="EventTarget.html">EventTarget</a> </li> <li class="class-depth-1"> <a href="Phaser.Animation.html">Animation</a> </li> <li class="class-depth-1"> <a href="Phaser.AnimationManager.html">AnimationManager</a> </li> <li class="class-depth-1"> <a href="Phaser.AnimationParser.html">AnimationParser</a> </li> <li class="class-depth-1"> <a href="Phaser.ArraySet.html">ArraySet</a> </li> <li class="class-depth-1"> <a href="Phaser.ArrayUtils.html">ArrayUtils</a> </li> <li class="class-depth-1"> <a href="Phaser.AudioSprite.html">AudioSprite</a> </li> <li class="class-depth-1"> <a href="Phaser.BitmapData.html">BitmapData</a> </li> <li class="class-depth-1"> <a href="Phaser.BitmapText.html">BitmapText</a> </li> <li class="class-depth-1"> <a href="Phaser.Bullet.html">Bullet</a> </li> <li class="class-depth-1"> <a href="Phaser.Button.html">Button</a> </li> <li class="class-depth-1"> <a href="Phaser.Cache.html">Cache</a> </li> <li class="class-depth-1"> <a href="Phaser.Camera.html">Camera</a> </li> <li class="class-depth-1"> <a href="Phaser.Canvas.html">Canvas</a> </li> <li class="class-depth-1"> <a href="Phaser.CanvasPool.html">CanvasPool</a> </li> <li class="class-depth-1"> <a href="Phaser.Circle.html">Circle</a> </li> <li class="class-depth-1"> <a href="Phaser.Color.html">Color</a> </li> <li class="class-depth-2"> <a href="Phaser.Component.Angle.html">Angle</a> </li> <li class="class-depth-2"> <a href="Phaser.Component.Animation.html">Animation</a> </li> <li class="class-depth-2"> <a href="Phaser.Component.AutoCull.html">AutoCull</a> </li> <li class="class-depth-2"> <a href="Phaser.Component.Bounds.html">Bounds</a> </li> <li class="class-depth-2"> <a href="Phaser.Component.BringToTop.html">BringToTop</a> </li> <li class="class-depth-2"> <a href="Phaser.Component.Core.html">Core</a> </li> <li class="class-depth-2"> <a href="Phaser.Component.Crop.html">Crop</a> </li> <li class="class-depth-2"> <a href="Phaser.Component.Delta.html">Delta</a> </li> <li class="class-depth-2"> <a href="Phaser.Component.Destroy.html">Destroy</a> </li> <li class="class-depth-2"> <a href="Phaser.Component.FixedToCamera.html">FixedToCamera</a> </li> <li class="class-depth-2"> <a href="Phaser.Component.Health.html">Health</a> </li> <li class="class-depth-2"> <a href="Phaser.Component.InCamera.html">InCamera</a> </li> <li class="class-depth-2"> <a href="Phaser.Component.InputEnabled.html">InputEnabled</a> </li> <li class="class-depth-2"> <a href="Phaser.Component.InWorld.html">InWorld</a> </li> <li class="class-depth-2"> <a href="Phaser.Component.LifeSpan.html">LifeSpan</a> </li> <li class="class-depth-2"> <a href="Phaser.Component.LoadTexture.html">LoadTexture</a> </li> <li class="class-depth-2"> <a href="Phaser.Component.Overlap.html">Overlap</a> </li> <li class="class-depth-2"> <a href="Phaser.Component.PhysicsBody.html">PhysicsBody</a> </li> <li class="class-depth-2"> <a href="Phaser.Component.Reset.html">Reset</a> </li> <li class="class-depth-2"> <a href="Phaser.Component.ScaleMinMax.html">ScaleMinMax</a> </li> <li class="class-depth-2"> <a href="Phaser.Component.Smoothed.html">Smoothed</a> </li> <li class="class-depth-1"> <a href="Phaser.Create.html">Create</a> </li> <li class="class-depth-1"> <a href="Phaser.Creature.html">Creature</a> </li> <li class="class-depth-1"> <a href="Phaser.Device.html">Device</a> </li> <li class="class-depth-1"> <a href="Phaser.DeviceButton.html">DeviceButton</a> </li> <li class="class-depth-1"> <a href="Phaser.DOM.html">DOM</a> </li> <li class="class-depth-1"> <a href="Phaser.Easing.html">Easing</a> </li> <li class="class-depth-2"> <a href="Phaser.Easing.Back.html">Back</a> </li> <li class="class-depth-2"> <a href="Phaser.Easing.Bounce.html">Bounce</a> </li> <li class="class-depth-2"> <a href="Phaser.Easing.Circular.html">Circular</a> </li> <li class="class-depth-2"> <a href="Phaser.Easing.Cubic.html">Cubic</a> </li> <li class="class-depth-2"> <a href="Phaser.Easing.Elastic.html">Elastic</a> </li> <li class="class-depth-2"> <a href="Phaser.Easing.Exponential.html">Exponential</a> </li> <li class="class-depth-2"> <a href="Phaser.Easing.Linear.html">Linear</a> </li> <li class="class-depth-2"> <a href="Phaser.Easing.Quadratic.html">Quadratic</a> </li> <li class="class-depth-2"> <a href="Phaser.Easing.Quartic.html">Quartic</a> </li> <li class="class-depth-2"> <a href="Phaser.Easing.Quintic.html">Quintic</a> </li> <li class="class-depth-2"> <a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a> </li> <li class="class-depth-1"> <a href="Phaser.Ellipse.html">Ellipse</a> </li> <li class="class-depth-1"> <a href="Phaser.Events.html">Events</a> </li> <li class="class-depth-1"> <a href="Phaser.Filter.html">Filter</a> </li> <li class="class-depth-1"> <a href="Phaser.FlexGrid.html">FlexGrid</a> </li> <li class="class-depth-1"> <a href="Phaser.FlexLayer.html">FlexLayer</a> </li> <li class="class-depth-1"> <a href="Phaser.Frame.html">Frame</a> </li> <li class="class-depth-1"> <a href="Phaser.FrameData.html">FrameData</a> </li> <li class="class-depth-1"> <a href="Phaser.Game.html">Game</a> </li> <li class="class-depth-1"> <a href="Phaser.GameObjectCreator.html">GameObjectCreator</a> </li> <li class="class-depth-1"> <a href="Phaser.GameObjectFactory.html">GameObjectFactory</a> </li> <li class="class-depth-1"> <a href="Phaser.Gamepad.html">Gamepad</a> </li> <li class="class-depth-1"> <a href="Phaser.Graphics.html">Graphics</a> </li> <li class="class-depth-1"> <a href="Phaser.Group.html">Group</a> </li> <li class="class-depth-1"> <a href="Phaser.Hermite.html">Hermite</a> </li> <li class="class-depth-1"> <a href="Phaser.Image.html">Image</a> </li> <li class="class-depth-1"> <a href="Phaser.ImageCollection.html">ImageCollection</a> </li> <li class="class-depth-1"> <a href="Phaser.Input.html">Input</a> </li> <li class="class-depth-1"> <a href="Phaser.InputHandler.html">InputHandler</a> </li> <li class="class-depth-1"> <a href="Phaser.Key.html">Key</a> </li> <li class="class-depth-1"> <a href="Phaser.Keyboard.html">Keyboard</a> </li> <li class="class-depth-1"> <a href="Phaser.KeyCode.html">KeyCode</a> </li> <li class="class-depth-1"> <a href="Phaser.Line.html">Line</a> </li> <li class="class-depth-1"> <a href="Phaser.LinkedList.html">LinkedList</a> </li> <li class="class-depth-1"> <a href="Phaser.Loader.html">Loader</a> </li> <li class="class-depth-1"> <a href="Phaser.LoaderParser.html">LoaderParser</a> </li> <li class="class-depth-1"> <a href="Phaser.Math.html">Math</a> </li> <li class="class-depth-1"> <a href="Phaser.Matrix.html">Matrix</a> </li> <li class="class-depth-1"> <a href="Phaser.Mouse.html">Mouse</a> </li> <li class="class-depth-1"> <a href="Phaser.MSPointer.html">MSPointer</a> </li> <li class="class-depth-1"> <a href="Phaser.Net.html">Net</a> </li> <li class="class-depth-1"> <a href="Phaser.Particle.html">Particle</a> </li> <li class="class-depth-1"> <a href="Phaser.Particles.html">Particles</a> </li> <li class="class-depth-2"> <a href="Phaser.Particles.Arcade.html">Arcade</a> </li> <li class="class-depth-3"> <a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a> </li> <li class="class-depth-1"> <a href="Phaser.Path.html">Path</a> </li> <li class="class-depth-1"> <a href="Phaser.PathFollower.html">PathFollower</a> </li> <li class="class-depth-1"> <a href="Phaser.PathPoint.html">PathPoint</a> </li> <li class="class-depth-1"> <a href="Phaser.Physics.html">Physics</a> </li> <li class="class-depth-2"> <a href="Phaser.Physics.Arcade.html">Arcade</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.Arcade.Body.html">Body</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.Arcade.TilemapCollision.html">TilemapCollision</a> </li> <li class="class-depth-2"> <a href="Phaser.Physics.Ninja.html">Ninja</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.Ninja.AABB.html">AABB</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.Ninja.Body.html">Body</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.Ninja.Circle.html">Circle</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.Ninja.Tile.html">Tile</a> </li> <li class="class-depth-2"> <a href="Phaser.Physics.P2.html">P2</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.Body.html">Body</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.Material.html">Material</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.RotationalSpring.html">RotationalSpring</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.Spring.html">Spring</a> </li> <li class="class-depth-1"> <a href="Phaser.Plugin.html">Plugin</a> </li> <li class="class-depth-2"> <a href="Phaser.Plugin.PathManager.html">PathManager</a> </li> <li class="class-depth-1"> <a href="Phaser.PluginManager.html">PluginManager</a> </li> <li class="class-depth-1"> <a href="Phaser.Point.html">Point</a> </li> <li class="class-depth-1"> <a href="Phaser.Pointer.html">Pointer</a> </li> <li class="class-depth-1"> <a href="Phaser.PointerMode.html">PointerMode</a> </li> <li class="class-depth-1"> <a href="Phaser.Polygon.html">Polygon</a> </li> <li class="class-depth-1"> <a href="Phaser.QuadTree.html">QuadTree</a> </li> <li class="class-depth-1"> <a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a> </li> <li class="class-depth-1"> <a href="Phaser.Rectangle.html">Rectangle</a> </li> <li class="class-depth-1"> <a href="Phaser.RenderTexture.html">RenderTexture</a> </li> <li class="class-depth-1"> <a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a> </li> <li class="class-depth-1"> <a href="Phaser.RetroFont.html">RetroFont</a> </li> <li class="class-depth-1"> <a href="Phaser.Rope.html">Rope</a> </li> <li class="class-depth-1"> <a href="Phaser.RoundedRectangle.html">RoundedRectangle</a> </li> <li class="class-depth-1"> <a href="Phaser.ScaleManager.html">ScaleManager</a> </li> <li class="class-depth-1"> <a href="Phaser.Signal.html">Signal</a> </li> <li class="class-depth-1"> <a href="Phaser.SignalBinding.html">SignalBinding</a> </li> <li class="class-depth-1"> <a href="Phaser.SinglePad.html">SinglePad</a> </li> <li class="class-depth-1"> <a href="Phaser.Sound.html">Sound</a> </li> <li class="class-depth-1"> <a href="Phaser.SoundManager.html">SoundManager</a> </li> <li class="class-depth-1"> <a href="Phaser.Sprite.html">Sprite</a> </li> <li class="class-depth-1"> <a href="Phaser.SpriteBatch.html">SpriteBatch</a> </li> <li class="class-depth-1"> <a href="Phaser.Stage.html">Stage</a> </li> <li class="class-depth-1"> <a href="Phaser.State.html">State</a> </li> <li class="class-depth-1"> <a href="Phaser.StateManager.html">StateManager</a> </li> <li class="class-depth-1"> <a href="Phaser.Text.html">Text</a> </li> <li class="class-depth-1"> <a href="Phaser.Tile.html">Tile</a> </li> <li class="class-depth-1"> <a href="Phaser.Tilemap.html">Tilemap</a> </li> <li class="class-depth-1"> <a href="Phaser.TilemapLayer.html">TilemapLayer</a> </li> <li class="class-depth-1"> <a href="Phaser.TilemapParser.html">TilemapParser</a> </li> <li class="class-depth-1"> <a href="Phaser.Tileset.html">Tileset</a> </li> <li class="class-depth-1"> <a href="Phaser.TileSprite.html">TileSprite</a> </li> <li class="class-depth-1"> <a href="Phaser.Time.html">Time</a> </li> <li class="class-depth-1"> <a href="Phaser.Timer.html">Timer</a> </li> <li class="class-depth-1"> <a href="Phaser.TimerEvent.html">TimerEvent</a> </li> <li class="class-depth-1"> <a href="Phaser.Touch.html">Touch</a> </li> <li class="class-depth-1"> <a href="Phaser.Tween.html">Tween</a> </li> <li class="class-depth-1"> <a href="Phaser.TweenData.html">TweenData</a> </li> <li class="class-depth-1"> <a href="Phaser.TweenManager.html">TweenManager</a> </li> <li class="class-depth-1"> <a href="Phaser.Utils.html">Utils</a> </li> <li class="class-depth-2"> <a href="Phaser.Utils.Debug.html">Debug</a> </li> <li class="class-depth-1"> <a href="Phaser.Video.html">Video</a> </li> <li class="class-depth-1"> <a href="Phaser.Weapon.html">Weapon</a> </li> <li class="class-depth-1"> <a href="Phaser.World.html">World</a> </li> <li class="class-depth-1"> <a href="PIXI.BaseTexture.html">BaseTexture</a> </li> <li class="class-depth-1"> <a href="PIXI.CanvasBuffer.html">CanvasBuffer</a> </li> <li class="class-depth-1"> <a href="PIXI.CanvasGraphics.html">CanvasGraphics</a> </li> <li class="class-depth-1"> <a href="PIXI.CanvasMaskManager.html">CanvasMaskManager</a> </li> <li class="class-depth-1"> <a href="PIXI.CanvasRenderer.html">CanvasRenderer</a> </li> <li class="class-depth-1"> <a href="PIXI.CanvasTinter.html">CanvasTinter</a> </li> <li class="class-depth-1"> <a href="PIXI.ComplexPrimitiveShader.html">ComplexPrimitiveShader</a> </li> <li class="class-depth-1"> <a href="PIXI.DisplayObject.html">DisplayObject</a> </li> <li class="class-depth-1"> <a href="PIXI.DisplayObjectContainer.html">DisplayObjectContainer</a> </li> <li class="class-depth-1"> <a href="PIXI.FilterTexture.html">FilterTexture</a> </li> <li class="class-depth-2"> <a href="PIXI.Phaser.GraphicsData.html">Phaser.GraphicsData</a> </li> <li class="class-depth-1"> <a href="PIXI.PIXI.html">PIXI</a> </li> <li class="class-depth-1"> <a href="PIXI.PixiFastShader.html">PixiFastShader</a> </li> <li class="class-depth-1"> <a href="PIXI.PixiShader.html">PixiShader</a> </li> <li class="class-depth-1"> <a href="PIXI.PrimitiveShader.html">PrimitiveShader</a> </li> <li class="class-depth-1"> <a href="PIXI.Sprite.html">Sprite</a> </li> <li class="class-depth-1"> <a href="PIXI.StripShader.html">StripShader</a> </li> <li class="class-depth-1"> <a href="PIXI.Texture.html">Texture</a> </li> <li class="class-depth-1"> <a href="PIXI.WebGLBlendModeManager.html">WebGLBlendModeManager</a> </li> <li class="class-depth-1"> <a href="PIXI.WebGLFastSpriteBatch.html">WebGLFastSpriteBatch</a> </li> <li class="class-depth-1"> <a href="PIXI.WebGLFilterManager.html">WebGLFilterManager</a> </li> <li class="class-depth-1"> <a href="PIXI.WebGLRenderer.html">WebGLRenderer</a> </li> </ul> </li> <li class="dropdown"> <a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a> <ul class="dropdown-menu "> <li class="class-depth-0"> <a href="global.html#ANGLE_DOWN">ANGLE_DOWN</a> </li> <li class="class-depth-0"> <a href="global.html#ANGLE_LEFT">ANGLE_LEFT</a> </li> <li class="class-depth-0"> <a href="global.html#ANGLE_NORTH_EAST">ANGLE_NORTH_EAST</a> </li> <li class="class-depth-0"> <a href="global.html#ANGLE_NORTH_WEST">ANGLE_NORTH_WEST</a> </li> <li class="class-depth-0"> <a href="global.html#ANGLE_RIGHT">ANGLE_RIGHT</a> </li> <li class="class-depth-0"> <a href="global.html#ANGLE_SOUTH_EAST">ANGLE_SOUTH_EAST</a> </li> <li class="class-depth-0"> <a href="global.html#ANGLE_SOUTH_WEST">ANGLE_SOUTH_WEST</a> </li> <li class="class-depth-0"> <a href="global.html#ANGLE_UP">ANGLE_UP</a> </li> <li class="class-depth-0"> <a href="global.html#arc">arc</a> </li> <li class="class-depth-0"> <a href="global.html#AUTO">AUTO</a> </li> <li class="class-depth-0"> <a href="global.html#beginFill">beginFill</a> </li> <li class="class-depth-0"> <a href="global.html#bezierCurveTo">bezierCurveTo</a> </li> <li class="class-depth-0"> <a href="global.html#BITMAPDATA">BITMAPDATA</a> </li> <li class="class-depth-0"> <a href="global.html#BITMAPTEXT">BITMAPTEXT</a> </li> <li class="class-depth-0"> <a href="global.html#blendModes">blendModes</a> </li> <li class="class-depth-0"> <a href="global.html#BOTTOM_CENTER">BOTTOM_CENTER</a> </li> <li class="class-depth-0"> <a href="global.html#BOTTOM_LEFT">BOTTOM_LEFT</a> </li> <li class="class-depth-0"> <a href="global.html#BOTTOM_RIGHT">BOTTOM_RIGHT</a> </li> <li class="class-depth-0"> <a href="global.html#BUTTON">BUTTON</a> </li> <li class="class-depth-0"> <a href="global.html#CANVAS">CANVAS</a> </li> <li class="class-depth-0"> <a href="global.html#CANVAS_FILTER">CANVAS_FILTER</a> </li> <li class="class-depth-0"> <a href="global.html#CENTER">CENTER</a> </li> <li class="class-depth-0"> <a href="global.html#CIRCLE">CIRCLE</a> </li> <li class="class-depth-0"> <a href="global.html#clear">clear</a> </li> <li class="class-depth-0"> <a href="global.html#CREATURE">CREATURE</a> </li> <li class="class-depth-0"> <a href="global.html#destroyCachedSprite">destroyCachedSprite</a> </li> <li class="class-depth-0"> <a href="global.html#displayList">displayList</a> </li> <li class="class-depth-0"> <a href="global.html#DOWN">DOWN</a> </li> <li class="class-depth-0"> <a href="global.html#drawCircle">drawCircle</a> </li> <li class="class-depth-0"> <a href="global.html#drawEllipse">drawEllipse</a> </li> <li class="class-depth-0"> <a href="global.html#drawPolygon">drawPolygon</a> </li> <li class="class-depth-0"> <a href="global.html#drawRect">drawRect</a> </li> <li class="class-depth-0"> <a href="global.html#drawRoundedRect">drawRoundedRect</a> </li> <li class="class-depth-0"> <a href="global.html#drawShape">drawShape</a> </li> <li class="class-depth-0"> <a href="global.html#ELLIPSE">ELLIPSE</a> </li> <li class="class-depth-0"> <a href="global.html#emit">emit</a> </li> <li class="class-depth-0"> <a href="global.html#EMITTER">EMITTER</a> </li> <li class="class-depth-0"> <a href="global.html#endFill">endFill</a> </li> <li class="class-depth-0"> <a href="global.html#GAMES">GAMES</a> </li> <li class="class-depth-0"> <a href="global.html#generateTexture">generateTexture</a> </li> <li class="class-depth-0"> <a href="global.html#getBounds">getBounds</a> </li> <li class="class-depth-0"> <a href="global.html#getLocalBounds">getLocalBounds</a> </li> <li class="class-depth-0"> <a href="global.html#GRAPHICS">GRAPHICS</a> </li> <li class="class-depth-0"> <a href="global.html#GROUP">GROUP</a> </li> <li class="class-depth-0"> <a href="global.html#HEADLESS">HEADLESS</a> </li> <li class="class-depth-0"> <a href="global.html#HORIZONTAL">HORIZONTAL</a> </li> <li class="class-depth-0"> <a href="global.html#IMAGE">IMAGE</a> </li> <li class="class-depth-0"> <a href="global.html#LANDSCAPE">LANDSCAPE</a> </li> <li class="class-depth-0"> <a href="global.html#LEFT">LEFT</a> </li> <li class="class-depth-0"> <a href="global.html#LEFT_BOTTOM">LEFT_BOTTOM</a> </li> <li class="class-depth-0"> <a href="global.html#LEFT_CENTER">LEFT_CENTER</a> </li> <li class="class-depth-0"> <a href="global.html#LEFT_TOP">LEFT_TOP</a> </li> <li class="class-depth-0"> <a href="global.html#LINE">LINE</a> </li> <li class="class-depth-0"> <a href="global.html#lineStyle">lineStyle</a> </li> <li class="class-depth-0"> <a href="global.html#lineTo">lineTo</a> </li> <li class="class-depth-0"> <a href="global.html#listeners">listeners</a> </li> <li class="class-depth-0"> <a href="global.html#MATRIX">MATRIX</a> </li> <li class="class-depth-0"> <a href="global.html#mixin">mixin</a> </li> <li class="class-depth-0"> <a href="global.html#moveTo">moveTo</a> </li> <li class="class-depth-0"> <a href="global.html#NONE">NONE</a> </li> <li class="class-depth-0"> <a href="global.html#off">off</a> </li> <li class="class-depth-0"> <a href="global.html#on">on</a> </li> <li class="class-depth-0"> <a href="global.html#once">once</a> </li> <li class="class-depth-0"> <a href="global.html#PENDING_ATLAS">PENDING_ATLAS</a> </li> <li class="class-depth-2"> <a href="global.html#Phaser.Path#numPointsreturn%257Bnumber%257DThetotalnumberofPathPointsinthisPath.">Phaser.Path#numPoints return {number} The total number of PathPoints in this Path.</a> </li> <li class="class-depth-0"> <a href="global.html#POINT">POINT</a> </li> <li class="class-depth-0"> <a href="global.html#POINTER">POINTER</a> </li> <li class="class-depth-0"> <a href="global.html#POLYGON">POLYGON</a> </li> <li class="class-depth-0"> <a href="global.html#PORTRAIT">PORTRAIT</a> </li> <li class="class-depth-0"> <a href="global.html#quadraticCurveTo">quadraticCurveTo</a> </li> <li class="class-depth-0"> <a href="global.html#RECTANGLE">RECTANGLE</a> </li> <li class="class-depth-0"> <a href="global.html#removeAllListeners">removeAllListeners</a> </li> <li class="class-depth-0"> <a href="global.html#RENDERTEXTURE">RENDERTEXTURE</a> </li> <li class="class-depth-0"> <a href="global.html#RETROFONT">RETROFONT</a> </li> <li class="class-depth-0"> <a href="global.html#RIGHT">RIGHT</a> </li> <li class="class-depth-0"> <a href="global.html#RIGHT_BOTTOM">RIGHT_BOTTOM</a> </li> <li class="class-depth-0"> <a href="global.html#RIGHT_CENTER">RIGHT_CENTER</a> </li> <li class="class-depth-0"> <a href="global.html#RIGHT_TOP">RIGHT_TOP</a> </li> <li class="class-depth-0"> <a href="global.html#ROPE">ROPE</a> </li> <li class="class-depth-0"> <a href="global.html#ROUNDEDRECTANGLE">ROUNDEDRECTANGLE</a> </li> <li class="class-depth-0"> <a href="global.html#scaleModes">scaleModes</a> </li> <li class="class-depth-0"> <a href="global.html#SPRITE">SPRITE</a> </li> <li class="class-depth-0"> <a href="global.html#SPRITEBATCH">SPRITEBATCH</a> </li> <li class="class-depth-0"> <a href="global.html#stopImmediatePropagation">stopImmediatePropagation</a> </li> <li class="class-depth-0"> <a href="global.html#stopPropagation">stopPropagation</a> </li> <li class="class-depth-0"> <a href="global.html#TEXT">TEXT</a> </li> <li class="class-depth-0"> <a href="global.html#TILEMAP">TILEMAP</a> </li> <li class="class-depth-0"> <a href="global.html#TILEMAPLAYER">TILEMAPLAYER</a> </li> <li class="class-depth-0"> <a href="global.html#TILESPRITE">TILESPRITE</a> </li> <li class="class-depth-0"> <a href="global.html#TOP_CENTER">TOP_CENTER</a> </li> <li class="class-depth-0"> <a href="global.html#TOP_LEFT">TOP_LEFT</a> </li> <li class="class-depth-0"> <a href="global.html#TOP_RIGHT">TOP_RIGHT</a> </li> <li class="class-depth-0"> <a href="global.html#UP">UP</a> </li> <li class="class-depth-0"> <a href="global.html#updateLocalBounds">updateLocalBounds</a> </li> <li class="class-depth-0"> <a href="global.html#VERSION">VERSION</a> </li> <li class="class-depth-0"> <a href="global.html#VERTICAL">VERTICAL</a> </li> <li class="class-depth-0"> <a href="global.html#VIDEO">VIDEO</a> </li> <li class="class-depth-0"> <a href="global.html#WEBGL">WEBGL</a> </li> <li class="class-depth-0"> <a href="global.html#WEBGL_FILTER">WEBGL_FILTER</a> </li> <li class="class-depth-0"> <a href="global.html#WEBGL_MULTI">WEBGL_MULTI</a> </li> </ul> </li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Core<b class="caret"></b></a> <ul class="dropdown-menu "> <li class="class-depth-1"><a href="Phaser.Game.html">Game</a></li> <li class="class-depth-1"><a href="Phaser.Group.html">Group</a></li> <li class="class-depth-1"><a href="Phaser.World.html">World</a></li> <li class="class-depth-1"><a href="Phaser.Loader.html">Loader</a></li> <li class="class-depth-1"><a href="Phaser.Cache.html">Cache</a></li> <li class="class-depth-1"><a href="Phaser.Time.html">Time</a></li> <li class="class-depth-1"><a href="Phaser.Camera.html">Camera</a></li> <li class="class-depth-1"><a href="Phaser.StateManager.html">State Manager</a></li> <li class="class-depth-1"><a href="Phaser.TweenManager.html">Tween Manager</a></li> <li class="class-depth-1"><a href="Phaser.SoundManager.html">Sound Manager</a></li> <li class="class-depth-1"><a href="Phaser.Input.html">Input Manager</a></li> <li class="class-depth-1"><a href="Phaser.ScaleManager.html">Scale Manager</a></li> </ul> </li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Game Objects<b class="caret"></b></a> <ul class="dropdown-menu "> <li class="class-depth-1"><a href="Phaser.GameObjectFactory.html">Factory (game.add)</a></li> <li class="class-depth-1"><a href="Phaser.GameObjectCreator.html">Creator (game.make)</a></li> <li class="class-depth-1"><a href="Phaser.Sprite.html">Sprite</a></li> <li class="class-depth-1"><a href="Phaser.Image.html">Image</a></li> <li class="class-depth-1"><a href="Phaser.Sound.html">Sound</a></li> <li class="class-depth-1"><a href="Phaser.Video.html">Video</a></li> <li class="class-depth-1"><a href="Phaser.Particles.Arcade.Emitter.html">Particle Emitter</a></li> <li class="class-depth-1"><a href="Phaser.Particle.html">Particle</a></li> <li class="class-depth-1"><a href="Phaser.Text.html">Text</a></li> <li class="class-depth-1"><a href="Phaser.Tween.html">Tween</a></li> <li class="class-depth-1"><a href="Phaser.BitmapText.html">BitmapText</a></li> <li class="class-depth-1"><a href="Phaser.Tilemap.html">Tilemap</a></li> <li class="class-depth-1"><a href="Phaser.BitmapData.html">BitmapData</a></li> <li class="class-depth-1"><a href="Phaser.RetroFont.html">RetroFont</a></li> <li class="class-depth-1"><a href="Phaser.Button.html">Button</a></li> <li class="class-depth-1"><a href="Phaser.Animation.html">Animation</a></li> <li class="class-depth-1"><a href="Phaser.Graphics.html">Graphics</a></li> <li class="class-depth-1"><a href="Phaser.RenderTexture.html">RenderTexture</a></li> <li class="class-depth-1"><a href="Phaser.TileSprite.html">TileSprite</a></li> </ul> </li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Geometry<b class="caret"></b></a> <ul class="dropdown-menu "> <li class="class-depth-1"><a href="Phaser.Circle.html">Circle</a></li> <li class="class-depth-1"><a href="Phaser.Ellipse.html">Ellipse</a></li> <li class="class-depth-1"><a href="Phaser.Line.html">Line</a></li> <li class="class-depth-1"><a href="Phaser.Matrix.html">Matrix</a></li> <li class="class-depth-1"><a href="Phaser.Point.html">Point</a></li> <li class="class-depth-1"><a href="Phaser.Polygon.html">Polygon</a></li> <li class="class-depth-1"><a href="Phaser.Rectangle.html">Rectangle</a></li> <li class="class-depth-1"><a href="Phaser.RoundedRectangle.html">Rounded Rectangle</a></li> </ul> </li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Physics<b class="caret"></b></a> <ul class="dropdown-menu "> <li class="class-depth-1"><a href="Phaser.Physics.Arcade.html">Arcade Physics</a></li> <li class="class-depth-2"><a href="Phaser.Physics.Arcade.Body.html">Body</a></li> <li class="class-depth-2"><a href="Phaser.Weapon.html">Weapon</a></li> <li class="class-depth-1"><a href="Phaser.Physics.P2.html">P2 Physics</a></li> <li class="class-depth-2"><a href="Phaser.Physics.P2.Body.html">Body</a></li> <li class="class-depth-2"><a href="Phaser.Physics.P2.Spring.html">Spring</a></li> <li class="class-depth-2"><a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a></li> <li class="class-depth-2"><a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a></li> <li class="class-depth-1"><a href="Phaser.Physics.Ninja.html">Ninja Physics</a></li> <li class="class-depth-2"><a href="Phaser.Physics.Body.html">Body</a></li> </ul> </li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Input<b class="caret"></b></a> <ul class="dropdown-menu "> <li class="class-depth-1"><a href="Phaser.InputHandler.html">Input Handler</a></li> <li class="class-depth-1"><a href="Phaser.Pointer.html">Pointer</a></li> <li class="class-depth-1"><a href="Phaser.DeviceButton.html">Device Button</a></li> <li class="class-depth-1"><a href="Phaser.Mouse.html">Mouse</a></li> <li class="class-depth-1"><a href="Phaser.Keyboard.html">Keyboard</a></li> <li class="class-depth-1"><a href="Phaser.Key.html">Key</a></li> <li class="class-depth-1"><a href="Phaser.KeyCode.html">Key Codes</a></li> <li class="class-depth-1"><a href="Phaser.Gamepad.html">Gamepad</a></li> </ul> </li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Community<b class="caret"></b></a> <ul class="dropdown-menu "> <li class="class-depth-1"><a href="http://phaser.io">Phaser Web Site</a></li> <li class="class-depth-1"><a href="https://github.com/photonstorm/phaser">Phaser Github</a></li> <li class="class-depth-1"><a href="http://phaser.io/examples">Phaser Examples</a></li> <li class="class-depth-1"><a href="https://github.com/photonstorm/phaser-plugins">Phaser Plugins</a></li> <li class="class-depth-1"><a href="http://www.html5gamedevs.com/forum/14-phaser/">Forum</a></li> <li class="class-depth-1"><a href="http://stackoverflow.com/questions/tagged/phaser-framework">Stack Overflow</a></li> <li class="class-depth-1"><a href="http://phaser.io/learn">Tutorials</a></li> <li class="class-depth-1"><a href="http://phaser.io/community/newsletter">Newsletter</a></li> <li class="class-depth-1"><a href="http://phaser.io/community/twitter">Twitter</a></li> <li class="class-depth-1"><a href="http://phaser.io/community/slack">Slack</a></li> <li class="class-depth-1"><a href="http://phaser.io/community/donate">Donate</a></li> <li class="class-depth-1"><a href="https://www.codeandweb.com/texturepacker/phaser">Texture Packer</a></li> </ul> </li> </ul> </div> </div> <div class="row-fluid"> <div class="span8"> <div id="main"> <!--<h1 class="page-title">Class: Cache</h1>--> <section> <header> <h2> <span class="ancestors"><a href="Phaser.html">Phaser</a>.</span> Cache </h2> </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 has one single cache in which it stores all assets.</p> <p>The cache is split up into sections, such as images, sounds, video, json, etc. All assets are stored using<br>a unique string-based key as their identifier. Assets stored in different areas of the cache can have the<br>same key, for example 'playerWalking' could be used as the key for both a sprite sheet and an audio file,<br>because they are unique data types.</p> <p>The cache is automatically populated by the Phaser.Loader. When you use the loader to pull in external assets<br>such as images they are automatically placed into their respective cache. Most common Game Objects, such as<br>Sprites and Videos automatically query the cache to extract the assets they need on instantiation.</p> <p>You can access the cache from within a State via <code>this.cache</code>. From here you can call any public method it has,<br>including adding new entries to it, deleting them or querying them.</p> <p>Understand that almost without exception when you get an item from the cache it will return a reference to the<br>item stored in the cache, not a copy of it. Therefore if you retrieve an item and then modify it, the original<br>object in the cache will also be updated, even if you don't put it back into the cache again.</p> <p>By default when you change State the cache is <em>not</em> cleared, although there is an option to clear it should<br>your game require it. In a typical game set-up the cache is populated once after the main game has loaded and<br>then used as an asset store.</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 - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-34">line 34</a> </dt> </dl> </dd> </div> <h3 class="subsection-title">Members</h3> <dl> <dt> <h4 class="name " id=".BINARY"><span class="type-signature"><static, constant> </span>BINARY<span class="type-signature"> :number</span></h4> </dt> <dd> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-167">line 167</a> </dt> </dl> </dd> <dt> <h4 class="name " id=".BITMAPDATA"><span class="type-signature"><static, constant> </span>BITMAPDATA<span class="type-signature"> :number</span></h4> </dt> <dd> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-173">line 173</a> </dt> </dl> </dd> <dt> <h4 class="name " id=".BITMAPFONT"><span class="type-signature"><static, constant> </span>BITMAPFONT<span class="type-signature"> :number</span></h4> </dt> <dd> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-179">line 179</a> </dt> </dl> </dd> <dt> <h4 class="name " id=".CANVAS"><span class="type-signature"><static, constant> </span>CANVAS<span class="type-signature"> :number</span></h4> </dt> <dd> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-125">line 125</a> </dt> </dl> </dd> <dt> <h4 class="name " id=".DEFAULT"><span class="type-signature"><static, constant> </span>DEFAULT<span class="type-signature"> :<a href="PIXI.Texture.html">PIXI.Texture</a></span></h4> </dt> <dd> <div class="description"> <p>The default image used for a texture when no other is specified.</p> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-216">line 216</a> </dt> </dl> </dd> <dt> <h4 class="name " id=".IMAGE"><span class="type-signature"><static, constant> </span>IMAGE<span class="type-signature"> :number</span></h4> </dt> <dd> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-131">line 131</a> </dt> </dl> </dd> <dt> <h4 class="name " id=".JSON"><span class="type-signature"><static, constant> </span>JSON<span class="type-signature"> :number</span></h4> </dt> <dd> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-185">line 185</a> </dt> </dl> </dd> <dt> <h4 class="name " id=".MISSING"><span class="type-signature"><static, constant> </span>MISSING<span class="type-signature"> :<a href="PIXI.Texture.html">PIXI.Texture</a></span></h4> </dt> <dd> <div class="description"> <p>The default image used for a texture when the source image is missing.</p> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-223">line 223</a> </dt> </dl> </dd> <dt> <h4 class="name " id=".PHYSICS"><span class="type-signature"><static, constant> </span>PHYSICS<span class="type-signature"> :number</span></h4> </dt> <dd> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-155">line 155</a> </dt> </dl> </dd> <dt> <h4 class="name " id=".RENDER_TEXTURE"><span class="type-signature"><static, constant> </span>RENDER_TEXTURE<span class="type-signature"> :number</span></h4> </dt> <dd> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-209">line 209</a> </dt> </dl> </dd> <dt> <h4 class="name " id=".SHADER"><span class="type-signature"><static, constant> </span>SHADER<span class="type-signature"> :number</span></h4> </dt> <dd> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-203">line 203</a> </dt> </dl> </dd> <dt> <h4 class="name " id=".SOUND"><span class="type-signature"><static, constant> </span>SOUND<span class="type-signature"> :number</span></h4> </dt> <dd> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-143">line 143</a> </dt> </dl> </dd> <dt> <h4 class="name " id=".TEXT"><span class="type-signature"><static, constant> </span>TEXT<span class="type-signature"> :number</span></h4> </dt> <dd> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-149">line 149</a> </dt> </dl> </dd> <dt> <h4 class="name " id=".TEXTURE"><span class="type-signature"><static, constant> </span>TEXTURE<span class="type-signature"> :number</span></h4> </dt> <dd> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-137">line 137</a> </dt> </dl> </dd> <dt> <h4 class="name " id=".TILEMAP"><span class="type-signature"><static, constant> </span>TILEMAP<span class="type-signature"> :number</span></h4> </dt> <dd> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-161">line 161</a> </dt> </dl> </dd> <dt> <h4 class="name " id=".VIDEO"><span class="type-signature"><static, constant> </span>VIDEO<span class="type-signature"> :number</span></h4> </dt> <dd> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-197">line 197</a> </dt> </dl> </dd> <dt> <h4 class="name " id=".XML"><span class="type-signature"><static, constant> </span>XML<span class="type-signature"> :number</span></h4> </dt> <dd> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-191">line 191</a> </dt> </dl> </dd> <dt> <h4 class="name " id="autoResolveURL"><span class="type-signature"></span>autoResolveURL<span class="type-signature"> :boolean</span></h4> </dt> <dd> <div class="description"> <p>Automatically resolve resource URLs to absolute paths for use with the Cache.getURL method.</p> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-45">line 45</a> </dt> </dl> </dd> <dt> <h4 class="name " id="game"><span class="type-signature"></span>game<span class="type-signature"> :<a href="Phaser.Game.html">Phaser.Game</a></span></h4> </dt> <dd> <div class="description"> <p>Local reference to game.</p> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-39">line 39</a> </dt> </dl> </dd> <dt> <h4 class="name " id="onSoundUnlock"><span class="type-signature"></span>onSoundUnlock<span class="type-signature"> :<a href="Phaser.Signal.html">Phaser.Signal</a></span></h4> </dt> <dd> <div class="description"> <p>This event is dispatched when the sound system is unlocked via a touch event on cellular devices.</p> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-92">line 92</a> </dt> </dl> </dd> </dl> <h3 class="subsection-title">Methods</h3> <dl> <dt> <h4 class="name " id="addBinary"><span class="type-signature"></span>addBinary<span class="signature">(key, binaryData)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Add a binary 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>The key that this asset will be stored in the cache under. This should be unique within this cache.</p></td> </tr> <tr> <td class="name"><code>binaryData</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last"><p>The binary object to be added to the cache.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-465">line 465</a> </dt> </dl> </dd> <dt> <h4 class="name " id="addBitmapData"><span class="type-signature"></span>addBitmapData<span class="signature">(key, bitmapData, <span class="optional">frameData</span>)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Add a BitmapData object 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 key that this asset will be stored in the cache under. This should be unique within this cache.</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="attributes"> </td> <td class="default"> </td> <td class="description last"><p>The BitmapData object to be addded to the cache.</p></td> </tr> <tr> <td class="name"><code>frameData</code></td> <td class="type"> <span class="param-type"><a href="Phaser.FrameData.html">Phaser.FrameData</a></span> | <span class="param-type">null</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> (auto create) </td> <td class="description last"><p>Optional FrameData set associated with the given BitmapData. If not specified (or <code>undefined</code>) a new FrameData object is created containing the Bitmap's Frame. If <code>null</code> is supplied then no FrameData will be created.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> - </div> <div class="returns-desc param-desc"> <p>The BitmapData object to be addded to the cache.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-478">line 478</a> </dt> </dl> </dd> <dt> <h4 class="name " id="addBitmapFont"><span class="type-signature"></span>addBitmapFont<span class="signature">(key, url, data, atlasData, <span class="optional">atlasType</span>, <span class="optional">xSpacing</span>, <span class="optional">ySpacing</span>)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Add a new Bitmap Font 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 key that this asset will be stored in the cache under. This should be unique within this cache.</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>The URL the asset was loaded from. If the asset was not loaded externally set to <code>null</code>.</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 font data.</p></td> </tr> <tr> <td class="name"><code>atlasData</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>The Bitmap Font data.</p></td> </tr> <tr> <td class="name"><code>atlasType</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> 'xml' </td> <td class="description last"><p>The format of the Bitmap Font data file: <code>json</code> or <code>xml</code>.</p></td> </tr> <tr> <td class="name"><code>xSpacing</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> 0 </td> <td class="description last"><p>If you'd like to add additional horizontal spacing between the characters then set the pixel value here.</p></td> </tr> <tr> <td class="name"><code>ySpacing</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> 0 </td> <td class="description last"><p>If you'd like to add additional vertical spacing between the lines then set the pixel value here.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-503">line 503</a> </dt> </dl> </dd> <dt> <h4 class="name " id="addBitmapFontFromAtlas"><span class="type-signature"></span>addBitmapFontFromAtlas<span class="signature">(key, atlasKey, atlasFrame, dataKey, <span class="optional">dataType</span>, <span class="optional">xSpacing</span>, <span class="optional">ySpacing</span>)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Add a new Bitmap Font to the Cache, where the font texture is part of a Texture Atlas.</p> <p>The atlas must already exist in the cache, and be available based on the given <code>atlasKey</code>.</p> <p>The <code>atlasFrame</code> specifies the name of the frame within the atlas that the Bitmap Font is<br>stored in.</p> <p>The <code>dataKey</code> is the key of the XML or JSON Bitmap Font Data, which must already be in<br>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 key that this asset will be stored in the cache under. This should be unique within this cache.</p></td> </tr> <tr> <td class="name"><code>atlasKey</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 key of the Texture Atlas in the Cache.</p></td> </tr> <tr> <td class="name"><code>atlasFrame</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 frame of the Texture Atlas that the Bitmap Font is in.</p></td> </tr> <tr> <td class="name"><code>dataKey</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 key of the Bitmap Font data in the Cache</p></td> </tr> <tr> <td class="name"><code>dataType</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> 'xml' </td> <td class="description last"><p>The format of the Bitmap Font data: <code>json</code> or <code>xml</code>.</p></td> </tr> <tr> <td class="name"><code>xSpacing</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> 0 </td> <td class="description last"><p>If you'd like to add additional horizontal spacing between the characters then set the pixel value here.</p></td> </tr> <tr> <td class="name"><code>ySpacing</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> 0 </td> <td class="description last"><p>If you'd like to add additional vertical spacing between the lines then set the pixel value here.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-542">line 542</a> </dt> </dl> </dd> <dt> <h4 class="name " id="addCanvas"><span class="type-signature"></span>addCanvas<span class="signature">(key, canvas, <span class="optional">context</span>)</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>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>The key that this asset will be stored in the cache under. This should be unique within this cache.</p></td> </tr> <tr> <td class="name"><code>canvas</code></td> <td class="type"> <span class="param-type">HTMLCanvasElement</span> </td> <td class="attributes"> </td> <td class="description last"><p>The 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="attributes"> <optional><br> </td> <td class="description last"><p>The context of the canvas element. If not specified it will default go <code>getContext('2d')</code>.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-271">line 271</a> </dt> </dl> </dd> <dt> <h4 class="name " id="addDefaultImage"><span class="type-signature"><internal> </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.<br>It uses the special reserved key of <code>__default</code>.<br>This method is called automatically when the Cache is created.<br>This image is skipped when <code>Cache.destroy</code> is called due to its internal requirements.</p> </div> <dl class="details"> <dt class="important tag-deprecated">Internal:</dt> <dd class="tag-deprecated"><ul> <li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li> </ul></dd> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-332">line 332</a> </dt> </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"> → {object}</span></h4> </dt> <dd> <div class="description"> <p>Adds an Image file into the Cache. The file must have already been loaded, typically via Phaser.Loader, but can also have been loaded into the DOM.<br>If an image already exists in the cache with the same key then it is removed and destroyed, and the new image inserted in its place.</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 key that this asset will be stored in the cache under. This should be unique within this cache.</p></td> </tr> <tr> <td class="name"><code>url</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The URL the asset was loaded from. If the asset was not loaded externally set to <code>null</code>.</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> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">object</span> - </div> <div class="returns-desc param-desc"> <p>The full image object that was added to the cache.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-287">line 287</a> </dt> </dl> </dd> <dt> <h4 class="name " id="addJSON"><span class="type-signature"></span>addJSON<span class="signature">(key, url, data)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Add a new json object into 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 key that this asset will be stored in the cache under. This should be unique within this cache.</p></td> </tr> <tr> <td class="name"><code>url</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The URL the asset was loaded from. If the asset was not loaded externally set to <code>null</code>.</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 json data.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-597">line 597</a> </dt> </dl> </dd> <dt> <h4 class="name " id="addMissingImage"><span class="type-signature"><internal> </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.<br>It uses the special reserved key of <code>__missing</code>.<br>This method is called automatically when the Cache is created.<br>This image is skipped when <code>Cache.destroy</code> is called due to its internal requirements.</p> </div> <dl class="details"> <dt class="important tag-deprecated">Internal:</dt> <dd class="tag-deprecated"><ul> <li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li> </ul></dd> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-357">line 357</a> </dt> </dl> </dd> <dt> <h4 class="name " id="addPhysicsData"><span class="type-signature"></span>addPhysicsData<span class="signature">(key, url, JSONData, format)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Add a new physics data object 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 key that this asset will be stored in the cache under. This should be unique within this cache.</p></td> </tr> <tr> <td class="name"><code>url</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The URL the asset was loaded from. If the asset was not loaded externally set to <code>null</code>.</p></td> </tr> <tr> <td class="name"><code>JSONData</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last"><p>The physics data object (a JSON file).</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 physics data.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-431">line 431</a> </dt> </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 key that this asset will be stored in the cache under. This should be unique within this cache.</p></td> </tr> <tr> <td class="name"><code>texture</code></td> <td class="type"> <span class="param-type"><a href="Phaser.RenderTexture.html">Phaser.RenderTexture</a></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 - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-662">line 662</a> </dt> </dl> </dd> <dt> <h4 class="name " id="addShader"><span class="type-signature"></span>addShader<span class="signature">(key, url, data)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Adds a Fragment Shader in to the Cache. The file must have already been loaded, typically via Phaser.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>The key that this asset will be stored in the cache under. This should be unique within this cache.</p></td> </tr> <tr> <td class="name"><code>url</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The URL the asset was loaded from. If the asset was not loaded externally set to <code>null</code>.</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 shader data.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-646">line 646</a> </dt> </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>Adds a Sound file into the Cache. The file must have already been loaded, typically via Phaser.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>The key that this asset will be stored in the cache under. This should be unique within this cache.</p></td> </tr> <tr> <td class="name"><code>url</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The URL the asset was loaded from. If the asset was not loaded externally set to <code>null</code>.</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 - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-379">line 379</a> </dt> </dl> </dd> <dt> <h4 class="name " id="addSpriteSheet"><span class="type-signature"></span>addSpriteSheet<span class="signature">(key, url, data, frameWidth, frameHeight, <span class="optional">frameMax</span>, <span class="optional">margin</span>, <span class="optional">spacing</span>, <span class="optional">skipFrames</span>)</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>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 key that this asset will be stored in the cache under. This should be unique within this cache.</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>The URL the asset was loaded from. If the asset was not loaded externally set to <code>null</code>.</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 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="attributes"> </td> <td class="default"> </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="attributes"> </td> <td class="default"> </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="attributes"> <optional><br> </td> <td class="default"> -1 </td> <td class="description last"><p>How many frames stored in the sprite sheet. If -1 then it divides the whole sheet evenly.</p></td> </tr> <tr> <td class="name"><code>margin</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> 0 </td> <td class="description last"><p>If the frames have been drawn with a margin, specify the amount here.</p></td> </tr> <tr> <td class="name"><code>spacing</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> 0 </td> <td class="description last"><p>If the frames have been drawn with spacing between them, specify the amount here.</p></td> </tr> <tr> <td class="name"><code>skipFrames</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> 0 </td> <td class="description last"><p>Skip a number of frames. Useful when there are multiple sprite sheets in one image.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-675">line 675</a> </dt> </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>The key that this asset will be stored in the cache under. This should be unique within this cache.</p></td> </tr> <tr> <td class="name"><code>url</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The URL the asset was loaded from. If the asset was not loaded externally set to <code>null</code>.</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 - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-415">line 415</a> </dt> </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 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 key that this asset will be stored in the cache under. This should be unique within this cache.</p></td> </tr> <tr> <td class="name"><code>url</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The URL the asset was loaded from. If the asset was not loaded externally set to <code>null</code>.</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 - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-713">line 713</a> </dt> </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 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 key that this asset will be stored in the cache under. This should be unique within this cache.</p></td> </tr> <tr> <td class="name"><code>url</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The URL the asset was loaded from. If the asset was not loaded externally set to <code>null</code>.</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 (either a CSV or JSON file).</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 - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-448">line 448</a> </dt> </dl> </dd> <dt> <h4 class="name " id="addVideo"><span class="type-signature"></span>addVideo<span class="signature">(key, url, data, isBlob)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Adds a Video file into the Cache. The file must have already been loaded, typically via Phaser.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>The key that this asset will be stored in the cache under. This should be unique within this cache.</p></td> </tr> <tr> <td class="name"><code>url</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The URL the asset was loaded from. If the asset was not loaded externally set to <code>null</code>.</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 video data.</p></td> </tr> <tr> <td class="name"><code>isBlob</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="description last"><p>True if the file was preloaded via xhr and the data parameter is a Blob. false if a Video tag was created instead.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-629">line 629</a> </dt> </dl> </dd> <dt> <h4 class="name " id="addXML"><span class="type-signature"></span>addXML<span class="signature">(key, url, data)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Add a new xml object into 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 key that this asset will be stored in the cache under. This should be unique within this cache.</p></td> </tr> <tr> <td class="name"><code>url</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The URL the asset was loaded from. If the asset was not loaded externally set to <code>null</code>.</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 - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-613">line 613</a> </dt> </dl> </dd> <dt> <h4 class="name " id="checkBinaryKey"><span class="type-signature"></span>checkBinaryKey<span class="signature">(key)</span><span class="type-signature"> → {boolean}</span></h4> </dt> <dd> <div class="description"> <p>Checks if the given key exists in the Binary 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 key of the asset within the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">boolean</span> - </div> <div class="returns-desc param-desc"> <p>True if the key exists in the cache, otherwise false.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1012">line 1012</a> </dt> </dl> </dd> <dt> <h4 class="name " id="checkBitmapDataKey"><span class="type-signature"></span>checkBitmapDataKey<span class="signature">(key)</span><span class="type-signature"> → {boolean}</span></h4> </dt> <dd> <div class="description"> <p>Checks if the given key exists in the BitmapData 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 key of the asset within the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">boolean</span> - </div> <div class="returns-desc param-desc"> <p>True if the key exists in the cache, otherwise false.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1025">line 1025</a> </dt> </dl> </dd> <dt> <h4 class="name " id="checkBitmapFontKey"><span class="type-signature"></span>checkBitmapFontKey<span class="signature">(key)</span><span class="type-signature"> → {boolean}</span></h4> </dt> <dd> <div class="description"> <p>Checks if the given key exists in the BitmapFont 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 key of the asset within the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">boolean</span> - </div> <div class="returns-desc param-desc"> <p>True if the key exists in the cache, otherwise false.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1038">line 1038</a> </dt> </dl> </dd> <dt> <h4 class="name " id="checkCanvasKey"><span class="type-signature"></span>checkCanvasKey<span class="signature">(key)</span><span class="type-signature"> → {boolean}</span></h4> </dt> <dd> <div class="description"> <p>Checks if the given key exists in the Canvas 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 key of the asset within the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">boolean</span> - </div> <div class="returns-desc param-desc"> <p>True if the key exists in the cache, otherwise false.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-921">line 921</a> </dt> </dl> </dd> <dt> <h4 class="name " id="checkImageKey"><span class="type-signature"></span>checkImageKey<span class="signature">(key)</span><span class="type-signature"> → {boolean}</span></h4> </dt> <dd> <div class="description"> <p>Checks if the given key exists in the Image Cache. Note that this also includes Texture Atlases, Sprite Sheets and Retro Fonts.</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 key of the asset within the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">boolean</span> - </div> <div class="returns-desc param-desc"> <p>True if the key exists in the cache, otherwise false.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-934">line 934</a> </dt> </dl> </dd> <dt> <h4 class="name " id="checkJSONKey"><span class="type-signature"></span>checkJSONKey<span class="signature">(key)</span><span class="type-signature"> → {boolean}</span></h4> </dt> <dd> <div class="description"> <p>Checks if the given key exists in the JSON 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 key of the asset within the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">boolean</span> - </div> <div class="returns-desc param-desc"> <p>True if the key exists in the cache, otherwise false.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1051">line 1051</a> </dt> </dl> </dd> <dt> <h4 class="name " id="checkKey"><span class="type-signature"></span>checkKey<span class="signature">(cache, key)</span><span class="type-signature"> → {boolean}</span></h4> </dt> <dd> <div class="description"> <p>Checks if a key for the given cache object type 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>cache</code></td> <td class="type"> <span class="param-type">integer</span> </td> <td class="description last"><p>The cache to search. One of the Cache consts such as <code>Phaser.Cache.IMAGE</code> or <code>Phaser.Cache.SOUND</code>.</p></td> </tr> <tr> <td class="name"><code>key</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The key of the asset within the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">boolean</span> - </div> <div class="returns-desc param-desc"> <p>True if the key exists, otherwise false.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-881">line 881</a> </dt> </dl> </dd> <dt> <h4 class="name " id="checkPhysicsKey"><span class="type-signature"></span>checkPhysicsKey<span class="signature">(key)</span><span class="type-signature"> → {boolean}</span></h4> </dt> <dd> <div class="description"> <p>Checks if the given key exists in the Physics 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 key of the asset within the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">boolean</span> - </div> <div class="returns-desc param-desc"> <p>True if the key exists in the cache, otherwise false.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-986">line 986</a> </dt> </dl> </dd> <dt> <h4 class="name " id="checkRenderTextureKey"><span class="type-signature"></span>checkRenderTextureKey<span class="signature">(key)</span><span class="type-signature"> → {boolean}</span></h4> </dt> <dd> <div class="description"> <p>Checks if the given key exists in the Render Texture 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 key of the asset within the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">boolean</span> - </div> <div class="returns-desc param-desc"> <p>True if the key exists in the cache, otherwise false.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1103">line 1103</a> </dt> </dl> </dd> <dt> <h4 class="name " id="checkShaderKey"><span class="type-signature"></span>checkShaderKey<span class="signature">(key)</span><span class="type-signature"> → {boolean}</span></h4> </dt> <dd> <div class="description"> <p>Checks if the given key exists in the Fragment Shader 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 key of the asset within the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">boolean</span> - </div> <div class="returns-desc param-desc"> <p>True if the key exists in the cache, otherwise false.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1090">line 1090</a> </dt> </dl> </dd> <dt> <h4 class="name " id="checkSoundKey"><span class="type-signature"></span>checkSoundKey<span class="signature">(key)</span><span class="type-signature"> → {boolean}</span></h4> </dt> <dd> <div class="description"> <p>Checks if the given key exists in the Sound 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 key of the asset within the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">boolean</span> - </div> <div class="returns-desc param-desc"> <p>True if the key exists in the cache, otherwise false.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-960">line 960</a> </dt> </dl> </dd> <dt> <h4 class="name " id="checkTextKey"><span class="type-signature"></span>checkTextKey<span class="signature">(key)</span><span class="type-signature"> → {boolean}</span></h4> </dt> <dd> <div class="description"> <p>Checks if the given key exists in the Text 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 key of the asset within the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">boolean</span> - </div> <div class="returns-desc param-desc"> <p>True if the key exists in the cache, otherwise false.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-973">line 973</a> </dt> </dl> </dd> <dt> <h4 class="name " id="checkTextureKey"><span class="type-signature"></span>checkTextureKey<span class="signature">(key)</span><span class="type-signature"> → {boolean}</span></h4> </dt> <dd> <div class="description"> <p>Checks if the given key exists in the Texture 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 key of the asset within the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">boolean</span> - </div> <div class="returns-desc param-desc"> <p>True if the key exists in the cache, otherwise false.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-947">line 947</a> </dt> </dl> </dd> <dt> <h4 class="name " id="checkTilemapKey"><span class="type-signature"></span>checkTilemapKey<span class="signature">(key)</span><span class="type-signature"> → {boolean}</span></h4> </dt> <dd> <div class="description"> <p>Checks if the given key exists in the Tilemap 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 key of the asset within the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">boolean</span> - </div> <div class="returns-desc param-desc"> <p>True if the key exists in the cache, otherwise false.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-999">line 999</a> </dt> </dl> </dd> <dt> <h4 class="name " id="checkURL"><span class="type-signature"></span>checkURL<span class="signature">(url)</span><span class="type-signature"> → {boolean}</span></h4> </dt> <dd> <div class="description"> <p>Checks if the given URL has been loaded into the Cache.<br>This method will only work if Cache.autoResolveURL was set to <code>true</code> before any preloading took place.<br>The method will make a DOM src call to the URL given, so please be aware of this for certain file types, such as Sound files on Firefox<br>which may cause double-load instances.</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>url</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The url to check for in the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">boolean</span> - </div> <div class="returns-desc param-desc"> <p>True if the url exists, otherwise false.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-900">line 900</a> </dt> </dl> </dd> <dt> <h4 class="name " id="checkVideoKey"><span class="type-signature"></span>checkVideoKey<span class="signature">(key)</span><span class="type-signature"> → {boolean}</span></h4> </dt> <dd> <div class="description"> <p>Checks if the given key exists in the Video 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 key of the asset within the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">boolean</span> - </div> <div class="returns-desc param-desc"> <p>True if the key exists in the cache, otherwise false.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1077">line 1077</a> </dt> </dl> </dd> <dt> <h4 class="name " id="checkXMLKey"><span class="type-signature"></span>checkXMLKey<span class="signature">(key)</span><span class="type-signature"> → {boolean}</span></h4> </dt> <dd> <div class="description"> <p>Checks if the given key exists in the XML 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 key of the asset within the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">boolean</span> - </div> <div class="returns-desc param-desc"> <p>True if the key exists in the cache, otherwise false.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1064">line 1064</a> </dt> </dl> </dd> <dt> <h4 class="name " id="clearGLTextures"><span class="type-signature"><internal> </span>clearGLTextures<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Empties out all of the GL Textures from Images stored in the cache.<br>This is called automatically when the WebGL context is lost and then restored.</p> </div> <dl class="details"> <dt class="important tag-deprecated">Internal:</dt> <dd class="tag-deprecated"><ul> <li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li> </ul></dd> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1994">line 1994</a> </dt> </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>The key of the asset within the cache.</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 - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-823">line 823</a> </dt> </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.<br>If an object in the cache has a <code>destroy</code> method it will also be called.</p> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-2044">line 2044</a> </dt> </dl> </dd> <dt> <h4 class="name " id="getBaseTexture"><span class="type-signature"></span>getBaseTexture<span class="signature">(key, <span class="optional">cache</span>)</span><span class="type-signature"> → {<a href="PIXI.BaseTexture.html">PIXI.BaseTexture</a>}</span></h4> </dt> <dd> <div class="description"> <p>Gets a PIXI.BaseTexture by key from the given 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>Asset key of the image for which you want the BaseTexture for.</p></td> </tr> <tr> <td class="name"><code>cache</code></td> <td class="type"> <span class="param-type">integer</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> Phaser.Cache.IMAGE </td> <td class="description last"><p>The cache to search for the item in.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type"><a href="PIXI.BaseTexture.html">PIXI.BaseTexture</a></span> - </div> <div class="returns-desc param-desc"> <p>The BaseTexture object.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1523">line 1523</a> </dt> </dl> </dd> <dt> <h4 class="name " id="getBinary"><span class="type-signature"></span>getBinary<span class="signature">(key)</span><span class="type-signature"> → {object}</span></h4> </dt> <dd> <div class="description"> <p>Gets a binary object from the cache.</p> <p>The object is looked-up based on the key given.</p> <p>Note: If the object cannot be found a <code>console.warn</code> message is displayed.</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 key of the asset to retrieve from the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">object</span> - </div> <div class="returns-desc param-desc"> <p>The binary data object.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1363">line 1363</a> </dt> </dl> </dd> <dt> <h4 class="name " id="getBitmapData"><span class="type-signature"></span>getBitmapData<span class="signature">(key)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Gets a BitmapData object from the cache.</p> <p>The object is looked-up based on the key given.</p> <p>Note: If the object cannot be found a <code>console.warn</code> message is displayed.</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 key of the asset to retrieve from the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> - </div> <div class="returns-desc param-desc"> <p>The requested BitmapData object if found, or null if not.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1380">line 1380</a> </dt> </dl> </dd> <dt> <h4 class="name " id="getBitmapFont"><span class="type-signature"></span>getBitmapFont<span class="signature">(key)</span><span class="type-signature"> → {Phaser.BitmapFont}</span></h4> </dt> <dd> <div class="description"> <p>Gets a Bitmap Font object from the cache.</p> <p>The object is looked-up based on the key given.</p> <p>Note: If the object cannot be found a <code>console.warn</code> message is displayed.</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 key of the asset to retrieve from the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">Phaser.BitmapFont</span> - </div> <div class="returns-desc param-desc"> <p>The requested BitmapFont object if found, or null if not.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1397">line 1397</a> </dt> </dl> </dd> <dt> <h4 class="name " id="getCanvas"><span class="type-signature"></span>getCanvas<span class="signature">(key)</span><span class="type-signature"> → {object}</span></h4> </dt> <dd> <div class="description"> <p>Gets a Canvas object from the cache.</p> <p>The object is looked-up based on the key given.</p> <p>Note: If the object cannot be found a <code>console.warn</code> message is displayed.</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 key of the asset to retrieve from the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">object</span> - </div> <div class="returns-desc param-desc"> <p>The canvas object or <code>null</code> if no item could be found matching the given key.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1158">line 1158</a> </dt> </dl> </dd> <dt> <h4 class="name " id="getFrame"><span class="type-signature"></span>getFrame<span class="signature">(key, <span class="optional">cache</span>)</span><span class="type-signature"> → {<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>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>Asset key of the frame data to retrieve from the Cache.</p></td> </tr> <tr> <td class="name"><code>cache</code></td> <td class="type"> <span class="param-type">integer</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> Phaser.Cache.IMAGE </td> <td class="description last"><p>The cache to search for the item in.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type"><a href="Phaser.Frame.html">Phaser.Frame</a></span> - </div> <div class="returns-desc param-desc"> <p>The frame data.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1539">line 1539</a> </dt> </dl> </dd> <dt> <h4 class="name " id="getFrameByIndex"><span class="type-signature"></span>getFrameByIndex<span class="signature">(key, index, <span class="optional">cache</span>)</span><span class="type-signature"> → {<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>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>Asset key of the frame data to retrieve from the Cache.</p></td> </tr> <tr> <td class="name"><code>index</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>The index of the frame you want to get.</p></td> </tr> <tr> <td class="name"><code>cache</code></td> <td class="type"> <span class="param-type">integer</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> Phaser.Cache.IMAGE </td> <td class="description last"><p>The cache to search. One of the Cache consts such as <code>Phaser.Cache.IMAGE</code> or <code>Phaser.Cache.SOUND</code>.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type"><a href="Phaser.Frame.html">Phaser.Frame</a></span> - </div> <div class="returns-desc param-desc"> <p>The frame object.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1633">line 1633</a> </dt> </dl> </dd> <dt> <h4 class="name " id="getFrameByName"><span class="type-signature"></span>getFrameByName<span class="signature">(key, name, <span class="optional">cache</span>)</span><span class="type-signature"> → {<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>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>Asset key of the frame data to retrieve from the Cache.</p></td> </tr> <tr> <td class="name"><code>name</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 name of the frame you want to get.</p></td> </tr> <tr> <td class="name"><code>cache</code></td> <td class="type"> <span class="param-type">integer</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> Phaser.Cache.IMAGE </td> <td class="description last"><p>The cache to search. One of the Cache consts such as <code>Phaser.Cache.IMAGE</code> or <code>Phaser.Cache.SOUND</code>.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type"><a href="Phaser.Frame.html">Phaser.Frame</a></span> - </div> <div class="returns-desc param-desc"> <p>The frame object.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1657">line 1657</a> </dt> </dl> </dd> <dt> <h4 class="name " id="getFrameCount"><span class="type-signature"></span>getFrameCount<span class="signature">(key, <span class="optional">cache</span>)</span><span class="type-signature"> → {number}</span></h4> </dt> <dd> <div class="description"> <p>Get the total number of frames contained in the FrameData object specified by the given key.</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>Asset key of the FrameData you want.</p></td> </tr> <tr> <td class="name"><code>cache</code></td> <td class="type"> <span class="param-type">integer</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> Phaser.Cache.IMAGE </td> <td class="description last"><p>The cache to search for the item in.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">number</span> - </div> <div class="returns-desc param-desc"> <p>Then number of frames. 0 if the image is not found.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1555">line 1555</a> </dt> </dl> </dd> <dt> <h4 class="name " id="getFrameData"><span class="type-signature"></span>getFrameData<span class="signature">(key, <span class="optional">cache</span>)</span><span class="type-signature"> → {<a href="Phaser.FrameData.html">Phaser.FrameData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Gets a Phaser.FrameData object from the Image Cache.</p> <p>The object is looked-up based on the key given.</p> <p>Note: If the object cannot be found a <code>console.warn</code> message is displayed.</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>Asset key of the frame data to retrieve from the Cache.</p></td> </tr> <tr> <td class="name"><code>cache</code></td> <td class="type"> <span class="param-type">integer</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> Phaser.Cache.IMAGE </td> <td class="description last"><p>The cache to search for the item in.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type"><a href="Phaser.FrameData.html">Phaser.FrameData</a></span> - </div> <div class="returns-desc param-desc"> <p>The frame data.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1578">line 1578</a> </dt> </dl> </dd> <dt> <h4 class="name " id="getImage"><span class="type-signature"></span>getImage<span class="signature">(<span class="optional">key</span>, <span class="optional">full</span>)</span><span class="type-signature"> → {Image}</span></h4> </dt> <dd> <div class="description"> <p>Gets a Image object from the cache. This returns a DOM Image object, not a Phaser.Image object.</p> <p>The object is looked-up based on the key given.</p> <p>Note: If the object cannot be found a <code>console.warn</code> message is displayed.</p> <p>Only the Image cache is searched, which covers images loaded via Loader.image, Sprite Sheets and Texture Atlases.</p> <p>If you need the image used by a bitmap font or similar then please use those respective 'get' methods.</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"> <optional><br> </td> <td class="default"> </td> <td class="description last"><p>The key of the asset to retrieve from the cache. If not given or null it will return a default image. If given but not found in the cache it will throw a warning and return the missing image.</p></td> </tr> <tr> <td class="name"><code>full</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> false </td> <td class="description last"><p>If true the full image object will be returned, if false just the HTML Image object is returned.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">Image</span> - </div> <div class="returns-desc param-desc"> <p>The Image object if found in the Cache, otherwise <code>null</code>. If <code>full</code> was true then a JavaScript object is returned.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1175">line 1175</a> </dt> </dl> </dd> <dt> <h4 class="name " id="getItem"><span class="type-signature"></span>getItem<span class="signature">(key, cache, <span class="optional">method</span>, <span class="optional">property</span>)</span><span class="type-signature"> → {object}</span></h4> </dt> <dd> <div class="description"> <p>Get an item from a cache based on the given key and property.</p> <p>This method is mostly used internally by other Cache methods such as <code>getImage</code> but is exposed<br>publicly for your own use as well.</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>The key of the asset within the cache.</p></td> </tr> <tr> <td class="name"><code>cache</code></td> <td class="type"> <span class="param-type">integer</span> </td> <td class="attributes"> </td> <td class="description last"><p>The cache to search. One of the Cache consts such as <code>Phaser.Cache.IMAGE</code> or <code>Phaser.Cache.SOUND</code>.</p></td> </tr> <tr> <td class="name"><code>method</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last"><p>The string name of the method calling getItem. Can be empty, in which case no console warning is output.</p></td> </tr> <tr> <td class="name"><code>property</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last"><p>If you require a specific property from the cache item, specify it here.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">object</span> - </div> <div class="returns-desc param-desc"> <p>The cached item if found, otherwise <code>null</code>. If the key is invalid and <code>method</code> is set then a console.warn is output.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1120">line 1120</a> </dt> </dl> </dd> <dt> <h4 class="name " id="getJSON"><span class="type-signature"></span>getJSON<span class="signature">(key, <span class="optional">clone</span>)</span><span class="type-signature"> → {object}</span></h4> </dt> <dd> <div class="description"> <p>Gets a JSON object from the cache.</p> <p>The object is looked-up based on the key given.</p> <p>Note: If the object cannot be found a <code>console.warn</code> message is displayed.</p> <p>You can either return the object by reference (the default), or return a clone<br>of it by setting the <code>clone</code> argument to <code>true</code>.</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 key of the asset to retrieve from the cache.</p></td> </tr> <tr> <td class="name"><code>clone</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> false </td> <td class="description last"><p>Return a clone of the original object (true) or a reference to it? (false)</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">object</span> - </div> <div class="returns-desc param-desc"> <p>The JSON object, or an Array if the key points to an Array property. If the property wasn't found, it returns null.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1414">line 1414</a> </dt> </dl> </dd> <dt> <h4 class="name " id="getKeys"><span class="type-signature"></span>getKeys<span class="signature">(<span class="optional">cache</span>)</span><span class="type-signature"> → {Array}</span></h4> </dt> <dd> <div class="description"> <p>Gets all keys used in the requested 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>cache</code></td> <td class="type"> <span class="param-type">integer</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> Phaser.Cache.IMAGE </td> <td class="description last"><p>The Cache you wish to get the keys from. Can be any of the Cache consts such as <code>Phaser.Cache.IMAGE</code>, <code>Phaser.Cache.SOUND</code> etc.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">Array</span> - </div> <div class="returns-desc param-desc"> <p>The array of keys in the requested cache.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1706">line 1706</a> </dt> </dl> </dd> <dt> <h4 class="name " id="getPhysicsData"><span class="type-signature"></span>getPhysicsData<span class="signature">(key, <span class="optional">object</span>, fixtureKey)</span><span class="type-signature"> → {object}</span></h4> </dt> <dd> <div class="description"> <p>Gets a Physics Data object from the cache.</p> <p>The object is looked-up based on the key given.</p> <p>Note: If the object cannot be found a <code>console.warn</code> message is displayed.</p> <p>You can get either the entire data set, a single object or a single fixture of an object from it.</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 key of the asset to retrieve from the cache.</p></td> </tr> <tr> <td class="name"><code>object</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> null </td> <td class="description last"><p>If specified it will return just the physics object that is part of the given key, if null it will return them all.</p></td> </tr> <tr> <td class="name"><code>fixtureKey</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>Fixture key of fixture inside an object. This key can be set per fixture with the Phaser Exporter.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">object</span> - </div> <div class="returns-desc param-desc"> <p>The requested physics object data if found.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1284">line 1284</a> </dt> </dl> </dd> <dt> <h4 class="name " id="getRenderTexture"><span class="type-signature"></span>getRenderTexture<span class="signature">(key)</span><span class="type-signature"> → {Object}</span></h4> </dt> <dd> <div class="description"> <p>Gets a RenderTexture object from the cache.</p> <p>The object is looked-up based on the key given.</p> <p>Note: If the object cannot be found a <code>console.warn</code> message is displayed.</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 key of the asset to retrieve from the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">Object</span> - </div> <div class="returns-desc param-desc"> <p>The object with Phaser.RenderTexture and Phaser.Frame.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1502">line 1502</a> </dt> </dl> </dd> <dt> <h4 class="name " id="getShader"><span class="type-signature"></span>getShader<span class="signature">(key)</span><span class="type-signature"> → {string}</span></h4> </dt> <dd> <div class="description"> <p>Gets a fragment shader object from the cache.</p> <p>The object is looked-up based on the key given.</p> <p>Note: If the object cannot be found a <code>console.warn</code> message is displayed.</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 key of the asset to retrieve from the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">string</span> - </div> <div class="returns-desc param-desc"> <p>The shader object.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1485">line 1485</a> </dt> </dl> </dd> <dt> <h4 class="name " id="getSound"><span class="type-signature"></span>getSound<span class="signature">(key)</span><span class="type-signature"> → {<a href="Phaser.Sound.html">Phaser.Sound</a>}</span></h4> </dt> <dd> <div class="description"> <p>Gets a Phaser.Sound object from the cache.</p> <p>The object is looked-up based on the key given.</p> <p>Note: If the object cannot be found a <code>console.warn</code> message is displayed.</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 key of the asset to retrieve from the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type"><a href="Phaser.Sound.html">Phaser.Sound</a></span> - </div> <div class="returns-desc param-desc"> <p>The sound object.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1233">line 1233</a> </dt> </dl> </dd> <dt> <h4 class="name " id="getSoundData"><span class="type-signature"></span>getSoundData<span class="signature">(key)</span><span class="type-signature"> → {object}</span></h4> </dt> <dd> <div class="description"> <p>Gets a raw Sound data object from the cache.</p> <p>The object is looked-up based on the key given.</p> <p>Note: If the object cannot be found a <code>console.warn</code> message is displayed.</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 key of the asset to retrieve from the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">object</span> - </div> <div class="returns-desc param-desc"> <p>The sound data.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1250">line 1250</a> </dt> </dl> </dd> <dt> <h4 class="name " id="getText"><span class="type-signature"></span>getText<span class="signature">(key)</span><span class="type-signature"> → {object}</span></h4> </dt> <dd> <div class="description"> <p>Gets a Text object from the cache.</p> <p>The object is looked-up based on the key given.</p> <p>Note: If the object cannot be found a <code>console.warn</code> message is displayed.</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 key of the asset to retrieve from the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">object</span> - </div> <div class="returns-desc param-desc"> <p>The text data.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1267">line 1267</a> </dt> </dl> </dd> <dt> <h4 class="name " id="getTextureFrame"><span class="type-signature"></span>getTextureFrame<span class="signature">(key)</span><span class="type-signature"> → {<a href="Phaser.Frame.html">Phaser.Frame</a>}</span></h4> </dt> <dd> <div class="description"> <p>Get a single texture frame by key.</p> <p>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>The key of the asset to retrieve from the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type"><a href="Phaser.Frame.html">Phaser.Frame</a></span> - </div> <div class="returns-desc param-desc"> <p>The frame data.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1218">line 1218</a> </dt> </dl> </dd> <dt> <h4 class="name " id="getTilemapData"><span class="type-signature"></span>getTilemapData<span class="signature">(key)</span><span class="type-signature"> → {object}</span></h4> </dt> <dd> <div class="description"> <p>Gets a raw Tilemap data object from the cache. This will be in either CSV or JSON format.</p> <p>The object is looked-up based on the key given.</p> <p>Note: If the object cannot be found a <code>console.warn</code> message is displayed.</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 key of the asset to retrieve from the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">object</span> - </div> <div class="returns-desc param-desc"> <p>The raw tilemap data in CSV or JSON format.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1346">line 1346</a> </dt> </dl> </dd> <dt> <h4 class="name " id="getURL"><span class="type-signature"></span>getURL<span class="signature">(url)</span><span class="type-signature"> → {object}</span></h4> </dt> <dd> <div class="description"> <p>Get a cached object by the URL.<br>This only returns a value if you set Cache.autoResolveURL to <code>true</code> <em>before</em> starting the preload of any assets.<br>Be aware that every call to this function makes a DOM src query, so use carefully and double-check for implications in your target browsers/devices.</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>url</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The url for the object loaded to get from the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">object</span> - </div> <div class="returns-desc param-desc"> <p>The cached object.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1681">line 1681</a> </dt> </dl> </dd> <dt> <h4 class="name " id="getVideo"><span class="type-signature"></span>getVideo<span class="signature">(key)</span><span class="type-signature"> → {<a href="Phaser.Video.html">Phaser.Video</a>}</span></h4> </dt> <dd> <div class="description"> <p>Gets a Phaser.Video object from the cache.</p> <p>The object is looked-up based on the key given.</p> <p>Note: If the object cannot be found a <code>console.warn</code> message is displayed.</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 key of the asset to retrieve from the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type"><a href="Phaser.Video.html">Phaser.Video</a></span> - </div> <div class="returns-desc param-desc"> <p>The video object.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1468">line 1468</a> </dt> </dl> </dd> <dt> <h4 class="name " id="getXML"><span class="type-signature"></span>getXML<span class="signature">(key)</span><span class="type-signature"> → {object}</span></h4> </dt> <dd> <div class="description"> <p>Gets an XML object from the cache.</p> <p>The object is looked-up based on the key given.</p> <p>Note: If the object cannot be found a <code>console.warn</code> message is displayed.</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 key of the asset to retrieve from the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">object</span> - </div> <div class="returns-desc param-desc"> <p>The XML object.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1451">line 1451</a> </dt> </dl> </dd> <dt> <h4 class="name " id="hasFrameData"><span class="type-signature"></span>hasFrameData<span class="signature">(key, <span class="optional">cache</span>)</span><span class="type-signature"> → {boolean}</span></h4> </dt> <dd> <div class="description"> <p>Check if the FrameData for the given key exists in the Image 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>Asset key of the frame data to retrieve from the Cache.</p></td> </tr> <tr> <td class="name"><code>cache</code></td> <td class="type"> <span class="param-type">integer</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> Phaser.Cache.IMAGE </td> <td class="description last"><p>The cache to search for the item in.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">boolean</span> - </div> <div class="returns-desc param-desc"> <p>True if the given key has frameData in the cache, otherwise false.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1598">line 1598</a> </dt> </dl> </dd> <dt> <h4 class="name " id="isSoundDecoded"><span class="type-signature"></span>isSoundDecoded<span class="signature">(key)</span><span class="type-signature"> → {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>The key of the asset within the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">boolean</span> - </div> <div class="returns-desc param-desc"> <p>The decoded state of the Sound object.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-840">line 840</a> </dt> </dl> </dd> <dt> <h4 class="name " id="isSoundReady"><span class="type-signature"></span>isSoundReady<span class="signature">(key)</span><span class="type-signature"> → {boolean}</span></h4> </dt> <dd> <div class="description"> <p>Check if the given sound is ready for playback.<br>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>The key of the asset within the cache.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="returns"> <div class="returns-type"> <span class="param-type">boolean</span> - </div> <div class="returns-desc param-desc"> <p>True if the sound is decoded and the device is not touch locked.</p> </div> </div> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-858">line 858</a> </dt> </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 file from the server.</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 key of the asset within the cache.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-763">line 763</a> </dt> </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>Fires the onSoundUnlock event when the sound has completed reloading.</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 key of the asset within the cache.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-788">line 788</a> </dt> </dl> </dd> <dt> <h4 class="name " id="removeBinary"><span class="type-signature"></span>removeBinary<span class="signature">(key)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Removes a binary file from the cache.</p> <p>Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere<br>then it will persist in memory.</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 - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1844">line 1844</a> </dt> </dl> </dd> <dt> <h4 class="name " id="removeBitmapData"><span class="type-signature"></span>removeBitmapData<span class="signature">(key)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Removes a bitmap data from the cache.</p> <p>Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere<br>then it will persist in memory.</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 - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1859">line 1859</a> </dt> </dl> </dd> <dt> <h4 class="name " id="removeBitmapFont"><span class="type-signature"></span>removeBitmapFont<span class="signature">(key)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Removes a bitmap font from the cache.</p> <p>Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere<br>then it will persist in memory.</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 - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1874">line 1874</a> </dt> </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> <p>Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere<br>then it will persist in memory.</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 - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1738">line 1738</a> </dt> </dl> </dd> <dt> <h4 class="name " id="removeImage"><span class="type-signature"></span>removeImage<span class="signature">(key, <span class="optional">destroyBaseTexture</span>)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Removes an image from the cache.</p> <p>You can optionally elect to destroy it as well. This calls BaseTexture.destroy on it.</p> <p>Note that this only removes it from the Phaser Cache. If you still have references to the data elsewhere<br>then it will persist in memory.</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>Key of the asset you want to remove.</p></td> </tr> <tr> <td class="name"><code>destroyBaseTexture</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> true </td> <td class="description last"><p>Should the BaseTexture behind this image also be destroyed?</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1753">line 1753</a> </dt> </dl> </dd> <dt> <h4 class="name " id="removeJSON"><span class="type-signature"></span>removeJSON<span class="signature">(key)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Removes a json object from the cache.</p> <p>Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere<br>then it will persist in memory.</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 - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1889">line 1889</a> </dt> </dl> </dd> <dt> <h4 class="name " id="removePhysics"><span class="type-signature"></span>removePhysics<span class="signature">(key)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Removes a physics data file from the cache.</p> <p>Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere<br>then it will persist in memory.</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 - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1814">line 1814</a> </dt> </dl> </dd> <dt> <h4 class="name " id="removeRenderTexture"><span class="type-signature"></span>removeRenderTexture<span class="signature">(key)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Removes a Render Texture from the cache.</p> <p>Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere<br>then it will persist in memory.</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 - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1949">line 1949</a> </dt> </dl> </dd> <dt> <h4 class="name " id="removeShader"><span class="type-signature"></span>removeShader<span class="signature">(key)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Removes a shader from the cache.</p> <p>Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere<br>then it will persist in memory.</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 - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1934">line 1934</a> </dt> </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> <p>If any <code>Phaser.Sound</code> objects use the audio file in the cache that you remove with this method, they will<br><em>automatically</em> destroy themselves. If you wish to have full control over when Sounds are destroyed then<br>you must finish your house-keeping and destroy them all yourself first, before calling this method.</p> <p>Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere<br>then it will persist in memory.</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 - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1780">line 1780</a> </dt> </dl> </dd> <dt> <h4 class="name " id="removeSpriteSheet"><span class="type-signature"></span>removeSpriteSheet<span class="signature">(key)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Removes a Sprite Sheet from the cache.</p> <p>Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere<br>then it will persist in memory.</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 - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1964">line 1964</a> </dt> </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 file from the cache.</p> <p>Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere<br>then it will persist in memory.</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 - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1799">line 1799</a> </dt> </dl> </dd> <dt> <h4 class="name " id="removeTextureAtlas"><span class="type-signature"></span>removeTextureAtlas<span class="signature">(key)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Removes a Texture Atlas from the cache.</p> <p>Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere<br>then it will persist in memory.</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 - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1979">line 1979</a> </dt> </dl> </dd> <dt> <h4 class="name " id="removeTilemap"><span class="type-signature"></span>removeTilemap<span class="signature">(key)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Removes a tilemap from the cache.</p> <p>Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere<br>then it will persist in memory.</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 - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1829">line 1829</a> </dt> </dl> </dd> <dt> <h4 class="name " id="removeVideo"><span class="type-signature"></span>removeVideo<span class="signature">(key)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Removes a video from the cache.</p> <p>Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere<br>then it will persist in memory.</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 - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1919">line 1919</a> </dt> </dl> </dd> <dt> <h4 class="name " id="removeXML"><span class="type-signature"></span>removeXML<span class="signature">(key)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Removes a xml object from the cache.</p> <p>Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere<br>then it will persist in memory.</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 - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1904">line 1904</a> </dt> </dl> </dd> <dt> <h4 class="name " id="updateFrameData"><span class="type-signature"></span>updateFrameData<span class="signature">(key, frameData, <span class="optional">cache</span>)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Replaces a set of frameData with a new Phaser.FrameData object.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Argument</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>key</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="default"> </td> <td class="description last"><p>The unique key by which you will reference this object.</p></td> </tr> <tr> <td class="name"><code>frameData</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>The new FrameData.</p></td> </tr> <tr> <td class="name"><code>cache</code></td> <td class="type"> <span class="param-type">integer</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> Phaser.Cache.IMAGE </td> <td class="description last"><p>The cache to search. One of the Cache consts such as <code>Phaser.Cache.IMAGE</code> or <code>Phaser.Cache.SOUND</code>.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-1614">line 1614</a> </dt> </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>Updates the sound object in 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 key of the asset within the cache.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source - <a href="src_loader_Cache.js.html">loader/Cache.js</a>, <a href="src_loader_Cache.js.html#sunlight-1-line-806">line 806</a> </dt> </dl> </dd> </dl> </article> </section> </div> <div class="clearfix"></div> <footer> <span class="copyright"> Phaser Copyright © 2012-2016 Photon Storm Ltd. </span> <br /> <span class="jsdoc-message"> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Mon Dec 05 2016 10:04:32 GMT+0000 (GMT Standard Time) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>. </span> </footer> </div> <div class="span3"> <div id="toc"></div> </div> <br clear="both"> </div> </div> <script src="scripts/sunlight.js"></script> <script src="scripts/sunlight.javascript.js"></script> <script src="scripts/sunlight-plugin.doclinks.js"></script> <script src="scripts/sunlight-plugin.linenumbers.js"></script> <script src="scripts/sunlight-plugin.menu.js"></script> <script src="scripts/jquery.min.js"></script> <script src="scripts/jquery.scrollTo.js"></script> <script src="scripts/jquery.localScroll.js"></script> <script src="scripts/bootstrap-dropdown.js"></script> <script src="scripts/toc.js"></script> <script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script> <script> $( function () { $( "#toc" ).toc( { anchorName : function(i, heading, prefix) { return $(heading).attr("id") || ( prefix + i ); }, selectors : "h1,h2,h3,h4", showAndHide : false, scrollTo : 60 } ); $( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" ); $( "#main span[id^='toc']" ).addClass( "toc-shim" ); } ); </script> </body> </html>