UNPKG

phaser

Version:

A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers.

2,965 lines (1,194 loc) 82.4 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Phaser Class: Image</title> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css"> <link type="text/css" rel="stylesheet" href="styles/site.cerulean.css"> </head> <body> <div class="container-fluid"> <div class="navbar navbar-fixed-top navbar-inverse"> <div class="navbar-inner"> <a class="brand" href="index.html">Phaser</a> <ul class="nav"> <li class="dropdown"> <a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b class="caret"></b></a> <ul class="dropdown-menu "> <li class="class-depth-0"> <a href="Phaser.html">Phaser</a> </li> </ul> </li> <li class="dropdown"> <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a> <ul class="dropdown-menu "> <li 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.ArrayList.html">ArrayList</a> </li> <li class="class-depth-1"> <a href="Phaser.AudioSprite.html">AudioSprite</a> </li> <li class="class-depth-1"> <a href="Phaser.BitmapData.html">BitmapData</a> </li> <li class="class-depth-1"> <a href="Phaser.BitmapText.html">BitmapText</a> </li> <li class="class-depth-1"> <a href="Phaser.Button.html">Button</a> </li> <li class="class-depth-1"> <a href="Phaser.Cache.html">Cache</a> </li> <li class="class-depth-1"> <a href="Phaser.Camera.html">Camera</a> </li> <li class="class-depth-1"> <a href="Phaser.Canvas.html">Canvas</a> </li> <li class="class-depth-1"> <a href="Phaser.Circle.html">Circle</a> </li> <li class="class-depth-1"> <a href="Phaser.Color.html">Color</a> </li> <li class="class-depth-1"> <a href="Phaser.Device.html">Device</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.GamepadButton.html">GamepadButton</a> </li> <li class="class-depth-1"> <a href="Phaser.Graphics.html">Graphics</a> </li> <li class="class-depth-1"> <a href="Phaser.Group.html">Group</a> </li> <li class="class-depth-1"> <a href="Phaser.Image.html">Image</a> </li> <li class="class-depth-1"> <a href="Phaser.Input.html">Input</a> </li> <li class="class-depth-1"> <a href="Phaser.InputHandler.html">InputHandler</a> </li> <li class="class-depth-1"> <a href="Phaser.Key.html">Key</a> </li> <li class="class-depth-1"> <a href="Phaser.Keyboard.html">Keyboard</a> </li> <li class="class-depth-1"> <a href="Phaser.Line.html">Line</a> </li> <li class="class-depth-1"> <a href="Phaser.LinkedList.html">LinkedList</a> </li> <li class="class-depth-1"> <a href="Phaser.Loader.html">Loader</a> </li> <li class="class-depth-1"> <a href="Phaser.LoaderParser.html">LoaderParser</a> </li> <li class="class-depth-1"> <a href="Phaser.Math.html">Math</a> </li> <li class="class-depth-1"> <a href="Phaser.Mouse.html">Mouse</a> </li> <li class="class-depth-1"> <a href="Phaser.MSPointer.html">MSPointer</a> </li> <li class="class-depth-1"> <a href="Phaser.Net.html">Net</a> </li> <li class="class-depth-1"> <a href="Phaser.Particle.html">Particle</a> </li> <li class="class-depth-1"> <a href="Phaser.Particles.html">Particles</a> </li> <li class="class-depth-2"> <a href="Phaser.Particles.Arcade.html">Arcade</a> </li> <li class="class-depth-3"> <a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a> </li> <li class="class-depth-1"> <a href="Phaser.Physics.html">Physics</a> </li> <li class="class-depth-2"> <a href="Phaser.Physics.Arcade.html">Arcade</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.Arcade.Body.html">Body</a> </li> <li class="class-depth-2"> <a href="Phaser.Physics.Ninja.html">Ninja</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.Ninja.AABB.html">AABB</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.Ninja.Body.html">Body</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.Ninja.Circle.html">Circle</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.Ninja.Tile.html">Tile</a> </li> <li class="class-depth-2"> <a href="Phaser.Physics.P2.html">P2</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.Body.html">Body</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.Material.html">Material</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.RotationalSpring.html">RotationalSpring</a> </li> <li class="class-depth-3"> <a href="Phaser.Physics.P2.Spring.html">Spring</a> </li> <li class="class-depth-1"> <a href="Phaser.Plugin.html">Plugin</a> </li> <li class="class-depth-1"> <a href="Phaser.PluginManager.html">PluginManager</a> </li> <li class="class-depth-1"> <a href="Phaser.Point.html">Point</a> </li> <li class="class-depth-1"> <a href="Phaser.Pointer.html">Pointer</a> </li> <li class="class-depth-1"> <a href="Phaser.Polygon.html">Polygon</a> </li> <li class="class-depth-1"> <a href="Phaser.QuadTree.html">QuadTree</a> </li> <li class="class-depth-1"> <a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a> </li> <li class="class-depth-1"> <a href="Phaser.Rectangle.html">Rectangle</a> </li> <li class="class-depth-1"> <a href="Phaser.RenderTexture.html">RenderTexture</a> </li> <li class="class-depth-1"> <a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a> </li> <li class="class-depth-1"> <a href="Phaser.RetroFont.html">RetroFont</a> </li> <li class="class-depth-1"> <a href="Phaser.Rope.html">Rope</a> </li> <li class="class-depth-1"> <a href="Phaser.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.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.World.html">World</a> </li> </ul> </li> </ul> </div> </div> <div class="row-fluid"> <div class="span8"> <div id="main"> <h1 class="page-title">Class: Image</h1> <section> <header> <h2> <span class="ancestors"><a href="Phaser.html">Phaser</a>.</span> Image </h2> <div class="class-description"><p>Phaser.Image</p></div> </header> <article> <div class="container-overview"> <dt> <h4 class="name" id="Image"><span class="type-signature"></span>new Image<span class="signature">(game, x, y, key, frame)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>An Image is a light-weight object you can use to display anything that doesn't need physics or animation. It can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.</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> <tr> <td class="name"><code>x</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The x coordinate of the Image. The coordinate is relative to any parent container this Image may be in.</p></td> </tr> <tr> <td class="name"><code>y</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The y coordinate of the Image. The coordinate is relative to any parent container this Image may be in.</p></td> </tr> <tr> <td class="name"><code>key</code></td> <td class="type"> <span class="param-type">string</span> | <span class="param-type"><a href="Phaser.RenderTexture.html">Phaser.RenderTexture</a></span> | <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> | <span class="param-type">PIXI.Texture</span> </td> <td class="description last"><p>The texture used by the Image during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture, BitmapData or PIXI.Texture.</p></td> </tr> <tr> <td class="name"><code>frame</code></td> <td class="type"> <span class="param-type">string</span> | <span class="param-type">number</span> </td> <td class="description last"><p>If this Image is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Image.js.html">gameobjects/Image.js</a>, <a href="Image.js.html#sunlight-1-line-20">line 20</a> </li></ul></dd> </dl> </dd> </div> <h3 class="subsection-title">Extends</h3> <ul> <li>PIXI.Sprite</li> </ul> <h3 class="subsection-title">Members</h3> <dl> <dt> <h4 class="name" id="alive"><span class="type-signature"></span>alive<span class="type-signature"></span></h4> </dt> <dd> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>alive</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="description last"><p>A useful boolean to control if the Image is alive or dead (in terms of your gameplay, it doesn't effect rendering).</p></td> </tr> </tbody> </table> </dl> <dt class="tag-default">Default Value:</dt> <dd class="tag-default"><ul class="dummy"><li>true</li></ul></dd> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Image.js.html">gameobjects/Image.js</a>, <a href="Image.js.html#sunlight-1-line-83">line 83</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="angle"><span class="type-signature"></span>angle<span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Indicates the rotation of the Image, in degrees, from its original orientation. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90. If you wish to work in radians instead of degrees use the property Image.rotation instead. Working in radians is also a little faster as it doesn't have to convert the angle.</p> </div> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>angle</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The angle of this Image in degrees.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Image.js.html">gameobjects/Image.js</a>, <a href="Image.js.html#sunlight-1-line-636">line 636</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="animations"><span class="type-signature"></span>animations<span class="type-signature"></span></h4> </dt> <dd> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>animations</code></td> <td class="type"> <span class="param-type"><a href="Phaser.AnimationManager.html">Phaser.AnimationManager</a></span> </td> <td class="description last"><p>This manages animations of the sprite. You can modify animations through it (see Phaser.AnimationManager)</p></td> </tr> </tbody> </table> </dl> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Image.js.html">gameobjects/Image.js</a>, <a href="Image.js.html#sunlight-1-line-63">line 63</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="autoCull"><span class="type-signature"></span>autoCull<span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Should this Image be automatically culled if out of range of the camera? A culled sprite has its renderable property set to 'false'. Be advised this is quite an expensive operation, as it has to calculate the bounds of the object every frame, so only enable it if you really need it.</p> </div> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>autoCull</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="description last"><p>A flag indicating if the Image should be automatically camera culled or not.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-default">Default Value:</dt> <dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Image.js.html">gameobjects/Image.js</a>, <a href="Image.js.html#sunlight-1-line-93">line 93</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="cameraOffset"><span class="type-signature"></span>cameraOffset<span class="type-signature"></span></h4> </dt> <dd> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>cameraOffset</code></td> <td class="type"> <span class="param-type"><a href="Phaser.Point.html">Phaser.Point</a></span> </td> <td class="description last"><p>If this object is fixedToCamera then this stores the x/y offset that its drawn at, from the top-left of the camera view.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Image.js.html">gameobjects/Image.js</a>, <a href="Image.js.html#sunlight-1-line-109">line 109</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="cropRect"><span class="type-signature"></span>cropRect<span class="type-signature"></span></h4> </dt> <dd> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>cropRect</code></td> <td class="type"> <span class="param-type"><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></span> </td> <td class="description last"><p>The Rectangle used to crop the texture. Set this via Sprite.crop. Any time you modify this property directly you must call Sprite.updateCrop.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-default">Default Value:</dt> <dd class="tag-default"><ul class="dummy"><li>null</li></ul></dd> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Image.js.html">gameobjects/Image.js</a>, <a href="Image.js.html#sunlight-1-line-115">line 115</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="debug"><span class="type-signature"></span>debug<span class="type-signature"></span></h4> </dt> <dd> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>debug</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="description last"><p>Handy flag to use with Game.enableStep</p></td> </tr> </tbody> </table> </dl> <dt class="tag-default">Default Value:</dt> <dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Image.js.html">gameobjects/Image.js</a>, <a href="Image.js.html#sunlight-1-line-104">line 104</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="deltaX"><span class="type-signature">&lt;readonly> </span>deltaX<span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Returns the delta x value. The difference between world.x now and in the previous step.</p> </div> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>deltaX</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The delta value. Positive if the motion was to the right, negative if to the left.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Image.js.html">gameobjects/Image.js</a>, <a href="Image.js.html#sunlight-1-line-660">line 660</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="deltaY"><span class="type-signature">&lt;readonly> </span>deltaY<span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Returns the delta y value. The difference between world.y now and in the previous step.</p> </div> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>deltaY</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The delta value. Positive if the motion was downwards, negative if upwards.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Image.js.html">gameobjects/Image.js</a>, <a href="Image.js.html#sunlight-1-line-677">line 677</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="deltaZ"><span class="type-signature">&lt;readonly> </span>deltaZ<span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Returns the delta z value. The difference between rotation now and in the previous step.</p> </div> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>deltaZ</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The delta value.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Image.js.html">gameobjects/Image.js</a>, <a href="Image.js.html#sunlight-1-line-694">line 694</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="destroyPhase"><span class="type-signature"></span>destroyPhase<span class="type-signature"></span></h4> </dt> <dd> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>destroyPhase</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="description last"><p>True if this object is currently being destroyed.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Image.js.html">gameobjects/Image.js</a>, <a href="Image.js.html#sunlight-1-line-923">line 923</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="events"><span class="type-signature"></span>events<span class="type-signature"></span></h4> </dt> <dd> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>events</code></td> <td class="type"> <span class="param-type"><a href="Phaser.Events.html">Phaser.Events</a></span> </td> <td class="description last"><p>The Events you can subscribe to that are dispatched when certain things happen on this Image or its components.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Image.js.html">gameobjects/Image.js</a>, <a href="Image.js.html#sunlight-1-line-58">line 58</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="exists"><span class="type-signature"></span>exists<span class="type-signature"></span></h4> </dt> <dd> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>exists</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="description last"><p>If exists = false then the Image isn't updated by the core game loop.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-default">Default Value:</dt> <dd class="tag-default"><ul class="dummy"><li>true</li></ul></dd> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Image.js.html">gameobjects/Image.js</a>, <a href="Image.js.html#sunlight-1-line-36">line 36</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="fixedToCamera"><span class="type-signature"></span>fixedToCamera<span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>An Image that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Image.cameraOffset. Note that the cameraOffset values are in addition to any parent in the display list. So if this Image was in a Group that has x: 200, then this will be added to the cameraOffset.x</p> </div> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>fixedToCamera</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="description last"><p>Set to true to fix this Image to the Camera at its current world coordinates.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Image.js.html">gameobjects/Image.js</a>, <a href="Image.js.html#sunlight-1-line-858">line 858</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="frame"><span class="type-signature"></span>frame<span class="type-signature"></span></h4> </dt> <dd> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>frame</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>Gets or sets the current frame index and updates the Texture for display.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Image.js.html">gameobjects/Image.js</a>, <a href="Image.js.html#sunlight-1-line-745">line 745</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="frameName"><span class="type-signature"></span>frameName<span class="type-signature"></span></h4> </dt> <dd> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>frameName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Gets or sets the current frame by name and updates the Texture for display.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Image.js.html">gameobjects/Image.js</a>, <a href="Image.js.html#sunlight-1-line-774">line 774</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="game"><span class="type-signature"></span>game<span class="type-signature"></span></h4> </dt> <dd> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>game</code></td> <td class="type"> <span class="param-type"><a href="Phaser.Game.html">Phaser.Game</a></span> </td> <td class="description last"><p>A reference to the currently running Game.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Image.js.html">gameobjects/Image.js</a>, <a href="Image.js.html#sunlight-1-line-30">line 30</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="inCamera"><span class="type-signature">&lt;readonly> </span>inCamera<span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Checks if the Image bounds are within the game camera, otherwise false if fully outside of it.</p> </div> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>inCamera</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="description last"><p>True if the Image bounds is within the game camera, even if only partially. Otherwise false if fully outside of it.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Image.js.html">gameobjects/Image.js</a>, <a href="Image.js.html#sunlight-1-line-728">line 728</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="input"><span class="type-signature"></span>input<span class="type-signature"></span></h4> </dt> <dd> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>input</code></td> <td class="type"> <span class="param-type"><a href="Phaser.InputHandler.html">Phaser.InputHandler</a></span> | <span class="param-type">null</span> </td> <td class="description last"><p>The Input Handler for this object. Needs to be enabled with image.inputEnabled = true before you can use it.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Image.js.html">gameobjects/Image.js</a>, <a href="Image.js.html#sunlight-1-line-98">line 98</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="inputEnabled"><span class="type-signature"></span>inputEnabled<span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>By default an Image won't process any input events at all. By setting inputEnabled to true the Phaser.InputHandler is activated for this object and it will then start to process click/touch events and more.</p> </div> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>inputEnabled</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="description last"><p>Set to true to allow this object to receive input events.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Image.js.html">gameobjects/Image.js</a>, <a href="Image.js.html#sunlight-1-line-818">line 818</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="inWorld"><span class="type-signature">&lt;readonly> </span>inWorld<span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Checks if the Image bounds are within the game world, otherwise false if fully outside of it.</p> </div> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>inWorld</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="description last"><p>True if the Image bounds is within the game world, even if only partially. Otherwise false if fully outside of