{"classes":[{"name":"PIXI.DisplayObject","description":"The base class for all objects that are rendered. Contains properties for position, scaling,\nrotation, masks and cache handling.\n\nThis is an abstract class and should not be used on its own, rather it should be extended.\n\nIt is used internally by the likes of PIXI.Sprite.","constructor":{"name":"DisplayObject","description":"The base class for all objects that are rendered. Contains properties for position, scaling,\nrotation, masks and cache handling.\n\nThis is an abstract class and should not be used on its own, rather it should be extended.\n\nIt is used internally by the likes of PIXI.Sprite.","parameters":[]},"functions":[],"members":[{"name":"position","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject, relative to its parent container.\n\nThe value of this property does not reflect any positioning happening further up the display list.\nTo obtain that value please see the `worldPosition` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"scale","access":"","virtual":false,"description":"The scale of this DisplayObject. A scale of 1:1 represents the DisplayObject\nat its default size. A value of 0.5 would scale this DisplayObject by half, and so on.\n\nThe value of this property does not reflect any scaling happening further up the display list.\nTo obtain that value please see the `worldScale` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"pivot","access":"","virtual":false,"description":"The pivot point of this DisplayObject that it rotates around. The values are expressed\nin pixel values.","type":{"names":["PIXIPoint"]},"default":""},{"name":"rotation","access":"","virtual":false,"description":"The rotation of this DisplayObject. The value is given, and expressed, in radians, and is based on\na right-handed orientation.\n\nThe value of this property does not reflect any rotation happening further up the display list.\nTo obtain that value please see the `worldRotation` property.","type":{"names":["Number"]},"default":""},{"name":"alpha","access":"","virtual":false,"description":"The alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nPlease note that an object with an alpha value of 0 is skipped during the render pass.\n\nThe value of this property does not reflect any alpha values set further up the display list.\nTo obtain that value please see the `worldAlpha` property.","type":{"names":["Number"]},"default":""},{"name":"visible","access":"","virtual":false,"description":"The visibility of this DisplayObject. A value of `false` makes the object invisible.\nA value of `true` makes it visible. Please note that an object with a visible value of\n`false` is skipped during the render pass. Equally a DisplayObject with visible false will\nnot render any of its children.\n\nThe value of this property does not reflect any visible values set further up the display list.\nTo obtain that value please see the `worldVisible` property.","type":{"names":["Boolean"]},"default":""},{"name":"hitArea","access":"","virtual":false,"description":"This is the defined area that will pick up mouse / touch events. It is null by default.\nSetting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)","type":{"names":["Rectangle","Circle","Ellipse","Polygon"]},"default":""},{"name":"renderable","access":"","virtual":false,"description":"Should this DisplayObject be rendered by the renderer? An object with a renderable value of\n`false` is skipped during the render pass.","type":{"names":["Boolean"]},"default":""},{"name":"parent","access":"","virtual":false,"description":"The parent DisplayObjectContainer that this DisplayObject is a child of.\nAll DisplayObjects must belong to a parent in order to be rendered.\nThe root parent is the Stage object. This property is set automatically when the\nDisplayObject is added to, or removed from, a DisplayObjectContainer.","type":{"names":["PIXIDisplayObjectContainer"]},"default":""},{"name":"worldAlpha","access":"","virtual":false,"description":"The multiplied alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nThis value is the calculated total, based on the alpha values of all parents of this DisplayObjects \nin the display list.\n\nTo obtain, and set, the local alpha value, see the `alpha` property.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"worldTransform","access":"","virtual":false,"description":"The current transform of this DisplayObject.\n\nThis property contains the calculated total, based on the transforms of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIMatrix"]},"default":""},{"name":"worldPosition","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject within the world.\n\nThis property contains the calculated total, based on the positions of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldScale","access":"","virtual":false,"description":"The global scale of this DisplayObject.\n\nThis property contains the calculated total, based on the scales of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldRotation","access":"","virtual":false,"description":"The rotation, in radians, of this DisplayObject.\n\nThis property contains the calculated total, based on the rotations of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"filterArea","access":"","virtual":false,"description":"The rectangular area used by filters when rendering a shader for this DisplayObject.","type":{"names":["Rectangle"]},"default":""},{"name":"_sr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_cr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_bounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_currentBounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_mask","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_cacheAsBitmap","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"_cacheIsDirty","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"x","access":"","virtual":false,"description":"The horizontal position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The vertical position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"worldVisible","access":"","virtual":false,"description":"Indicates if this DisplayObject is visible, based on it, and all of its parents, `visible` property values.","type":{"names":["Boolean"]},"default":""},{"name":"mask","access":"","virtual":false,"description":"Sets a mask for this DisplayObject. A mask is an instance of a Graphics object.\nWhen applied it limits the visible area of this DisplayObject to the shape of the mask.\nUnder a Canvas renderer it uses shape clipping. Under a WebGL renderer it uses a Stencil Buffer.\nTo remove a mask, set this property to `null`.","type":{"names":["PIXIGraphics"]},"default":""},{"name":"filters","access":"","virtual":false,"description":"Sets the filters for this DisplayObject. This is a WebGL only feature, and is ignored by the Canvas\nRenderer. A filter is a shader applied to this DisplayObject. You can modify the placement of the filter\nusing `DisplayObject.filterArea`.\n\nTo remove filters, set this property to `null`.\n\nNote: You cannot have a filter set, and a MULTIPLY Blend Mode active, at the same time. Setting a \nfilter will reset this DisplayObjects blend mode to NORMAL.","type":{"names":["Array"]},"default":""},{"name":"cacheAsBitmap","access":"","virtual":false,"description":"Sets if this DisplayObject should be cached as a bitmap.\n\nWhen invoked it will take a snapshot of the DisplayObject, as it is at that moment, and store it \nin a RenderTexture. This is then used whenever this DisplayObject is rendered. It can provide a\nperformance benefit for complex, but static, DisplayObjects. I.e. those with lots of children.\n\nCached Bitmaps do not track their parents. If you update a property of this DisplayObject, it will not\nre-generate the cached bitmap automatically. To do that you need to call `DisplayObject.updateCache`.\n\nTo remove a cached bitmap, set this property to `null`.","type":{"names":["Boolean"]},"default":""}]},{"name":"PIXI.DisplayObjectContainer","description":"A DisplayObjectContainer represents a collection of display objects.\nIt is the base class of all display objects that act as a container for other objects.","constructor":{"name":"DisplayObjectContainer","description":"A DisplayObjectContainer represents a collection of display objects.\nIt is the base class of all display objects that act as a container for other objects.","parameters":[]},"functions":[{"name":"addChild","description":"Adds a child to the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to add to the container","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"addChildAt","description":"Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child to add","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The index to place the child in","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"swapChildren","description":"Swaps the position of 2 Display Objects within this container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""},{"name":"child2","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}]},{"name":"getChildIndex","description":"Returns the index position of a child DisplayObject instance","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject instance to identify","default":"","optional":"","nullable":""}],"returns":{"type":"Number","description":"The index position of the child display object to identify"}},{"name":"setChildIndex","description":"Changes the position of an existing child in the display object container","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child DisplayObject instance for which you want to change the index number","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The resulting index number for the child display object","default":"","optional":"","nullable":""}]},{"name":"getChildAt","description":"Returns the child at the specified index","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child at the given index, if any."}},{"name":"removeChild","description":"Removes a child from the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to remove","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildAt","description":"Removes a child from the specified index position.","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildren","description":"Removes all children from this container that are within the begin and end indexes.","parameters":[{"name":"beginIndex","type":"Number","description":"The beginning position. Default value is 0.","default":"","optional":"","nullable":""},{"name":"endIndex","type":"Number","description":"The ending position. Default value is size of the container.","default":"","optional":"","nullable":""}]},{"name":"getBounds","description":"Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.","parameters":[{"name":"targetCoordinateSpace","type":["PIXIDisplayObject","PIXIMatrix"],"description":"Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object.","default":"","optional":true,"nullable":""}],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"getLocalBounds","description":"Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.","parameters":[],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"contains","description":"Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}],"returns":{"type":"Boolean","description":""}},{"name":"_renderWebGL","description":"Renders the object using the WebGL renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""}]},{"name":"_renderCanvas","description":"Renders the object using the Canvas renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""}]}],"members":[{"name":"children","access":"","virtual":false,"description":"[read-only] The array of children of this container.","type":{"names":["Array.<DisplayObject>"]},"default":""},{"name":"ignoreChildInput","access":"","virtual":false,"description":"If `ignoreChildInput`  is `false` it will allow this objects _children_ to be considered as valid for Input events.\n\nIf this property is `true` then the children will _not_ be considered as valid for Input events.\n\nNote that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.","type":{"names":["Boolean"]},"default":""},{"name":"width","access":"","virtual":false,"description":"The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"position","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject, relative to its parent container.\n\nThe value of this property does not reflect any positioning happening further up the display list.\nTo obtain that value please see the `worldPosition` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"scale","access":"","virtual":false,"description":"The scale of this DisplayObject. A scale of 1:1 represents the DisplayObject\nat its default size. A value of 0.5 would scale this DisplayObject by half, and so on.\n\nThe value of this property does not reflect any scaling happening further up the display list.\nTo obtain that value please see the `worldScale` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"pivot","access":"","virtual":false,"description":"The pivot point of this DisplayObject that it rotates around. The values are expressed\nin pixel values.","type":{"names":["PIXIPoint"]},"default":""},{"name":"rotation","access":"","virtual":false,"description":"The rotation of this DisplayObject. The value is given, and expressed, in radians, and is based on\na right-handed orientation.\n\nThe value of this property does not reflect any rotation happening further up the display list.\nTo obtain that value please see the `worldRotation` property.","type":{"names":["Number"]},"default":""},{"name":"alpha","access":"","virtual":false,"description":"The alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nPlease note that an object with an alpha value of 0 is skipped during the render pass.\n\nThe value of this property does not reflect any alpha values set further up the display list.\nTo obtain that value please see the `worldAlpha` property.","type":{"names":["Number"]},"default":""},{"name":"visible","access":"","virtual":false,"description":"The visibility of this DisplayObject. A value of `false` makes the object invisible.\nA value of `true` makes it visible. Please note that an object with a visible value of\n`false` is skipped during the render pass. Equally a DisplayObject with visible false will\nnot render any of its children.\n\nThe value of this property does not reflect any visible values set further up the display list.\nTo obtain that value please see the `worldVisible` property.","type":{"names":["Boolean"]},"default":""},{"name":"hitArea","access":"","virtual":false,"description":"This is the defined area that will pick up mouse / touch events. It is null by default.\nSetting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)","type":{"names":["Rectangle","Circle","Ellipse","Polygon"]},"default":""},{"name":"renderable","access":"","virtual":false,"description":"Should this DisplayObject be rendered by the renderer? An object with a renderable value of\n`false` is skipped during the render pass.","type":{"names":["Boolean"]},"default":""},{"name":"parent","access":"","virtual":false,"description":"The parent DisplayObjectContainer that this DisplayObject is a child of.\nAll DisplayObjects must belong to a parent in order to be rendered.\nThe root parent is the Stage object. This property is set automatically when the\nDisplayObject is added to, or removed from, a DisplayObjectContainer.","type":{"names":["PIXIDisplayObjectContainer"]},"default":""},{"name":"worldAlpha","access":"","virtual":false,"description":"The multiplied alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nThis value is the calculated total, based on the alpha values of all parents of this DisplayObjects \nin the display list.\n\nTo obtain, and set, the local alpha value, see the `alpha` property.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"worldTransform","access":"","virtual":false,"description":"The current transform of this DisplayObject.\n\nThis property contains the calculated total, based on the transforms of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIMatrix"]},"default":""},{"name":"worldPosition","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject within the world.\n\nThis property contains the calculated total, based on the positions of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldScale","access":"","virtual":false,"description":"The global scale of this DisplayObject.\n\nThis property contains the calculated total, based on the scales of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldRotation","access":"","virtual":false,"description":"The rotation, in radians, of this DisplayObject.\n\nThis property contains the calculated total, based on the rotations of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"filterArea","access":"","virtual":false,"description":"The rectangular area used by filters when rendering a shader for this DisplayObject.","type":{"names":["Rectangle"]},"default":""},{"name":"_sr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_cr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_bounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_currentBounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_mask","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_cacheAsBitmap","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"_cacheIsDirty","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"x","access":"","virtual":false,"description":"The horizontal position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The vertical position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"worldVisible","access":"","virtual":false,"description":"Indicates if this DisplayObject is visible, based on it, and all of its parents, `visible` property values.","type":{"names":["Boolean"]},"default":""},{"name":"mask","access":"","virtual":false,"description":"Sets a mask for this DisplayObject. A mask is an instance of a Graphics object.\nWhen applied it limits the visible area of this DisplayObject to the shape of the mask.\nUnder a Canvas renderer it uses shape clipping. Under a WebGL renderer it uses a Stencil Buffer.\nTo remove a mask, set this property to `null`.","type":{"names":["PIXIGraphics"]},"default":""},{"name":"filters","access":"","virtual":false,"description":"Sets the filters for this DisplayObject. This is a WebGL only feature, and is ignored by the Canvas\nRenderer. A filter is a shader applied to this DisplayObject. You can modify the placement of the filter\nusing `DisplayObject.filterArea`.\n\nTo remove filters, set this property to `null`.\n\nNote: You cannot have a filter set, and a MULTIPLY Blend Mode active, at the same time. Setting a \nfilter will reset this DisplayObjects blend mode to NORMAL.","type":{"names":["Array"]},"default":""},{"name":"cacheAsBitmap","access":"","virtual":false,"description":"Sets if this DisplayObject should be cached as a bitmap.\n\nWhen invoked it will take a snapshot of the DisplayObject, as it is at that moment, and store it \nin a RenderTexture. This is then used whenever this DisplayObject is rendered. It can provide a\nperformance benefit for complex, but static, DisplayObjects. I.e. those with lots of children.\n\nCached Bitmaps do not track their parents. If you update a property of this DisplayObject, it will not\nre-generate the cached bitmap automatically. To do that you need to call `DisplayObject.updateCache`.\n\nTo remove a cached bitmap, set this property to `null`.","type":{"names":["Boolean"]},"default":""}]},{"name":"PIXI.Sprite","description":"The Sprite object is the base for all textured objects that are rendered to the screen","constructor":{"name":"Sprite","description":"The Sprite object is the base for all textured objects that are rendered to the screen","parameters":[{"name":"texture","type":"PIXI.Texture","description":"The texture for this sprite","default":"","optional":"","nullable":""}]},"functions":[{"name":"setTexture","description":"Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous\ntexture this Sprite was using.","parameters":[{"name":"texture","type":"PIXI.Texture","description":"The PIXI texture that is displayed by the sprite","default":"","optional":"","nullable":""},{"name":"destroy","type":"Boolean","description":"Call Texture.destroy on the current texture before replacing it with the new one?","default":"","optional":true,"nullable":""}]},{"name":"onTextureUpdate","description":"When the texture is updated, this event will fire to update the scale and frame","parameters":[{"name":"event","type":"","description":"-","default":"","optional":"","nullable":""}]},{"name":"getBounds","description":"Returns the bounds of the Sprite as a rectangle.\nThe bounds calculation takes the worldTransform into account.\n\nIt is important to note that the transform is not updated when you call this method.\nSo if this Sprite is the child of a Display Object which has had its transform\nupdated since the last render pass, those changes will not yet have been applied\nto this Sprites worldTransform. If you need to ensure that all parent transforms\nare factored into this getBounds operation then you should call `updateTransform`\non the root most object in this Sprites display list first.","parameters":[{"name":"matrix","type":"Matrix","description":"the transformation matrix of the sprite","default":"","optional":"","nullable":""}],"returns":{"type":"Rectangle","description":"the framing rectangle"}},{"name":"getLocalBounds","description":"Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.","parameters":[],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"_renderWebGL","description":"Renders the object using the WebGL renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""},{"name":"matrix","type":"Matrix","description":"- Optional matrix. If provided the Display Object will be rendered using this matrix, otherwise it will use its worldTransform.","default":"","optional":true,"nullable":""}]},{"name":"_renderCanvas","description":"Renders the object using the Canvas renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""},{"name":"matrix","type":"Matrix","description":"- Optional matrix. If provided the Display Object will be rendered using this matrix, otherwise it will use its worldTransform.","default":"","optional":true,"nullable":""}]},{"name":"addChild","description":"Adds a child to the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to add to the container","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"addChildAt","description":"Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child to add","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The index to place the child in","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"swapChildren","description":"Swaps the position of 2 Display Objects within this container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""},{"name":"child2","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}]},{"name":"getChildIndex","description":"Returns the index position of a child DisplayObject instance","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject instance to identify","default":"","optional":"","nullable":""}],"returns":{"type":"Number","description":"The index position of the child display object to identify"}},{"name":"setChildIndex","description":"Changes the position of an existing child in the display object container","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child DisplayObject instance for which you want to change the index number","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The resulting index number for the child display object","default":"","optional":"","nullable":""}]},{"name":"getChildAt","description":"Returns the child at the specified index","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child at the given index, if any."}},{"name":"removeChild","description":"Removes a child from the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to remove","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildAt","description":"Removes a child from the specified index position.","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildren","description":"Removes all children from this container that are within the begin and end indexes.","parameters":[{"name":"beginIndex","type":"Number","description":"The beginning position. Default value is 0.","default":"","optional":"","nullable":""},{"name":"endIndex","type":"Number","description":"The ending position. Default value is size of the container.","default":"","optional":"","nullable":""}]},{"name":"contains","description":"Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}],"returns":{"type":"Boolean","description":""}}],"members":[{"name":"anchor","access":"","virtual":false,"description":"The anchor sets the origin point of the texture.\nThe default is 0,0 this means the texture's origin is the top left\nSetting than anchor to 0.5,0.5 means the textures origin is centered\nSetting the anchor to 1,1 would mean the textures origin points will be the bottom right corner","type":{"names":["Point"]},"default":""},{"name":"texture","access":"","virtual":false,"description":"The texture that the sprite is using","type":{"names":["PIXI.Texture"]},"default":""},{"name":"_width","access":"private","virtual":false,"description":"The width of the sprite (this is initially set by the texture)","type":{"names":["Number"]},"default":""},{"name":"_height","access":"private","virtual":false,"description":"The height of the sprite (this is initially set by the texture)","type":{"names":["Number"]},"default":""},{"name":"tint","access":"","virtual":false,"description":"The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.","type":{"names":["Number"]},"default":"0xFFFFFF"},{"name":"cachedTint","access":"private","virtual":false,"description":"The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.","type":{"names":["Number"]},"default":"-1"},{"name":"tintedTexture","access":"","virtual":false,"description":"A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)","type":{"names":["Canvas"]},"default":"null"},{"name":"blendMode","access":"","virtual":false,"description":"The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.\n\nWarning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.","type":{"names":["Number"]},"default":"PIXI.blendModes.NORMAL;"},{"name":"shader","access":"","virtual":false,"description":"The shader that will be used to render this Sprite.\nSet to null to remove a current shader.","type":{"names":["PhaserFilter"]},"default":"null"},{"name":"exists","access":"","virtual":false,"description":"Controls if this Sprite is processed by the core Phaser game loops and Group loops.","type":{"names":["Boolean"]},"default":"true"},{"name":"width","access":"","virtual":false,"description":"The width of the sprite, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the sprite, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"children","access":"","virtual":false,"description":"[read-only] The array of children of this container.","type":{"names":["Array.<DisplayObject>"]},"default":""},{"name":"ignoreChildInput","access":"","virtual":false,"description":"If `ignoreChildInput`  is `false` it will allow this objects _children_ to be considered as valid for Input events.\n\nIf this property is `true` then the children will _not_ be considered as valid for Input events.\n\nNote that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.","type":{"names":["Boolean"]},"default":""},{"name":"position","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject, relative to its parent container.\n\nThe value of this property does not reflect any positioning happening further up the display list.\nTo obtain that value please see the `worldPosition` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"scale","access":"","virtual":false,"description":"The scale of this DisplayObject. A scale of 1:1 represents the DisplayObject\nat its default size. A value of 0.5 would scale this DisplayObject by half, and so on.\n\nThe value of this property does not reflect any scaling happening further up the display list.\nTo obtain that value please see the `worldScale` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"pivot","access":"","virtual":false,"description":"The pivot point of this DisplayObject that it rotates around. The values are expressed\nin pixel values.","type":{"names":["PIXIPoint"]},"default":""},{"name":"rotation","access":"","virtual":false,"description":"The rotation of this DisplayObject. The value is given, and expressed, in radians, and is based on\na right-handed orientation.\n\nThe value of this property does not reflect any rotation happening further up the display list.\nTo obtain that value please see the `worldRotation` property.","type":{"names":["Number"]},"default":""},{"name":"alpha","access":"","virtual":false,"description":"The alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nPlease note that an object with an alpha value of 0 is skipped during the render pass.\n\nThe value of this property does not reflect any alpha values set further up the display list.\nTo obtain that value please see the `worldAlpha` property.","type":{"names":["Number"]},"default":""},{"name":"visible","access":"","virtual":false,"description":"The visibility of this DisplayObject. A value of `false` makes the object invisible.\nA value of `true` makes it visible. Please note that an object with a visible value of\n`false` is skipped during the render pass. Equally a DisplayObject with visible false will\nnot render any of its children.\n\nThe value of this property does not reflect any visible values set further up the display list.\nTo obtain that value please see the `worldVisible` property.","type":{"names":["Boolean"]},"default":""},{"name":"hitArea","access":"","virtual":false,"description":"This is the defined area that will pick up mouse / touch events. It is null by default.\nSetting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)","type":{"names":["Rectangle","Circle","Ellipse","Polygon"]},"default":""},{"name":"renderable","access":"","virtual":false,"description":"Should this DisplayObject be rendered by the renderer? An object with a renderable value of\n`false` is skipped during the render pass.","type":{"names":["Boolean"]},"default":""},{"name":"parent","access":"","virtual":false,"description":"The parent DisplayObjectContainer that this DisplayObject is a child of.\nAll DisplayObjects must belong to a parent in order to be rendered.\nThe root parent is the Stage object. This property is set automatically when the\nDisplayObject is added to, or removed from, a DisplayObjectContainer.","type":{"names":["PIXIDisplayObjectContainer"]},"default":""},{"name":"worldAlpha","access":"","virtual":false,"description":"The multiplied alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nThis value is the calculated total, based on the alpha values of all parents of this DisplayObjects \nin the display list.\n\nTo obtain, and set, the local alpha value, see the `alpha` property.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"worldTransform","access":"","virtual":false,"description":"The current transform of this DisplayObject.\n\nThis property contains the calculated total, based on the transforms of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIMatrix"]},"default":""},{"name":"worldPosition","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject within the world.\n\nThis property contains the calculated total, based on the positions of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldScale","access":"","virtual":false,"description":"The global scale of this DisplayObject.\n\nThis property contains the calculated total, based on the scales of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldRotation","access":"","virtual":false,"description":"The rotation, in radians, of this DisplayObject.\n\nThis property contains the calculated total, based on the rotations of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"filterArea","access":"","virtual":false,"description":"The rectangular area used by filters when rendering a shader for this DisplayObject.","type":{"names":["Rectangle"]},"default":""},{"name":"_sr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_cr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_bounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_currentBounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_mask","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_cacheAsBitmap","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"_cacheIsDirty","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"x","access":"","virtual":false,"description":"The horizontal position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The vertical position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"worldVisible","access":"","virtual":false,"description":"Indicates if this DisplayObject is visible, based on it, and all of its parents, `visible` property values.","type":{"names":["Boolean"]},"default":""},{"name":"mask","access":"","virtual":false,"description":"Sets a mask for this DisplayObject. A mask is an instance of a Graphics object.\nWhen applied it limits the visible area of this DisplayObject to the shape of the mask.\nUnder a Canvas renderer it uses shape clipping. Under a WebGL renderer it uses a Stencil Buffer.\nTo remove a mask, set this property to `null`.","type":{"names":["PIXIGraphics"]},"default":""},{"name":"filters","access":"","virtual":false,"description":"Sets the filters for this DisplayObject. This is a WebGL only feature, and is ignored by the Canvas\nRenderer. A filter is a shader applied to this DisplayObject. You can modify the placement of the filter\nusing `DisplayObject.filterArea`.\n\nTo remove filters, set this property to `null`.\n\nNote: You cannot have a filter set, and a MULTIPLY Blend Mode active, at the same time. Setting a \nfilter will reset this DisplayObjects blend mode to NORMAL.","type":{"names":["Array"]},"default":""},{"name":"cacheAsBitmap","access":"","virtual":false,"description":"Sets if this DisplayObject should be cached as a bitmap.\n\nWhen invoked it will take a snapshot of the DisplayObject, as it is at that moment, and store it \nin a RenderTexture. This is then used whenever this DisplayObject is rendered. It can provide a\nperformance benefit for complex, but static, DisplayObjects. I.e. those with lots of children.\n\nCached Bitmaps do not track their parents. If you update a property of this DisplayObject, it will not\nre-generate the cached bitmap automatically. To do that you need to call `DisplayObject.updateCache`.\n\nTo remove a cached bitmap, set this property to `null`.","type":{"names":["Boolean"]},"default":""}]},{"name":"PIXI.CanvasBuffer","description":"Creates a Canvas element of the given size.","constructor":{"name":"CanvasBuffer","description":"Creates a Canvas element of the given size.","parameters":[{"name":"width","type":"Number","description":"the width for the newly created canvas","default":"","optional":"","nullable":""},{"name":"height","type":"Number","description":"the height for the newly created canvas","default":"","optional":"","nullable":""}]},"functions":[{"name":"clear","description":"Clears the canvas that was created by the CanvasBuffer class.","parameters":[]},{"name":"resize","description":"Resizes the canvas to the specified width and height.","parameters":[{"name":"width","type":"Number","description":"the new width of the canvas","default":"","optional":"","nullable":""},{"name":"height","type":"Number","description":"the new height of the canvas","default":"","optional":"","nullable":""}]},{"name":"destroy","description":"Frees the canvas up for use again.","parameters":[]}],"members":[{"name":"width","access":"","virtual":false,"description":"The width of the Canvas in pixels.","type":{"names":["Number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the Canvas in pixels.","type":{"names":["Number"]},"default":""},{"name":"canvas","access":"","virtual":false,"description":"The Canvas object that belongs to this CanvasBuffer.","type":{"names":["HTMLCanvasElement"]},"default":""},{"name":"context","access":"","virtual":false,"description":"A CanvasRenderingContext2D object representing a two-dimensional rendering context.","type":{"names":["CanvasRenderingContext2D"]},"default":""}]},{"name":"PIXI.CanvasMaskManager","description":"A set of functions used to handle masking.","constructor":{"name":"CanvasMaskManager","description":"A set of functions used to handle masking.","parameters":[]},"functions":[{"name":"pushMask","description":"This method adds it to the current stack of masks.","parameters":[{"name":"maskData","type":"Object","description":"the maskData that will be pushed","default":"","optional":"","nullable":""},{"name":"renderSession","type":"Object","description":"The renderSession whose context will be used for this mask manager.","default":"","optional":"","nullable":""}]},{"name":"popMask","description":"Restores the current drawing context to the state it was before the mask was applied.","parameters":[{"name":"renderSession","type":"Object","description":"The renderSession whose context will be used for this mask manager.","default":"","optional":"","nullable":""}]}],"members":[]},{"name":"PIXI.CanvasTinter","description":"Utility methods for Sprite/Texture tinting.","constructor":{"name":"CanvasTinter","description":"Utility methods for Sprite/Texture tinting.","parameters":[]},"functions":[{"name":"getTintedTexture","description":"Basically this method just needs a sprite and a color and tints the sprite with the given color.","parameters":[{"name":"sprite","type":"PIXI.Sprite","description":"the sprite to tint","default":"","optional":"","nullable":""},{"name":"color","type":"Number","description":"the color to use to tint the sprite with","default":"","optional":"","nullable":""}],"returns":{"type":"HTMLCanvasElement","description":"The tinted canvas"}},{"name":"tintWithMultiply","description":"Tint a texture using the \"multiply\" operation.","parameters":[{"name":"texture","type":"PIXI.Texture","description":"the texture to tint","default":"","optional":"","nullable":""},{"name":"color","type":"Number","description":"the color to use to tint the sprite with","default":"","optional":"","nullable":""},{"name":"canvas","type":"HTMLCanvasElement","description":"the current canvas","default":"","optional":"","nullable":""}]},{"name":"tintPerPixel","description":"Tint a texture pixel per pixel.","parameters":[{"name":"texture","type":"PIXI.Texture","description":"the texture to tint","default":"","optional":"","nullable":""},{"name":"color","type":"Number","description":"the color to use to tint the sprite with","default":"","optional":"","nullable":""},{"name":"canvas","type":"HTMLCanvasElement","description":"the current canvas","default":"","optional":"","nullable":""}]}],"members":[]},{"name":"PIXI.CanvasGraphics","description":"A set of functions used by the canvas renderer to draw the primitive graphics data.","constructor":{"name":"CanvasGraphics","description":"A set of functions used by the canvas renderer to draw the primitive graphics data.","parameters":[]},"functions":[],"members":[]},{"name":"PIXI.CanvasRenderer","description":"The CanvasRenderer draws the Stage and all its content onto a 2d canvas. This renderer should be used for browsers that do not support webGL.\nDon't forget to add the CanvasRenderer.view to your DOM or you will not see anything :)","constructor":{"name":"CanvasRenderer","description":"The CanvasRenderer draws the Stage and all its content onto a 2d canvas. This renderer should be used for browsers that do not support webGL.\nDon't forget to add the CanvasRenderer.view to your DOM or you will not see anything :)","parameters":[{"name":"game","type":"PhaserGame","description":"A reference to the Phaser Game instance","default":"","optional":"","nullable":""}]},"functions":[{"name":"render","description":"Renders the DisplayObjectContainer, usually the Phaser.Stage, to this canvas view.","parameters":[{"name":"root","type":["PhaserStage","PIXIDisplayObjectContainer"],"description":"The root element to be rendered.","default":"","optional":"","nullable":""}]},{"name":"destroy","description":"Removes everything from the renderer and optionally removes the Canvas DOM element.","parameters":[{"name":"removeView","type":"Boolean","description":"Removes the Canvas element from the DOM.","default":true,"optional":true,"nullable":""}]},{"name":"resize","description":"Resizes the canvas view to the specified width and height","parameters":[{"name":"width","type":"Number","description":"the new width of the canvas view","default":"","optional":"","nullable":""},{"name":"height","type":"Number","description":"the new height of the canvas view","default":"","optional":"","nullable":""}]},{"name":"renderDisplayObject","description":"Renders a display object","parameters":[{"name":"displayObject","type":"PIXI.DisplayObject","description":"The displayObject to render","default":"","optional":"","nullable":""},{"name":"context","type":"CanvasRenderingContext2D","description":"the context 2d method of the canvas","default":"","optional":"","nullable":""},{"name":"matrix","type":"Matrix","description":"Optional matrix to apply to the display object before rendering.","default":"","optional":true,"nullable":""}]},{"name":"mapBlendModes","description":"Maps Pixi blend modes to canvas blend modes.","parameters":[]}],"members":[{"name":"game","access":"","virtual":false,"description":"","type":{"names":["PhaserGame"]},"default":""},{"name":"type","access":"","virtual":false,"description":"The renderer type.","type":{"names":["Number"]},"default":""},{"name":"resolution","access":"","virtual":false,"description":"The resolution of the canvas.","type":{"names":["Number"]},"default":""},{"name":"clearBeforeRender","access":"","virtual":false,"description":"This sets if the CanvasRenderer will clear the canvas or not before the new render pass.\nIf the Stage is NOT transparent Pixi will use a canvas sized fillRect operation every frame to set the canvas background color.\nIf the Stage is transparent Pixi will use clearRect to clear the canvas every frame.\nDisable this by setting this to false. For example if your game has a canvas filling background image you often don't need this set.","type":{"names":["Boolean"]},"default":""},{"name":"transparent","access":"","virtual":false,"description":"Whether the render view is transparent","type":{"names":["Boolean"]},"default":""},{"name":"autoResize","access":"","virtual":false,"description":"Whether the render view should be resized automatically","type":{"names":["Boolean"]},"default":""},{"name":"width","access":"","virtual":false,"description":"The width of the canvas view","type":{"names":["Number"]},"default":"800"},{"name":"height","access":"","virtual":false,"description":"The height of the canvas view","type":{"names":["Number"]},"default":"600"},{"name":"view","access":"","virtual":false,"description":"The canvas element that everything is drawn to.","type":{"names":["HTMLCanvasElement"]},"default":""},{"name":"context","access":"","virtual":false,"description":"The canvas 2d context that everything is drawn with","type":{"names":["CanvasRenderingContext2D"]},"default":""},{"name":"refresh","access":"","virtual":false,"description":"Boolean flag controlling canvas refresh.","type":{"names":["Boolean"]},"default":""},{"name":"count","access":"","virtual":false,"description":"Internal var.","type":{"names":["Number"]},"default":""},{"name":"CanvasMaskManager","access":"","virtual":false,"description":"Instance of a PIXI.CanvasMaskManager, handles masking when using the canvas renderer","type":{"names":["PIXI.CanvasMaskManager"]},"default":""},{"name":"renderSession","access":"","virtual":false,"description":"The render session is just a bunch of parameter used for rendering","type":{"names":["Object"]},"default":""}]},{"name":"PIXI.ComplexPrimitiveShader","description":"","constructor":{"name":"ComplexPrimitiveShader","description":"","parameters":[{"name":"gl","type":"WebGLContext","description":"the current WebGL drawing context","default":"","optional":"","nullable":""}]},"functions":[{"name":"init","description":"Initialises the shader.","parameters":[]},{"name":"destroy","description":"Destroys the shader.","parameters":[]}],"members":[{"name":"_UID","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"gl","access":"","virtual":false,"description":"","type":{"names":["WebGLContext"]},"default":""},{"name":"program","access":"","virtual":false,"description":"The WebGL program.","type":{"names":["Object"]},"default":""},{"name":"fragmentSrc","access":"","virtual":false,"description":"The fragment shader.","type":{"names":["Array"]},"default":""},{"name":"vertexSrc","access":"","virtual":false,"description":"The vertex shader.","type":{"names":["Array"]},"default":""}]},{"name":"PIXI.PixiFastShader","description":"","constructor":{"name":"PixiFastShader","description":"","parameters":[{"name":"gl","type":"WebGLContext","description":"the current WebGL drawing context","default":"","optional":"","nullable":""}]},"functions":[{"name":"init","description":"Initialises the shader.","parameters":[]},{"name":"destroy","description":"Destroys the shader.","parameters":[]}],"members":[{"name":"_UID","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"gl","access":"","virtual":false,"description":"","type":{"names":["WebGLContext"]},"default":""},{"name":"program","access":"","virtual":false,"description":"The WebGL program.","type":{"names":["Object"]},"default":""},{"name":"fragmentSrc","access":"","virtual":false,"description":"The fragment shader.","type":{"names":["Array"]},"default":""},{"name":"vertexSrc","access":"","virtual":false,"description":"The vertex shader.","type":{"names":["Array"]},"default":""},{"name":"textureCount","access":"","virtual":false,"description":"A local texture counter for multi-texture shaders.","type":{"names":["Number"]},"default":""}]},{"name":"PIXI.PixiShader","description":"","constructor":{"name":"PixiShader","description":"","parameters":[{"name":"gl","type":"WebGLContext","description":"the current WebGL drawing context","default":"","optional":"","nullable":""}]},"functions":[{"name":"init","description":"Initialises the shader.","parameters":[]},{"name":"initUniforms","description":"Initialises the shader uniform values.\n\nUniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/\nhttp://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf","parameters":[]},{"name":"initSampler2D","description":"Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)","parameters":[]},{"name":"syncUniforms","description":"Updates the shader uniform values.","parameters":[]},{"name":"destroy","description":"Destroys the shader.","parameters":[]}],"members":[{"name":"_UID","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"gl","access":"","virtual":false,"description":"","type":{"names":["WebGLContext"]},"default":""},{"name":"program","access":"","virtual":false,"description":"The WebGL program.","type":{"names":["Object"]},"default":""},{"name":"fragmentSrc","access":"","virtual":false,"description":"The fragment shader.","type":{"names":["Array"]},"default":""},{"name":"textureCount","access":"","virtual":false,"description":"A local texture counter for multi-texture shaders.","type":{"names":["Number"]},"default":""},{"name":"firstRun","access":"private","virtual":false,"description":"A local flag","type":{"names":["Boolean"]},"default":""},{"name":"dirty","access":"","virtual":false,"description":"A dirty flag","type":{"names":["Boolean"]},"default":""},{"name":"attributes","access":"private","virtual":false,"description":"Uniform attributes cache.","type":{"names":["Array"]},"default":""},{"name":"defaultVertexSrc","access":"","virtual":false,"description":"The Default Vertex shader source.","type":{"names":["String"]},"default":""}]},{"name":"PIXI.PrimitiveShader","description":"","constructor":{"name":"PrimitiveShader","description":"","parameters":[{"name":"gl","type":"WebGLContext","description":"the current WebGL drawing context","default":"","optional":"","nullable":""}]},"functions":[{"name":"init","description":"Initialises the shader.","parameters":[]},{"name":"destroy","description":"Destroys the shader.","parameters":[]}],"members":[{"name":"_UID","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"gl","access":"","virtual":false,"description":"","type":{"names":["WebGLContext"]},"default":""},{"name":"program","access":"","virtual":false,"description":"The WebGL program.","type":{"names":["Object"]},"default":""},{"name":"fragmentSrc","access":"","virtual":false,"description":"The fragment shader.","type":{"names":["Array"]},"default":""},{"name":"vertexSrc","access":"","virtual":false,"description":"The vertex shader.","type":{"names":["Array"]},"default":""}]},{"name":"PIXI.StripShader","description":"","constructor":{"name":"StripShader","description":"","parameters":[{"name":"gl","type":"WebGLContext","description":"the current WebGL drawing context","default":"","optional":"","nullable":""}]},"functions":[{"name":"init","description":"Initialises the shader.","parameters":[]},{"name":"destroy","description":"Destroys the shader.","parameters":[]}],"members":[{"name":"_UID","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"gl","access":"","virtual":false,"description":"","type":{"names":["WebGLContext"]},"default":""},{"name":"program","access":"","virtual":false,"description":"The WebGL program.","type":{"names":["Object"]},"default":""},{"name":"fragmentSrc","access":"","virtual":false,"description":"The fragment shader.","type":{"names":["Array"]},"default":""},{"name":"fragmentSrc","access":"","virtual":false,"description":"The fragment shader.","type":{"names":["Array"]},"default":""},{"name":"vertexSrc","access":"","virtual":false,"description":"The vertex shader.","type":{"names":["Array"]},"default":""}]},{"name":"PIXI.FilterTexture","description":"","constructor":{"name":"FilterTexture","description":"","parameters":[{"name":"gl","type":"WebGLContext","description":"the current WebGL drawing context","default":"","optional":"","nullable":""},{"name":"width","type":"Number","description":"the horizontal range of the filter","default":"","optional":"","nullable":""},{"name":"height","type":"Number","description":"the vertical range of the filter","default":"","optional":"","nullable":""},{"name":"scaleMode","type":"Number","description":"See {{#crossLink \"PIXI/scaleModes:property\"}}PIXI.scaleModes{{/crossLink}} for possible values","default":"","optional":"","nullable":""}]},"functions":[{"name":"clear","description":"Clears the filter texture.","parameters":[]},{"name":"resize","description":"Resizes the texture to the specified width and height","parameters":[{"name":"width","type":"Number","description":"the new width of the texture","default":"","optional":"","nullable":""},{"name":"height","type":"Number","description":"the new height of the texture","default":"","optional":"","nullable":""}]},{"name":"destroy","description":"Destroys the filter texture.","parameters":[]}],"members":[{"name":"gl","access":"","virtual":false,"description":"","type":{"names":["WebGLContext"]},"default":""},{"name":"frameBuffer","access":"","virtual":false,"description":"","type":{"names":["Object"]},"default":""},{"name":"texture","access":"","virtual":false,"description":"","type":{"names":["Object"]},"default":""}]},{"name":"PIXI.WebGLBlendModeManager","description":"","constructor":{"name":"WebGLBlendModeManager","description":"","parameters":[{"name":"gl","type":"WebGLContext","description":"the current WebGL drawing context","default":"","optional":"","nullable":""}]},"functions":[{"name":"setContext","description":"Sets the WebGL Context.","parameters":[{"name":"gl","type":"WebGLContext","description":"the current WebGL drawing context","default":"","optional":"","nullable":""}]},{"name":"setBlendMode","description":"Sets-up the given blendMode from WebGL's point of view.","parameters":[{"name":"blendMode","type":"Number","description":"the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD","default":"","optional":"","nullable":""}]},{"name":"destroy","description":"Destroys this object.","parameters":[]}],"members":[{"name":"currentBlendMode","access":"","virtual":false,"description":"","type":{"names":["Number"]},"default":""}]},{"name":"PIXI.WebGLFastSpriteBatch","description":"","constructor":{"name":"WebGLFastSpriteBatch","description":"","parameters":[]},"functions":[{"name":"setContext","description":"Sets the WebGL Context.","parameters":[{"name":"gl","type":"WebGLContext","description":"the current WebGL drawing context","default":"","optional":"","nullable":""}]},{"name":"begin","description":"","parameters":[{"name":"spriteBatch","type":"PIXI.WebGLSpriteBatch","description":"-","default":"","optional":"","nullable":""},{"name":"renderSession","type":"Object","description":"-","default":"","optional":"","nullable":""}]},{"name":"end","description":"","parameters":[]},{"name":"render","description":"","parameters":[{"name":"spriteBatch","type":"PIXI.WebGLSpriteBatch","description":"-","default":"","optional":"","nullable":""}]},{"name":"renderSprite","description":"","parameters":[{"name":"sprite","type":"PIXI.Sprite","description":"-","default":"","optional":"","nullable":""}]},{"name":"flush","description":"","parameters":[]},{"name":"stop","description":"","parameters":[]},{"name":"start","description":"","parameters":[]}],"members":[{"name":"vertSize","access":"","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"maxSize","access":"","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"size","access":"","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"vertices","access":"","virtual":false,"description":"Vertex data","type":{"names":["Float32Array"]},"default":""},{"name":"indices","access":"","virtual":false,"description":"Index data","type":{"names":["Uint16Array"]},"default":""},{"name":"vertexBuffer","access":"","virtual":false,"description":"","type":{"names":["Object"]},"default":""},{"name":"indexBuffer","access":"","virtual":false,"description":"","type":{"names":["Object"]},"default":""},{"name":"lastIndexCount","access":"","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"drawing","access":"","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"currentBatchSize","access":"","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"currentBaseTexture","access":"","virtual":false,"description":"","type":{"names":["PIXI.BaseTexture"]},"default":""},{"name":"currentBlendMode","access":"","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"renderSession","access":"","virtual":false,"description":"","type":{"names":["Object"]},"default":""},{"name":"shader","access":"","virtual":false,"description":"","type":{"names":["Object"]},"default":""},{"name":"matrix","access":"","virtual":false,"description":"","type":{"names":["Matrix"]},"default":""}]},{"name":"PIXI.WebGLFilterManager","description":"","constructor":{"name":"WebGLFilterManager","description":"","parameters":[]},"functions":[{"name":"setContext","description":"Initialises the context and the properties.","parameters":[{"name":"gl","type":"WebGLContext","description":"the current WebGL drawing context","default":"","optional":"","nullable":""}]},{"name":"begin","description":"","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""},{"name":"buffer","type":"ArrayBuffer","description":"-","default":"","optional":"","nullable":""}]},{"name":"pushFilter","description":"Applies the filter and adds it to the current filter stack.","parameters":[{"name":"filterBlock","type":"Object","description":"the filter that will be pushed to the current filter stack","default":"","optional":"","nullable":""}]},{"name":"popFilter","description":"Removes the last filter from the filter stack and doesn't return it.","parameters":[]},{"name":"applyFilterPass","description":"Applies the filter to the specified area.","parameters":[{"name":"filter","type":"PhaserFilter","description":"the filter that needs to be applied","default":"","optional":"","nullable":""},{"name":"filterArea","type":"PIXI.Texture","description":"TODO - might need an update","default":"","optional":"","nullable":""},{"name":"width","type":"Number","description":"the horizontal range of the filter","default":"","optional":"","nullable":""},{"name":"height","type":"Number","description":"the vertical range of the filter","default":"","optional":"","nullable":""}]},{"name":"initShaderBuffers","description":"Initialises the shader buffers.","parameters":[]},{"name":"destroy","description":"Destroys the filter and removes it from the filter stack.","parameters":[]}],"members":[{"name":"filterStack","access":"","virtual":false,"description":"","type":{"names":["Array"]},"default":""},{"name":"offsetX","access":"","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"offsetY","access":"","virtual":false,"description":"","type":{"names":["Number"]},"default":""}]},{"name":"PIXI.WebGLGraphics","description":"A set of functions used by the webGL renderer to draw the primitive graphics data","constructor":{"name":"WebGLGraphics","description":"A set of functions used by the webGL renderer to draw the primitive graphics data","parameters":[]},"functions":[{"name":"renderGraphics","description":"Renders the graphics object","parameters":[{"name":"graphics","type":"Graphics","description":"-","default":"","optional":"","nullable":""},{"name":"renderSession","type":"Object","description":"-","default":"","optional":"","nullable":""}]},{"name":"updateGraphics","description":"Updates the graphics object","parameters":[{"name":"graphicsData","type":"Graphics","description":"The graphics object to update","default":"","optional":"","nullable":""},{"name":"gl","type":"WebGLContext","description":"the current WebGL drawing context","default":"","optional":"","nullable":""}]},{"name":"switchMode","description":"","parameters":[{"name":"webGL","type":"WebGLContext","description":"-","default":"","optional":"","nullable":""},{"name":"type","type":"Number","description":"-","default":"","optional":"","nullable":""}]},{"name":"buildRectangle","description":"Builds a rectangle to draw","parameters":[{"name":"graphicsData","type":"Graphics","description":"The graphics object containing all the necessary properties","default":"","optional":"","nullable":""},{"name":"webGLData","type":"Object","description":"-","default":"","optional":"","nullable":""}]},{"name":"buildRoundedRectangle","description":"Builds a rounded rectangle to draw","parameters":[{"name":"graphicsData","type":"Graphics","description":"The graphics object containing all the necessary properties","default":"","optional":"","nullable":""},{"name":"webGLData","type":"Object","description":"-","default":"","optional":"","nullable":""}]},{"name":"quadraticBezierCurve","description":"Calculate the points for a quadratic bezier curve. (helper function..)\nBased on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c","parameters":[{"name":"fromX","type":"Number","description":"Origin point x","default":"","optional":"","nullable":""},{"name":"fromY","type":"Number","description":"Origin point x","default":"","optional":"","nullable":""},{"name":"cpX","type":"Number","description":"Control point x","default":"","optional":"","nullable":""},{"name":"cpY","type":"Number","description":"Control point y","default":"","optional":"","nullable":""},{"name":"toX","type":"Number","description":"Destination point x","default":"","optional":"","nullable":""},{"name":"toY","type":"Number","description":"Destination point y","default":"","optional":"","nullable":""}],"returns":{"type":"Array.<Number>","description":""}},{"name":"buildCircle","description":"Builds a circle to draw","parameters":[{"name":"graphicsData","type":"Graphics","description":"The graphics object to draw","default":"","optional":"","nullable":""},{"name":"webGLData","type":"Object","description":"-","default":"","optional":"","nullable":""}]},{"name":"buildLine","description":"Builds a line to draw","parameters":[{"name":"graphicsData","type":"Graphics","description":"The graphics object containing all the necessary properties","default":"","optional":"","nullable":""},{"name":"webGLData","type":"Object","description":"-","default":"","optional":"","nullable":""}]},{"name":"buildComplexPoly","description":"Builds a complex polygon to draw","parameters":[{"name":"graphicsData","type":"Graphics","description":"The graphics object containing all the necessary properties","default":"","optional":"","nullable":""},{"name":"webGLData","type":"Object","description":"-","default":"","optional":"","nullable":""}]},{"name":"buildPoly","description":"Builds a polygon to draw","parameters":[{"name":"graphicsData","type":"Graphics","description":"The graphics object containing all the necessary properties","default":"","optional":"","nullable":""},{"name":"webGLData","type":"Object","description":"-","default":"","optional":"","nullable":""}]}],"members":[]},{"name":"PIXI.WebGLGraphicsData","description":"","constructor":{"name":"WebGLGraphicsData","description":"","parameters":[]},"functions":[{"name":"reset","description":"","parameters":[]},{"name":"upload","description":"","parameters":[]}],"members":[]},{"name":"PIXI.WebGLMaskManager","description":"","constructor":{"name":"WebGLMaskManager","description":"","parameters":[]},"functions":[{"name":"setContext","description":"Sets the drawing context to the one given in parameter.","parameters":[{"name":"gl","type":"WebGLContext","description":"the current WebGL drawing context","default":"","optional":"","nullable":""}]},{"name":"pushMask","description":"Applies the Mask and adds it to the current filter stack.","parameters":[{"name":"maskData","type":"Array","description":"-","default":"","optional":"","nullable":""},{"name":"renderSession","type":"Object","description":"-","default":"","optional":"","nullable":""}]},{"name":"popMask","description":"Removes the last filter from the filter stack and doesn't return it.","parameters":[{"name":"maskData","type":"Array","description":"-","default":"","optional":"","nullable":""},{"name":"renderSession","type":"Object","description":"an object containing all the useful parameters","default":"","optional":"","nullable":""}]},{"name":"destroy","description":"Destroys the mask stack.","parameters":[]}],"members":[]},{"name":"PIXI.WebGLShaderManager","description":"","constructor":{"name":"WebGLShaderManager","description":"","parameters":[]},"functions":[{"name":"setContext","description":"Initialises the context and the properties.","parameters":[{"name":"gl","type":"WebGLContext","description":"the current WebGL drawing context","default":"","optional":"","nullable":""}]},{"name":"setAttribs","description":"Takes the attributes given in parameters.","parameters":[{"name":"attribs","type":"Array","description":"attribs","default":"","optional":"","nullable":""}]},{"name":"setShader","description":"Sets the current shader.","parameters":[{"name":"shader","type":"","description":"-","default":"","optional":"","nullable":""}]},{"name":"destroy","description":"Destroys this object.","parameters":[]}],"members":[{"name":"maxAttibs","access":"","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"attribState","access":"","virtual":false,"description":"","type":{"names":["Array"]},"default":""},{"name":"tempAttribState","access":"","virtual":false,"description":"","type":{"names":["Array"]},"default":""},{"name":"stack","access":"","virtual":false,"description":"","type":{"names":["Array"]},"default":""}]},{"name":"PIXI.WebGLSpriteBatch","description":"","constructor":{"name":"WebGLSpriteBatch","description":"","parameters":[]},"functions":[{"name":"initDefaultShaders","description":"","parameters":[]},{"name":"CompileVertexShader","description":"","parameters":[{"name":"gl","type":"WebGLContext","description":"the current WebGL drawing context","default":"","optional":"","nullable":""},{"name":"shaderSrc","type":"Array","description":"-","default":"","optional":"","nullable":""}],"returns":{"type":"","description":""}},{"name":"CompileFragmentShader","description":"","parameters":[{"name":"gl","type":"WebGLContext","description":"the current WebGL drawing context","default":"","optional":"","nullable":""},{"name":"shaderSrc","type":"Array","description":"-","default":"","optional":"","nullable":""}],"returns":{"type":"","description":""}},{"name":"_CompileShader","description":"","parameters":[{"name":"gl","type":"WebGLContext","description":"the current WebGL drawing context","default":"","optional":"","nullable":""},{"name":"shaderSrc","type":"Array","description":"-","default":"","optional":"","nullable":""},{"name":"shaderType","type":"Number","description":"-","default":"","optional":"","nullable":""}],"returns":{"type":"","description":""}},{"name":"compileProgram","description":"","parameters":[{"name":"gl","type":"WebGLContext","description":"the current WebGL drawing context","default":"","optional":"","nullable":""},{"name":"vertexSrc","type":"Array","description":"-","default":"","optional":"","nullable":""},{"name":"fragmentSrc","type":"Array","description":"-","default":"","optional":"","nullable":""}],"returns":{"type":"","description":""}},{"name":"setContext","description":"","parameters":[{"name":"gl","type":"WebGLContext","description":"the current WebGL drawing context","default":"","optional":"","nullable":""}]},{"name":"begin","description":"","parameters":[{"name":"renderSession","type":"Object","description":"The RenderSession object","default":"","optional":"","nullable":""}]},{"name":"end","description":"","parameters":[]},{"name":"render","description":"","parameters":[{"name":"sprite","type":"PIXI.Sprite","description":"the sprite to render when using this spritebatch","default":"","optional":"","nullable":""},{"name":"matrix","type":"Matrix","description":"- Optional matrix. If provided the Display Object will be rendered using this matrix, otherwise it will use its worldTransform.","default":"","optional":true,"nullable":""}]},{"name":"renderTilingSprite","description":"Renders a TilingSprite using the spriteBatch.","parameters":[{"name":"sprite","type":"TilingSprite","description":"the sprite to render","default":"","optional":"","nullable":""}]},{"name":"flush","description":"Renders the content and empties the current batch.","parameters":[]},{"name":"renderBatch","description":"","parameters":[{"name":"texture","type":"PIXI.Texture","description":"-","default":"","optional":"","nullable":""},{"name":"size","type":"Number","description":"-","default":"","optional":"","nullable":""},{"name":"startIndex","type":"Number","description":"-","default":"","optional":"","nullable":""}]},{"name":"stop","description":"","parameters":[]},{"name":"start","description":"","parameters":[]},{"name":"destroy","description":"Destroys the SpriteBatch.","parameters":[]}],"members":[{"name":"game","access":"","virtual":false,"description":"","type":{"names":["PhaserGame"]},"default":""},{"name":"vertSize","access":"","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"size","access":"","virtual":false,"description":"The number of images in the SpriteBatch before it flushes","type":{"names":["Number"]},"default":""},{"name":"vertices","access":"","virtual":false,"description":"Holds the vertices","type":{"names":["ArrayBuffer"]},"default":""},{"name":"positions","access":"","virtual":false,"description":"View on the vertices as a Float32Array","type":{"names":["Float32Array"]},"default":""},{"name":"colors","access":"","virtual":false,"description":"View on the vertices as a Uint32Array","type":{"names":["Uint32Array"]},"default":""},{"name":"indices","access":"","virtual":false,"description":"Holds the indices","type":{"names":["Uint16Array"]},"default":""},{"name":"lastIndexCount","access":"","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"drawing","access":"","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"currentBatchSize","access":"","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"currentBaseTexture","access":"","virtual":false,"description":"","type":{"names":["PIXI.BaseTexture"]},"default":""},{"name":"dirty","access":"","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"textures","access":"","virtual":false,"description":"","type":{"names":["Array"]},"default":""},{"name":"blendModes","access":"","virtual":false,"description":"","type":{"names":["Array"]},"default":""},{"name":"shaders","access":"","virtual":false,"description":"","type":{"names":["Array"]},"default":""},{"name":"sprites","access":"","virtual":false,"description":"","type":{"names":["Array"]},"default":""},{"name":"defaultShader","access":"","virtual":false,"description":"","type":{"names":["PhaserFilter"]},"default":""}]},{"name":"PIXI.WebGLStencilManager","description":"","constructor":{"name":"WebGLStencilManager","description":"","parameters":[]},"functions":[{"name":"setContext","description":"Sets the drawing context to the one given in parameter.","parameters":[{"name":"gl","type":"WebGLContext","description":"the current WebGL drawing context","default":"","optional":"","nullable":""}]},{"name":"pushMask","description":"Applies the Mask and adds it to the current filter stack.","parameters":[{"name":"graphics","type":"Graphics","description":"-","default":"","optional":"","nullable":""},{"name":"webGLData","type":"Array","description":"-","default":"","optional":"","nullable":""},{"name":"renderSession","type":"Object","description":"-","default":"","optional":"","nullable":""}]},{"name":"bindGraphics","description":"TODO this does not belong here!","parameters":[{"name":"graphics","type":"Graphics","description":"-","default":"","optional":"","nullable":""},{"name":"webGLData","type":"Array","description":"-","default":"","optional":"","nullable":""},{"name":"renderSession","type":"Object","description":"-","default":"","optional":"","nullable":""}]},{"name":"popStencil","description":"","parameters":[{"name":"graphics","type":"Graphics","description":"-","default":"","optional":"","nullable":""},{"name":"webGLData","type":"Array","description":"-","default":"","optional":"","nullable":""},{"name":"renderSession","type":"Object","description":"-","default":"","optional":"","nullable":""}]},{"name":"destroy","description":"Destroys the mask stack.","parameters":[]}],"members":[]},{"name":"PIXI.WebGLRenderer","description":"The WebGLRenderer draws the stage and all its content onto a webGL enabled canvas. This renderer\nshould be used for browsers that support webGL. This Render works by automatically managing webGLBatchs.\nSo no need for Sprite Batches or Sprite Clouds.\nDon't forget to add the view to your DOM or you will not see anything :)","constructor":{"name":"WebGLRenderer","description":"The WebGLRenderer draws the stage and all its content onto a webGL enabled canvas. This renderer\nshould be used for browsers that support webGL. This Render works by automatically managing webGLBatchs.\nSo no need for Sprite Batches or Sprite Clouds.\nDon't forget to add the view to your DOM or you will not see anything :)","parameters":[{"name":"game","type":"PhaserGame","description":"A reference to the Phaser Game instance","default":"","optional":"","nullable":""}]},"functions":[{"name":"initContext","description":"","parameters":[]},{"name":"setTexturePriority","description":"If Multi Texture support has been enabled, then calling this method will enable batching on the given\ntextures. The texture collection is an array of keys, that map to Phaser.Cache image entries.\n\nThe number of textures that can be batched is dependent on hardware. If you provide more textures\nthan can be batched by the GPU, then only those at the start of the array will be used. Generally\nyou shouldn't provide more than 16 textures to this method. You can check the hardware limit via the\n`maxTextures` property.\n\nYou can also check the property `currentBatchedTextures` at any time, to see which textures are currently\nbeing batched.\n\nTo stop all textures from being batched, call this method again with an empty array.\n\nTo change the textures being batched, call this method with a new array of image keys. The old ones\nwill all be purged out and no-longer batched, and the new ones enabled.\n\nNote: Throws a warning if you haven't enabled Multiple Texture batching support in the Phaser Game config.","parameters":[{"name":"textureNameCollection","type":"Array","description":"An Array of Texture Cache keys to use for multi-texture batching.","default":"","optional":"","nullable":""}],"returns":{"type":"Array","description":"An array containing the texture keys that were enabled for batching."}},{"name":"render","description":"Renders the stage to its webGL view","parameters":[{"name":"stage","type":"Stage","description":"the Stage element to be rendered","default":"","optional":"","nullable":""}]},{"name":"renderDisplayObject","description":"Renders a Display Object.","parameters":[{"name":"displayObject","type":"PIXI.DisplayObject","description":"The DisplayObject to render","default":"","optional":"","nullable":""},{"name":"projection","type":"Point","description":"The projection","default":"","optional":"","nullable":""},{"name":"buffer","type":"Array","description":"a standard WebGL buffer","default":"","optional":"","nullable":""}]},{"name":"resize","description":"Resizes the webGL view to the specified width and height.","parameters":[{"name":"width","type":"Number","description":"the new width of the webGL view","default":"","optional":"","nullable":""},{"name":"height","type":"Number","description":"the new height of the webGL view","default":"","optional":"","nullable":""}]},{"name":"updateCompressedTexture","description":"Updates and creates a WebGL compressed texture for the renderers context.","parameters":[{"name":"texture","type":"PIXI.Texture","description":"the texture to update","default":"","optional":"","nullable":""}],"returns":{"type":"Boolean","description":"True if the texture was successfully bound, otherwise false."}},{"name":"updateTexture","description":"Updates and Creates a WebGL texture for the renderers context.","parameters":[{"name":"texture","type":"PIXI.Texture","description":"the texture to update","default":"","optional":"","nullable":""}],"returns":{"type":"Boolean","description":"True if the texture was successfully bound, otherwise false."}},{"name":"destroy","description":"Removes everything from the renderer (event listeners, spritebatch, etc...)","parameters":[]},{"name":"mapBlendModes","description":"Maps Pixi blend modes to WebGL blend modes.","parameters":[]}],"members":[{"name":"game","access":"","virtual":false,"description":"","type":{"names":["PhaserGame"]},"default":""},{"name":"type","access":"","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"resolution","access":"","virtual":false,"description":"The resolution of the renderer","type":{"names":["Number"]},"default":"1"},{"name":"transparent","access":"","virtual":false,"description":"Whether the render view is transparent","type":{"names":["Boolean"]},"default":""},{"name":"autoResize","access":"","virtual":false,"description":"Whether the render view should be resized automatically","type":{"names":["Boolean"]},"default":""},{"name":"preserveDrawingBuffer","access":"","virtual":false,"description":"The value of the preserveDrawingBuffer flag affects whether or not the contents of the stencil buffer is retained after rendering.","type":{"names":["Boolean"]},"default":""},{"name":"clearBeforeRender","access":"","virtual":false,"description":"This sets if the WebGLRenderer will clear the context texture or not before the new render pass. If true:\nIf the Stage is NOT transparent, Pixi will clear to alpha (0, 0, 0, 0).\nIf the Stage is transparent, Pixi will clear to the target Stage's background color.\nDisable this by setting this to false. For example: if your game has a canvas filling background image, you often don't need this set.","type":{"names":["Boolean"]},"default":""},{"name":"width","access":"","virtual":false,"description":"The width of the canvas view","type":{"names":["Number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the canvas view","type":{"names":["Number"]},"default":""},{"name":"view","access":"","virtual":false,"description":"The canvas element that everything is drawn to","type":{"names":["HTMLCanvasElement"]},"default":""},{"name":"_contextOptions","access":"private","virtual":false,"description":"","type":{"names":["Object"]},"default":""},{"name":"projection","access":"","virtual":false,"description":"","type":{"names":["Point"]},"default":""},{"name":"offset","access":"","virtual":false,"description":"","type":{"names":["Point"]},"default":""},{"name":"shaderManager","access":"","virtual":false,"description":"Deals with managing the shader programs and their attribs","type":{"names":["PIXI.WebGLShaderManager"]},"default":""},{"name":"spriteBatch","access":"","virtual":false,"description":"Manages the rendering of sprites","type":{"names":["PIXI.WebGLSpriteBatch"]},"default":""},{"name":"maskManager","access":"","virtual":false,"description":"Manages the masks using the stencil buffer","type":{"names":["PIXI.WebGLMaskManager"]},"default":""},{"name":"filterManager","access":"","virtual":false,"description":"Manages the filters","type":{"names":["PIXI.WebGLFilterManager"]},"default":""},{"name":"stencilManager","access":"","virtual":false,"description":"Manages the stencil buffer","type":{"names":["PIXI.WebGLStencilManager"]},"default":""},{"name":"blendModeManager","access":"","virtual":false,"description":"Manages the blendModes","type":{"names":["PIXI.WebGLBlendModeManager"]},"default":""},{"name":"renderSession","access":"","virtual":false,"description":"","type":{"names":["Object"]},"default":""},{"name":"currentBatchedTextures","access":"","virtual":false,"description":"","type":{"names":["Array"]},"default":""}]},{"name":"PIXI.BaseTexture","description":"A texture stores the information that represents an image. All textures have a base texture.","constructor":{"name":"BaseTexture","description":"A texture stores the information that represents an image. All textures have a base texture.","parameters":[{"name":"source","type":["String","Canvas"],"description":"the source object (image or canvas)","default":"","optional":"","nullable":""},{"name":"scaleMode","type":"Number","description":"See {{#crossLink \"PIXI/scaleModes:property\"}}PIXI.scaleModes{{/crossLink}} for possible values","default":"","optional":"","nullable":""},{"name":"resolution","type":"Number","description":"the resolution of the texture (for HiDPI displays)","default":"","optional":true,"nullable":""}]},"functions":[{"name":"forceLoaded","description":"Forces this BaseTexture to be set as loaded, with the given width and height.\nThen calls BaseTexture.dirty.\nImportant for when you don't want to modify the source object by forcing in `complete` or dimension properties it may not have.","parameters":[{"name":"width","type":"Number","description":"- The new width to force the BaseTexture to be.","default":"","optional":"","nullable":""},{"name":"height","type":"Number","description":"- The new height to force the BaseTexture to be.","default":"","optional":"","nullable":""}]},{"name":"destroy","description":"Destroys this base texture","parameters":[]},{"name":"updateSourceImage","description":"Changes the source image of the texture","parameters":[{"name":"newSrc","type":"String","description":"the path of the image","default":"","optional":"","nullable":""}]},{"name":"dirty","description":"Sets all glTextures to be dirty.","parameters":[]},{"name":"unloadFromGPU","description":"Removes the base texture from the GPU, useful for managing resources on the GPU.\nAtexture is still 100% usable and will simply be reuploaded if there is a sprite on screen that is using it.","parameters":[]},{"name":"fromCanvas","description":"Helper function that creates a base texture from the given canvas element.","parameters":[{"name":"canvas","type":"Canvas","description":"The canvas element source of the texture","default":"","optional":"","nullable":""},{"name":"scaleMode","type":"Number","description":"See {{#crossLink \"PIXI/scaleModes:property\"}}PIXI.scaleModes{{/crossLink}} for possible values","default":"","optional":"","nullable":""},{"name":"resolution","type":"Number","description":"the resolution of the texture (for HiDPI displays)","default":"","optional":true,"nullable":""}],"returns":{"type":"PIXI.BaseTexture","description":""}}],"members":[{"name":"resolution","access":"","virtual":false,"description":"The Resolution of the texture.","type":{"names":["Number"]},"default":""},{"name":"width","access":"","virtual":false,"description":"[read-only] The width of the base texture set when the image has loaded","type":{"names":["Number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"[read-only] The height of the base texture set when the image has loaded","type":{"names":["Number"]},"default":""},{"name":"scaleMode","access":"","virtual":false,"description":"The scale mode to apply when scaling this texture","type":{"names":["Number"]},"default":"PIXI.scaleModes.LINEAR"},{"name":"hasLoaded","access":"","virtual":false,"description":"[read-only] Set to true once the base texture has loaded","type":{"names":["Boolean"]},"default":""},{"name":"source","access":"","virtual":false,"description":"The image source that is used to create the texture.","type":{"names":["Image"]},"default":""},{"name":"premultipliedAlpha","access":"","virtual":false,"description":"Controls if RGB channels should be pre-multiplied by Alpha  (WebGL only)","type":{"names":["Boolean"]},"default":"true"},{"name":"_glTextures","access":"private","virtual":false,"description":"","type":{"names":["Array"]},"default":""},{"name":"mipmap","access":"","virtual":false,"description":"Set this to true if a mipmap of this texture needs to be generated. This value needs to be set before the texture is used\nAlso the texture must be a power of two size to work","type":{"names":["Boolean"]},"default":""},{"name":"textureIndex","access":"","virtual":false,"description":"The multi texture batching index number.","type":{"names":["Number"]},"default":""},{"name":"_dirty","access":"private","virtual":false,"description":"","type":{"names":["Array"]},"default":""},{"name":"skipRender","access":"","virtual":false,"description":"A BaseTexture can be set to skip the rendering phase in the WebGL Sprite Batch.\n\nYou may want to do this if you have a parent Sprite with no visible texture (i.e. uses the internal `__default` texture)\nthat has children that you do want to render, without causing a batch flush in the process.","type":{"names":["Boolean"]},"default":""},{"name":"_powerOf2","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""}]},{"name":"PIXI.Texture","description":"A texture stores the information that represents an image or part of an image. It cannot be added\nto the display list directly. Instead use it as the texture for a PIXI.Sprite. If no frame is provided then the whole image is used.","constructor":{"name":"Texture","description":"A texture stores the information that represents an image or part of an image. It cannot be added\nto the display list directly. Instead use it as the texture for a PIXI.Sprite. If no frame is provided then the whole image is used.","parameters":[{"name":"baseTexture","type":"PIXI.BaseTexture","description":"The base texture source to create the texture from","default":"","optional":"","nullable":""},{"name":"frame","type":"Rectangle","description":"The rectangle frame of the texture to show","default":"","optional":"","nullable":""},{"name":"crop","type":"Rectangle","description":"The area of original texture","default":"","optional":true,"nullable":""},{"name":"trim","type":"Rectangle","description":"Trimmed texture rectangle","default":"","optional":true,"nullable":""}]},"functions":[{"name":"onBaseTextureLoaded","description":"Called when the base texture is loaded","parameters":[]},{"name":"destroy","description":"Destroys this texture","parameters":[{"name":"destroyBase","type":"Boolean","description":"Whether to destroy the base texture as well","default":"","optional":"","nullable":""}]},{"name":"setFrame","description":"Specifies the region of the baseTexture that this texture will use.","parameters":[{"name":"frame","type":"Rectangle","description":"The frame of the texture to set it to","default":"","optional":"","nullable":""}]},{"name":"_updateUvs","description":"Updates the internal WebGL UV cache.","parameters":[]},{"name":"_updateUvsInverted","description":"Updates the internal WebGL UV cache.","parameters":[]},{"name":"fromCanvas","description":"Helper function that creates a new a Texture based on the given canvas element.","parameters":[{"name":"canvas","type":"Canvas","description":"The canvas element source of the texture","default":"","optional":"","nullable":""},{"name":"scaleMode","type":"Number","description":"See {{#crossLink \"PIXI/scaleModes:property\"}}PIXI.scaleModes{{/crossLink}} for possible values","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.Texture","description":""}}],"members":[{"name":"noFrame","access":"","virtual":false,"description":"Does this Texture have any frame data assigned to it?","type":{"names":["Boolean"]},"default":""},{"name":"baseTexture","access":"","virtual":false,"description":"The base texture that this texture uses.","type":{"names":["PIXI.BaseTexture"]},"default":""},{"name":"frame","access":"","virtual":false,"description":"The frame specifies the region of the base texture that this texture uses","type":{"names":["Rectangle"]},"default":""},{"name":"trim","access":"","virtual":false,"description":"The texture trim data.","type":{"names":["Rectangle"]},"default":""},{"name":"valid","access":"","virtual":false,"description":"This will let the renderer know if the texture is valid. If it's not then it cannot be rendered.","type":{"names":["Boolean"]},"default":""},{"name":"isTiling","access":"","virtual":false,"description":"Is this a tiling texture? As used by the likes of a TilingSprite.","type":{"names":["Boolean"]},"default":""},{"name":"requiresUpdate","access":"","virtual":false,"description":"This will let a renderer know that a texture has been updated (used mainly for webGL uv updates)","type":{"names":["Boolean"]},"default":""},{"name":"requiresReTint","access":"","virtual":false,"description":"This will let a renderer know that a tinted parent has updated its texture.","type":{"names":["Boolean"]},"default":""},{"name":"_uvs","access":"private","virtual":false,"description":"The WebGL UV data cache.","type":{"names":["Object"]},"default":""},{"name":"width","access":"","virtual":false,"description":"The width of the Texture in pixels.","type":{"names":["Number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the Texture in pixels.","type":{"names":["Number"]},"default":""},{"name":"crop","access":"","virtual":false,"description":"This is the area of the BaseTexture image to actually copy to the Canvas / WebGL when rendering,\nirrespective of the actual frame size or placement (which can be influenced by trimmed texture atlases)","type":{"names":["Rectangle"]},"default":""},{"name":"rotated","access":"","virtual":false,"description":"A flag that controls if this frame is rotated or not.\nRotation allows you to use rotated frames in texture atlas packing, it has nothing to do with\nSprite rotation.","type":{"names":["Boolean"]},"default":""}]},{"name":"PIXI.PIXI","description":"Namespace-class for [pixi.js](http://www.pixijs.com/).\n\nContains assorted static properties and enumerations.","constructor":{"name":"PIXI","description":"Namespace-class for [pixi.js](http://www.pixijs.com/).\n\nContains assorted static properties and enumerations.","parameters":[]},"functions":[],"members":[]},{"name":"Phaser.Animation","description":"An Animation instance contains a single animation and the controls to play it.\r\rIt is created by the AnimationManager, consists of Animation.Frame objects and belongs to a single Game Object such as a Sprite.","constructor":{"name":"Animation","description":"An Animation instance contains a single animation and the controls to play it.\r\rIt is created by the AnimationManager, consists of Animation.Frame objects and belongs to a single Game Object such as a Sprite.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"parent","type":"Phaser.Sprite","description":"A reference to the owner of this Animation.","default":"","optional":"","nullable":""},{"name":"name","type":"string","description":"The unique name for this animation, used in playback commands.","default":"","optional":"","nullable":""},{"name":"frameData","type":"Phaser.FrameData","description":"The FrameData object that contains all frames used by this Animation.","default":"","optional":"","nullable":""},{"name":"frames","type":["Array.<number>","Array.<string>"],"description":"An array of numbers or strings indicating which frames to play in which order.","default":"","optional":"","nullable":""},{"name":"frameRate","type":"number","description":"The speed at which the animation should play. The speed is given in frames per second.","default":60,"optional":true,"nullable":""},{"name":"loop","type":"boolean","description":"Whether or not the animation is looped or just plays once.","default":"","optional":true,"nullable":""}]},"functions":[{"name":"play","description":"Plays this animation.\r\rIf you need to jump to a specific frame of this animation, then call `play` and immediately after it,\rset the frame you require (i.e. `animation.play(); animation.frame = 4`).","parameters":[{"name":"frameRate","type":"number","description":"The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used.","default":"","optional":true,"nullable":""},{"name":"loop","type":"boolean","description":"Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.","default":"","optional":true,"nullable":""},{"name":"killOnComplete","type":"boolean","description":"If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Animation","description":"- A reference to this Animation instance."}},{"name":"restart","description":"Sets this animation back to the first frame and restarts the animation.","parameters":[]},{"name":"reverse","description":"Reverses the animation direction.","parameters":[],"returns":{"type":"Phaser.Animation","description":"The animation instance."}},{"name":"reverseOnce","description":"Reverses the animation direction for the current/next animation only\rOnce the onComplete event is called this method will be called again and revert\rthe reversed state.","parameters":[],"returns":{"type":"Phaser.Animation","description":"The animation instance."}},{"name":"setFrame","description":"Sets this animations playback to a given frame with the given ID.","parameters":[{"name":"frameId","type":["string","number"],"description":"The identifier of the frame to set. Can be the name of the frame, the sprite index of the frame, or the animation-local frame index.","default":"","optional":true,"nullable":""},{"name":"useLocalFrameIndex","type":"boolean","description":"If you provide a number for frameId, should it use the numeric indexes of the frameData, or the 0-indexed frame index local to the animation.","default":"","optional":true,"nullable":""}]},{"name":"stop","description":"Stops playback of this animation and set it to a finished state. If a resetFrame is provided it will stop playback and set frame to the first in the animation.\rIf `dispatchComplete` is true it will dispatch the complete events, otherwise they'll be ignored.","parameters":[{"name":"resetFrame","type":"boolean","description":"If true after the animation stops the currentFrame value will be set to the first frame in this animation.","default":"","optional":true,"nullable":""},{"name":"dispatchComplete","type":"boolean","description":"Dispatch the Animation.onComplete and parent.onAnimationComplete events?","default":"","optional":true,"nullable":""}]},{"name":"onPause","description":"Called when the Game enters a paused state.","parameters":[]},{"name":"onResume","description":"Called when the Game resumes from a paused state.","parameters":[]},{"name":"update","description":"Updates this animation. Called automatically by the AnimationManager.","parameters":[]},{"name":"updateCurrentFrame","description":"Changes the currentFrame per the _frameIndex, updates the display state,\rand triggers the update signal.\r\rReturns true if the current frame update was 'successful', false otherwise.","parameters":[{"name":"signalUpdate","type":"boolean","description":"If true the `Animation.onUpdate` signal will be dispatched.","default":"","optional":"","nullable":""},{"name":"fromPlay","type":"boolean","description":"Was this call made from the playing of a new animation?","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the current frame was updated, otherwise false."}},{"name":"next","description":"Advances by the given number of frames in the Animation, taking the loop value into consideration.","parameters":[{"name":"quantity","type":"number","description":"The number of frames to advance.","default":1,"optional":true,"nullable":""}]},{"name":"previous","description":"Moves backwards the given number of frames in the Animation, taking the loop value into consideration.","parameters":[{"name":"quantity","type":"number","description":"The number of frames to move back.","default":1,"optional":true,"nullable":""}]},{"name":"updateFrameData","description":"Changes the FrameData object this Animation is using.","parameters":[{"name":"frameData","type":"Phaser.FrameData","description":"The FrameData object that contains all frames used by this Animation.","default":"","optional":"","nullable":""}]},{"name":"destroy","description":"Cleans up this animation ready for deletion. Nulls all values and references.","parameters":[]},{"name":"complete","description":"Called internally when the animation finishes playback.\rSets the isPlaying and isFinished states and dispatches the onAnimationComplete event if it exists on the parent and local onComplete event.","parameters":[]},{"name":"generateFrameNames","description":"Really handy function for when you are creating arrays of animation data but it's using frame names and not numbers.\rFor example imagine you've got 30 frames named: 'explosion_0001-large' to 'explosion_0030-large'\rYou could use this function to generate those by doing: Phaser.Animation.generateFrameNames('explosion_', 1, 30, '-large', 4);","parameters":[{"name":"prefix","type":"string","description":"The start of the filename. If the filename was 'explosion_0001-large' the prefix would be 'explosion_'.","default":"","optional":"","nullable":""},{"name":"start","type":"number","description":"The number to start sequentially counting from. If your frames are named 'explosion_0001' to 'explosion_0034' the start is 1.","default":"","optional":"","nullable":""},{"name":"stop","type":"number","description":"The number to count to. If your frames are named 'explosion_0001' to 'explosion_0034' the stop value is 34.","default":"","optional":"","nullable":""},{"name":"suffix","type":"string","description":"The end of the filename. If the filename was 'explosion_0001-large' the prefix would be '-large'.","default":"''","optional":true,"nullable":""},{"name":"zeroPad","type":"number","description":"The number of zeros to pad the min and max values with. If your frames are named 'explosion_0001' to 'explosion_0034' then the zeroPad is 4.","default":"","optional":true,"nullable":""}],"returns":{"type":"Array.<string>","description":"An array of framenames."}}],"members":[{"name":"game","access":"","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"_parent","access":"private","virtual":false,"description":"A reference to the parent Sprite that owns this Animation.","type":{"names":["Phaser.Sprite"]},"default":""},{"name":"_frameData","access":"private","virtual":false,"description":"The FrameData the Animation uses.","type":{"names":["Phaser.FrameData"]},"default":""},{"name":"name","access":"","virtual":false,"description":"The user defined name given to this Animation.","type":{"names":["string"]},"default":""},{"name":"_frames","access":"private","virtual":false,"description":"","type":{"names":["array"]},"default":""},{"name":"delay","access":"","virtual":false,"description":"The delay in ms between each frame of the Animation, based on the given frameRate.","type":{"names":["number"]},"default":""},{"name":"loop","access":"","virtual":false,"description":"The loop state of the Animation.","type":{"names":["boolean"]},"default":""},{"name":"loopCount","access":"","virtual":false,"description":"The number of times the animation has looped since it was last started.","type":{"names":["number"]},"default":""},{"name":"killOnComplete","access":"","virtual":false,"description":"Should the parent of this Animation be killed when the animation completes?","type":{"names":["boolean"]},"default":""},{"name":"isFinished","access":"","virtual":false,"description":"The finished state of the Animation. Set to true once playback completes, false during playback.","type":{"names":["boolean"]},"default":""},{"name":"isPlaying","access":"","virtual":false,"description":"The playing state of the Animation. Set to false once playback completes, true during playback.","type":{"names":["boolean"]},"default":""},{"name":"isPaused","access":"","virtual":false,"description":"The paused state of the Animation.","type":{"names":["boolean"]},"default":""},{"name":"_pauseStartTime","access":"private","virtual":false,"description":"The time the animation paused.","type":{"names":["boolean"]},"default":""},{"name":"_frameIndex","access":"private","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"_frameDiff","access":"private","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"_frameSkip","access":"private","virtual":false,"description":"","type":{"names":["number"]},"default":1},{"name":"currentFrame","access":"","virtual":false,"description":"The currently displayed frame of the Animation.","type":{"names":["Phaser.Frame"]},"default":""},{"name":"onStart","access":"","virtual":false,"description":"This event is dispatched when this Animation starts playback.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onUpdate","access":"","virtual":false,"description":"This event is dispatched when the Animation changes frame.\rBy default this event is disabled due to its intensive nature. Enable it with: `Animation.enableUpdate = true`.\rNote that the event is only dispatched with the current frame. In a low-FPS environment Animations\rwill automatically frame-skip to try and claw back time, so do not base your code on expecting to\rreceive a perfectly sequential set of frames from this event.","type":{"names":["Phaser.Signal","null"]},"default":""},{"name":"onComplete","access":"","virtual":false,"description":"This event is dispatched when this Animation completes playback. If the animation is set to loop this is never fired, listen for onLoop instead.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onLoop","access":"","virtual":false,"description":"This event is dispatched when this Animation loops.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"isReversed","access":"","virtual":false,"description":"Indicates if the animation will play backwards.","type":{"names":["boolean"]},"default":""},{"name":"paused","access":"","virtual":false,"description":"Gets and sets the paused state of this Animation.","type":{"names":["boolean"]},"default":""},{"name":"reversed","access":"","virtual":false,"description":"Gets and sets the isReversed state of this Animation.","type":{"names":["boolean"]},"default":""},{"name":"frameTotal","access":"","virtual":false,"description":"The total number of frames in the currently loaded FrameData, or -1 if no FrameData is loaded.","type":{"names":["number"]},"default":""},{"name":"frame","access":"","virtual":false,"description":"Gets or sets the current frame index and updates the Texture Cache for display.","type":{"names":["number"]},"default":""},{"name":"speed","access":"","virtual":false,"description":"Gets or sets the current speed of the animation in frames per second. Changing this in a playing animation will take effect from the next frame. Value must be greater than 0.","type":{"names":["number"]},"default":""},{"name":"enableUpdate","access":"","virtual":false,"description":"Gets or sets if this animation will dispatch the onUpdate events upon changing frame.","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.AnimationManager","description":"The Animation Manager is used to add, play and update Phaser Animations.\rAny Game Object such as Phaser.Sprite that supports animation contains a single AnimationManager instance.","constructor":{"name":"AnimationManager","description":"The Animation Manager is used to add, play and update Phaser Animations.\rAny Game Object such as Phaser.Sprite that supports animation contains a single AnimationManager instance.","parameters":[{"name":"sprite","type":"Phaser.Sprite","description":"A reference to the Game Object that owns this AnimationManager.","default":"","optional":"","nullable":""}]},"functions":[{"name":"loadFrameData","description":"Loads FrameData into the internal temporary vars and resets the frame index to zero.\rThis is called automatically when a new Sprite is created.","parameters":[{"name":"frameData","type":"Phaser.FrameData","description":"The FrameData set to load.","default":"","optional":"","nullable":""},{"name":"frame","type":["string","number"],"description":"The frame to default to.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"Returns `true` if the frame data was loaded successfully, otherwise `false`"}},{"name":"copyFrameData","description":"Loads FrameData into the internal temporary vars and resets the frame index to zero.\rThis is called automatically when a new Sprite is created.","parameters":[{"name":"frameData","type":"Phaser.FrameData","description":"The FrameData set to load.","default":"","optional":"","nullable":""},{"name":"frame","type":["string","number"],"description":"The frame to default to.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"Returns `true` if the frame data was loaded successfully, otherwise `false`"}},{"name":"add","description":"Adds a new animation under the given key. Optionally set the frames, frame rate and loop.\rAnimations added in this way are played back with the play function.","parameters":[{"name":"name","type":"string","description":"The unique (within this Sprite) name for the animation, i.e. \"run\", \"fire\", \"walk\".","default":"","optional":"","nullable":""},{"name":"frames","type":"Array","description":"An array of numbers/strings that correspond to the frames to add to this animation and in which order. e.g. [1, 2, 3] or ['run0', 'run1', run2]). If null then all frames will be used.","default":"","optional":true,"nullable":""},{"name":"frameRate","type":"number","description":"The speed at which the animation should play. The speed is given in frames per second.","default":60,"optional":true,"nullable":""},{"name":"loop","type":"boolean","description":"Whether or not the animation is looped or just plays once.","default":"","optional":true,"nullable":""},{"name":"useNumericIndex","type":"boolean","description":"Are the given frames using numeric indexes (default) or strings?","default":true,"optional":true,"nullable":""}],"returns":{"type":"Phaser.Animation","description":"The Animation object that was created."}},{"name":"validateFrames","description":"Check whether the frames in the given array are valid and exist.","parameters":[{"name":"frames","type":"Array","description":"An array of frames to be validated.","default":"","optional":"","nullable":""},{"name":"useNumericIndex","type":"boolean","description":"Validate the frames based on their numeric index (true) or string index (false)","default":true,"optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if all given Frames are valid, otherwise false."}},{"name":"play","description":"Play an animation based on the given key. The animation should previously have been added via `animations.add`\r\rIf the requested animation is already playing this request will be ignored. \rIf you need to reset an already running animation do so directly on the Animation object itself.\r\rIf you need to jump to a specific frame of this animation, then call `play` and immediately after it,\rset the frame you require (i.e. `animation.play(); animation.frame = 4`).","parameters":[{"name":"name","type":"string","description":"The name of the animation to be played, e.g. \"fire\", \"walk\", \"jump\".","default":"","optional":"","nullable":""},{"name":"frameRate","type":"number","description":"The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used.","default":"","optional":true,"nullable":""},{"name":"loop","type":"boolean","description":"Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.","default":"","optional":true,"nullable":""},{"name":"killOnComplete","type":"boolean","description":"If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Animation","description":"A reference to playing Animation instance."}},{"name":"stop","description":"Stop playback of an animation. If a name is given that specific animation is stopped, otherwise the current animation is stopped.\rThe currentAnim property of the AnimationManager is automatically set to the animation given.","parameters":[{"name":"name","type":"string","description":"The name of the animation to be stopped, e.g. \"fire\". If none is given the currently running animation is stopped.","default":"","optional":true,"nullable":""},{"name":"resetFrame","type":"boolean","description":"When the animation is stopped should the currentFrame be set to the first frame of the animation (true) or paused on the last frame displayed (false)","default":"","optional":true,"nullable":""}]},{"name":"update","description":"The main update function is called by the Sprites update loop. It's responsible for updating animation frames and firing related events.","parameters":[],"returns":{"type":"boolean","description":"True if a new animation frame has been set, otherwise false."}},{"name":"next","description":"Advances by the given number of frames in the current animation, taking the loop value into consideration.","parameters":[{"name":"quantity","type":"number","description":"The number of frames to advance.","default":1,"optional":true,"nullable":""}]},{"name":"previous","description":"Moves backwards the given number of frames in the current animation, taking the loop value into consideration.","parameters":[{"name":"quantity","type":"number","description":"The number of frames to move back.","default":1,"optional":true,"nullable":""}]},{"name":"getAnimation","description":"Returns an animation that was previously added by name.","parameters":[{"name":"name","type":"string","description":"The name of the animation to be returned, e.g. \"fire\".","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Animation","description":"The Animation instance, if found, otherwise null."}},{"name":"refreshFrame","description":"Refreshes the current frame data back to the parent Sprite and also resets the texture data.","parameters":[]},{"name":"destroy","description":"Destroys all references this AnimationManager contains.\rIterates through the list of animations stored in this manager and calls destroy on each of them.","parameters":[]}],"members":[{"name":"sprite","access":"","virtual":false,"description":"A reference to the parent Sprite that owns this AnimationManager.","type":{"names":["Phaser.Sprite"]},"default":""},{"name":"game","access":"","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"currentFrame","access":"","virtual":false,"description":"The currently displayed Frame of animation, if any.\rThis property is only set once an Animation starts playing. Until that point it remains set as `null`.","type":{"names":["Phaser.Frame"]},"default":""},{"name":"currentAnim","access":"","virtual":false,"description":"The currently displayed animation, if any.","type":{"names":["Phaser.Animation"]},"default":""},{"name":"updateIfVisible","access":"","virtual":false,"description":"Update the animation data only while the the sprite is {@link Phaser.Sprite#visible}. Set to `false` to continue updating while the sprite is invisible.","type":{"names":["boolean"]},"default":true},{"name":"isLoaded","access":"","virtual":false,"description":"Set to true once animation data has been loaded.","type":{"names":["boolean"]},"default":""},{"name":"_frameData","access":"private","virtual":false,"description":"A temp. var for holding the currently playing Animations FrameData.","type":{"names":["Phaser.FrameData"]},"default":""},{"name":"_anims","access":"private","virtual":false,"description":"An internal object that stores all of the Animation instances.","type":{"names":["object"]},"default":""},{"name":"_outputFrames","access":"private","virtual":false,"description":"An internal object to help avoid gc.","type":{"names":["object"]},"default":""},{"name":"frameData","access":"","virtual":false,"description":"The current animations FrameData.","type":{"names":["Phaser.FrameData"]},"default":""},{"name":"frameTotal","access":"","virtual":false,"description":"The total number of frames in the currently loaded FrameData, or -1 if no FrameData is loaded.","type":{"names":["number"]},"default":""},{"name":"paused","access":"","virtual":false,"description":"Gets and sets the paused state of the current animation.","type":{"names":["boolean"]},"default":""},{"name":"name","access":"","virtual":false,"description":"Gets the current animation name, if set.","type":{"names":["string"]},"default":""},{"name":"frame","access":"","virtual":false,"description":"Gets or sets the current frame index and updates the Texture Cache for display.","type":{"names":["number"]},"default":""},{"name":"frameName","access":"","virtual":false,"description":"Gets or sets the current frame name and updates the Texture Cache for display.","type":{"names":["string"]},"default":""}]},{"name":"Phaser.AnimationParser","description":"Responsible for parsing sprite sheet and JSON data into the internal FrameData format that Phaser uses for animations.","constructor":{"name":"AnimationParser","description":"Responsible for parsing sprite sheet and JSON data into the internal FrameData format that Phaser uses for animations.","parameters":[]},"functions":[{"name":"spriteSheet","description":"Parse a Sprite Sheet and extract the animation frame data from it.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"key","type":["string","Image"],"description":"The Game.Cache asset key of the Sprite Sheet image or an actual HTML Image element.","default":"","optional":"","nullable":""},{"name":"frameWidth","type":"number","description":"The fixed width of each frame of the animation.","default":"","optional":"","nullable":""},{"name":"frameHeight","type":"number","description":"The fixed height of each frame of the animation.","default":"","optional":"","nullable":""},{"name":"frameMax","type":"number","description":"The total number of animation frames to extract from the Sprite Sheet. The default value of -1 means \"extract all frames\".","default":-1,"optional":true,"nullable":""},{"name":"margin","type":"number","description":"If the frames have been drawn with a margin, specify the amount here.","default":"","optional":true,"nullable":""},{"name":"spacing","type":"number","description":"If the frames have been drawn with spacing between them, specify the amount here.","default":"","optional":true,"nullable":""},{"name":"skipFrames","type":"number","description":"Skip a number of frames. Useful when there are multiple sprite sheets in one image.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.FrameData","description":"A FrameData object containing the parsed frames."}},{"name":"JSONData","description":"Parse the JSON data and extract the animation frame data from it.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"json","type":"object","description":"The JSON data from the Texture Atlas. Must be in Array format.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.FrameData","description":"A FrameData object containing the parsed frames."}},{"name":"JSONDataPyxel","description":"Parse the JSON data and extract the animation frame data from it.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"json","type":"object","description":"The JSON data from the Texture Atlas. Must be in Pyxel JSON format.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.FrameData","description":"A FrameData object containing the parsed frames."}},{"name":"JSONDataHash","description":"Parse the JSON data and extract the animation frame data from it.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"json","type":"object","description":"The JSON data from the Texture Atlas. Must be in JSON Hash format.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.FrameData","description":"A FrameData object containing the parsed frames."}},{"name":"XMLData","description":"Parse the XML data and extract the animation frame data from it.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"xml","type":"object","description":"The XML data from the Texture Atlas. Must be in Starling XML format.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.FrameData","description":"A FrameData object containing the parsed frames."}}],"members":[]},{"name":"glMatrix","description":"","constructor":{"name":"glMatrix","description":"","parameters":[]},"functions":[],"members":[]},{"name":"vec2","description":"","constructor":{"name":"vec2","description":"","parameters":[]},"functions":[],"members":[]},{"name":"vec3","description":"","constructor":{"name":"vec3","description":"","parameters":[]},"functions":[],"members":[]},{"name":"vec4","description":"","constructor":{"name":"vec4","description":"","parameters":[]},"functions":[],"members":[]},{"name":"mat2","description":"","constructor":{"name":"mat2","description":"","parameters":[]},"functions":[],"members":[]},{"name":"mat2d","description":"A mat2d contains six elements defined as:\r<pre>\r[a, c, tx,\r b, d, ty]\r</pre>\rThis is a short form for the 3x3 matrix:\r<pre>\r[a, c, tx,\r b, d, ty,\r 0, 0, 1]\r</pre>\rThe last row is ignored so the array is shorter and operations are faster.","constructor":{"name":"mat2d","description":"A mat2d contains six elements defined as:\r<pre>\r[a, c, tx,\r b, d, ty]\r</pre>\rThis is a short form for the 3x3 matrix:\r<pre>\r[a, c, tx,\r b, d, ty,\r 0, 0, 1]\r</pre>\rThe last row is ignored so the array is shorter and operations are faster.","parameters":[]},"functions":[],"members":[]},{"name":"mat3","description":"","constructor":{"name":"mat3","description":"","parameters":[]},"functions":[],"members":[]},{"name":"mat4","description":"","constructor":{"name":"mat4","description":"","parameters":[]},"functions":[],"members":[]},{"name":"quat","description":"","constructor":{"name":"quat","description":"","parameters":[]},"functions":[],"members":[]},{"name":"Phaser.Frame","description":"A Frame is a single frame of an animation and is part of a FrameData collection.","constructor":{"name":"Frame","description":"A Frame is a single frame of an animation and is part of a FrameData collection.","parameters":[{"name":"index","type":"number","description":"The index of this Frame within the FrameData set it is being added to.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"X position of the frame within the texture image.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the frame within the texture image.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"Width of the frame within the texture image.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"Height of the frame within the texture image.","default":"","optional":"","nullable":""},{"name":"name","type":"string","description":"The name of the frame. In Texture Atlas data this is usually set to the filename.","default":"","optional":"","nullable":""}]},"functions":[{"name":"resize","description":"Adjusts of all the Frame properties based on the given width and height values.","parameters":[{"name":"width","type":"integer","description":"The new width of the Frame.","default":"","optional":"","nullable":""},{"name":"height","type":"integer","description":"The new height of the Frame.","default":"","optional":"","nullable":""}]},{"name":"setTrim","description":"If the frame was trimmed when added to the Texture Atlas this records the trim and source data.","parameters":[{"name":"trimmed","type":"boolean","description":"If this frame was trimmed or not.","default":"","optional":"","nullable":""},{"name":"actualWidth","type":"number","description":"The width of the frame before being trimmed.","default":"","optional":"","nullable":""},{"name":"actualHeight","type":"number","description":"The height of the frame before being trimmed.","default":"","optional":"","nullable":""},{"name":"destX","type":"number","description":"The destination X position of the trimmed frame for display.","default":"","optional":"","nullable":""},{"name":"destY","type":"number","description":"The destination Y position of the trimmed frame for display.","default":"","optional":"","nullable":""},{"name":"destWidth","type":"number","description":"The destination width of the trimmed frame for display.","default":"","optional":"","nullable":""},{"name":"destHeight","type":"number","description":"The destination height of the trimmed frame for display.","default":"","optional":"","nullable":""}]},{"name":"clone","description":"Clones this Frame into a new Phaser.Frame object and returns it.\rNote that all properties are cloned, including the name and index.","parameters":[],"returns":{"type":"Phaser.Frame","description":"An exact copy of this Frame object."}},{"name":"getRect","description":"Returns a Rectangle set to the dimensions of this Frame.","parameters":[{"name":"out","type":"Phaser.Rectangle","description":"A rectangle to copy the frame dimensions to.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Rectangle","description":"A rectangle."}}],"members":[{"name":"index","access":"","virtual":false,"description":"The index of this Frame within the FrameData set it is being added to.","type":{"names":["number"]},"default":""},{"name":"x","access":"","virtual":false,"description":"X position within the image to cut from.","type":{"names":["number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"Y position within the image to cut from.","type":{"names":["number"]},"default":""},{"name":"width","access":"","virtual":false,"description":"Width of the frame.","type":{"names":["number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"Height of the frame.","type":{"names":["number"]},"default":""},{"name":"name","access":"","virtual":false,"description":"Useful for Texture Atlas files (is set to the filename value).","type":{"names":["string"]},"default":""},{"name":"centerX","access":"","virtual":false,"description":"Center X position within the image to cut from.","type":{"names":["number"]},"default":""},{"name":"centerY","access":"","virtual":false,"description":"Center Y position within the image to cut from.","type":{"names":["number"]},"default":""},{"name":"distance","access":"","virtual":false,"description":"The distance from the top left to the bottom-right of this Frame.","type":{"names":["number"]},"default":""},{"name":"rotated","access":"","virtual":false,"description":"Is the frame rotated in the source texture?","type":{"names":["boolean"]},"default":""},{"name":"trimmed","access":"","virtual":false,"description":"Was it trimmed when packed?","type":{"names":["boolean"]},"default":""},{"name":"sourceSizeW","access":"","virtual":false,"description":"Width of the original sprite before it was trimmed.","type":{"names":["number"]},"default":""},{"name":"sourceSizeH","access":"","virtual":false,"description":"Height of the original sprite before it was trimmed.","type":{"names":["number"]},"default":""},{"name":"spriteSourceSizeX","access":"","virtual":false,"description":"X position of the trimmed sprite inside original sprite.","type":{"names":["number"]},"default":""},{"name":"spriteSourceSizeY","access":"","virtual":false,"description":"Y position of the trimmed sprite inside original sprite.","type":{"names":["number"]},"default":""},{"name":"spriteSourceSizeW","access":"","virtual":false,"description":"Width of the trimmed sprite.","type":{"names":["number"]},"default":""},{"name":"spriteSourceSizeH","access":"","virtual":false,"description":"Height of the trimmed sprite.","type":{"names":["number"]},"default":""},{"name":"right","access":"","virtual":false,"description":"The right of the Frame (x + width).","type":{"names":["number"]},"default":""},{"name":"bottom","access":"","virtual":false,"description":"The bottom of the frame (y + height).","type":{"names":["number"]},"default":""}]},{"name":"Phaser.FrameData","description":"FrameData is a container for Frame objects, which are the internal representation of animation data in Phaser.","constructor":{"name":"FrameData","description":"FrameData is a container for Frame objects, which are the internal representation of animation data in Phaser.","parameters":[]},"functions":[{"name":"addFrame","description":"Adds a new Frame to this FrameData collection. Typically called by the Animation.Parser and not directly.","parameters":[{"name":"frame","type":"Phaser.Frame","description":"The frame to add to this FrameData set.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Frame","description":"The frame that was just added."}},{"name":"getFrame","description":"Get a Frame by its numerical index.","parameters":[{"name":"index","type":"number","description":"The index of the frame you want to get.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Frame","description":"The frame, if found."}},{"name":"getFrameByName","description":"Get a Frame by its frame name.","parameters":[{"name":"name","type":"string","description":"The name of the frame you want to get.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Frame","description":"The frame, if found."}},{"name":"checkFrameName","description":"Check if there is a Frame with the given name.","parameters":[{"name":"name","type":"string","description":"The name of the frame you want to check.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the frame is found, otherwise false."}},{"name":"clone","description":"Makes a copy of this FrameData including copies (not references) to all of the Frames it contains.","parameters":[],"returns":{"type":"Phaser.FrameData","description":"A clone of this object, including clones of the Frame objects it contains."}},{"name":"getFrameRange","description":"Returns a range of frames based on the given start and end frame indexes and returns them in an Array.","parameters":[{"name":"start","type":"number","description":"The starting frame index.","default":"","optional":"","nullable":""},{"name":"end","type":"number","description":"The ending frame index.","default":"","optional":"","nullable":""},{"name":"output","type":"Array","description":"If given the results will be appended to the end of this array otherwise a new array will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Array","description":"An array of Frames between the start and end index values, or an empty array if none were found."}},{"name":"getFrames","description":"Returns all of the Frames in this FrameData set where the frame index is found in the input array.\rThe frames are returned in the output array, or if none is provided in a new Array object.","parameters":[{"name":"frames","type":"Array","description":"An Array containing the indexes of the frames to retrieve. If the array is empty or undefined then all frames in the FrameData are returned.","default":"","optional":true,"nullable":""},{"name":"useNumericIndex","type":"boolean","description":"Are the given frames using numeric indexes (default) or strings? (false)","default":true,"optional":true,"nullable":""},{"name":"output","type":"Array","description":"If given the results will be appended to the end of this array otherwise a new array will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Array","description":"An array of all Frames in this FrameData set matching the given names or IDs."}},{"name":"getFrameIndexes","description":"Returns all of the Frame indexes in this FrameData set.\rThe frames indexes are returned in the output array, or if none is provided in a new Array object.","parameters":[{"name":"frames","type":"Array","description":"An Array containing the indexes of the frames to retrieve. If undefined or the array is empty then all frames in the FrameData are returned.","default":"","optional":true,"nullable":""},{"name":"useNumericIndex","type":"boolean","description":"Are the given frames using numeric indexes (default) or strings? (false)","default":true,"optional":true,"nullable":""},{"name":"output","type":"Array","description":"If given the results will be appended to the end of this array otherwise a new array will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Array","description":"An array of all Frame indexes matching the given names or IDs."}},{"name":"destroy","description":"Destroys this FrameData collection by nulling the _frames and _frameNames arrays.","parameters":[]}],"members":[{"name":"_frames","access":"private","virtual":false,"description":"Local array of frames.","type":{"names":["Array"]},"default":""},{"name":"_frameNames","access":"private","virtual":false,"description":"Local array of frame names for name to index conversions.","type":{"names":["Array"]},"default":""},{"name":"total","access":"","virtual":false,"description":"The total number of frames in this FrameData set.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.Camera","description":"A Camera is your view into the game world. It has a position and size and renders only those objects within its field of view.\rThe game automatically creates a single Stage sized camera on boot. Move the camera around the world with Phaser.Camera.x/y","constructor":{"name":"Camera","description":"A Camera is your view into the game world. It has a position and size and renders only those objects within its field of view.\rThe game automatically creates a single Stage sized camera on boot. Move the camera around the world with Phaser.Camera.x/y","parameters":[{"name":"game","type":"Phaser.Game","description":"Game reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"id","type":"number","description":"Not being used at the moment, will be when Phaser supports multiple camera","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"Position of the camera on the X axis","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Position of the camera on the Y axis","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The width of the view rectangle","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height of the view rectangle","default":"","optional":"","nullable":""}]},"functions":[{"name":"boot","description":"Called automatically by Phaser.World.","parameters":[]},{"name":"preUpdate","description":"Camera preUpdate. Sets the total view counter to zero.","parameters":[]},{"name":"follow","description":"Tell the camera which sprite to follow.\r\rYou can set the follow type and a linear interpolation value.\rUse low lerp values (such as 0.1) to automatically smooth the camera motion.\r\rIf you find you're getting a slight \"jitter\" effect when following a Sprite it's probably to do with sub-pixel rendering of the Sprite position.\rThis can be disabled by setting `game.renderer.renderSession.roundPixels = true` to force full pixel rendering.","parameters":[{"name":"target","type":["Phaser.Sprite","Phaser.Image","Phaser.Text"],"description":"The object you want the camera to track. Set to null to not follow anything.","default":"","optional":"","nullable":""},{"name":"style","type":"number","description":"Leverage one of the existing \"deadzone\" presets. If you use a custom deadzone, ignore this parameter and manually specify the deadzone after calling follow().","default":"","optional":true,"nullable":""},{"name":"lerpX","type":"float","description":"A value between 0 and 1. This value specifies the amount of linear interpolation to use when horizontally tracking the target. The closer the value to 1, the faster the camera will track.","default":1,"optional":true,"nullable":""},{"name":"lerpY","type":"float","description":"A value between 0 and 1. This value specifies the amount of linear interpolation to use when vertically tracking the target. The closer the value to 1, the faster the camera will track.","default":1,"optional":true,"nullable":""}]},{"name":"unfollow","description":"Sets the Camera follow target to null, stopping it from following an object if it's doing so.","parameters":[]},{"name":"focusOn","description":"Move the camera focus on a display object instantly.","parameters":[{"name":"displayObject","type":"any","description":"The display object to focus the camera on. Must have visible x/y properties.","default":"","optional":"","nullable":""}]},{"name":"focusOnXY","description":"Move the camera focus on a location instantly.","parameters":[{"name":"x","type":"number","description":"X position.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position.","default":"","optional":"","nullable":""}]},{"name":"shake","description":"This creates a camera shake effect. It works by applying a random amount of additional\rspacing on the x and y axis each frame. You can control the intensity and duration\rof the effect, and if it should effect both axis or just one.\r\rWhen the shake effect ends the signal Camera.onShakeComplete is dispatched.","parameters":[{"name":"intensity","type":"float","description":"The intensity of the camera shake. Given as a percentage of the camera size representing the maximum distance that the camera can move while shaking.","default":0.05,"optional":true,"nullable":""},{"name":"duration","type":"number","description":"The duration of the shake effect in milliseconds.","default":500,"optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If a camera shake effect is already running and force is true it will replace the previous effect, resetting the duration.","default":true,"optional":true,"nullable":""},{"name":"direction","type":"number","description":"The directions in which the camera can shake. Either Phaser.Camera.SHAKE_BOTH, Phaser.Camera.SHAKE_HORIZONTAL or Phaser.Camera.SHAKE_VERTICAL.","default":"Phaser.Camera.SHAKE_BOTH","optional":true,"nullable":""},{"name":"shakeBounds","type":"boolean","description":"Is the effect allowed to shake the camera beyond its bounds (if set?).","default":true,"optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the shake effect was started, otherwise false."}},{"name":"flash","description":"This creates a camera flash effect. It works by filling the game with the solid fill\rcolor specified, and then fading it away to alpha 0 over the duration given.\r\rYou can use this for things such as hit feedback effects.\r\rWhen the effect ends the signal Camera.onFlashComplete is dispatched.","parameters":[{"name":"color","type":"numer","description":"The color of the flash effect. I.e. 0xffffff for white, 0xff0000 for red, etc.","default":"0xffffff","optional":true,"nullable":""},{"name":"duration","type":"number","description":"The duration of the flash effect in milliseconds.","default":500,"optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If a camera flash or fade effect is already running and force is true it will replace the previous effect, resetting the duration.","default":"","optional":true,"nullable":""},{"name":"alpha","type":"numer","description":"The alpha value of the color applied to the flash effect.","default":1,"optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the effect was started, otherwise false."}},{"name":"fade","description":"This creates a camera fade effect. It works by filling the game with the\rcolor specified, over the duration given, ending with a solid fill.\r\rYou can use this for things such as transitioning to a new scene.\r\rThe game will be left 'filled' at the end of this effect, likely obscuring\reverything. In order to reset it you can call `Camera.resetFX` and it will clear the\rfade. Or you can call `Camera.flash` with the same color as the fade, and it will\rreverse the process, bringing the game back into view again.\r\rWhen the effect ends the signal Camera.onFadeComplete is dispatched.","parameters":[{"name":"color","type":"numer","description":"The color the game will fade to. I.e. 0x000000 for black, 0xff0000 for red, etc.","default":"0x000000","optional":true,"nullable":""},{"name":"duration","type":"number","description":"The duration of the fade in milliseconds.","default":500,"optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If a camera flash or fade effect is already running and force is true it will replace the previous effect, resetting the duration.","default":"","optional":true,"nullable":""},{"name":"alpha","type":"numer","description":"The alpha value of the color applied to the fade effect.","default":1,"optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the effect was started, otherwise false."}},{"name":"update","description":"The camera update loop. This is called automatically by the core game loop.","parameters":[]},{"name":"updateFX","description":"Update the camera flash and fade effects.","parameters":[]},{"name":"updateShake","description":"Update the camera shake effect.","parameters":[]},{"name":"updateTarget","description":"Internal method that handles tracking a sprite.","parameters":[]},{"name":"setBoundsToWorld","description":"Update the Camera bounds to match the game world.","parameters":[]},{"name":"checkBounds","description":"Method called to ensure the camera doesn't venture outside of the game world.\rCalled automatically by Camera.update.","parameters":[]},{"name":"setPosition","description":"A helper function to set both the X and Y properties of the camera at once\rwithout having to use game.camera.x and game.camera.y.","parameters":[{"name":"x","type":"number","description":"X position.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position.","default":"","optional":"","nullable":""}]},{"name":"setSize","description":"Sets the size of the view rectangle given the width and height in parameters.","parameters":[{"name":"width","type":"number","description":"The desired width.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The desired height.","default":"","optional":"","nullable":""}]},{"name":"reset","description":"Resets the camera back to 0,0 and un-follows any object it may have been tracking.\rAlso immediately resets any camera effects that may have been running such as\rshake, flash or fade.","parameters":[]},{"name":"resetFX","description":"Resets any active FX, such as a fade or flash and immediately clears it.\rUseful to calling after a fade in order to remove the fade from the Stage.","parameters":[]}],"members":[{"name":"game","access":"","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"world","access":"","virtual":false,"description":"A reference to the game world.","type":{"names":["Phaser.World"]},"default":""},{"name":"id","access":"","virtual":false,"description":"Reserved for future multiple camera set-ups.","type":{"names":["number"]},"default":""},{"name":"view","access":"","virtual":false,"description":"Camera view.\rThe view into the world we wish to render (by default the game dimensions).\rThe x/y values are in world coordinates, not screen coordinates, the width/height is how many pixels to render.\rSprites outside of this view are not rendered if Sprite.autoCull is set to `true`. Otherwise they are always rendered.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"bounds","access":"","virtual":false,"description":"The Camera is bound to this Rectangle and cannot move outside of it. By default it is enabled and set to the size of the World.\rThe Rectangle can be located anywhere in the world and updated as often as you like. If you don't wish the Camera to be bound\rat all then set this to null. The values can be anything and are in World coordinates, with 0,0 being the top-left of the world. The Rectangle in which the Camera is bounded. Set to null to allow for movement anywhere.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"deadzone","access":"","virtual":false,"description":"Moving inside this Rectangle will not cause the camera to move.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"visible","access":"","virtual":false,"description":"Whether this camera is visible or not.","type":{"names":["boolean"]},"default":true},{"name":"roundPx","access":"","virtual":false,"description":"If a Camera has roundPx set to `true` it will call `view.floor` as part of its update loop, keeping its boundary to integer values. Set this to `false` to disable this from happening.","type":{"names":["boolean"]},"default":true},{"name":"atLimit","access":"","virtual":false,"description":"Whether this camera is flush with the World Bounds or not.","type":{"names":["boolean"]},"default":""},{"name":"target","access":"","virtual":false,"description":"If the camera is tracking a Sprite, this is a reference to it, otherwise null.","type":{"names":["Phaser.Sprite"]},"default":""},{"name":"displayObject","access":"","virtual":false,"description":"The display object to which all game objects are added. Set by World.boot.","type":{"names":["PIXI.DisplayObject"]},"default":""},{"name":"scale","access":"","virtual":false,"description":"The scale of the display object to which all game objects are added. Set by World.boot.","type":{"names":["Phaser.Point"]},"default":""},{"name":"totalInView","access":"","virtual":false,"description":"The total number of Sprites with `autoCull` set to `true` that are visible by this Camera.","type":{"names":["number"]},"default":""},{"name":"lerp","access":"","virtual":false,"description":"The linear interpolation value to use when following a target.\rThe default values of 1 means the camera will instantly snap to the target coordinates.\rA lower value, such as 0.1 means the camera will more slowly track the target, giving\ra smooth transition. You can set the horizontal and vertical values independently, and also\radjust this value in real-time during your game.","type":{"names":["Phaser.Point"]},"default":""},{"name":"onShakeComplete","access":"","virtual":false,"description":"This signal is dispatched when the camera shake effect completes.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onFlashComplete","access":"","virtual":false,"description":"This signal is dispatched when the camera flash effect completes.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onFadeComplete","access":"","virtual":false,"description":"This signal is dispatched when the camera fade effect completes.\rWhen the fade effect completes you will be left with the screen black (or whatever\rcolor you faded to). In order to reset this call `Camera.resetFX`. This is called\rautomatically when you change State.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"fx","access":"protected","virtual":false,"description":"The Graphics object used to handle camera fx such as fade and flash.","type":{"names":["Phaser.Graphics"]},"default":""},{"name":"_targetPosition","access":"private","virtual":false,"description":"Internal point used to calculate target position.","type":{"names":["Phaser.Point"]},"default":""},{"name":"_edge","access":"private","virtual":false,"description":"Edge property.","type":"","default":""},{"name":"_position","access":"private","virtual":false,"description":"Current position of the camera in world.","type":"","default":""},{"name":"_shake","access":"private","virtual":false,"description":"The shake effect container.","type":{"names":["Object"]},"default":""},{"name":"_fxDuration","access":"private","virtual":false,"description":"FX duration timer.","type":{"names":["number"]},"default":""},{"name":"_fxType","access":"private","virtual":false,"description":"The FX type running.","type":{"names":["number"]},"default":""},{"name":"FOLLOW_LOCKON","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"FOLLOW_PLATFORMER","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"FOLLOW_TOPDOWN","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"FOLLOW_TOPDOWN_TIGHT","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"SHAKE_BOTH","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"SHAKE_HORIZONTAL","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"SHAKE_VERTICAL","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"ENABLE_FX","access":"","virtual":false,"description":"","type":{"names":["boolean"]},"default":""},{"name":"x","access":"","virtual":false,"description":"The Cameras x coordinate. This value is automatically clamped if it falls outside of the World bounds. Gets or sets the cameras x position.","type":{"names":["number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The Cameras y coordinate. This value is automatically clamped if it falls outside of the World bounds. Gets or sets the cameras y position.","type":{"names":["number"]},"default":""},{"name":"position","access":"","virtual":false,"description":"The Cameras position. This value is automatically clamped if it falls outside of the World bounds. Gets or sets the cameras xy position using Phaser.Point object.","type":{"names":["Phaser.Point"]},"default":""},{"name":"width","access":"","virtual":false,"description":"The Cameras width. By default this is the same as the Game size and should not be adjusted for now. Gets or sets the cameras width.","type":{"names":["number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The Cameras height. By default this is the same as the Game size and should not be adjusted for now. Gets or sets the cameras height.","type":{"names":["number"]},"default":""},{"name":"shakeIntensity","access":"","virtual":false,"description":"The Cameras shake intensity. Gets or sets the cameras shake intensity.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.Create","description":"The Phaser.Create class is a collection of smaller helper methods that allow you to generate game content\rquickly and easily, without the need for any external files. You can create textures for sprites and in\rcoming releases we'll add dynamic sound effect generation support as well (like sfxr).\r\rAccess this via `Game.create` (`this.game.create` from within a State object)","constructor":{"name":"Create","description":"The Phaser.Create class is a collection of smaller helper methods that allow you to generate game content\rquickly and easily, without the need for any external files. You can create textures for sprites and in\rcoming releases we'll add dynamic sound effect generation support as well (like sfxr).\r\rAccess this via `Game.create` (`this.game.create` from within a State object)","parameters":[{"name":"game","type":"Phaser.Game","description":"Game reference to the currently running game.","default":"","optional":"","nullable":""}]},"functions":[{"name":"texture","description":"Generates a new PIXI.Texture from the given data, which can be applied to a Sprite.\r\rThis allows you to create game graphics quickly and easily, with no external files but that use actual proper images\rrather than Phaser.Graphics objects, which are expensive to render and limited in scope.\r\rEach element of the array is a string holding the pixel color values, as mapped to one of the Phaser.Create PALETTE consts.\r\rFor example:\r\r`var data = [\r  ' 333 ',\r  ' 777 ',\r  'E333E',\r  ' 333 ',\r  ' 3 3 '\r];`\r\r`game.create.texture('bob', data);`\r\rThe above will create a new texture called `bob`, which will look like a little man wearing a hat. You can then use it\rfor sprites the same way you use any other texture: `game.add.sprite(0, 0, 'bob');`","parameters":[{"name":"key","type":"string","description":"The key used to store this texture in the Phaser Cache.","default":"","optional":"","nullable":""},{"name":"data","type":"array","description":"An array of pixel data.","default":"","optional":"","nullable":""},{"name":"pixelWidth","type":"integer","description":"The width of each pixel.","default":8,"optional":true,"nullable":""},{"name":"pixelHeight","type":"integer","description":"The height of each pixel.","default":8,"optional":true,"nullable":""},{"name":"palette","type":"integer","description":"The palette to use when rendering the texture. One of the Phaser.Create.PALETTE consts.","default":"","optional":true,"nullable":""}],"returns":{"type":"PIXI.Texture","description":"The newly generated texture."}},{"name":"grid","description":"Creates a grid texture based on the given dimensions.","parameters":[{"name":"key","type":"string","description":"The key used to store this texture in the Phaser Cache.","default":"","optional":"","nullable":""},{"name":"width","type":"integer","description":"The width of the grid in pixels.","default":"","optional":"","nullable":""},{"name":"height","type":"integer","description":"The height of the grid in pixels.","default":"","optional":"","nullable":""},{"name":"cellWidth","type":"integer","description":"The width of the grid cells in pixels.","default":"","optional":"","nullable":""},{"name":"cellHeight","type":"integer","description":"The height of the grid cells in pixels.","default":"","optional":"","nullable":""},{"name":"color","type":"string","description":"The color to draw the grid lines in. Should be a Canvas supported color string like `#ff5500` or `rgba(200,50,3,0.5)`.","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.Texture","description":"The newly generated texture."}}],"members":[{"name":"game","access":"","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"bmd","access":"","virtual":false,"description":"The internal BitmapData Create uses to generate textures from.","type":{"names":["Phaser.BitmapData"]},"default":""},{"name":"canvas","access":"","virtual":false,"description":"The canvas the BitmapData uses.","type":{"names":["HTMLCanvasElement"]},"default":""},{"name":"ctx","access":"","virtual":false,"description":"The 2d context of the canvas.","type":"","default":""},{"name":"palettes","access":"","virtual":false,"description":"A range of 16 color palettes for use with sprite generation.","type":{"names":["array"]},"default":""},{"name":"PALETTE_ARNE","access":"","virtual":false,"description":"A 16 color palette by [Arne](http://androidarts.com/palette/16pal.htm)","type":{"names":["number"]},"default":""},{"name":"PALETTE_JMP","access":"","virtual":false,"description":"A 16 color JMP inspired palette.","type":{"names":["number"]},"default":""},{"name":"PALETTE_CGA","access":"","virtual":false,"description":"A 16 color CGA inspired palette.","type":{"names":["number"]},"default":""},{"name":"PALETTE_C64","access":"","virtual":false,"description":"A 16 color C64 inspired palette.","type":{"names":["number"]},"default":""},{"name":"PALETTE_JAPANESE_MACHINE","access":"","virtual":false,"description":"A 16 color palette inspired by Japanese computers like the MSX.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.Filter","description":"This is a base Filter class to use for any Phaser filter development.\rIf you want to make a custom filter, this should be your base class.\r\rThe default uniforms, types and values for all Filters are:\r\r```\rresolution: { type: '2f', value: { x: 256, y: 256 }}\rtime: { type: '1f', value: 0 }\rmouse: { type: '2f', value: { x: 0.0, y: 0.0 } }\rdate: { type: '4fv', value: [ d.getFullYear(),  d.getMonth(),  d.getDate(), d.getHours() *60 * 60 + d.getMinutes() * 60 + d.getSeconds() ] }\rsampleRate: { type: '1f', value: 44100.0 }\riChannel0: { type: 'sampler2D', value: null, textureData: { repeat: true } }\riChannel1: { type: 'sampler2D', value: null, textureData: { repeat: true } }\riChannel2: { type: 'sampler2D', value: null, textureData: { repeat: true } }\riChannel3: { type: 'sampler2D', value: null, textureData: { repeat: true } }\r```\r\rThe vast majority of filters (including all of those that ship with Phaser) use fragment shaders, and\rtherefore only work in WebGL and are not supported by Canvas at all.","constructor":{"name":"Filter","description":"This is a base Filter class to use for any Phaser filter development.\rIf you want to make a custom filter, this should be your base class.\r\rThe default uniforms, types and values for all Filters are:\r\r```\rresolution: { type: '2f', value: { x: 256, y: 256 }}\rtime: { type: '1f', value: 0 }\rmouse: { type: '2f', value: { x: 0.0, y: 0.0 } }\rdate: { type: '4fv', value: [ d.getFullYear(),  d.getMonth(),  d.getDate(), d.getHours() *60 * 60 + d.getMinutes() * 60 + d.getSeconds() ] }\rsampleRate: { type: '1f', value: 44100.0 }\riChannel0: { type: 'sampler2D', value: null, textureData: { repeat: true } }\riChannel1: { type: 'sampler2D', value: null, textureData: { repeat: true } }\riChannel2: { type: 'sampler2D', value: null, textureData: { repeat: true } }\riChannel3: { type: 'sampler2D', value: null, textureData: { repeat: true } }\r```\r\rThe vast majority of filters (including all of those that ship with Phaser) use fragment shaders, and\rtherefore only work in WebGL and are not supported by Canvas at all.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"uniforms","type":"object","description":"Uniform mappings object. The uniforms are added on the default uniforms, or replace them if the keys are the same.","default":"","optional":true,"nullable":""},{"name":"fragmentSrc","type":["Array","string"],"description":"The fragment shader code. Either an array, one element per line of code, or a string.","default":"","optional":true,"nullable":""}]},"functions":[{"name":"init","description":"This should be over-ridden. Will receive a variable number of arguments.","parameters":[]},{"name":"setResolution","description":"Set the resolution uniforms on the filter.","parameters":[{"name":"width","type":"number","description":"The width of the display.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height of the display.","default":"","optional":"","nullable":""}]},{"name":"update","description":"Updates the filter.","parameters":[{"name":"pointer","type":"Phaser.Pointer","description":"A Pointer object to use for the filter. The coordinates are mapped to the mouse uniform.","default":"","optional":true,"nullable":""}]},{"name":"addToWorld","description":"Creates a new Phaser.Image object using a blank texture and assigns \rthis Filter to it. The image is then added to the world.\r\rIf you don't provide width and height values then Filter.width and Filter.height are used.\r\rIf you do provide width and height values then this filter will be resized to match those\rvalues.","parameters":[{"name":"x","type":"number","description":"The x coordinate to place the Image at.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to place the Image at.","default":"","optional":true,"nullable":""},{"name":"width","type":"number","description":"The width of the Image. If not specified (or null) it will use Filter.width. If specified Filter.width will be set to this value.","default":"","optional":true,"nullable":""},{"name":"height","type":"number","description":"The height of the Image. If not specified (or null) it will use Filter.height. If specified Filter.height will be set to this value.","default":"","optional":true,"nullable":""},{"name":"anchorX","type":"number","description":"Set the x anchor point of the Image. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right.","default":"","optional":true,"nullable":""},{"name":"anchorY","type":"number","description":"Set the y anchor point of the Image. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Image","description":"The newly added Image object."}},{"name":"syncUniforms","description":"Syncs the uniforms between the class object and the shaders.","parameters":[]},{"name":"destroy","description":"Clear down this Filter and null out references to game.","parameters":[]}],"members":[{"name":"game","access":"","virtual":false,"description":"A reference to the currently running game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"type","access":"","virtual":false,"description":"The const type of this object, either Phaser.WEBGL_FILTER or Phaser.CANVAS_FILTER.","type":{"names":["number"]},"default":""},{"name":"passes","access":"private","virtual":false,"description":"An array of passes - some filters contain a few steps this array simply stores the steps in a linear fashion.\rFor example the blur filter has two passes blurX and blurY. An array of filter objects.","type":{"names":["array"]},"default":""},{"name":"shaders","access":"private","virtual":false,"description":"Array an array of shaders.","type":{"names":["array"]},"default":""},{"name":"dirty","access":"","virtual":false,"description":"Internal PIXI var.","type":{"names":["boolean"]},"default":true},{"name":"padding","access":"","virtual":false,"description":"Internal PIXI var.","type":{"names":["number"]},"default":""},{"name":"prevPoint","access":"","virtual":false,"description":"The previous position of the pointer (we don't update the uniform if the same)","type":{"names":["Phaser.Point"]},"default":""},{"name":"uniforms","access":"","virtual":false,"description":"Default uniform mappings. Compatible with ShaderToy and GLSLSandbox.","type":{"names":["object"]},"default":""},{"name":"fragmentSrc","access":"","virtual":false,"description":"The fragment shader code.","type":{"names":["array","string"]},"default":""},{"name":"width","access":"","virtual":false,"description":"The width (resolution uniform)","type":{"names":["number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height (resolution uniform)","type":{"names":["number"]},"default":""}]},{"name":"Phaser.FlexGrid","description":"WARNING: This is an EXPERIMENTAL class. The API will change significantly in the coming versions and is incomplete.\rPlease try to avoid using in production games with a long time to build.\rThis is also why the documentation is incomplete.\r\rFlexGrid is a a responsive grid manager that works in conjunction with the ScaleManager RESIZE scaling mode and FlexLayers\rto provide for game object positioning in a responsive manner.","constructor":{"name":"FlexGrid","description":"WARNING: This is an EXPERIMENTAL class. The API will change significantly in the coming versions and is incomplete.\rPlease try to avoid using in production games with a long time to build.\rThis is also why the documentation is incomplete.\r\rFlexGrid is a a responsive grid manager that works in conjunction with the ScaleManager RESIZE scaling mode and FlexLayers\rto provide for game object positioning in a responsive manner.","parameters":[{"name":"manager","type":"Phaser.ScaleManager","description":"The ScaleManager.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The width of the game.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height of the game.","default":"","optional":"","nullable":""}]},"functions":[{"name":"setSize","description":"Sets the core game size. This resets the w/h parameters and bounds.","parameters":[{"name":"width","type":"number","description":"The new dimensions.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The new dimensions.","default":"","optional":"","nullable":""}]},{"name":"createCustomLayer","description":"A custom layer is centered on the game and maintains its aspect ratio as it scales up and down.","parameters":[{"name":"width","type":"number","description":"Width of this layer in pixels.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"Height of this layer in pixels.","default":"","optional":"","nullable":""},{"name":"children","type":"Array.<PIXI.DisplayObject>","description":"An array of children that are used to populate the FlexLayer.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.FlexLayer","description":"The Layer object."}},{"name":"createFluidLayer","description":"A fluid layer is centered on the game and maintains its aspect ratio as it scales up and down.","parameters":[{"name":"children","type":"array","description":"An array of children that are used to populate the FlexLayer.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.FlexLayer","description":"The Layer object."}},{"name":"createFullLayer","description":"A full layer is placed at 0,0 and extends to the full size of the game. Children are scaled according to the fluid ratios.","parameters":[{"name":"children","type":"array","description":"An array of children that are used to populate the FlexLayer.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.FlexLayer","description":"The Layer object."}},{"name":"createFixedLayer","description":"A fixed layer is centered on the game and is the size of the required dimensions and is never scaled.","parameters":[{"name":"children","type":"Array.<PIXI.DisplayObject>","description":"An array of children that are used to populate the FlexLayer.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.FlexLayer","description":"The Layer object."}},{"name":"reset","description":"Resets the layer children references","parameters":[]},{"name":"onResize","description":"Called when the game container changes dimensions.","parameters":[{"name":"width","type":"number","description":"The new width of the game container.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The new height of the game container.","default":"","optional":"","nullable":""}]},{"name":"refresh","description":"Updates all internal vars such as the bounds and scale values.","parameters":[]},{"name":"fitSprite","description":"Fits a sprites width to the bounds.","parameters":[{"name":"sprite","type":"Phaser.Sprite","description":"The Sprite to fit.","default":"","optional":"","nullable":""}]},{"name":"debug","description":"Call in the render function to output the bounds rects.","parameters":[]}],"members":[{"name":"game","access":"","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"manager","access":"","virtual":false,"description":"A reference to the ScaleManager.","type":{"names":["Phaser.ScaleManager"]},"default":""},{"name":"positionCustom","access":"","virtual":false,"description":"-","type":"","default":""},{"name":"scaleCustom","access":"","virtual":false,"description":"The scale factor based on the game dimensions vs. the scaled dimensions.","type":"","default":""}]},{"name":"Phaser.FlexLayer","description":"WARNING: This is an EXPERIMENTAL class. The API will change significantly in the coming versions and is incomplete.\rPlease try to avoid using in production games with a long time to build.\rThis is also why the documentation is incomplete.\r\rA responsive grid layer.","constructor":{"name":"FlexLayer","description":"WARNING: This is an EXPERIMENTAL class. The API will change significantly in the coming versions and is incomplete.\rPlease try to avoid using in production games with a long time to build.\rThis is also why the documentation is incomplete.\r\rA responsive grid layer.","parameters":[{"name":"manager","type":"Phaser.FlexGrid","description":"The FlexGrid that owns this FlexLayer.","default":"","optional":"","nullable":""},{"name":"position","type":"Phaser.Point","description":"A reference to the Point object used for positioning.","default":"","optional":"","nullable":""},{"name":"bounds","type":"Phaser.Rectangle","description":"A reference to the Rectangle used for the layer bounds.","default":"","optional":"","nullable":""},{"name":"scale","type":"Phaser.Point","description":"A reference to the Point object used for layer scaling.","default":"","optional":"","nullable":""}]},"functions":[{"name":"resize","description":"Resize.","parameters":[]},{"name":"debug","description":"Debug.","parameters":[]},{"name":"add","description":"Adds an existing object as the top child in this group.\r\rThe child is automatically added to the top of the group, and is displayed above every previous child.\r\rOr if the _optional_ index is specified, the child is added at the location specified by the index value, \rthis allows you to control child ordering.\r\rIf the child was already in this Group, it is simply returned, and nothing else happens to it.\r\rIf `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.\r\rUse {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.","parameters":[{"name":"child","type":"DisplayObject","description":"The display object to add as a child.","default":"","optional":"","nullable":""},{"name":"silent","type":"boolean","description":"If true the child will not dispatch the `onAddedToGroup` event.","default":"","optional":true,"nullable":""},{"name":"index","type":"integer","description":"The index within the group to insert the child to. Where 0 is the bottom of the Group.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The child that was added to the group."}},{"name":"addAt","description":"Adds an existing object to this group.\r\rThe child is added to the group at the location specified by the index value, this allows you to control child ordering.\r\rIf `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.","parameters":[{"name":"child","type":"DisplayObject","description":"The display object to add as a child.","default":"","optional":"","nullable":""},{"name":"index","type":"integer","description":"The index within the group to insert the child to.","default":"","optional":true,"nullable":""},{"name":"silent","type":"boolean","description":"If true the child will not dispatch the `onAddedToGroup` event.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The child that was added to the group."}},{"name":"addToHash","description":"Adds a child of this Group into the hash array.\rThis call will return false if the child is not a child of this Group, or is already in the hash.","parameters":[{"name":"child","type":"DisplayObject","description":"The display object to add to this Groups hash. Must be a member of this Group already and not present in the hash.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the child was successfully added to the hash, otherwise false."}},{"name":"removeFromHash","description":"Removes a child of this Group from the hash array.\rThis call will return false if the child is not in the hash.","parameters":[{"name":"child","type":"DisplayObject","description":"The display object to remove from this Groups hash. Must be a member of this Group and in the hash.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the child was successfully removed from the hash, otherwise false."}},{"name":"addMultiple","description":"Adds an array of existing Display Objects to this Group.\r\rThe Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.\r\rAs well as an array you can also pass another Group as the first argument. In this case all of the children from that\rGroup will be removed from it and added into this Group.\r\rIf `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.","parameters":[{"name":"children","type":["Array.<DisplayObject>","Phaser.Group"],"description":"An array of display objects or a Phaser.Group. If a Group is given then *all* children will be moved from it.","default":"","optional":"","nullable":""},{"name":"silent","type":"boolean","description":"If true the children will not dispatch the `onAddedToGroup` event.","default":"","optional":true,"nullable":""}],"returns":{"type":["Array.<DisplayObject>","Phaser.Group"],"description":"The array of children or Group of children that were added to this Group."}},{"name":"getAt","description":"Returns the child found at the given index within this group.","parameters":[{"name":"index","type":"integer","description":"The index to return the child from.","default":"","optional":"","nullable":""}],"returns":{"type":["DisplayObject","integer"],"description":"The child that was found at the given index, or -1 for an invalid index."}},{"name":"create","description":"Creates a new Phaser.Sprite object and adds it to the top of this group.\r\rUse {@link Phaser.Group#classType classType} to change the type of object created.\r\rThe child is automatically added to the top of the group, and is displayed above every previous child.\r\rOr if the _optional_ index is specified, the child is added at the location specified by the index value, \rthis allows you to control child ordering.\r\rIf `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.","parameters":[{"name":"x","type":"number","description":"The x coordinate to display the newly created Sprite at. The value is in relation to the group.x point.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate to display the newly created Sprite at. The value is in relation to the group.y point.","default":"","optional":"","nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""},{"name":"exists","type":"boolean","description":"The default exists state of the Sprite.","default":true,"optional":true,"nullable":""},{"name":"index","type":"integer","description":"The index within the group to insert the child to. Where 0 is the bottom of the Group.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The child that was created: will be a {@link Phaser.Sprite} unless {@link #classType} has been changed."}},{"name":"createMultiple","description":"Creates multiple Phaser.Sprite objects and adds them to the top of this Group.\r\rThis method is useful if you need to quickly generate a pool of sprites, such as bullets.\r\rUse {@link Phaser.Group#classType classType} to change the type of object created.\r\rYou can provide an array as the `key` and / or `frame` arguments. When you do this\rit will create `quantity` Sprites for every key (and frame) in the arrays.\r\rFor example:\r\r`createMultiple(25, ['ball', 'carrot'])`\r\rIn the above code there are 2 keys (ball and carrot) which means that 50 sprites will be\rcreated in total, 25 of each. You can also have the `frame` as an array:\r\r`createMultiple(5, 'bricks', [0, 1, 2, 3])`\r\rIn the above there is one key (bricks), which is a sprite sheet. The frames array tells\rthis method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because\rthe quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with\rframe 1, and so on.\r\rIf you set both the key and frame arguments to be arrays then understand it will create\ra total quantity of sprites equal to the size of both arrays times each other. I.e.:\r\r`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`\r\rThe above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2.\rIt will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2.\rIn total it will have created 120 sprites.\r\rBy default the Sprites will have their `exists` property set to `false`, and they will be \rpositioned at 0x0, relative to the `Group.x / y` values.\r\rIf `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.","parameters":[{"name":"quantity","type":"integer","description":"The number of Sprites to create.","default":"","optional":"","nullable":""},{"name":"key","type":["string","array"],"description":"The Cache key of the image that the Sprites will use. Or an Array of keys. See the description for details on how the quantity applies when arrays are used.","default":"","optional":"","nullable":""},{"name":"frame","type":["integer","string","array"],"description":"If the Sprite image contains multiple frames you can specify which one to use here. Or an Array of frames. See the description for details on how the quantity applies when arrays are used.","default":"","optional":true,"nullable":""},{"name":"exists","type":"boolean","description":"The default exists state of the Sprite.","default":"","optional":true,"nullable":""}],"returns":{"type":"array","description":"An array containing all of the Sprites that were created."}},{"name":"updateZ","description":"Internal method that re-applies all of the children's Z values.\r\rThis must be called whenever children ordering is altered so that their `z` indices are correctly updated.","parameters":[]},{"name":"align","description":"This method iterates through all children in the Group (regardless if they are visible or exist)\rand then changes their position so they are arranged in a Grid formation. Children must have\rthe `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have\rthis.\r\rThe grid dimensions are determined by the first four arguments. The `width` and `height` arguments\rrelate to the width and height of the grid respectively.\r\rFor example if the Group had 100 children in it:\r\r`Group.align(10, 10, 32, 32)`\r\rThis will align all of the children into a grid formation of 10x10, using 32 pixels per\rgrid cell. If you want a wider grid, you could do:\r\r`Group.align(25, 4, 32, 32)`\r\rThis will align the children into a grid of 25x4, again using 32 pixels per grid cell.\r\rYou can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method\rto keep on aligning children until there are no children left. For example if this Group had\r48 children in it, the following:\r\r`Group.align(-1, 8, 32, 32)`\r\r... will align the children so that there are 8 children vertically (the second argument), \rand each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)\r\rYou can also do:\r\r`Group.align(10, -1, 32, 32)`\r\rIn this case it will create a grid 10 wide, and as tall as it needs to be in order to fit\rall of the children in.\r\rThe `position` property allows you to control where in each grid cell the child is positioned.\rThis is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, \r`Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, \r`Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.\r\rThe final argument; `offset` lets you start the alignment from a specific child index.","parameters":[{"name":"width","type":"integer","description":"The width of the grid in items (not pixels). Set to -1 for a dynamic width. If -1 then you must set an explicit height value.","default":"","optional":"","nullable":""},{"name":"height","type":"integer","description":"The height of the grid in items (not pixels). Set to -1 for a dynamic height. If -1 then you must set an explicit width value.","default":"","optional":"","nullable":""},{"name":"cellWidth","type":"integer","description":"The width of each grid cell, in pixels.","default":"","optional":"","nullable":""},{"name":"cellHeight","type":"integer","description":"The height of each grid cell, in pixels.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offset","type":"integer","description":"Optional index to start the alignment from. Defaults to zero, the first child in the Group, but can be set to any valid child index value.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the Group children were aligned, otherwise false."}},{"name":"resetCursor","description":"Sets the group cursor to the first child in the group.\r\rIf the optional index parameter is given it sets the cursor to the object at that index instead.","parameters":[{"name":"index","type":"integer","description":"Set the cursor to point to a specific index.","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"The child the cursor now points to."}},{"name":"next","description":"Advances the group cursor to the next (higher) object in the group.\r\rIf the cursor is at the end of the group (top child) it is moved the start of the group (bottom child).","parameters":[],"returns":{"type":"any","description":"The child the cursor now points to."}},{"name":"previous","description":"Moves the group cursor to the previous (lower) child in the group.\r\rIf the cursor is at the start of the group (bottom child) it is moved to the end (top child).","parameters":[],"returns":{"type":"any","description":"The child the cursor now points to."}},{"name":"swap","description":"Swaps the position of two children in this group.\r\rBoth children must be in this group, a child cannot be swapped with itself, and unparented children cannot be swapped.","parameters":[{"name":"child1","type":"any","description":"The first child to swap.","default":"","optional":"","nullable":""},{"name":"child2","type":"any","description":"The second child to swap.","default":"","optional":"","nullable":""}]},{"name":"bringToTop","description":"Brings the given child to the top of this group so it renders above all other children.","parameters":[{"name":"child","type":"any","description":"The child to bring to the top of this group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The child that was moved."}},{"name":"sendToBack","description":"Sends the given child to the bottom of this group so it renders below all other children.","parameters":[{"name":"child","type":"any","description":"The child to send to the bottom of this group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The child that was moved."}},{"name":"moveUp","description":"Moves the given child up one place in this group unless it's already at the top.","parameters":[{"name":"child","type":"any","description":"The child to move up in the group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The child that was moved."}},{"name":"moveDown","description":"Moves the given child down one place in this group unless it's already at the bottom.","parameters":[{"name":"child","type":"any","description":"The child to move down in the group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The child that was moved."}},{"name":"xy","description":"Positions the child found at the given index within this group to the given x and y coordinates.","parameters":[{"name":"index","type":"integer","description":"The index of the child in the group to set the position of.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The new x position of the child.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The new y position of the child.","default":"","optional":"","nullable":""}]},{"name":"reverse","description":"Reverses all children in this group.\r\rThis operation applies only to immediate children and does not propagate to subgroups.","parameters":[]},{"name":"getIndex","description":"Get the index position of the given child in this group, which should match the child's `z` property.","parameters":[{"name":"child","type":"any","description":"The child to get the index for.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The index of the child or -1 if it's not a member of this group."}},{"name":"getByName","description":"Searches the Group for the first instance of a child with the `name`\rproperty matching the given argument. Should more than one child have\rthe same name only the first instance is returned.","parameters":[{"name":"name","type":"string","description":"The name to search for.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The first child with a matching name, or null if none were found."}},{"name":"replace","description":"Replaces a child of this Group with the given newChild. The newChild cannot be a member of this Group.\r\rIf `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.","parameters":[{"name":"oldChild","type":"any","description":"The child in this group that will be replaced.","default":"","optional":"","nullable":""},{"name":"newChild","type":"any","description":"The child to be inserted into this group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"Returns the oldChild that was replaced within this group."}},{"name":"hasProperty","description":"Checks if the child has the given property.\r\rWill scan up to 4 levels deep only.","parameters":[{"name":"child","type":"any","description":"The child to check for the existence of the property on.","default":"","optional":"","nullable":""},{"name":"key","type":"Array.<string>","description":"An array of strings that make up the property.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the child has the property, otherwise false."}},{"name":"setProperty","description":"Sets a property to the given value on the child. The operation parameter controls how the value is set.\r\rThe operations are:\r- 0: set the existing value to the given value; if force is `true` a new property will be created if needed\r- 1: will add the given value to the value already present.\r- 2: will subtract the given value from the value already present.\r- 3: will multiply the value already present by the given value.\r- 4: will divide the value already present by the given value.","parameters":[{"name":"child","type":"any","description":"The child to set the property value on.","default":"","optional":"","nullable":""},{"name":"key","type":"array","description":"An array of strings that make up the property that will be set.","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be set.","default":"","optional":"","nullable":""},{"name":"operation","type":"integer","description":"Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the property was set, false if not."}},{"name":"checkProperty","description":"Checks a property for the given value on the child.","parameters":[{"name":"child","type":"any","description":"The child to check the property value on.","default":"","optional":"","nullable":""},{"name":"key","type":"array","description":"An array of strings that make up the property that will be set.","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be checked.","default":"","optional":"","nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the property was was equal to value, false if not."}},{"name":"set","description":"Quickly set a property on a single child of this group to a new value.\r\rThe operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.","parameters":[{"name":"child","type":"Phaser.Sprite","description":"The child to set the property on.","default":"","optional":"","nullable":""},{"name":"key","type":"string","description":"The property, as a string, to be set. For example: 'body.velocity.x'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be set.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If set then the child will only be updated if alive=true.","default":"","optional":true,"nullable":""},{"name":"checkVisible","type":"boolean","description":"If set then the child will only be updated if visible=true.","default":"","optional":true,"nullable":""},{"name":"operation","type":"integer","description":"Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the property was set, false if not."}},{"name":"setAll","description":"Quickly set the same property across all children of this group to a new value.\r\rThis call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children.\rIf you need that ability please see `Group.setAllChildren`.\r\rThe operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.","parameters":[{"name":"key","type":"string","description":"The property, as a string, to be set. For example: 'body.velocity.x'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be set.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If set then only children with alive=true will be updated. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"checkVisible","type":"boolean","description":"If set then only children with visible=true will be updated. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"operation","type":"integer","description":"Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.","default":"","optional":true,"nullable":""}]},{"name":"setAllChildren","description":"Quickly set the same property across all children of this group, and any child Groups, to a new value.\r\rIf this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom.\rUnlike with `setAll` the property is NOT set on child Groups itself.\r\rThe operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.","parameters":[{"name":"key","type":"string","description":"The property, as a string, to be set. For example: 'body.velocity.x'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be set.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If set then only children with alive=true will be updated. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"checkVisible","type":"boolean","description":"If set then only children with visible=true will be updated. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"operation","type":"integer","description":"Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.","default":"","optional":true,"nullable":""}]},{"name":"checkAll","description":"Quickly check that the same property across all children of this group is equal to the given value.\r\rThis call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.","parameters":[{"name":"key","type":"string","description":"The property, as a string, to be set. For example: 'body.velocity.x'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be checked.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If set then only children with alive=true will be checked. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"checkVisible","type":"boolean","description":"If set then only children with visible=true will be checked. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned.","default":"","optional":true,"nullable":""}]},{"name":"addAll","description":"Adds the amount to the given property on all children in this group.\r\r`Group.addAll('x', 10)` will add 10 to the child.x value for each child.","parameters":[{"name":"property","type":"string","description":"The property to increment, for example 'body.velocity.x' or 'angle'.","default":"","optional":"","nullable":""},{"name":"amount","type":"number","description":"The amount to increment the property by. If child.x = 10 then addAll('x', 40) would make child.x = 50.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If true the property will only be changed if the child is alive.","default":"","optional":"","nullable":""},{"name":"checkVisible","type":"boolean","description":"If true the property will only be changed if the child is visible.","default":"","optional":"","nullable":""}]},{"name":"subAll","description":"Subtracts the amount from the given property on all children in this group.\r\r`Group.subAll('x', 10)` will minus 10 from the child.x value for each child.","parameters":[{"name":"property","type":"string","description":"The property to decrement, for example 'body.velocity.x' or 'angle'.","default":"","optional":"","nullable":""},{"name":"amount","type":"number","description":"The amount to subtract from the property. If child.x = 50 then subAll('x', 40) would make child.x = 10.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If true the property will only be changed if the child is alive.","default":"","optional":"","nullable":""},{"name":"checkVisible","type":"boolean","description":"If true the property will only be changed if the child is visible.","default":"","optional":"","nullable":""}]},{"name":"multiplyAll","description":"Multiplies the given property by the amount on all children in this group.\r\r`Group.multiplyAll('x', 2)` will x2 the child.x value for each child.","parameters":[{"name":"property","type":"string","description":"The property to multiply, for example 'body.velocity.x' or 'angle'.","default":"","optional":"","nullable":""},{"name":"amount","type":"number","description":"The amount to multiply the property by. If child.x = 10 then multiplyAll('x', 2) would make child.x = 20.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If true the property will only be changed if the child is alive.","default":"","optional":"","nullable":""},{"name":"checkVisible","type":"boolean","description":"If true the property will only be changed if the child is visible.","default":"","optional":"","nullable":""}]},{"name":"divideAll","description":"Divides the given property by the amount on all children in this group.\r\r`Group.divideAll('x', 2)` will half the child.x value for each child.","parameters":[{"name":"property","type":"string","description":"The property to divide, for example 'body.velocity.x' or 'angle'.","default":"","optional":"","nullable":""},{"name":"amount","type":"number","description":"The amount to divide the property by. If child.x = 100 then divideAll('x', 2) would make child.x = 50.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If true the property will only be changed if the child is alive.","default":"","optional":"","nullable":""},{"name":"checkVisible","type":"boolean","description":"If true the property will only be changed if the child is visible.","default":"","optional":"","nullable":""}]},{"name":"callAllExists","description":"Calls a function, specified by name, on all children in the group who exist (or do not exist).\r\rAfter the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.","parameters":[{"name":"callback","type":"string","description":"Name of the function on the children to call.","default":"","optional":"","nullable":""},{"name":"existsValue","type":"boolean","description":"Only children with exists=existsValue will be called.","default":"","optional":"","nullable":""},{"name":"parameter","type":"any","description":"Additional parameters that will be passed to the callback.","default":"","optional":"","nullable":""}]},{"name":"callbackFromArray","description":"Returns a reference to a function that exists on a child of the group based on the given callback array.","parameters":[{"name":"child","type":"object","description":"The object to inspect.","default":"","optional":"","nullable":""},{"name":"callback","type":"array","description":"The array of function names.","default":"","optional":"","nullable":""},{"name":"length","type":"integer","description":"The size of the array (pre-calculated in callAll).","default":"","optional":"","nullable":""}]},{"name":"callAll","description":"Calls a function, specified by name, on all on children.\r\rThe function is called for all children regardless if they are dead or alive (see callAllExists for different options).\rAfter the method parameter and context you can add as many extra parameters as you like, which will all be passed to the child.","parameters":[{"name":"method","type":"string","description":"Name of the function on the child to call. Deep property lookup is supported.","default":"","optional":"","nullable":""},{"name":"context","type":"string","description":"A string containing the context under which the method will be executed. Set to null to default to the child.","default":"","optional":true,"nullable":""},{"name":"args","type":"any","description":"Additional parameters that will be passed to the method.","default":"","optional":"","nullable":""}]},{"name":"preUpdate","description":"The core preUpdate - as called by World.","parameters":[]},{"name":"update","description":"The core update - as called by World.","parameters":[]},{"name":"postUpdate","description":"The core postUpdate - as called by World.","parameters":[]},{"name":"filter","description":"Find children matching a certain predicate.\r\rFor example:\r\r    var healthyList = Group.filter(function(child, index, children) {\r        return child.health > 10 ? true : false;\r    }, true);\r    healthyList.callAll('attack');\r\rNote: Currently this will skip any children which are Groups themselves.","parameters":[{"name":"predicate","type":"function","description":"The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, the index as the second, and the entire child array as the third","default":"","optional":"","nullable":""},{"name":"checkExists","type":"boolean","description":"If true, only existing can be selected; otherwise all children can be selected and will be passed to the predicate.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.ArraySet","description":"Returns an array list containing all the children that the predicate returned true for"}},{"name":"forEach","description":"Call a function on each child in this group.\r\rAdditional arguments for the callback can be specified after the `checkExists` parameter. For example,\r\r    Group.forEach(awardBonusGold, this, true, 100, 500)\r\rwould invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.\r\rNote: This check will skip any children which are Groups themselves.","parameters":[{"name":"callback","type":"function","description":"The function that will be called for each applicable child. The child will be passed as the first argument.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":"","nullable":""},{"name":"checkExists","type":"boolean","description":"If set only children matching for which `exists` is true will be passed to the callback, otherwise all children will be passed.","default":"","optional":true,"nullable":""},{"name":"args","type":"any","description":"Additional arguments to pass to the callback function, after the child item.","default":"(none)","optional":true,"nullable":""}]},{"name":"forEachExists","description":"Call a function on each existing child in this group.\r\rSee {@link Phaser.Group#forEach forEach} for details.","parameters":[{"name":"callback","type":"function","description":"The function that will be called for each applicable child. The child will be passed as the first argument.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":"","nullable":""},{"name":"args","type":"any","description":"Additional arguments to pass to the callback function, after the child item.","default":"(none)","optional":true,"nullable":""}]},{"name":"forEachAlive","description":"Call a function on each alive child in this group.\r\rSee {@link Phaser.Group#forEach forEach} for details.","parameters":[{"name":"callback","type":"function","description":"The function that will be called for each applicable child. The child will be passed as the first argument.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":"","nullable":""},{"name":"args","type":"any","description":"Additional arguments to pass to the callback function, after the child item.","default":"(none)","optional":true,"nullable":""}]},{"name":"forEachDead","description":"Call a function on each dead child in this group.\r\rSee {@link Phaser.Group#forEach forEach} for details.","parameters":[{"name":"callback","type":"function","description":"The function that will be called for each applicable child. The child will be passed as the first argument.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":"","nullable":""},{"name":"args","type":"any","description":"Additional arguments to pass to the callback function, after the child item.","default":"(none)","optional":true,"nullable":""}]},{"name":"sort","description":"Sort the children in the group according to a particular key and ordering.\r\rCall this function to sort the group according to a particular key value and order.\r\rFor example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.\r\rInternally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including\ralphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.","parameters":[{"name":"key","type":"string","description":"The name of the property to sort on. Defaults to the objects z-depth value.","default":"'z'","optional":true,"nullable":""},{"name":"order","type":"integer","description":"Order ascending ({@link Phaser.Group.SORT_ASCENDING SORT_ASCENDING}) or descending ({@link Phaser.Group.SORT_DESCENDING SORT_DESCENDING}).","default":"Phaser.Group.SORT_ASCENDING","optional":true,"nullable":""}]},{"name":"customSort","description":"Sort the children in the group according to custom sort function.\r\rThe `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b).\rIt should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.","parameters":[{"name":"sortHandler","type":"function","description":"The custom sort function.","default":"","optional":"","nullable":""},{"name":"context","type":"object","description":"The context in which the sortHandler is called.","default":"","optional":true,"nullable":""}]},{"name":"ascendingSortHandler","description":"An internal helper function for the sort process.","parameters":[{"name":"a","type":"object","description":"The first object being sorted.","default":"","optional":"","nullable":""},{"name":"b","type":"object","description":"The second object being sorted.","default":"","optional":"","nullable":""}]},{"name":"descendingSortHandler","description":"An internal helper function for the sort process.","parameters":[{"name":"a","type":"object","description":"The first object being sorted.","default":"","optional":"","nullable":""},{"name":"b","type":"object","description":"The second object being sorted.","default":"","optional":"","nullable":""}]},{"name":"iterate","description":"Iterates over the children of the group performing one of several actions for matched children.\r\rA child is considered a match when it has a property, named `key`, whose value is equal to `value`\raccording to a strict equality comparison.\r\rThe result depends on the `returnType`:\r\r- {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}:\r    The callback, if any, is applied to all matching children. The number of matched children is returned.\r- {@link Phaser.Group.RETURN_NONE RETURN_NONE}:\r    The callback, if any, is applied to all matching children. No value is returned.\r- {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}:\r    The callback, if any, is applied to the *first* matching child and the *first* matched child is returned.\r    If there is no matching child then null is returned.\r\rIf `args` is specified it must be an array. The matched child will be assigned to the first\relement and the entire array will be applied to the callback function.","parameters":[{"name":"key","type":"string","description":"The child property to check, i.e. 'exists', 'alive', 'health'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"A child matches if `child[key] === value` is true.","default":"","optional":"","nullable":""},{"name":"returnType","type":"integer","description":"How to iterate the children and what to return.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"Optional function that will be called on each matching child. The matched child is supplied as the first argument.","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":true,"nullable":""},{"name":"args","type":"Array.<any>","description":"The arguments supplied to to the callback; the first array index (argument) will be replaced with the matched child.","default":"(none)","optional":true,"nullable":""}],"returns":{"type":"any","description":"Returns either an integer (for RETURN_TOTAL), the first matched child (for RETURN_CHILD), or null."}},{"name":"getFirstExists","description":"Get the first display object that exists, or doesn't exist.\r\rYou can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.\r\rIt works by calling `Group.create` passing it the parameters given to this method, and returning the new child.\r\rIf a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child\rwill be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.","parameters":[{"name":"exists","type":"boolean","description":"If true, find the first existing child; otherwise find the first non-existing child.","default":true,"optional":true,"nullable":""},{"name":"createIfNull","type":"boolean","description":"If `true` and no alive children are found a new one is created.","default":"","optional":true,"nullable":""},{"name":"x","type":"number","description":"The x coordinate to reset the child to. The value is in relation to the group.x point.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to reset the child to. The value is in relation to the group.y point.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The first child, or `null` if none found and `createIfNull` was false."}},{"name":"getFirstAlive","description":"Get the first child that is alive (`child.alive === true`).\r\rThis is handy for choosing a squad leader, etc.\r\rYou can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.\r\rIt works by calling `Group.create` passing it the parameters given to this method, and returning the new child.\r\rIf a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child\rwill be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.","parameters":[{"name":"createIfNull","type":"boolean","description":"If `true` and no alive children are found a new one is created.","default":"","optional":true,"nullable":""},{"name":"x","type":"number","description":"The x coordinate to reset the child to. The value is in relation to the group.x point.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to reset the child to. The value is in relation to the group.y point.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The alive dead child, or `null` if none found and `createIfNull` was false."}},{"name":"getFirstDead","description":"Get the first child that is dead (`child.alive === false`).\r\rThis is handy for checking if everything has been wiped out and adding to the pool as needed.\r\rYou can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.\r\rIt works by calling `Group.create` passing it the parameters given to this method, and returning the new child.\r\rIf a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child\rwill be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.","parameters":[{"name":"createIfNull","type":"boolean","description":"If `true` and no dead children are found a new one is created.","default":"","optional":true,"nullable":""},{"name":"x","type":"number","description":"The x coordinate to reset the child to. The value is in relation to the group.x point.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to reset the child to. The value is in relation to the group.y point.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The first dead child, or `null` if none found and `createIfNull` was false."}},{"name":"resetChild","description":"Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.\r\rIf the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.\r\rThe two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.","parameters":[{"name":"child","type":"DisplayObject","description":"The child to reset and/or load the texture on.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate to reset the child to. The value is in relation to the group.x point.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to reset the child to. The value is in relation to the group.y point.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The child that was reset: usually a {@link Phaser.Sprite}."}},{"name":"getTop","description":"Return the child at the top of this group.\r\rThe top child is the child displayed (rendered) above every other child.","parameters":[],"returns":{"type":"any","description":"The child at the top of the Group."}},{"name":"getBottom","description":"Returns the child at the bottom of this group.\r\rThe bottom child the child being displayed (rendered) below every other child.","parameters":[],"returns":{"type":"any","description":"The child at the bottom of the Group."}},{"name":"getClosestTo","description":"Get the closest child to given Object, with optional callback to filter children.\r\rThis can be a Sprite, Group, Image or any object with public x and y properties.\r\r'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.\r\rYou can use the optional `callback` argument to apply your own filter to the distance checks.\rIf the child is closer then the previous child, it will be sent to `callback` as the first argument,\rwith the distance as the second. The callback should return `true` if it passes your \rfiltering criteria, otherwise it should return `false`.","parameters":[{"name":"object","type":"any","description":"The object used to determine the distance. This can be a Sprite, Group, Image or any object with public x and y properties.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, with the distance as the second. It should return `true` if the child passes the matching criteria.","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"The child closest to given object, or `null` if no child was found."}},{"name":"getFurthestFrom","description":"Get the child furthest away from the given Object, with optional callback to filter children.\r\rThis can be a Sprite, Group, Image or any object with public x and y properties.\r\r'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.\r\rYou can use the optional `callback` argument to apply your own filter to the distance checks.\rIf the child is closer then the previous child, it will be sent to `callback` as the first argument,\rwith the distance as the second. The callback should return `true` if it passes your \rfiltering criteria, otherwise it should return `false`.","parameters":[{"name":"object","type":"any","description":"The object used to determine the distance. This can be a Sprite, Group, Image or any object with public x and y properties.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, with the distance as the second. It should return `true` if the child passes the matching criteria.","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"The child furthest from the given object, or `null` if no child was found."}},{"name":"countLiving","description":"Get the number of living children in this group.","parameters":[],"returns":{"type":"integer","description":"The number of children flagged as alive."}},{"name":"countDead","description":"Get the number of dead children in this group.","parameters":[],"returns":{"type":"integer","description":"The number of children flagged as dead."}},{"name":"getRandom","description":"Returns a random child from the group.","parameters":[{"name":"startIndex","type":"integer","description":"Offset from the front of the group (lowest child).","default":"","optional":true,"nullable":""},{"name":"length","type":"integer","description":"Restriction on the number of values you want to randomly select from.","default":"(to top)","optional":true,"nullable":""}],"returns":{"type":"any","description":"A random child of this Group."}},{"name":"getRandomExists","description":"Returns a random child from the Group that has `exists` set to `true`.\r\rOptionally you can specify a start and end index. For example if this Group had 100 children,\rand you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only\rthe first 50 children in the Group.","parameters":[{"name":"startIndex","type":"integer","description":"The first child index to start the search from.","default":"","optional":true,"nullable":""},{"name":"endIndex","type":"integer","description":"The last child index to search up to.","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"A random child of this Group that exists."}},{"name":"getAll","description":"Returns all children in this Group.\r\rYou can optionally specify a matching criteria using the `property` and `value` arguments.\r\rFor example: `getAll('exists', true)` would return only children that have their exists property set.\r\rOptionally you can specify a start and end index. For example if this Group had 100 children,\rand you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only\rthe first 50 children in the Group.","parameters":[{"name":"property","type":"string","description":"An optional property to test against the value argument.","default":"","optional":true,"nullable":""},{"name":"value","type":"any","description":"If property is set then Child.property must strictly equal this value to be included in the results.","default":"","optional":true,"nullable":""},{"name":"startIndex","type":"integer","description":"The first child index to start the search from.","default":"","optional":true,"nullable":""},{"name":"endIndex","type":"integer","description":"The last child index to search up until.","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"A random existing child of this Group."}},{"name":"remove","description":"Removes the given child from this group.\r\rThis will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.\r\rIf the group cursor was referring to the removed child it is updated to refer to the next child.","parameters":[{"name":"child","type":"any","description":"The child to remove.","default":"","optional":"","nullable":""},{"name":"destroy","type":"boolean","description":"If true `destroy` will be invoked on the removed child.","default":"","optional":true,"nullable":""},{"name":"silent","type":"boolean","description":"If true the the child will not dispatch the `onRemovedFromGroup` event.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"true if the child was removed from this group, otherwise false."}},{"name":"moveAll","description":"Moves all children from this Group to the Group given.","parameters":[{"name":"group","type":"Phaser.Group","description":"The new Group to which the children will be moved to.","default":"","optional":"","nullable":""},{"name":"silent","type":"boolean","description":"If true the children will not dispatch the `onAddedToGroup` event for the new Group.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Group","description":"The Group to which all the children were moved."}},{"name":"removeAll","description":"Removes all children from this Group, but does not remove the group from its parent.\r\rThe children can be optionally destroyed as they are removed.\r\rYou can also optionally also destroy the BaseTexture the Child is using. Be careful if you've\rmore than one Game Object sharing the same BaseTexture.","parameters":[{"name":"destroy","type":"boolean","description":"If true `destroy` will be invoked on each removed child.","default":"","optional":true,"nullable":""},{"name":"silent","type":"boolean","description":"If true the children will not dispatch their `onRemovedFromGroup` events.","default":"","optional":true,"nullable":""},{"name":"destroyTexture","type":"boolean","description":"If true, and if the `destroy` argument is also true, the BaseTexture belonging to the Child is also destroyed. Note that if another Game Object is sharing the same BaseTexture it will invalidate it.","default":"","optional":true,"nullable":""}]},{"name":"removeBetween","description":"Removes all children from this group whose index falls beteen the given startIndex and endIndex values.","parameters":[{"name":"startIndex","type":"integer","description":"The index to start removing children from.","default":"","optional":"","nullable":""},{"name":"endIndex","type":"integer","description":"The index to stop removing children at. Must be higher than startIndex. If undefined this method will remove all children between startIndex and the end of the group.","default":"","optional":true,"nullable":""},{"name":"destroy","type":"boolean","description":"If true `destroy` will be invoked on each removed child.","default":"","optional":true,"nullable":""},{"name":"silent","type":"boolean","description":"If true the children will not dispatch their `onRemovedFromGroup` events.","default":"","optional":true,"nullable":""}]},{"name":"destroy","description":"Destroys this group.\r\rRemoves all children, then removes this group from its parent and nulls references.","parameters":[{"name":"destroyChildren","type":"boolean","description":"If true `destroy` will be invoked on each removed child.","default":true,"optional":true,"nullable":""},{"name":"soft","type":"boolean","description":"A 'soft destroy' (set to true) doesn't remove this group from its parent or null the game reference. Set to false and it does.","default":"","optional":true,"nullable":""}]},{"name":"alignIn","description":"Aligns this Group within another Game Object, or Rectangle, known as the\r'container', to one of 9 possible positions.\r\rThe container must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Groups within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Group to another Game Object does **not** make it a child of\rthe container. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, \r`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, \r`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.\r\rGroups are placed in such a way that their _bounds_ align with the\rcontainer, taking into consideration rotation and scale of its children.\rThis allows you to neatly align Groups, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Group. For example:\r\r`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `group` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the containers bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"container","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Group to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Group","description":"This Group."}},{"name":"alignTo","description":"Aligns this Group to the side of another Game Object, or Rectangle, known as the\r'parent', in one of 11 possible positions.\r\rThe parent must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Groups within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Group to another Game Object does **not** make it a child of\rthe parent. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, \r`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, \r`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` \rand `Phaser.BOTTOM_RIGHT`.\r\rGroups are placed in such a way that their _bounds_ align with the\rparent, taking into consideration rotation and scale of the children.\rThis allows you to neatly align Groups, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Group. For example:\r\r`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `group` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the parents bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"parent","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Group to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Group","description":"This Group."}},{"name":"addChild","description":"Adds a child to the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to add to the container","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"addChildAt","description":"Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child to add","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The index to place the child in","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"swapChildren","description":"Swaps the position of 2 Display Objects within this container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""},{"name":"child2","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}]},{"name":"getChildIndex","description":"Returns the index position of a child DisplayObject instance","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject instance to identify","default":"","optional":"","nullable":""}],"returns":{"type":"Number","description":"The index position of the child display object to identify"}},{"name":"setChildIndex","description":"Changes the position of an existing child in the display object container","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child DisplayObject instance for which you want to change the index number","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The resulting index number for the child display object","default":"","optional":"","nullable":""}]},{"name":"getChildAt","description":"Returns the child at the specified index","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child at the given index, if any."}},{"name":"removeChild","description":"Removes a child from the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to remove","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildAt","description":"Removes a child from the specified index position.","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildren","description":"Removes all children from this container that are within the begin and end indexes.","parameters":[{"name":"beginIndex","type":"Number","description":"The beginning position. Default value is 0.","default":"","optional":"","nullable":""},{"name":"endIndex","type":"Number","description":"The ending position. Default value is size of the container.","default":"","optional":"","nullable":""}]},{"name":"getBounds","description":"Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.","parameters":[{"name":"targetCoordinateSpace","type":["PIXIDisplayObject","PIXIMatrix"],"description":"Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object.","default":"","optional":true,"nullable":""}],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"getLocalBounds","description":"Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.","parameters":[],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"contains","description":"Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}],"returns":{"type":"Boolean","description":""}},{"name":"_renderWebGL","description":"Renders the object using the WebGL renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""}]},{"name":"_renderCanvas","description":"Renders the object using the Canvas renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""}]}],"members":[{"name":"manager","access":"","virtual":false,"description":"A reference to the ScaleManager.","type":"","default":""},{"name":"grid","access":"","virtual":false,"description":"A reference to the FlexGrid that owns this layer.","type":{"names":["Phaser.FlexGrid"]},"default":""},{"name":"persist","access":"","virtual":false,"description":"Should the FlexLayer remain through a State swap?","type":{"names":["boolean"]},"default":""},{"name":"position","access":"","virtual":false,"description":"","type":{"names":["Phaser.Point"]},"default":""},{"name":"bounds","access":"","virtual":false,"description":"","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"scale","access":"","virtual":false,"description":"","type":{"names":["Phaser.Point"]},"default":""},{"name":"topLeft","access":"","virtual":false,"description":"","type":{"names":["Phaser.Point"]},"default":""},{"name":"topMiddle","access":"","virtual":false,"description":"","type":{"names":["Phaser.Point"]},"default":""},{"name":"topRight","access":"","virtual":false,"description":"","type":{"names":["Phaser.Point"]},"default":""},{"name":"bottomLeft","access":"","virtual":false,"description":"","type":{"names":["Phaser.Point"]},"default":""},{"name":"bottomMiddle","access":"","virtual":false,"description":"","type":{"names":["Phaser.Point"]},"default":""},{"name":"bottomRight","access":"","virtual":false,"description":"","type":{"names":["Phaser.Point"]},"default":""},{"name":"game","access":"protected","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"name","access":"","virtual":false,"description":"A name for this group. Not used internally but useful for debugging.","type":{"names":["string"]},"default":""},{"name":"z","access":"","virtual":false,"description":"The z-depth value of this object within its parent container/Group - the World is a Group as well.\rThis value must be unique for each child in a Group.","type":{"names":["integer"]},"default":""},{"name":"type","access":"protected","virtual":false,"description":"Internal Phaser Type value.","type":{"names":["integer"]},"default":""},{"name":"physicsType","access":"","virtual":false,"description":"The const physics body type of this object.","type":{"names":["number"]},"default":""},{"name":"alive","access":"","virtual":false,"description":"The alive property is useful for Groups that are children of other Groups and need to be included/excluded in checks like forEachAlive.","type":{"names":["boolean"]},"default":true},{"name":"exists","access":"","virtual":false,"description":"If exists is false the group will be excluded from collision checks and filters such as {@link forEachExists}. The group will not call `preUpdate` and `postUpdate` on its children and the children will not receive physics updates or camera/world boundary checks. The group will still be {@link Phaser.Group#visible visible} and will still call `update` on its children.","type":{"names":["boolean"]},"default":true},{"name":"ignoreDestroy","access":"","virtual":false,"description":"A group with `ignoreDestroy` set to `true` ignores all calls to its `destroy` method.","type":{"names":["boolean"]},"default":""},{"name":"pendingDestroy","access":"","virtual":false,"description":"A Group is that has `pendingDestroy` set to `true` is flagged to have its destroy method\rcalled on the next logic update.\rYou can set it directly to flag the Group to be destroyed on its next update.\r\rThis is extremely useful if you wish to destroy a Group from within one of its own callbacks\ror a callback of one of its children.","type":{"names":["boolean"]},"default":""},{"name":"classType","access":"","virtual":false,"description":"The type of objects that will be created when using {@link Phaser.Group#create create} or {@link Phaser.Group#createMultiple createMultiple}.\r\rAny object may be used but it should extend either Sprite or Image and accept the same constructor arguments:\rwhen a new object is created it is passed the following parameters to its constructor: `(game, x, y, key, frame)`.","type":{"names":["object"]},"default":"{@link Phaser.Sprite}"},{"name":"cursor","access":"","virtual":false,"description":"The current display object that the group cursor is pointing to, if any. (Can be set manually.)\r\rThe cursor is a way to iterate through the children in a Group using {@link Phaser.Group#next next} and {@link Phaser.Group#previous previous}.","type":{"names":["DisplayObject"]},"default":""},{"name":"inputEnableChildren","access":"","virtual":false,"description":"A Group with `inputEnableChildren` set to `true` will automatically call `inputEnabled = true` \ron any children _added_ to, or _created by_, this Group.\r\rIf there are children already in the Group at the time you set this property, they are not changed.","type":{"names":["boolean"]},"default":""},{"name":"onChildInputDown","access":"","virtual":false,"description":"This Signal is dispatched whenever a child of this Group emits an onInputDown signal as a result\rof having been interacted with by a Pointer. You can bind functions to this Signal instead of to\revery child Sprite.\r\rThis Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and\ra reference to the Pointer that caused it.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onChildInputUp","access":"","virtual":false,"description":"This Signal is dispatched whenever a child of this Group emits an onInputUp signal as a result\rof having been interacted with by a Pointer. You can bind functions to this Signal instead of to\revery child Sprite.\r\rThis Signal is sent 3 arguments: A reference to the Sprite that triggered the signal, \ra reference to the Pointer that caused it, and a boolean value `isOver` that tells you if the Pointer\ris still over the Sprite or not.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onChildInputOver","access":"","virtual":false,"description":"This Signal is dispatched whenever a child of this Group emits an onInputOver signal as a result\rof having been interacted with by a Pointer. You can bind functions to this Signal instead of to\revery child Sprite.\r\rThis Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and\ra reference to the Pointer that caused it.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onChildInputOut","access":"","virtual":false,"description":"This Signal is dispatched whenever a child of this Group emits an onInputOut signal as a result\rof having been interacted with by a Pointer. You can bind functions to this Signal instead of to\revery child Sprite.\r\rThis Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and\ra reference to the Pointer that caused it.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"enableBody","access":"","virtual":false,"description":"If true all Sprites created by, or added to this group, will have a physics body enabled on them.\r\rIf there are children already in the Group at the time you set this property, they are not changed.\r\rThe default body type is controlled with {@link Phaser.Group#physicsBodyType physicsBodyType}.","type":{"names":["boolean"]},"default":""},{"name":"enableBodyDebug","access":"","virtual":false,"description":"If true when a physics body is created (via {@link Phaser.Group#enableBody enableBody}) it will create a physics debug object as well.\r\rThis only works for P2 bodies.","type":{"names":["boolean"]},"default":""},{"name":"physicsBodyType","access":"","virtual":false,"description":"If {@link Phaser.Group#enableBody enableBody} is true this is the type of physics body that is created on new Sprites.\r\rThe valid values are {@link Phaser.Physics.ARCADE}, {@link Phaser.Physics.P2JS}, {@link Phaser.Physics.NINJA}, etc.","type":{"names":["integer"]},"default":""},{"name":"physicsSortDirection","access":"","virtual":false,"description":"If this Group contains Arcade Physics Sprites you can set a custom sort direction via this property.\r\rIt should be set to one of the Phaser.Physics.Arcade sort direction constants: \r\rPhaser.Physics.Arcade.SORT_NONE\rPhaser.Physics.Arcade.LEFT_RIGHT\rPhaser.Physics.Arcade.RIGHT_LEFT\rPhaser.Physics.Arcade.TOP_BOTTOM\rPhaser.Physics.Arcade.BOTTOM_TOP\r\rIf set to `null` the Group will use whatever Phaser.Physics.Arcade.sortDirection is set to. This is the default behavior.","type":{"names":["integer"]},"default":""},{"name":"onDestroy","access":"","virtual":false,"description":"This signal is dispatched when the group is destroyed.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"cursorIndex","access":"","virtual":false,"description":"The current index of the Group cursor. Advance it with Group.next.","type":{"names":["integer"]},"default":""},{"name":"fixedToCamera","access":"","virtual":false,"description":"A Group that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Group.cameraOffset.\r\rNote that the cameraOffset values are in addition to any parent in the display list.\rSo if this Group was in a Group that has x: 200, then this will be added to the cameraOffset.x","type":{"names":["boolean"]},"default":""},{"name":"cameraOffset","access":"","virtual":false,"description":"If this object is {@link Phaser.Group#fixedToCamera fixedToCamera} then this stores the x/y position offset relative to the top-left of the camera view.\rIf the parent of this Group is also `fixedToCamera` then the offset here is in addition to that and should typically be disabled.","type":{"names":["Phaser.Point"]},"default":""},{"name":"hash","access":"","virtual":false,"description":"The hash array is an array belonging to this Group into which you can add any of its children via Group.addToHash and Group.removeFromHash.\r\rOnly children of this Group can be added to and removed from the hash.\r\rThis hash is used automatically by Phaser Arcade Physics in order to perform non z-index based destructive sorting.\rHowever if you don't use Arcade Physics, or this isn't a physics enabled Group, then you can use the hash to perform your own\rsorting and filtering of Group children without touching their z-index (and therefore display draw order)","type":{"names":["array"]},"default":""},{"name":"_sortProperty","access":"private","virtual":false,"description":"The property on which children are sorted.","type":{"names":["string"]},"default":""},{"name":"total","access":"","virtual":false,"description":"Total number of existing children in the group.","type":{"names":["integer"]},"default":""},{"name":"length","access":"","virtual":false,"description":"Total number of children in this group, regardless of exists/alive status.","type":{"names":["integer"]},"default":""},{"name":"angle","access":"","virtual":false,"description":"The angle of rotation of the group container, in degrees.\r\rThis adjusts the group itself by modifying its local rotation transform.\r\rThis has no impact on the rotation/angle properties of the children, but it will update their worldTransform\rand on-screen orientation and position.","type":{"names":["number"]},"default":""},{"name":"centerX","access":"","virtual":false,"description":"The center x coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"centerY","access":"","virtual":false,"description":"The center y coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"left","access":"","virtual":false,"description":"The left coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"right","access":"","virtual":false,"description":"The right coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"top","access":"","virtual":false,"description":"The top coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"bottom","access":"","virtual":false,"description":"The bottom coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"x","access":"","virtual":false,"description":"The x coordinate of the group container.\r\rYou can adjust the group container itself by modifying its coordinates.\rThis will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.","type":{"names":["number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The y coordinate of the group container.\r\rYou can adjust the group container itself by modifying its coordinates.\rThis will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.","type":{"names":["number"]},"default":""},{"name":"rotation","access":"","virtual":false,"description":"The angle of rotation of the group container, in radians.\r\rThis will adjust the group container itself by modifying its rotation.\rThis will have no impact on the rotation value of its children, but it will update their worldTransform and on-screen position.","type":{"names":["number"]},"default":""},{"name":"visible","access":"","virtual":false,"description":"The visible state of the group. Non-visible Groups and all of their children are not rendered.","type":{"names":["boolean"]},"default":""},{"name":"alpha","access":"","virtual":false,"description":"The alpha value of the group container.","type":{"names":["number"]},"default":""},{"name":"children","access":"","virtual":false,"description":"[read-only] The array of children of this container.","type":{"names":["Array.<DisplayObject>"]},"default":""},{"name":"ignoreChildInput","access":"","virtual":false,"description":"If `ignoreChildInput`  is `false` it will allow this objects _children_ to be considered as valid for Input events.\n\nIf this property is `true` then the children will _not_ be considered as valid for Input events.\n\nNote that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.","type":{"names":["Boolean"]},"default":""},{"name":"width","access":"","virtual":false,"description":"The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"pivot","access":"","virtual":false,"description":"The pivot point of this DisplayObject that it rotates around. The values are expressed\nin pixel values.","type":{"names":["PIXIPoint"]},"default":""},{"name":"hitArea","access":"","virtual":false,"description":"This is the defined area that will pick up mouse / touch events. It is null by default.\nSetting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)","type":{"names":["Rectangle","Circle","Ellipse","Polygon"]},"default":""},{"name":"renderable","access":"","virtual":false,"description":"Should this DisplayObject be rendered by the renderer? An object with a renderable value of\n`false` is skipped during the render pass.","type":{"names":["Boolean"]},"default":""},{"name":"parent","access":"","virtual":false,"description":"The parent DisplayObjectContainer that this DisplayObject is a child of.\nAll DisplayObjects must belong to a parent in order to be rendered.\nThe root parent is the Stage object. This property is set automatically when the\nDisplayObject is added to, or removed from, a DisplayObjectContainer.","type":{"names":["PIXIDisplayObjectContainer"]},"default":""},{"name":"worldAlpha","access":"","virtual":false,"description":"The multiplied alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nThis value is the calculated total, based on the alpha values of all parents of this DisplayObjects \nin the display list.\n\nTo obtain, and set, the local alpha value, see the `alpha` property.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"worldTransform","access":"","virtual":false,"description":"The current transform of this DisplayObject.\n\nThis property contains the calculated total, based on the transforms of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIMatrix"]},"default":""},{"name":"worldPosition","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject within the world.\n\nThis property contains the calculated total, based on the positions of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldScale","access":"","virtual":false,"description":"The global scale of this DisplayObject.\n\nThis property contains the calculated total, based on the scales of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldRotation","access":"","virtual":false,"description":"The rotation, in radians, of this DisplayObject.\n\nThis property contains the calculated total, based on the rotations of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"filterArea","access":"","virtual":false,"description":"The rectangular area used by filters when rendering a shader for this DisplayObject.","type":{"names":["Rectangle"]},"default":""},{"name":"_sr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_cr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_bounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_currentBounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_mask","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_cacheAsBitmap","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"_cacheIsDirty","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"worldVisible","access":"","virtual":false,"description":"Indicates if this DisplayObject is visible, based on it, and all of its parents, `visible` property values.","type":{"names":["Boolean"]},"default":""},{"name":"mask","access":"","virtual":false,"description":"Sets a mask for this DisplayObject. A mask is an instance of a Graphics object.\nWhen applied it limits the visible area of this DisplayObject to the shape of the mask.\nUnder a Canvas renderer it uses shape clipping. Under a WebGL renderer it uses a Stencil Buffer.\nTo remove a mask, set this property to `null`.","type":{"names":["PIXIGraphics"]},"default":""},{"name":"filters","access":"","virtual":false,"description":"Sets the filters for this DisplayObject. This is a WebGL only feature, and is ignored by the Canvas\nRenderer. A filter is a shader applied to this DisplayObject. You can modify the placement of the filter\nusing `DisplayObject.filterArea`.\n\nTo remove filters, set this property to `null`.\n\nNote: You cannot have a filter set, and a MULTIPLY Blend Mode active, at the same time. Setting a \nfilter will reset this DisplayObjects blend mode to NORMAL.","type":{"names":["Array"]},"default":""},{"name":"cacheAsBitmap","access":"","virtual":false,"description":"Sets if this DisplayObject should be cached as a bitmap.\n\nWhen invoked it will take a snapshot of the DisplayObject, as it is at that moment, and store it \nin a RenderTexture. This is then used whenever this DisplayObject is rendered. It can provide a\nperformance benefit for complex, but static, DisplayObjects. I.e. those with lots of children.\n\nCached Bitmaps do not track their parents. If you update a property of this DisplayObject, it will not\nre-generate the cached bitmap automatically. To do that you need to call `DisplayObject.updateCache`.\n\nTo remove a cached bitmap, set this property to `null`.","type":{"names":["Boolean"]},"default":""}]},{"name":"Phaser.Game","description":"The Phaser.Game object is the main controller for the entire Phaser game. It is responsible\rfor handling the boot process, parsing the configuration values, creating the renderer,\rand setting-up all of the Phaser systems, such as physics, sound and input.\rOnce that is complete it will start the default State, and then begin the main game loop.\r\rYou can access lots of the Phaser systems via the properties on the `game` object. For\rexample `game.renderer` is the Renderer, `game.sound` is the Sound Manager, and so on.\r\rAnywhere you can access the `game` property, you can access all of these core systems.\rFor example a Sprite has a `game` property, allowing you to talk to the various parts\rof Phaser directly, without having to look after your own references.\r\rIn it's most simplest form, a Phaser game can be created by providing the arguments\rto the constructor:\r\r```\rvar game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create });\r```\r\rIn the example above it is passing in a State object directly. You can also use the State\rManager to do this:\r\r```\rvar game = new Phaser.Game(800, 600, Phaser.AUTO);\rgame.state.add('Boot', BasicGame.Boot);\rgame.state.add('Preloader', BasicGame.Preloader);\rgame.state.add('MainMenu', BasicGame.MainMenu);\rgame.state.add('Game', BasicGame.Game);\rgame.state.start('Boot');\r\r```\rIn the example above, 4 States are added to the State Manager, and Phaser is told to\rstart running the `Boot` state when it has finished initializing. There are example\rproject templates you can use in the Phaser GitHub repo, inside the `resources` folder.\r\rInstead of specifying arguments you can also pass a single object instead:\r\r```\rvar config = {\r    width: 800,\r    height: 600,\r    renderer: Phaser.AUTO,\r    antialias: true,\r    multiTexture: true,\r    state: {\r        preload: preload,\r        create: create,\r        update: update\r    }\r}\r\rvar game = new Phaser.Game(config);\r```","constructor":{"name":"Game","description":"The Phaser.Game object is the main controller for the entire Phaser game. It is responsible\rfor handling the boot process, parsing the configuration values, creating the renderer,\rand setting-up all of the Phaser systems, such as physics, sound and input.\rOnce that is complete it will start the default State, and then begin the main game loop.\r\rYou can access lots of the Phaser systems via the properties on the `game` object. For\rexample `game.renderer` is the Renderer, `game.sound` is the Sound Manager, and so on.\r\rAnywhere you can access the `game` property, you can access all of these core systems.\rFor example a Sprite has a `game` property, allowing you to talk to the various parts\rof Phaser directly, without having to look after your own references.\r\rIn it's most simplest form, a Phaser game can be created by providing the arguments\rto the constructor:\r\r```\rvar game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create });\r```\r\rIn the example above it is passing in a State object directly. You can also use the State\rManager to do this:\r\r```\rvar game = new Phaser.Game(800, 600, Phaser.AUTO);\rgame.state.add('Boot', BasicGame.Boot);\rgame.state.add('Preloader', BasicGame.Preloader);\rgame.state.add('MainMenu', BasicGame.MainMenu);\rgame.state.add('Game', BasicGame.Game);\rgame.state.start('Boot');\r\r```\rIn the example above, 4 States are added to the State Manager, and Phaser is told to\rstart running the `Boot` state when it has finished initializing. There are example\rproject templates you can use in the Phaser GitHub repo, inside the `resources` folder.\r\rInstead of specifying arguments you can also pass a single object instead:\r\r```\rvar config = {\r    width: 800,\r    height: 600,\r    renderer: Phaser.AUTO,\r    antialias: true,\r    multiTexture: true,\r    state: {\r        preload: preload,\r        create: create,\r        update: update\r    }\r}\r\rvar game = new Phaser.Game(config);\r```","parameters":[{"name":"width","type":["number","string"],"description":"The width of your game in game pixels. If given as a string the value must be between 0 and 100 and will be used as the percentage width of the parent container, or the browser window if no parent is given.","default":800,"optional":true,"nullable":""},{"name":"height","type":["number","string"],"description":"The height of your game in game pixels. If given as a string the value must be between 0 and 100 and will be used as the percentage height of the parent container, or the browser window if no parent is given.","default":600,"optional":true,"nullable":""},{"name":"renderer","type":"number","description":"Which renderer to use: Phaser.AUTO will auto-detect, Phaser.WEBGL, Phaser.WEBGL_MULTI, Phaser.CANVAS or Phaser.HEADLESS (no rendering at all).","default":"Phaser.AUTO","optional":true,"nullable":""},{"name":"parent","type":["string","HTMLElement"],"description":"The DOM element into which this games canvas will be injected. Either a DOM ID (string) or the element itself.","default":"''","optional":true,"nullable":""},{"name":"state","type":"object","description":"The default state object. A object consisting of Phaser.State functions (preload, create, update, render) or null.","default":"","optional":true,"nullable":""},{"name":"transparent","type":"boolean","description":"Use a transparent canvas background or not.","default":"","optional":true,"nullable":""},{"name":"antialias","type":"boolean","description":"Draw all image textures anti-aliased or not. The default is for smooth textures, but disable if your game features pixel art.","default":true,"optional":true,"nullable":""},{"name":"physicsConfig","type":"object","description":"A physics configuration object to pass to the Physics world on creation.","default":"","optional":true,"nullable":""}]},"functions":[{"name":"parseConfig","description":"Parses a Game configuration object.","parameters":[]},{"name":"boot","description":"Initialize engine sub modules and start the game.","parameters":[]},{"name":"showDebugHeader","description":"Displays a Phaser version debug header in the console.","parameters":[]},{"name":"setUpRenderer","description":"Checks if the device is capable of using the requested renderer and sets it up or an alternative if not.","parameters":[]},{"name":"contextLost","description":"Handles WebGL context loss.","parameters":[{"name":"event","type":"Event","description":"The webglcontextlost event.","default":"","optional":"","nullable":""}]},{"name":"contextRestored","description":"Handles WebGL context restoration.","parameters":[]},{"name":"update","description":"The core game loop.","parameters":[{"name":"time","type":"number","description":"The current time as provided by RequestAnimationFrame.","default":"","optional":"","nullable":""}]},{"name":"updateLogic","description":"Updates all logic subsystems in Phaser. Called automatically by Game.update.","parameters":[{"name":"timeStep","type":"number","description":"The current timeStep value as determined by Game.update.","default":"","optional":"","nullable":""}]},{"name":"updateRender","description":"Runs the Render cycle.\rIt starts by calling State.preRender. In here you can do any last minute adjustments of display objects as required.\rIt then calls the renderer, which renders the entire display list, starting from the Stage object and working down.\rIt then calls plugin.render on any loaded plugins, in the order in which they were enabled.\rAfter this State.render is called. Any rendering that happens here will take place on-top of the display list.\rFinally plugin.postRender is called on any loaded plugins, in the order in which they were enabled.\rThis method is called automatically by Game.update, you don't need to call it directly.\rShould you wish to have fine-grained control over when Phaser renders then use the `Game.lockRender` boolean.\rPhaser will only render when this boolean is `false`.","parameters":[{"name":"elapsedTime","type":"number","description":"The time elapsed since the last update.","default":"","optional":"","nullable":""}]},{"name":"enableStep","description":"Enable core game loop stepping. When enabled you must call game.step() directly (perhaps via a DOM button?)\rCalling step will advance the game loop by one frame. This is extremely useful for hard to track down errors!","parameters":[]},{"name":"disableStep","description":"Disables core game loop stepping.","parameters":[]},{"name":"step","description":"When stepping is enabled you must call this function directly (perhaps via a DOM button?) to advance the game loop by one frame.\rThis is extremely useful to hard to track down errors! Use the internal stepCount property to monitor progress.","parameters":[]},{"name":"destroy","description":"Nukes the entire game from orbit.\r\rCalls destroy on Game.state, Game.sound, Game.scale, Game.stage, Game.input, Game.physics and Game.plugins.\r\rThen sets all of those local handlers to null, destroys the renderer, removes the canvas from the DOM\rand resets the PIXI default renderer.","parameters":[]},{"name":"gamePaused","description":"Called by the Stage visibility handler.","parameters":[{"name":"event","type":"object","description":"The DOM event that caused the game to pause, if any.","default":"","optional":"","nullable":""}]},{"name":"gameResumed","description":"Called by the Stage visibility handler.","parameters":[{"name":"event","type":"object","description":"The DOM event that caused the game to pause, if any.","default":"","optional":"","nullable":""}]},{"name":"focusLoss","description":"Called by the Stage visibility handler.","parameters":[{"name":"event","type":"object","description":"The DOM event that caused the game to pause, if any.","default":"","optional":"","nullable":""}]},{"name":"focusGain","description":"Called by the Stage visibility handler.","parameters":[{"name":"event","type":"object","description":"The DOM event that caused the game to pause, if any.","default":"","optional":"","nullable":""}]}],"members":[{"name":"id","access":"","virtual":false,"description":"Phaser Game ID","type":{"names":["number"]},"default":""},{"name":"config","access":"","virtual":false,"description":"The Phaser.Game configuration object.","type":{"names":["object"]},"default":""},{"name":"physicsConfig","access":"","virtual":false,"description":"The Phaser.Physics.World configuration object.","type":{"names":["object"]},"default":""},{"name":"parent","access":"","virtual":false,"description":"The Games DOM parent.","type":{"names":["string","HTMLElement"]},"default":""},{"name":"width","access":"","virtual":false,"description":"The current Game Width in pixels.\r\r_Do not modify this property directly:_ use {@link Phaser.ScaleManager#setGameSize} - eg. `game.scale.setGameSize(width, height)` - instead.","type":{"names":["integer"]},"default":800},{"name":"height","access":"","virtual":false,"description":"The current Game Height in pixels.\r\r_Do not modify this property directly:_ use {@link Phaser.ScaleManager#setGameSize} - eg. `game.scale.setGameSize(width, height)` - instead.","type":{"names":["integer"]},"default":600},{"name":"resolution","access":"","virtual":false,"description":"The resolution of your game. This value is read only, but can be changed at start time it via a game configuration object.","type":{"names":["integer"]},"default":1},{"name":"_width","access":"private","virtual":false,"description":"Private internal var.","type":{"names":["integer"]},"default":""},{"name":"_height","access":"private","virtual":false,"description":"Private internal var.","type":{"names":["integer"]},"default":""},{"name":"transparent","access":"","virtual":false,"description":"Use a transparent canvas background or not.","type":{"names":["boolean"]},"default":""},{"name":"antialias","access":"","virtual":false,"description":"Anti-alias graphics. By default scaled images are smoothed in Canvas and WebGL, set anti-alias to false to disable this globally.","type":{"names":["boolean"]},"default":true},{"name":"multiTexture","access":"","virtual":false,"description":"Has support for Multiple bound Textures in WebGL been enabled? This is a read-only property.\rTo set it you need to either specify `Phaser.WEBGL_MULTI` as the renderer type, or use the Game\rConfiguration object with the property `multiTexture` set to true. It has to be enabled before\rPixi boots, and cannot be changed after the game is running. Once enabled, take advantage of it\rvia the `game.renderer.setTexturePriority` method.","type":{"names":["boolean"]},"default":""},{"name":"preserveDrawingBuffer","access":"","virtual":false,"description":"The value of the preserveDrawingBuffer flag affects whether or not the contents of the stencil buffer is retained after rendering.","type":{"names":["boolean"]},"default":""},{"name":"clearBeforeRender","access":"","virtual":false,"description":"Clear the Canvas each frame before rendering the display list.\rYou can set this to `false` to gain some performance if your game always contains a background that completely fills the display.","type":{"names":["boolean"]},"default":true},{"name":"renderer","access":"protected","virtual":false,"description":"The Pixi Renderer.","type":{"names":["PIXI.CanvasRenderer","PIXI.WebGLRenderer"]},"default":""},{"name":"renderType","access":"","virtual":false,"description":"The Renderer this game will use. Either Phaser.AUTO, Phaser.CANVAS, Phaser.WEBGL, Phaser.WEBGL_MULTI or Phaser.HEADLESS.","type":{"names":["number"]},"default":""},{"name":"state","access":"","virtual":false,"description":"The StateManager.","type":{"names":["Phaser.StateManager"]},"default":""},{"name":"isBooted","access":"","virtual":false,"description":"Whether the game engine is booted, aka available.","type":{"names":["boolean"]},"default":""},{"name":"isRunning","access":"","virtual":false,"description":"Is game running or paused?","type":{"names":["boolean"]},"default":""},{"name":"raf","access":"protected","virtual":false,"description":"Automatically handles the core game loop via requestAnimationFrame or setTimeout","type":{"names":["Phaser.RequestAnimationFrame"]},"default":""},{"name":"add","access":"","virtual":false,"description":"Reference to the Phaser.GameObjectFactory.","type":{"names":["Phaser.GameObjectFactory"]},"default":""},{"name":"make","access":"","virtual":false,"description":"Reference to the GameObject Creator.","type":{"names":["Phaser.GameObjectCreator"]},"default":""},{"name":"cache","access":"","virtual":false,"description":"Reference to the assets cache.","type":{"names":["Phaser.Cache"]},"default":""},{"name":"input","access":"","virtual":false,"description":"Reference to the input manager","type":{"names":["Phaser.Input"]},"default":""},{"name":"load","access":"","virtual":false,"description":"Reference to the assets loader.","type":{"names":["Phaser.Loader"]},"default":""},{"name":"math","access":"","virtual":false,"description":"Reference to the math helper.","type":{"names":["Phaser.Math"]},"default":""},{"name":"net","access":"","virtual":false,"description":"Reference to the network class.","type":{"names":["Phaser.Net"]},"default":""},{"name":"scale","access":"","virtual":false,"description":"The game scale manager.","type":{"names":["Phaser.ScaleManager"]},"default":""},{"name":"sound","access":"","virtual":false,"description":"Reference to the sound manager.","type":{"names":["Phaser.SoundManager"]},"default":""},{"name":"stage","access":"","virtual":false,"description":"Reference to the stage.","type":{"names":["Phaser.Stage"]},"default":""},{"name":"time","access":"","virtual":false,"description":"Reference to the core game clock.","type":{"names":["Phaser.Time"]},"default":""},{"name":"tweens","access":"","virtual":false,"description":"Reference to the tween manager.","type":{"names":["Phaser.TweenManager"]},"default":""},{"name":"world","access":"","virtual":false,"description":"Reference to the world.","type":{"names":["Phaser.World"]},"default":""},{"name":"physics","access":"","virtual":false,"description":"Reference to the physics manager.","type":{"names":["Phaser.Physics"]},"default":""},{"name":"plugins","access":"","virtual":false,"description":"Reference to the plugin manager.","type":{"names":["Phaser.PluginManager"]},"default":""},{"name":"rnd","access":"","virtual":false,"description":"Instance of repeatable random data generator helper.","type":{"names":["Phaser.RandomDataGenerator"]},"default":""},{"name":"device","access":"","virtual":false,"description":"Contains device information and capabilities.","type":{"names":["Phaser.Device"]},"default":""},{"name":"camera","access":"","virtual":false,"description":"A handy reference to world.camera.","type":{"names":["Phaser.Camera"]},"default":""},{"name":"canvas","access":"","virtual":false,"description":"A handy reference to renderer.view, the canvas that the game is being rendered in to.","type":{"names":["HTMLCanvasElement"]},"default":""},{"name":"context","access":"","virtual":false,"description":"A handy reference to renderer.context (only set for CANVAS games, not WebGL)","type":{"names":["CanvasRenderingContext2D"]},"default":""},{"name":"debug","access":"","virtual":false,"description":"A set of useful debug utilities.","type":{"names":["Phaser.Utils.Debug"]},"default":""},{"name":"particles","access":"","virtual":false,"description":"The Particle Manager.","type":{"names":["Phaser.Particles"]},"default":""},{"name":"create","access":"","virtual":false,"description":"The Asset Generator.","type":{"names":["Phaser.Create"]},"default":""},{"name":"lockRender","access":"","virtual":false,"description":"If `false` Phaser will automatically render the display list every update. If `true` the render loop will be skipped.\rYou can toggle this value at run-time to gain exact control over when Phaser renders. This can be useful in certain types of game or application.\rPlease note that if you don't render the display list then none of the game object transforms will be updated, so use this value carefully.","type":{"names":["boolean"]},"default":""},{"name":"stepping","access":"","virtual":false,"description":"Enable core loop stepping with Game.enableStep().","type":{"names":["boolean"]},"default":""},{"name":"pendingStep","access":"","virtual":false,"description":"An internal property used by enableStep, but also useful to query from your own game objects.","type":{"names":["boolean"]},"default":""},{"name":"stepCount","access":"","virtual":false,"description":"When stepping is enabled this contains the current step cycle.","type":{"names":["number"]},"default":""},{"name":"onPause","access":"","virtual":false,"description":"This event is fired when the game pauses.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onResume","access":"","virtual":false,"description":"This event is fired when the game resumes from a paused state.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onBlur","access":"","virtual":false,"description":"This event is fired when the game no longer has focus (typically on page hide).","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onFocus","access":"","virtual":false,"description":"This event is fired when the game has focus (typically on page show).","type":{"names":["Phaser.Signal"]},"default":""},{"name":"_paused","access":"private","virtual":false,"description":"Is game paused?","type":{"names":["boolean"]},"default":""},{"name":"_codePaused","access":"private","virtual":false,"description":"Was the game paused via code or a visibility change?","type":{"names":["boolean"]},"default":""},{"name":"currentUpdateID","access":"protected","virtual":false,"description":"The ID of the current/last logic update applied this render frame, starting from 0.\rThe first update is `currentUpdateID === 0` and the last update is `currentUpdateID === updatesThisFrame.`","type":{"names":["integer"]},"default":""},{"name":"updatesThisFrame","access":"protected","virtual":false,"description":"Number of logic updates expected to occur this render frame; will be 1 unless there are catch-ups required (and allowed).","type":{"names":["integer"]},"default":""},{"name":"_deltaTime","access":"private","virtual":false,"description":"Accumulate elapsed time until a logic update is due.","type":{"names":["number"]},"default":""},{"name":"_lastCount","access":"private","virtual":false,"description":"Remember how many 'catch-up' iterations were used on the logicUpdate last frame.","type":{"names":["number"]},"default":""},{"name":"_spiraling","access":"private","virtual":false,"description":"If the 'catch-up' iterations are spiraling out of control, this counter is incremented.","type":{"names":["number"]},"default":""},{"name":"_kickstart","access":"private","virtual":false,"description":"Force a logic update + render by default (always set on Boot and State swap)","type":{"names":["boolean"]},"default":""},{"name":"fpsProblemNotifier","access":"public","virtual":false,"description":"If the game is struggling to maintain the desired FPS, this signal will be dispatched.\rThe desired/chosen FPS should probably be closer to the {@link Phaser.Time#suggestedFps} value.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"forceSingleUpdate","access":"","virtual":false,"description":"Should the game loop force a logic update, regardless of the delta timer? Set to true if you know you need this. You can toggle it on the fly.","type":{"names":["boolean"]},"default":""},{"name":"_nextFpsNotification","access":"private","virtual":false,"description":"The soonest game.time.time value that the next fpsProblemNotifier can be dispatched.","type":"","default":""},{"name":"paused","access":"","virtual":false,"description":"The paused state of the Game. A paused game doesn't update any of its subsystems.\rWhen a game is paused the onPause event is dispatched. When it is resumed the onResume event is dispatched. Gets and sets the paused state of the Game.","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.Group","description":"A Group is a container for {@link DisplayObject display objects} including {@link Phaser.Sprite Sprites} and {@link Phaser.Image Images}.\r\rGroups form the logical tree structure of the display/scene graph where local transformations are applied to children.\rFor instance, all children are also moved/rotated/scaled when the group is moved/rotated/scaled.\r\rIn addition, Groups provides support for fast pooling and object recycling.\r\rGroups are also display objects and can be nested as children within other Groups.","constructor":{"name":"Group","description":"A Group is a container for {@link DisplayObject display objects} including {@link Phaser.Sprite Sprites} and {@link Phaser.Image Images}.\r\rGroups form the logical tree structure of the display/scene graph where local transformations are applied to children.\rFor instance, all children are also moved/rotated/scaled when the group is moved/rotated/scaled.\r\rIn addition, Groups provides support for fast pooling and object recycling.\r\rGroups are also display objects and can be nested as children within other Groups.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"parent","type":["DisplayObject","null"],"description":"The parent Group (or other {@link DisplayObject}) that this group will be added to.\r    If undefined/unspecified the Group will be added to the {@link Phaser.Game#world Game World}; if null the Group will not be added to any parent.","default":"(game world)","optional":true,"nullable":""},{"name":"name","type":"string","description":"A name for this group. Not used internally but useful for debugging.","default":"'group'","optional":true,"nullable":""},{"name":"addToStage","type":"boolean","description":"If true this group will be added directly to the Game.Stage instead of Game.World.","default":"","optional":true,"nullable":""},{"name":"enableBody","type":"boolean","description":"If true all Sprites created with {@link #create} or {@link #createMulitple} will have a physics body created on them. Change the body type with {@link #physicsBodyType}.","default":"","optional":true,"nullable":""},{"name":"physicsBodyType","type":"integer","description":"The physics body type to use when physics bodies are automatically added. See {@link #physicsBodyType} for values.","default":"","optional":true,"nullable":""}]},"functions":[{"name":"add","description":"Adds an existing object as the top child in this group.\r\rThe child is automatically added to the top of the group, and is displayed above every previous child.\r\rOr if the _optional_ index is specified, the child is added at the location specified by the index value, \rthis allows you to control child ordering.\r\rIf the child was already in this Group, it is simply returned, and nothing else happens to it.\r\rIf `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.\r\rUse {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.","parameters":[{"name":"child","type":"DisplayObject","description":"The display object to add as a child.","default":"","optional":"","nullable":""},{"name":"silent","type":"boolean","description":"If true the child will not dispatch the `onAddedToGroup` event.","default":"","optional":true,"nullable":""},{"name":"index","type":"integer","description":"The index within the group to insert the child to. Where 0 is the bottom of the Group.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The child that was added to the group."}},{"name":"addAt","description":"Adds an existing object to this group.\r\rThe child is added to the group at the location specified by the index value, this allows you to control child ordering.\r\rIf `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.","parameters":[{"name":"child","type":"DisplayObject","description":"The display object to add as a child.","default":"","optional":"","nullable":""},{"name":"index","type":"integer","description":"The index within the group to insert the child to.","default":"","optional":true,"nullable":""},{"name":"silent","type":"boolean","description":"If true the child will not dispatch the `onAddedToGroup` event.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The child that was added to the group."}},{"name":"addToHash","description":"Adds a child of this Group into the hash array.\rThis call will return false if the child is not a child of this Group, or is already in the hash.","parameters":[{"name":"child","type":"DisplayObject","description":"The display object to add to this Groups hash. Must be a member of this Group already and not present in the hash.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the child was successfully added to the hash, otherwise false."}},{"name":"removeFromHash","description":"Removes a child of this Group from the hash array.\rThis call will return false if the child is not in the hash.","parameters":[{"name":"child","type":"DisplayObject","description":"The display object to remove from this Groups hash. Must be a member of this Group and in the hash.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the child was successfully removed from the hash, otherwise false."}},{"name":"addMultiple","description":"Adds an array of existing Display Objects to this Group.\r\rThe Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.\r\rAs well as an array you can also pass another Group as the first argument. In this case all of the children from that\rGroup will be removed from it and added into this Group.\r\rIf `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.","parameters":[{"name":"children","type":["Array.<DisplayObject>","Phaser.Group"],"description":"An array of display objects or a Phaser.Group. If a Group is given then *all* children will be moved from it.","default":"","optional":"","nullable":""},{"name":"silent","type":"boolean","description":"If true the children will not dispatch the `onAddedToGroup` event.","default":"","optional":true,"nullable":""}],"returns":{"type":["Array.<DisplayObject>","Phaser.Group"],"description":"The array of children or Group of children that were added to this Group."}},{"name":"getAt","description":"Returns the child found at the given index within this group.","parameters":[{"name":"index","type":"integer","description":"The index to return the child from.","default":"","optional":"","nullable":""}],"returns":{"type":["DisplayObject","integer"],"description":"The child that was found at the given index, or -1 for an invalid index."}},{"name":"create","description":"Creates a new Phaser.Sprite object and adds it to the top of this group.\r\rUse {@link Phaser.Group#classType classType} to change the type of object created.\r\rThe child is automatically added to the top of the group, and is displayed above every previous child.\r\rOr if the _optional_ index is specified, the child is added at the location specified by the index value, \rthis allows you to control child ordering.\r\rIf `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.","parameters":[{"name":"x","type":"number","description":"The x coordinate to display the newly created Sprite at. The value is in relation to the group.x point.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate to display the newly created Sprite at. The value is in relation to the group.y point.","default":"","optional":"","nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""},{"name":"exists","type":"boolean","description":"The default exists state of the Sprite.","default":true,"optional":true,"nullable":""},{"name":"index","type":"integer","description":"The index within the group to insert the child to. Where 0 is the bottom of the Group.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The child that was created: will be a {@link Phaser.Sprite} unless {@link #classType} has been changed."}},{"name":"createMultiple","description":"Creates multiple Phaser.Sprite objects and adds them to the top of this Group.\r\rThis method is useful if you need to quickly generate a pool of sprites, such as bullets.\r\rUse {@link Phaser.Group#classType classType} to change the type of object created.\r\rYou can provide an array as the `key` and / or `frame` arguments. When you do this\rit will create `quantity` Sprites for every key (and frame) in the arrays.\r\rFor example:\r\r`createMultiple(25, ['ball', 'carrot'])`\r\rIn the above code there are 2 keys (ball and carrot) which means that 50 sprites will be\rcreated in total, 25 of each. You can also have the `frame` as an array:\r\r`createMultiple(5, 'bricks', [0, 1, 2, 3])`\r\rIn the above there is one key (bricks), which is a sprite sheet. The frames array tells\rthis method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because\rthe quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with\rframe 1, and so on.\r\rIf you set both the key and frame arguments to be arrays then understand it will create\ra total quantity of sprites equal to the size of both arrays times each other. I.e.:\r\r`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`\r\rThe above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2.\rIt will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2.\rIn total it will have created 120 sprites.\r\rBy default the Sprites will have their `exists` property set to `false`, and they will be \rpositioned at 0x0, relative to the `Group.x / y` values.\r\rIf `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.","parameters":[{"name":"quantity","type":"integer","description":"The number of Sprites to create.","default":"","optional":"","nullable":""},{"name":"key","type":["string","array"],"description":"The Cache key of the image that the Sprites will use. Or an Array of keys. See the description for details on how the quantity applies when arrays are used.","default":"","optional":"","nullable":""},{"name":"frame","type":["integer","string","array"],"description":"If the Sprite image contains multiple frames you can specify which one to use here. Or an Array of frames. See the description for details on how the quantity applies when arrays are used.","default":"","optional":true,"nullable":""},{"name":"exists","type":"boolean","description":"The default exists state of the Sprite.","default":"","optional":true,"nullable":""}],"returns":{"type":"array","description":"An array containing all of the Sprites that were created."}},{"name":"updateZ","description":"Internal method that re-applies all of the children's Z values.\r\rThis must be called whenever children ordering is altered so that their `z` indices are correctly updated.","parameters":[]},{"name":"align","description":"This method iterates through all children in the Group (regardless if they are visible or exist)\rand then changes their position so they are arranged in a Grid formation. Children must have\rthe `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have\rthis.\r\rThe grid dimensions are determined by the first four arguments. The `width` and `height` arguments\rrelate to the width and height of the grid respectively.\r\rFor example if the Group had 100 children in it:\r\r`Group.align(10, 10, 32, 32)`\r\rThis will align all of the children into a grid formation of 10x10, using 32 pixels per\rgrid cell. If you want a wider grid, you could do:\r\r`Group.align(25, 4, 32, 32)`\r\rThis will align the children into a grid of 25x4, again using 32 pixels per grid cell.\r\rYou can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method\rto keep on aligning children until there are no children left. For example if this Group had\r48 children in it, the following:\r\r`Group.align(-1, 8, 32, 32)`\r\r... will align the children so that there are 8 children vertically (the second argument), \rand each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)\r\rYou can also do:\r\r`Group.align(10, -1, 32, 32)`\r\rIn this case it will create a grid 10 wide, and as tall as it needs to be in order to fit\rall of the children in.\r\rThe `position` property allows you to control where in each grid cell the child is positioned.\rThis is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, \r`Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, \r`Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.\r\rThe final argument; `offset` lets you start the alignment from a specific child index.","parameters":[{"name":"width","type":"integer","description":"The width of the grid in items (not pixels). Set to -1 for a dynamic width. If -1 then you must set an explicit height value.","default":"","optional":"","nullable":""},{"name":"height","type":"integer","description":"The height of the grid in items (not pixels). Set to -1 for a dynamic height. If -1 then you must set an explicit width value.","default":"","optional":"","nullable":""},{"name":"cellWidth","type":"integer","description":"The width of each grid cell, in pixels.","default":"","optional":"","nullable":""},{"name":"cellHeight","type":"integer","description":"The height of each grid cell, in pixels.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offset","type":"integer","description":"Optional index to start the alignment from. Defaults to zero, the first child in the Group, but can be set to any valid child index value.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the Group children were aligned, otherwise false."}},{"name":"resetCursor","description":"Sets the group cursor to the first child in the group.\r\rIf the optional index parameter is given it sets the cursor to the object at that index instead.","parameters":[{"name":"index","type":"integer","description":"Set the cursor to point to a specific index.","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"The child the cursor now points to."}},{"name":"next","description":"Advances the group cursor to the next (higher) object in the group.\r\rIf the cursor is at the end of the group (top child) it is moved the start of the group (bottom child).","parameters":[],"returns":{"type":"any","description":"The child the cursor now points to."}},{"name":"previous","description":"Moves the group cursor to the previous (lower) child in the group.\r\rIf the cursor is at the start of the group (bottom child) it is moved to the end (top child).","parameters":[],"returns":{"type":"any","description":"The child the cursor now points to."}},{"name":"swap","description":"Swaps the position of two children in this group.\r\rBoth children must be in this group, a child cannot be swapped with itself, and unparented children cannot be swapped.","parameters":[{"name":"child1","type":"any","description":"The first child to swap.","default":"","optional":"","nullable":""},{"name":"child2","type":"any","description":"The second child to swap.","default":"","optional":"","nullable":""}]},{"name":"bringToTop","description":"Brings the given child to the top of this group so it renders above all other children.","parameters":[{"name":"child","type":"any","description":"The child to bring to the top of this group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The child that was moved."}},{"name":"sendToBack","description":"Sends the given child to the bottom of this group so it renders below all other children.","parameters":[{"name":"child","type":"any","description":"The child to send to the bottom of this group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The child that was moved."}},{"name":"moveUp","description":"Moves the given child up one place in this group unless it's already at the top.","parameters":[{"name":"child","type":"any","description":"The child to move up in the group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The child that was moved."}},{"name":"moveDown","description":"Moves the given child down one place in this group unless it's already at the bottom.","parameters":[{"name":"child","type":"any","description":"The child to move down in the group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The child that was moved."}},{"name":"xy","description":"Positions the child found at the given index within this group to the given x and y coordinates.","parameters":[{"name":"index","type":"integer","description":"The index of the child in the group to set the position of.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The new x position of the child.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The new y position of the child.","default":"","optional":"","nullable":""}]},{"name":"reverse","description":"Reverses all children in this group.\r\rThis operation applies only to immediate children and does not propagate to subgroups.","parameters":[]},{"name":"getIndex","description":"Get the index position of the given child in this group, which should match the child's `z` property.","parameters":[{"name":"child","type":"any","description":"The child to get the index for.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The index of the child or -1 if it's not a member of this group."}},{"name":"getByName","description":"Searches the Group for the first instance of a child with the `name`\rproperty matching the given argument. Should more than one child have\rthe same name only the first instance is returned.","parameters":[{"name":"name","type":"string","description":"The name to search for.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The first child with a matching name, or null if none were found."}},{"name":"replace","description":"Replaces a child of this Group with the given newChild. The newChild cannot be a member of this Group.\r\rIf `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.","parameters":[{"name":"oldChild","type":"any","description":"The child in this group that will be replaced.","default":"","optional":"","nullable":""},{"name":"newChild","type":"any","description":"The child to be inserted into this group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"Returns the oldChild that was replaced within this group."}},{"name":"hasProperty","description":"Checks if the child has the given property.\r\rWill scan up to 4 levels deep only.","parameters":[{"name":"child","type":"any","description":"The child to check for the existence of the property on.","default":"","optional":"","nullable":""},{"name":"key","type":"Array.<string>","description":"An array of strings that make up the property.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the child has the property, otherwise false."}},{"name":"setProperty","description":"Sets a property to the given value on the child. The operation parameter controls how the value is set.\r\rThe operations are:\r- 0: set the existing value to the given value; if force is `true` a new property will be created if needed\r- 1: will add the given value to the value already present.\r- 2: will subtract the given value from the value already present.\r- 3: will multiply the value already present by the given value.\r- 4: will divide the value already present by the given value.","parameters":[{"name":"child","type":"any","description":"The child to set the property value on.","default":"","optional":"","nullable":""},{"name":"key","type":"array","description":"An array of strings that make up the property that will be set.","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be set.","default":"","optional":"","nullable":""},{"name":"operation","type":"integer","description":"Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the property was set, false if not."}},{"name":"checkProperty","description":"Checks a property for the given value on the child.","parameters":[{"name":"child","type":"any","description":"The child to check the property value on.","default":"","optional":"","nullable":""},{"name":"key","type":"array","description":"An array of strings that make up the property that will be set.","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be checked.","default":"","optional":"","nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the property was was equal to value, false if not."}},{"name":"set","description":"Quickly set a property on a single child of this group to a new value.\r\rThe operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.","parameters":[{"name":"child","type":"Phaser.Sprite","description":"The child to set the property on.","default":"","optional":"","nullable":""},{"name":"key","type":"string","description":"The property, as a string, to be set. For example: 'body.velocity.x'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be set.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If set then the child will only be updated if alive=true.","default":"","optional":true,"nullable":""},{"name":"checkVisible","type":"boolean","description":"If set then the child will only be updated if visible=true.","default":"","optional":true,"nullable":""},{"name":"operation","type":"integer","description":"Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the property was set, false if not."}},{"name":"setAll","description":"Quickly set the same property across all children of this group to a new value.\r\rThis call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children.\rIf you need that ability please see `Group.setAllChildren`.\r\rThe operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.","parameters":[{"name":"key","type":"string","description":"The property, as a string, to be set. For example: 'body.velocity.x'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be set.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If set then only children with alive=true will be updated. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"checkVisible","type":"boolean","description":"If set then only children with visible=true will be updated. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"operation","type":"integer","description":"Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.","default":"","optional":true,"nullable":""}]},{"name":"setAllChildren","description":"Quickly set the same property across all children of this group, and any child Groups, to a new value.\r\rIf this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom.\rUnlike with `setAll` the property is NOT set on child Groups itself.\r\rThe operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.","parameters":[{"name":"key","type":"string","description":"The property, as a string, to be set. For example: 'body.velocity.x'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be set.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If set then only children with alive=true will be updated. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"checkVisible","type":"boolean","description":"If set then only children with visible=true will be updated. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"operation","type":"integer","description":"Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.","default":"","optional":true,"nullable":""}]},{"name":"checkAll","description":"Quickly check that the same property across all children of this group is equal to the given value.\r\rThis call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.","parameters":[{"name":"key","type":"string","description":"The property, as a string, to be set. For example: 'body.velocity.x'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be checked.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If set then only children with alive=true will be checked. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"checkVisible","type":"boolean","description":"If set then only children with visible=true will be checked. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned.","default":"","optional":true,"nullable":""}]},{"name":"addAll","description":"Adds the amount to the given property on all children in this group.\r\r`Group.addAll('x', 10)` will add 10 to the child.x value for each child.","parameters":[{"name":"property","type":"string","description":"The property to increment, for example 'body.velocity.x' or 'angle'.","default":"","optional":"","nullable":""},{"name":"amount","type":"number","description":"The amount to increment the property by. If child.x = 10 then addAll('x', 40) would make child.x = 50.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If true the property will only be changed if the child is alive.","default":"","optional":"","nullable":""},{"name":"checkVisible","type":"boolean","description":"If true the property will only be changed if the child is visible.","default":"","optional":"","nullable":""}]},{"name":"subAll","description":"Subtracts the amount from the given property on all children in this group.\r\r`Group.subAll('x', 10)` will minus 10 from the child.x value for each child.","parameters":[{"name":"property","type":"string","description":"The property to decrement, for example 'body.velocity.x' or 'angle'.","default":"","optional":"","nullable":""},{"name":"amount","type":"number","description":"The amount to subtract from the property. If child.x = 50 then subAll('x', 40) would make child.x = 10.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If true the property will only be changed if the child is alive.","default":"","optional":"","nullable":""},{"name":"checkVisible","type":"boolean","description":"If true the property will only be changed if the child is visible.","default":"","optional":"","nullable":""}]},{"name":"multiplyAll","description":"Multiplies the given property by the amount on all children in this group.\r\r`Group.multiplyAll('x', 2)` will x2 the child.x value for each child.","parameters":[{"name":"property","type":"string","description":"The property to multiply, for example 'body.velocity.x' or 'angle'.","default":"","optional":"","nullable":""},{"name":"amount","type":"number","description":"The amount to multiply the property by. If child.x = 10 then multiplyAll('x', 2) would make child.x = 20.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If true the property will only be changed if the child is alive.","default":"","optional":"","nullable":""},{"name":"checkVisible","type":"boolean","description":"If true the property will only be changed if the child is visible.","default":"","optional":"","nullable":""}]},{"name":"divideAll","description":"Divides the given property by the amount on all children in this group.\r\r`Group.divideAll('x', 2)` will half the child.x value for each child.","parameters":[{"name":"property","type":"string","description":"The property to divide, for example 'body.velocity.x' or 'angle'.","default":"","optional":"","nullable":""},{"name":"amount","type":"number","description":"The amount to divide the property by. If child.x = 100 then divideAll('x', 2) would make child.x = 50.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If true the property will only be changed if the child is alive.","default":"","optional":"","nullable":""},{"name":"checkVisible","type":"boolean","description":"If true the property will only be changed if the child is visible.","default":"","optional":"","nullable":""}]},{"name":"callAllExists","description":"Calls a function, specified by name, on all children in the group who exist (or do not exist).\r\rAfter the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.","parameters":[{"name":"callback","type":"string","description":"Name of the function on the children to call.","default":"","optional":"","nullable":""},{"name":"existsValue","type":"boolean","description":"Only children with exists=existsValue will be called.","default":"","optional":"","nullable":""},{"name":"parameter","type":"any","description":"Additional parameters that will be passed to the callback.","default":"","optional":"","nullable":""}]},{"name":"callbackFromArray","description":"Returns a reference to a function that exists on a child of the group based on the given callback array.","parameters":[{"name":"child","type":"object","description":"The object to inspect.","default":"","optional":"","nullable":""},{"name":"callback","type":"array","description":"The array of function names.","default":"","optional":"","nullable":""},{"name":"length","type":"integer","description":"The size of the array (pre-calculated in callAll).","default":"","optional":"","nullable":""}]},{"name":"callAll","description":"Calls a function, specified by name, on all on children.\r\rThe function is called for all children regardless if they are dead or alive (see callAllExists for different options).\rAfter the method parameter and context you can add as many extra parameters as you like, which will all be passed to the child.","parameters":[{"name":"method","type":"string","description":"Name of the function on the child to call. Deep property lookup is supported.","default":"","optional":"","nullable":""},{"name":"context","type":"string","description":"A string containing the context under which the method will be executed. Set to null to default to the child.","default":"","optional":true,"nullable":""},{"name":"args","type":"any","description":"Additional parameters that will be passed to the method.","default":"","optional":"","nullable":""}]},{"name":"preUpdate","description":"The core preUpdate - as called by World.","parameters":[]},{"name":"update","description":"The core update - as called by World.","parameters":[]},{"name":"postUpdate","description":"The core postUpdate - as called by World.","parameters":[]},{"name":"filter","description":"Find children matching a certain predicate.\r\rFor example:\r\r    var healthyList = Group.filter(function(child, index, children) {\r        return child.health > 10 ? true : false;\r    }, true);\r    healthyList.callAll('attack');\r\rNote: Currently this will skip any children which are Groups themselves.","parameters":[{"name":"predicate","type":"function","description":"The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, the index as the second, and the entire child array as the third","default":"","optional":"","nullable":""},{"name":"checkExists","type":"boolean","description":"If true, only existing can be selected; otherwise all children can be selected and will be passed to the predicate.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.ArraySet","description":"Returns an array list containing all the children that the predicate returned true for"}},{"name":"forEach","description":"Call a function on each child in this group.\r\rAdditional arguments for the callback can be specified after the `checkExists` parameter. For example,\r\r    Group.forEach(awardBonusGold, this, true, 100, 500)\r\rwould invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.\r\rNote: This check will skip any children which are Groups themselves.","parameters":[{"name":"callback","type":"function","description":"The function that will be called for each applicable child. The child will be passed as the first argument.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":"","nullable":""},{"name":"checkExists","type":"boolean","description":"If set only children matching for which `exists` is true will be passed to the callback, otherwise all children will be passed.","default":"","optional":true,"nullable":""},{"name":"args","type":"any","description":"Additional arguments to pass to the callback function, after the child item.","default":"(none)","optional":true,"nullable":""}]},{"name":"forEachExists","description":"Call a function on each existing child in this group.\r\rSee {@link Phaser.Group#forEach forEach} for details.","parameters":[{"name":"callback","type":"function","description":"The function that will be called for each applicable child. The child will be passed as the first argument.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":"","nullable":""},{"name":"args","type":"any","description":"Additional arguments to pass to the callback function, after the child item.","default":"(none)","optional":true,"nullable":""}]},{"name":"forEachAlive","description":"Call a function on each alive child in this group.\r\rSee {@link Phaser.Group#forEach forEach} for details.","parameters":[{"name":"callback","type":"function","description":"The function that will be called for each applicable child. The child will be passed as the first argument.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":"","nullable":""},{"name":"args","type":"any","description":"Additional arguments to pass to the callback function, after the child item.","default":"(none)","optional":true,"nullable":""}]},{"name":"forEachDead","description":"Call a function on each dead child in this group.\r\rSee {@link Phaser.Group#forEach forEach} for details.","parameters":[{"name":"callback","type":"function","description":"The function that will be called for each applicable child. The child will be passed as the first argument.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":"","nullable":""},{"name":"args","type":"any","description":"Additional arguments to pass to the callback function, after the child item.","default":"(none)","optional":true,"nullable":""}]},{"name":"sort","description":"Sort the children in the group according to a particular key and ordering.\r\rCall this function to sort the group according to a particular key value and order.\r\rFor example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.\r\rInternally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including\ralphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.","parameters":[{"name":"key","type":"string","description":"The name of the property to sort on. Defaults to the objects z-depth value.","default":"'z'","optional":true,"nullable":""},{"name":"order","type":"integer","description":"Order ascending ({@link Phaser.Group.SORT_ASCENDING SORT_ASCENDING}) or descending ({@link Phaser.Group.SORT_DESCENDING SORT_DESCENDING}).","default":"Phaser.Group.SORT_ASCENDING","optional":true,"nullable":""}]},{"name":"customSort","description":"Sort the children in the group according to custom sort function.\r\rThe `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b).\rIt should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.","parameters":[{"name":"sortHandler","type":"function","description":"The custom sort function.","default":"","optional":"","nullable":""},{"name":"context","type":"object","description":"The context in which the sortHandler is called.","default":"","optional":true,"nullable":""}]},{"name":"ascendingSortHandler","description":"An internal helper function for the sort process.","parameters":[{"name":"a","type":"object","description":"The first object being sorted.","default":"","optional":"","nullable":""},{"name":"b","type":"object","description":"The second object being sorted.","default":"","optional":"","nullable":""}]},{"name":"descendingSortHandler","description":"An internal helper function for the sort process.","parameters":[{"name":"a","type":"object","description":"The first object being sorted.","default":"","optional":"","nullable":""},{"name":"b","type":"object","description":"The second object being sorted.","default":"","optional":"","nullable":""}]},{"name":"iterate","description":"Iterates over the children of the group performing one of several actions for matched children.\r\rA child is considered a match when it has a property, named `key`, whose value is equal to `value`\raccording to a strict equality comparison.\r\rThe result depends on the `returnType`:\r\r- {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}:\r    The callback, if any, is applied to all matching children. The number of matched children is returned.\r- {@link Phaser.Group.RETURN_NONE RETURN_NONE}:\r    The callback, if any, is applied to all matching children. No value is returned.\r- {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}:\r    The callback, if any, is applied to the *first* matching child and the *first* matched child is returned.\r    If there is no matching child then null is returned.\r\rIf `args` is specified it must be an array. The matched child will be assigned to the first\relement and the entire array will be applied to the callback function.","parameters":[{"name":"key","type":"string","description":"The child property to check, i.e. 'exists', 'alive', 'health'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"A child matches if `child[key] === value` is true.","default":"","optional":"","nullable":""},{"name":"returnType","type":"integer","description":"How to iterate the children and what to return.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"Optional function that will be called on each matching child. The matched child is supplied as the first argument.","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":true,"nullable":""},{"name":"args","type":"Array.<any>","description":"The arguments supplied to to the callback; the first array index (argument) will be replaced with the matched child.","default":"(none)","optional":true,"nullable":""}],"returns":{"type":"any","description":"Returns either an integer (for RETURN_TOTAL), the first matched child (for RETURN_CHILD), or null."}},{"name":"getFirstExists","description":"Get the first display object that exists, or doesn't exist.\r\rYou can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.\r\rIt works by calling `Group.create` passing it the parameters given to this method, and returning the new child.\r\rIf a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child\rwill be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.","parameters":[{"name":"exists","type":"boolean","description":"If true, find the first existing child; otherwise find the first non-existing child.","default":true,"optional":true,"nullable":""},{"name":"createIfNull","type":"boolean","description":"If `true` and no alive children are found a new one is created.","default":"","optional":true,"nullable":""},{"name":"x","type":"number","description":"The x coordinate to reset the child to. The value is in relation to the group.x point.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to reset the child to. The value is in relation to the group.y point.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The first child, or `null` if none found and `createIfNull` was false."}},{"name":"getFirstAlive","description":"Get the first child that is alive (`child.alive === true`).\r\rThis is handy for choosing a squad leader, etc.\r\rYou can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.\r\rIt works by calling `Group.create` passing it the parameters given to this method, and returning the new child.\r\rIf a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child\rwill be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.","parameters":[{"name":"createIfNull","type":"boolean","description":"If `true` and no alive children are found a new one is created.","default":"","optional":true,"nullable":""},{"name":"x","type":"number","description":"The x coordinate to reset the child to. The value is in relation to the group.x point.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to reset the child to. The value is in relation to the group.y point.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The alive dead child, or `null` if none found and `createIfNull` was false."}},{"name":"getFirstDead","description":"Get the first child that is dead (`child.alive === false`).\r\rThis is handy for checking if everything has been wiped out and adding to the pool as needed.\r\rYou can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.\r\rIt works by calling `Group.create` passing it the parameters given to this method, and returning the new child.\r\rIf a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child\rwill be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.","parameters":[{"name":"createIfNull","type":"boolean","description":"If `true` and no dead children are found a new one is created.","default":"","optional":true,"nullable":""},{"name":"x","type":"number","description":"The x coordinate to reset the child to. The value is in relation to the group.x point.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to reset the child to. The value is in relation to the group.y point.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The first dead child, or `null` if none found and `createIfNull` was false."}},{"name":"resetChild","description":"Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.\r\rIf the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.\r\rThe two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.","parameters":[{"name":"child","type":"DisplayObject","description":"The child to reset and/or load the texture on.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate to reset the child to. The value is in relation to the group.x point.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to reset the child to. The value is in relation to the group.y point.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The child that was reset: usually a {@link Phaser.Sprite}."}},{"name":"getTop","description":"Return the child at the top of this group.\r\rThe top child is the child displayed (rendered) above every other child.","parameters":[],"returns":{"type":"any","description":"The child at the top of the Group."}},{"name":"getBottom","description":"Returns the child at the bottom of this group.\r\rThe bottom child the child being displayed (rendered) below every other child.","parameters":[],"returns":{"type":"any","description":"The child at the bottom of the Group."}},{"name":"getClosestTo","description":"Get the closest child to given Object, with optional callback to filter children.\r\rThis can be a Sprite, Group, Image or any object with public x and y properties.\r\r'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.\r\rYou can use the optional `callback` argument to apply your own filter to the distance checks.\rIf the child is closer then the previous child, it will be sent to `callback` as the first argument,\rwith the distance as the second. The callback should return `true` if it passes your \rfiltering criteria, otherwise it should return `false`.","parameters":[{"name":"object","type":"any","description":"The object used to determine the distance. This can be a Sprite, Group, Image or any object with public x and y properties.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, with the distance as the second. It should return `true` if the child passes the matching criteria.","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"The child closest to given object, or `null` if no child was found."}},{"name":"getFurthestFrom","description":"Get the child furthest away from the given Object, with optional callback to filter children.\r\rThis can be a Sprite, Group, Image or any object with public x and y properties.\r\r'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.\r\rYou can use the optional `callback` argument to apply your own filter to the distance checks.\rIf the child is closer then the previous child, it will be sent to `callback` as the first argument,\rwith the distance as the second. The callback should return `true` if it passes your \rfiltering criteria, otherwise it should return `false`.","parameters":[{"name":"object","type":"any","description":"The object used to determine the distance. This can be a Sprite, Group, Image or any object with public x and y properties.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, with the distance as the second. It should return `true` if the child passes the matching criteria.","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"The child furthest from the given object, or `null` if no child was found."}},{"name":"countLiving","description":"Get the number of living children in this group.","parameters":[],"returns":{"type":"integer","description":"The number of children flagged as alive."}},{"name":"countDead","description":"Get the number of dead children in this group.","parameters":[],"returns":{"type":"integer","description":"The number of children flagged as dead."}},{"name":"getRandom","description":"Returns a random child from the group.","parameters":[{"name":"startIndex","type":"integer","description":"Offset from the front of the group (lowest child).","default":"","optional":true,"nullable":""},{"name":"length","type":"integer","description":"Restriction on the number of values you want to randomly select from.","default":"(to top)","optional":true,"nullable":""}],"returns":{"type":"any","description":"A random child of this Group."}},{"name":"getRandomExists","description":"Returns a random child from the Group that has `exists` set to `true`.\r\rOptionally you can specify a start and end index. For example if this Group had 100 children,\rand you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only\rthe first 50 children in the Group.","parameters":[{"name":"startIndex","type":"integer","description":"The first child index to start the search from.","default":"","optional":true,"nullable":""},{"name":"endIndex","type":"integer","description":"The last child index to search up to.","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"A random child of this Group that exists."}},{"name":"getAll","description":"Returns all children in this Group.\r\rYou can optionally specify a matching criteria using the `property` and `value` arguments.\r\rFor example: `getAll('exists', true)` would return only children that have their exists property set.\r\rOptionally you can specify a start and end index. For example if this Group had 100 children,\rand you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only\rthe first 50 children in the Group.","parameters":[{"name":"property","type":"string","description":"An optional property to test against the value argument.","default":"","optional":true,"nullable":""},{"name":"value","type":"any","description":"If property is set then Child.property must strictly equal this value to be included in the results.","default":"","optional":true,"nullable":""},{"name":"startIndex","type":"integer","description":"The first child index to start the search from.","default":"","optional":true,"nullable":""},{"name":"endIndex","type":"integer","description":"The last child index to search up until.","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"A random existing child of this Group."}},{"name":"remove","description":"Removes the given child from this group.\r\rThis will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.\r\rIf the group cursor was referring to the removed child it is updated to refer to the next child.","parameters":[{"name":"child","type":"any","description":"The child to remove.","default":"","optional":"","nullable":""},{"name":"destroy","type":"boolean","description":"If true `destroy` will be invoked on the removed child.","default":"","optional":true,"nullable":""},{"name":"silent","type":"boolean","description":"If true the the child will not dispatch the `onRemovedFromGroup` event.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"true if the child was removed from this group, otherwise false."}},{"name":"moveAll","description":"Moves all children from this Group to the Group given.","parameters":[{"name":"group","type":"Phaser.Group","description":"The new Group to which the children will be moved to.","default":"","optional":"","nullable":""},{"name":"silent","type":"boolean","description":"If true the children will not dispatch the `onAddedToGroup` event for the new Group.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Group","description":"The Group to which all the children were moved."}},{"name":"removeAll","description":"Removes all children from this Group, but does not remove the group from its parent.\r\rThe children can be optionally destroyed as they are removed.\r\rYou can also optionally also destroy the BaseTexture the Child is using. Be careful if you've\rmore than one Game Object sharing the same BaseTexture.","parameters":[{"name":"destroy","type":"boolean","description":"If true `destroy` will be invoked on each removed child.","default":"","optional":true,"nullable":""},{"name":"silent","type":"boolean","description":"If true the children will not dispatch their `onRemovedFromGroup` events.","default":"","optional":true,"nullable":""},{"name":"destroyTexture","type":"boolean","description":"If true, and if the `destroy` argument is also true, the BaseTexture belonging to the Child is also destroyed. Note that if another Game Object is sharing the same BaseTexture it will invalidate it.","default":"","optional":true,"nullable":""}]},{"name":"removeBetween","description":"Removes all children from this group whose index falls beteen the given startIndex and endIndex values.","parameters":[{"name":"startIndex","type":"integer","description":"The index to start removing children from.","default":"","optional":"","nullable":""},{"name":"endIndex","type":"integer","description":"The index to stop removing children at. Must be higher than startIndex. If undefined this method will remove all children between startIndex and the end of the group.","default":"","optional":true,"nullable":""},{"name":"destroy","type":"boolean","description":"If true `destroy` will be invoked on each removed child.","default":"","optional":true,"nullable":""},{"name":"silent","type":"boolean","description":"If true the children will not dispatch their `onRemovedFromGroup` events.","default":"","optional":true,"nullable":""}]},{"name":"destroy","description":"Destroys this group.\r\rRemoves all children, then removes this group from its parent and nulls references.","parameters":[{"name":"destroyChildren","type":"boolean","description":"If true `destroy` will be invoked on each removed child.","default":true,"optional":true,"nullable":""},{"name":"soft","type":"boolean","description":"A 'soft destroy' (set to true) doesn't remove this group from its parent or null the game reference. Set to false and it does.","default":"","optional":true,"nullable":""}]},{"name":"alignIn","description":"Aligns this Group within another Game Object, or Rectangle, known as the\r'container', to one of 9 possible positions.\r\rThe container must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Groups within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Group to another Game Object does **not** make it a child of\rthe container. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, \r`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, \r`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.\r\rGroups are placed in such a way that their _bounds_ align with the\rcontainer, taking into consideration rotation and scale of its children.\rThis allows you to neatly align Groups, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Group. For example:\r\r`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `group` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the containers bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"container","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Group to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Group","description":"This Group."}},{"name":"alignTo","description":"Aligns this Group to the side of another Game Object, or Rectangle, known as the\r'parent', in one of 11 possible positions.\r\rThe parent must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Groups within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Group to another Game Object does **not** make it a child of\rthe parent. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, \r`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, \r`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` \rand `Phaser.BOTTOM_RIGHT`.\r\rGroups are placed in such a way that their _bounds_ align with the\rparent, taking into consideration rotation and scale of the children.\rThis allows you to neatly align Groups, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Group. For example:\r\r`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `group` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the parents bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"parent","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Group to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Group","description":"This Group."}},{"name":"addChild","description":"Adds a child to the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to add to the container","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"addChildAt","description":"Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child to add","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The index to place the child in","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"swapChildren","description":"Swaps the position of 2 Display Objects within this container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""},{"name":"child2","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}]},{"name":"getChildIndex","description":"Returns the index position of a child DisplayObject instance","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject instance to identify","default":"","optional":"","nullable":""}],"returns":{"type":"Number","description":"The index position of the child display object to identify"}},{"name":"setChildIndex","description":"Changes the position of an existing child in the display object container","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child DisplayObject instance for which you want to change the index number","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The resulting index number for the child display object","default":"","optional":"","nullable":""}]},{"name":"getChildAt","description":"Returns the child at the specified index","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child at the given index, if any."}},{"name":"removeChild","description":"Removes a child from the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to remove","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildAt","description":"Removes a child from the specified index position.","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildren","description":"Removes all children from this container that are within the begin and end indexes.","parameters":[{"name":"beginIndex","type":"Number","description":"The beginning position. Default value is 0.","default":"","optional":"","nullable":""},{"name":"endIndex","type":"Number","description":"The ending position. Default value is size of the container.","default":"","optional":"","nullable":""}]},{"name":"getBounds","description":"Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.","parameters":[{"name":"targetCoordinateSpace","type":["PIXIDisplayObject","PIXIMatrix"],"description":"Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object.","default":"","optional":true,"nullable":""}],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"getLocalBounds","description":"Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.","parameters":[],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"contains","description":"Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}],"returns":{"type":"Boolean","description":""}},{"name":"_renderWebGL","description":"Renders the object using the WebGL renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""}]},{"name":"_renderCanvas","description":"Renders the object using the Canvas renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""}]}],"members":[{"name":"game","access":"protected","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"name","access":"","virtual":false,"description":"A name for this group. Not used internally but useful for debugging.","type":{"names":["string"]},"default":""},{"name":"z","access":"","virtual":false,"description":"The z-depth value of this object within its parent container/Group - the World is a Group as well.\rThis value must be unique for each child in a Group.","type":{"names":["integer"]},"default":""},{"name":"type","access":"protected","virtual":false,"description":"Internal Phaser Type value.","type":{"names":["integer"]},"default":""},{"name":"physicsType","access":"","virtual":false,"description":"The const physics body type of this object.","type":{"names":["number"]},"default":""},{"name":"alive","access":"","virtual":false,"description":"The alive property is useful for Groups that are children of other Groups and need to be included/excluded in checks like forEachAlive.","type":{"names":["boolean"]},"default":true},{"name":"exists","access":"","virtual":false,"description":"If exists is false the group will be excluded from collision checks and filters such as {@link forEachExists}. The group will not call `preUpdate` and `postUpdate` on its children and the children will not receive physics updates or camera/world boundary checks. The group will still be {@link Phaser.Group#visible visible} and will still call `update` on its children.","type":{"names":["boolean"]},"default":true},{"name":"ignoreDestroy","access":"","virtual":false,"description":"A group with `ignoreDestroy` set to `true` ignores all calls to its `destroy` method.","type":{"names":["boolean"]},"default":""},{"name":"pendingDestroy","access":"","virtual":false,"description":"A Group is that has `pendingDestroy` set to `true` is flagged to have its destroy method\rcalled on the next logic update.\rYou can set it directly to flag the Group to be destroyed on its next update.\r\rThis is extremely useful if you wish to destroy a Group from within one of its own callbacks\ror a callback of one of its children.","type":{"names":["boolean"]},"default":""},{"name":"classType","access":"","virtual":false,"description":"The type of objects that will be created when using {@link Phaser.Group#create create} or {@link Phaser.Group#createMultiple createMultiple}.\r\rAny object may be used but it should extend either Sprite or Image and accept the same constructor arguments:\rwhen a new object is created it is passed the following parameters to its constructor: `(game, x, y, key, frame)`.","type":{"names":["object"]},"default":"{@link Phaser.Sprite}"},{"name":"cursor","access":"","virtual":false,"description":"The current display object that the group cursor is pointing to, if any. (Can be set manually.)\r\rThe cursor is a way to iterate through the children in a Group using {@link Phaser.Group#next next} and {@link Phaser.Group#previous previous}.","type":{"names":["DisplayObject"]},"default":""},{"name":"inputEnableChildren","access":"","virtual":false,"description":"A Group with `inputEnableChildren` set to `true` will automatically call `inputEnabled = true` \ron any children _added_ to, or _created by_, this Group.\r\rIf there are children already in the Group at the time you set this property, they are not changed.","type":{"names":["boolean"]},"default":""},{"name":"onChildInputDown","access":"","virtual":false,"description":"This Signal is dispatched whenever a child of this Group emits an onInputDown signal as a result\rof having been interacted with by a Pointer. You can bind functions to this Signal instead of to\revery child Sprite.\r\rThis Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and\ra reference to the Pointer that caused it.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onChildInputUp","access":"","virtual":false,"description":"This Signal is dispatched whenever a child of this Group emits an onInputUp signal as a result\rof having been interacted with by a Pointer. You can bind functions to this Signal instead of to\revery child Sprite.\r\rThis Signal is sent 3 arguments: A reference to the Sprite that triggered the signal, \ra reference to the Pointer that caused it, and a boolean value `isOver` that tells you if the Pointer\ris still over the Sprite or not.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onChildInputOver","access":"","virtual":false,"description":"This Signal is dispatched whenever a child of this Group emits an onInputOver signal as a result\rof having been interacted with by a Pointer. You can bind functions to this Signal instead of to\revery child Sprite.\r\rThis Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and\ra reference to the Pointer that caused it.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onChildInputOut","access":"","virtual":false,"description":"This Signal is dispatched whenever a child of this Group emits an onInputOut signal as a result\rof having been interacted with by a Pointer. You can bind functions to this Signal instead of to\revery child Sprite.\r\rThis Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and\ra reference to the Pointer that caused it.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"enableBody","access":"","virtual":false,"description":"If true all Sprites created by, or added to this group, will have a physics body enabled on them.\r\rIf there are children already in the Group at the time you set this property, they are not changed.\r\rThe default body type is controlled with {@link Phaser.Group#physicsBodyType physicsBodyType}.","type":{"names":["boolean"]},"default":""},{"name":"enableBodyDebug","access":"","virtual":false,"description":"If true when a physics body is created (via {@link Phaser.Group#enableBody enableBody}) it will create a physics debug object as well.\r\rThis only works for P2 bodies.","type":{"names":["boolean"]},"default":""},{"name":"physicsBodyType","access":"","virtual":false,"description":"If {@link Phaser.Group#enableBody enableBody} is true this is the type of physics body that is created on new Sprites.\r\rThe valid values are {@link Phaser.Physics.ARCADE}, {@link Phaser.Physics.P2JS}, {@link Phaser.Physics.NINJA}, etc.","type":{"names":["integer"]},"default":""},{"name":"physicsSortDirection","access":"","virtual":false,"description":"If this Group contains Arcade Physics Sprites you can set a custom sort direction via this property.\r\rIt should be set to one of the Phaser.Physics.Arcade sort direction constants: \r\rPhaser.Physics.Arcade.SORT_NONE\rPhaser.Physics.Arcade.LEFT_RIGHT\rPhaser.Physics.Arcade.RIGHT_LEFT\rPhaser.Physics.Arcade.TOP_BOTTOM\rPhaser.Physics.Arcade.BOTTOM_TOP\r\rIf set to `null` the Group will use whatever Phaser.Physics.Arcade.sortDirection is set to. This is the default behavior.","type":{"names":["integer"]},"default":""},{"name":"onDestroy","access":"","virtual":false,"description":"This signal is dispatched when the group is destroyed.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"cursorIndex","access":"","virtual":false,"description":"The current index of the Group cursor. Advance it with Group.next.","type":{"names":["integer"]},"default":""},{"name":"fixedToCamera","access":"","virtual":false,"description":"A Group that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Group.cameraOffset.\r\rNote that the cameraOffset values are in addition to any parent in the display list.\rSo if this Group was in a Group that has x: 200, then this will be added to the cameraOffset.x","type":{"names":["boolean"]},"default":""},{"name":"cameraOffset","access":"","virtual":false,"description":"If this object is {@link Phaser.Group#fixedToCamera fixedToCamera} then this stores the x/y position offset relative to the top-left of the camera view.\rIf the parent of this Group is also `fixedToCamera` then the offset here is in addition to that and should typically be disabled.","type":{"names":["Phaser.Point"]},"default":""},{"name":"hash","access":"","virtual":false,"description":"The hash array is an array belonging to this Group into which you can add any of its children via Group.addToHash and Group.removeFromHash.\r\rOnly children of this Group can be added to and removed from the hash.\r\rThis hash is used automatically by Phaser Arcade Physics in order to perform non z-index based destructive sorting.\rHowever if you don't use Arcade Physics, or this isn't a physics enabled Group, then you can use the hash to perform your own\rsorting and filtering of Group children without touching their z-index (and therefore display draw order)","type":{"names":["array"]},"default":""},{"name":"_sortProperty","access":"private","virtual":false,"description":"The property on which children are sorted.","type":{"names":["string"]},"default":""},{"name":"RETURN_NONE","access":"","virtual":false,"description":"A returnType value, as specified in {@link Phaser.Group#iterate iterate} eg.","type":{"names":["integer"]},"default":""},{"name":"RETURN_TOTAL","access":"","virtual":false,"description":"A returnType value, as specified in {@link Phaser.Group#iterate iterate} eg.","type":{"names":["integer"]},"default":""},{"name":"RETURN_CHILD","access":"","virtual":false,"description":"A returnType value, as specified in {@link Phaser.Group#iterate iterate} eg.","type":{"names":["integer"]},"default":""},{"name":"RETURN_ALL","access":"","virtual":false,"description":"A returnType value, as specified in {@link Phaser.Group#iterate iterate} eg.","type":{"names":["integer"]},"default":""},{"name":"SORT_ASCENDING","access":"","virtual":false,"description":"A sort ordering value, as specified in {@link Phaser.Group#sort sort} eg.","type":{"names":["integer"]},"default":""},{"name":"SORT_DESCENDING","access":"","virtual":false,"description":"A sort ordering value, as specified in {@link Phaser.Group#sort sort} eg.","type":{"names":["integer"]},"default":""},{"name":"total","access":"","virtual":false,"description":"Total number of existing children in the group.","type":{"names":["integer"]},"default":""},{"name":"length","access":"","virtual":false,"description":"Total number of children in this group, regardless of exists/alive status.","type":{"names":["integer"]},"default":""},{"name":"angle","access":"","virtual":false,"description":"The angle of rotation of the group container, in degrees.\r\rThis adjusts the group itself by modifying its local rotation transform.\r\rThis has no impact on the rotation/angle properties of the children, but it will update their worldTransform\rand on-screen orientation and position.","type":{"names":["number"]},"default":""},{"name":"centerX","access":"","virtual":false,"description":"The center x coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"centerY","access":"","virtual":false,"description":"The center y coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"left","access":"","virtual":false,"description":"The left coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"right","access":"","virtual":false,"description":"The right coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"top","access":"","virtual":false,"description":"The top coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"bottom","access":"","virtual":false,"description":"The bottom coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"x","access":"","virtual":false,"description":"The x coordinate of the group container.\r\rYou can adjust the group container itself by modifying its coordinates.\rThis will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.","type":{"names":["number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The y coordinate of the group container.\r\rYou can adjust the group container itself by modifying its coordinates.\rThis will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.","type":{"names":["number"]},"default":""},{"name":"rotation","access":"","virtual":false,"description":"The angle of rotation of the group container, in radians.\r\rThis will adjust the group container itself by modifying its rotation.\rThis will have no impact on the rotation value of its children, but it will update their worldTransform and on-screen position.","type":{"names":["number"]},"default":""},{"name":"visible","access":"","virtual":false,"description":"The visible state of the group. Non-visible Groups and all of their children are not rendered.","type":{"names":["boolean"]},"default":""},{"name":"alpha","access":"","virtual":false,"description":"The alpha value of the group container.","type":{"names":["number"]},"default":""},{"name":"children","access":"","virtual":false,"description":"[read-only] The array of children of this container.","type":{"names":["Array.<DisplayObject>"]},"default":""},{"name":"ignoreChildInput","access":"","virtual":false,"description":"If `ignoreChildInput`  is `false` it will allow this objects _children_ to be considered as valid for Input events.\n\nIf this property is `true` then the children will _not_ be considered as valid for Input events.\n\nNote that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.","type":{"names":["Boolean"]},"default":""},{"name":"width","access":"","virtual":false,"description":"The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"position","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject, relative to its parent container.\n\nThe value of this property does not reflect any positioning happening further up the display list.\nTo obtain that value please see the `worldPosition` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"scale","access":"","virtual":false,"description":"The scale of this DisplayObject. A scale of 1:1 represents the DisplayObject\nat its default size. A value of 0.5 would scale this DisplayObject by half, and so on.\n\nThe value of this property does not reflect any scaling happening further up the display list.\nTo obtain that value please see the `worldScale` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"pivot","access":"","virtual":false,"description":"The pivot point of this DisplayObject that it rotates around. The values are expressed\nin pixel values.","type":{"names":["PIXIPoint"]},"default":""},{"name":"hitArea","access":"","virtual":false,"description":"This is the defined area that will pick up mouse / touch events. It is null by default.\nSetting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)","type":{"names":["Rectangle","Circle","Ellipse","Polygon"]},"default":""},{"name":"renderable","access":"","virtual":false,"description":"Should this DisplayObject be rendered by the renderer? An object with a renderable value of\n`false` is skipped during the render pass.","type":{"names":["Boolean"]},"default":""},{"name":"parent","access":"","virtual":false,"description":"The parent DisplayObjectContainer that this DisplayObject is a child of.\nAll DisplayObjects must belong to a parent in order to be rendered.\nThe root parent is the Stage object. This property is set automatically when the\nDisplayObject is added to, or removed from, a DisplayObjectContainer.","type":{"names":["PIXIDisplayObjectContainer"]},"default":""},{"name":"worldAlpha","access":"","virtual":false,"description":"The multiplied alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nThis value is the calculated total, based on the alpha values of all parents of this DisplayObjects \nin the display list.\n\nTo obtain, and set, the local alpha value, see the `alpha` property.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"worldTransform","access":"","virtual":false,"description":"The current transform of this DisplayObject.\n\nThis property contains the calculated total, based on the transforms of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIMatrix"]},"default":""},{"name":"worldPosition","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject within the world.\n\nThis property contains the calculated total, based on the positions of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldScale","access":"","virtual":false,"description":"The global scale of this DisplayObject.\n\nThis property contains the calculated total, based on the scales of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldRotation","access":"","virtual":false,"description":"The rotation, in radians, of this DisplayObject.\n\nThis property contains the calculated total, based on the rotations of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"filterArea","access":"","virtual":false,"description":"The rectangular area used by filters when rendering a shader for this DisplayObject.","type":{"names":["Rectangle"]},"default":""},{"name":"_sr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_cr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_bounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_currentBounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_mask","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_cacheAsBitmap","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"_cacheIsDirty","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"worldVisible","access":"","virtual":false,"description":"Indicates if this DisplayObject is visible, based on it, and all of its parents, `visible` property values.","type":{"names":["Boolean"]},"default":""},{"name":"mask","access":"","virtual":false,"description":"Sets a mask for this DisplayObject. A mask is an instance of a Graphics object.\nWhen applied it limits the visible area of this DisplayObject to the shape of the mask.\nUnder a Canvas renderer it uses shape clipping. Under a WebGL renderer it uses a Stencil Buffer.\nTo remove a mask, set this property to `null`.","type":{"names":["PIXIGraphics"]},"default":""},{"name":"filters","access":"","virtual":false,"description":"Sets the filters for this DisplayObject. This is a WebGL only feature, and is ignored by the Canvas\nRenderer. A filter is a shader applied to this DisplayObject. You can modify the placement of the filter\nusing `DisplayObject.filterArea`.\n\nTo remove filters, set this property to `null`.\n\nNote: You cannot have a filter set, and a MULTIPLY Blend Mode active, at the same time. Setting a \nfilter will reset this DisplayObjects blend mode to NORMAL.","type":{"names":["Array"]},"default":""},{"name":"cacheAsBitmap","access":"","virtual":false,"description":"Sets if this DisplayObject should be cached as a bitmap.\n\nWhen invoked it will take a snapshot of the DisplayObject, as it is at that moment, and store it \nin a RenderTexture. This is then used whenever this DisplayObject is rendered. It can provide a\nperformance benefit for complex, but static, DisplayObjects. I.e. those with lots of children.\n\nCached Bitmaps do not track their parents. If you update a property of this DisplayObject, it will not\nre-generate the cached bitmap automatically. To do that you need to call `DisplayObject.updateCache`.\n\nTo remove a cached bitmap, set this property to `null`.","type":{"names":["Boolean"]},"default":""}]},{"name":"Phaser.Plugin","description":"This is a base Plugin template to use for any Phaser plugin development.","constructor":{"name":"Plugin","description":"This is a base Plugin template to use for any Phaser plugin development.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"parent","type":"any","description":"The object that owns this plugin, usually Phaser.PluginManager.","default":"","optional":"","nullable":""}]},"functions":[{"name":"preUpdate","description":"Pre-update is called at the very start of the update cycle, before any other subsystems have been updated (including Physics).\rIt is only called if active is set to true.","parameters":[]},{"name":"update","description":"Update is called after all the core subsystems (Input, Tweens, Sound, etc) and the State have updated, but before the render.\rIt is only called if active is set to true.","parameters":[]},{"name":"render","description":"Render is called right after the Game Renderer completes, but before the State.render.\rIt is only called if visible is set to true.","parameters":[]},{"name":"postRender","description":"Post-render is called after the Game Renderer and State.render have run.\rIt is only called if visible is set to true.","parameters":[]},{"name":"destroy","description":"Clear down this Plugin and null out references","parameters":[]}],"members":[{"name":"game","access":"","virtual":false,"description":"A reference to the currently running game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"parent","access":"","virtual":false,"description":"The parent of this plugin. If added to the PluginManager the parent will be set to that, otherwise it will be null.","type":{"names":["any"]},"default":""},{"name":"active","access":"","virtual":false,"description":"A Plugin with active=true has its preUpdate and update methods called by the parent, otherwise they are skipped.","type":{"names":["boolean"]},"default":""},{"name":"visible","access":"","virtual":false,"description":"A Plugin with visible=true has its render and postRender methods called by the parent, otherwise they are skipped.","type":{"names":["boolean"]},"default":""},{"name":"hasPreUpdate","access":"","virtual":false,"description":"A flag to indicate if this plugin has a preUpdate method.","type":{"names":["boolean"]},"default":""},{"name":"hasUpdate","access":"","virtual":false,"description":"A flag to indicate if this plugin has an update method.","type":{"names":["boolean"]},"default":""},{"name":"hasPostUpdate","access":"","virtual":false,"description":"A flag to indicate if this plugin has a postUpdate method.","type":{"names":["boolean"]},"default":""},{"name":"hasRender","access":"","virtual":false,"description":"A flag to indicate if this plugin has a render method.","type":{"names":["boolean"]},"default":""},{"name":"hasPostRender","access":"","virtual":false,"description":"A flag to indicate if this plugin has a postRender method.","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.PluginManager","description":"The Plugin Manager is responsible for the loading, running and unloading of Phaser Plugins.","constructor":{"name":"PluginManager","description":"The Plugin Manager is responsible for the loading, running and unloading of Phaser Plugins.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""}]},"functions":[{"name":"add","description":"Add a new Plugin into the PluginManager.\rThe Plugin must have 2 properties: game and parent. Plugin.game is set to the game reference the PluginManager uses, and parent is set to the PluginManager.","parameters":[{"name":"plugin","type":["object","Phaser.Plugin"],"description":"The Plugin to add into the PluginManager. This can be a function or an existing object.","default":"","optional":"","nullable":""},{"name":"parameter","type":"*","description":"Additional arguments that will be passed to the Plugin.init method.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Plugin","description":"The Plugin that was added to the manager."}},{"name":"remove","description":"Remove a Plugin from the PluginManager. It calls Plugin.destroy on the plugin before removing it from the manager.","parameters":[{"name":"plugin","type":"Phaser.Plugin","description":"The plugin to be removed.","default":"","optional":"","nullable":""},{"name":"destroy","type":"boolean","description":"Call destroy on the plugin that is removed?","default":true,"optional":true,"nullable":""}]},{"name":"removeAll","description":"Remove all Plugins from the PluginManager. It calls Plugin.destroy on every plugin before removing it from the manager.","parameters":[]},{"name":"preUpdate","description":"Pre-update is called at the very start of the update cycle, before any other subsystems have been updated (including Physics).\rIt only calls plugins who have active=true.","parameters":[]},{"name":"update","description":"Update is called after all the core subsystems (Input, Tweens, Sound, etc) and the State have updated, but before the render.\rIt only calls plugins who have active=true.","parameters":[]},{"name":"postUpdate","description":"PostUpdate is the last thing to be called before the world render.\rIn particular, it is called after the world postUpdate, which means the camera has been adjusted.\rIt only calls plugins who have active=true.","parameters":[]},{"name":"render","description":"Render is called right after the Game Renderer completes, but before the State.render.\rIt only calls plugins who have visible=true.","parameters":[]},{"name":"postRender","description":"Post-render is called after the Game Renderer and State.render have run.\rIt only calls plugins who have visible=true.","parameters":[]},{"name":"destroy","description":"Clear down this PluginManager, calls destroy on every plugin and nulls out references.","parameters":[]}],"members":[{"name":"game","access":"","virtual":false,"description":"A reference to the currently running game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"plugins","access":"","virtual":false,"description":"An array of all the plugins being managed by this PluginManager.","type":{"names":["Array.<Phaser.Plugin>"]},"default":""},{"name":"_len","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["number"]},"default":""},{"name":"_i","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.ScaleManager","description":"The ScaleManager object handles the the scaling, resizing, and alignment of the\rGame size and the game Display canvas.\r\rThe Game size is the logical size of the game; the Display canvas has size as an HTML element.\r\rThe calculations of these are heavily influenced by the bounding Parent size which is the computed\rdimensions of the Display canvas's Parent container/element - the _effective CSS rules of the\rcanvas's Parent element play an important role_ in the operation of the ScaleManager. \r\rThe Display canvas - or Game size, depending {@link Phaser.ScaleManager#scaleMode scaleMode} - is updated to best utilize the Parent size.\rWhen in Fullscreen mode or with {@link Phaser.ScaleManager#parentIsWindow parentIsWindow} the Parent size is that of the visual viewport (see {@link Phaser.ScaleManager#getParentBounds getParentBounds}).\r\rParent and Display canvas containment guidelines:\r\r- Style the Parent element (of the game canvas) to control the Parent size and\r  thus the Display canvas's size and layout.\r\r- The Parent element's CSS styles should _effectively_ apply maximum (and minimum) bounding behavior.\r\r- The Parent element should _not_ apply a padding as this is not accounted for.\r  If a padding is required apply it to the Parent's parent or apply a margin to the Parent.\r  If you need to add a border, margin or any other CSS around your game container, then use a parent element and\r  apply the CSS to this instead, otherwise you'll be constantly resizing the shape of the game container.\r\r- The Display canvas layout CSS styles (i.e. margins, size) should not be altered/specified as\r  they may be updated by the ScaleManager.","constructor":{"name":"ScaleManager","description":"Create a new ScaleManager object - this is done automatically by {@link Phaser.Game}\r\rThe `width` and `height` constructor parameters can either be a number which represents pixels or a string that represents a percentage: e.g. `800` (for 800 pixels) or `\"80%\"` for 80%.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"width","type":["number","string"],"description":"The width of the game. See above.","default":"","optional":"","nullable":""},{"name":"height","type":["number","string"],"description":"The height of the game. See above.","default":"","optional":"","nullable":""}]},"functions":[{"name":"boot","description":"Start the ScaleManager.","parameters":[]},{"name":"parseConfig","description":"Load configuration settings.","parameters":[{"name":"config","type":"object","description":"The game configuration object.","default":"","optional":"","nullable":""}]},{"name":"setupScale","description":"Calculates and sets the game dimensions based on the given width and height.\r\rThis should _not_ be called when in fullscreen mode.","parameters":[{"name":"width","type":["number","string"],"description":"The width of the game.","default":"","optional":"","nullable":""},{"name":"height","type":["number","string"],"description":"The height of the game.","default":"","optional":"","nullable":""}]},{"name":"_gameResumed","description":"Invoked when the game is resumed.","parameters":[]},{"name":"setGameSize","description":"Set the actual Game size.\rUse this instead of directly changing `game.width` or `game.height`.\r\rThe actual physical display (Canvas element size) depends on various settings including\r- Scale mode\r- Scaling factor\r- Size of Canvas's parent element or CSS rules such as min-height/max-height;\r- The size of the Window","parameters":[{"name":"width","type":"integer","description":"_Game width_, in pixels.","default":"","optional":"","nullable":""},{"name":"height","type":"integer","description":"_Game height_, in pixels.","default":"","optional":"","nullable":""}]},{"name":"setUserScale","description":"Set a User scaling factor used in the USER_SCALE scaling mode.\r\rThe target canvas size is computed by:\r\r    canvas.width = (game.width * hScale) - hTrim\r    canvas.height = (game.height * vScale) - vTrim\r\rThis method can be used in the {@link Phaser.ScaleManager#setResizeCallback resize callback}.","parameters":[{"name":"hScale","type":"number","description":"Horizontal scaling factor.","default":"","optional":"","nullable":""},{"name":"vScale","type":"numer","description":"Vertical scaling factor.","default":"","optional":"","nullable":""},{"name":"hTrim","type":"integer","description":"Horizontal trim, applied after scaling.","default":"","optional":true,"nullable":""},{"name":"vTrim","type":"integer","description":"Vertical trim, applied after scaling.","default":"","optional":true,"nullable":""}]},{"name":"setResizeCallback","description":"Sets the callback that will be invoked before sizing calculations.\r\rThis is the appropriate place to call {@link Phaser.ScaleManager#setUserScale setUserScale} if needing custom dynamic scaling.\r\rThe callback is supplied with two arguments `scale` and `parentBounds` where `scale` is the ScaleManager\rand `parentBounds`, a Phaser.Rectangle, is the size of the Parent element.\r\rThis callback\r- May be invoked even though the parent container or canvas sizes have not changed\r- Unlike {@link Phaser.ScaleManager#onSizeChange onSizeChange}, it runs _before_ the canvas is guaranteed to be updated\r- Will be invoked from `preUpdate`, _even when_ the game is paused    \r\rSee {@link Phaser.ScaleManager#onSizeChange onSizeChange} for a better way of reacting to layout updates.","parameters":[{"name":"callback","type":"function","description":"The callback that will be called each time a window.resize event happens or if set, the parent container resizes.","default":"","optional":"","nullable":""},{"name":"context","type":"object","description":"The context in which the callback will be called.","default":"","optional":"","nullable":""}]},{"name":"signalSizeChange","description":"Signals a resize - IF the canvas or Game size differs from the last signal.\r\rThis also triggers updates on {@link Phaser.ScaleManager#grid grid} (FlexGrid) and, if in a RESIZE mode, `game.state` (StateManager).","parameters":[]},{"name":"setMinMax","description":"Set the min and max dimensions for the Display canvas.\r\r_Note:_ The min/max dimensions are only applied in some cases\r- When the device is not in an incorrect orientation; or\r- The scale mode is EXACT_FIT when not in fullscreen","parameters":[{"name":"minWidth","type":"number","description":"The minimum width the game is allowed to scale down to.","default":"","optional":"","nullable":""},{"name":"minHeight","type":"number","description":"The minimum height the game is allowed to scale down to.","default":"","optional":"","nullable":""},{"name":"maxWidth","type":"number","description":"The maximum width the game is allowed to scale up to; only changed if specified.","default":"","optional":true,"nullable":""},{"name":"maxHeight","type":"number","description":"The maximum height the game is allowed to scale up to; only changed if specified.","default":"","optional":true,"nullable":""}]},{"name":"preUpdate","description":"The ScaleManager.preUpdate is called automatically by the core Game loop.","parameters":[]},{"name":"pauseUpdate","description":"Update method while paused.","parameters":[]},{"name":"updateDimensions","description":"Update the dimensions taking the parent scaling factor into account.","parameters":[{"name":"width","type":"number","description":"The new width of the parent container.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The new height of the parent container.","default":"","optional":"","nullable":""},{"name":"resize","type":"boolean","description":"True if the renderer should be resized, otherwise false to just update the internal vars.","default":"","optional":"","nullable":""}]},{"name":"updateScalingAndBounds","description":"Update relevant scaling values based on the ScaleManager dimension and game dimensions,\rwhich should already be set. This does not change {@link Phaser.ScaleManager#sourceAspectRatio sourceAspectRatio}.","parameters":[]},{"name":"forceOrientation","description":"Force the game to run in only one orientation.\r\rThis enables generation of incorrect orientation signals and affects resizing but does not otherwise rotate or lock the orientation.\r\rOrientation checks are performed via the Screen Orientation API, if available in browser. This means it will check your monitor\rorientation on desktop, or your device orientation on mobile, rather than comparing actual game dimensions. If you need to check the \rviewport dimensions instead and bypass the Screen Orientation API then set: `ScaleManager.compatibility.orientationFallback = 'viewport'`","parameters":[{"name":"forceLandscape","type":"boolean","description":"true if the game should run in landscape mode only.","default":"","optional":"","nullable":""},{"name":"forcePortrait","type":"boolean","description":"true if the game should run in portrait mode only.","default":"","optional":true,"nullable":""}]},{"name":"classifyOrientation","description":"Classify the orientation, per `getScreenOrientation`.","parameters":[{"name":"orientation","type":"string","description":"The orientation string, e.g. 'portrait-primary'.","default":"","optional":"","nullable":""}],"returns":{"type":"string","description":"The classified orientation: 'portrait', 'landscape`, or null."}},{"name":"updateOrientationState","description":"Updates the current orientation and dispatches orientation change events.","parameters":[],"returns":{"type":"boolean","description":"True if the orientation state changed which means a forced update is likely required."}},{"name":"orientationChange","description":"window.orientationchange event handler.","parameters":[{"name":"event","type":"Event","description":"The orientationchange event data.","default":"","optional":"","nullable":""}]},{"name":"windowResize","description":"window.resize event handler.","parameters":[{"name":"event","type":"Event","description":"The resize event data.","default":"","optional":"","nullable":""}]},{"name":"scrollTop","description":"Scroll to the top - in some environments. See `compatibility.scrollTo`.","parameters":[]},{"name":"refresh","description":"The \"refresh\" methods informs the ScaleManager that a layout refresh is required.\r\rThe ScaleManager automatically queues a layout refresh (eg. updates the Game size or Display canvas layout)\rwhen the browser is resized, the orientation changes, or when there is a detected change\rof the Parent size. Refreshing is also done automatically when public properties,\rsuch as {@link Phaser.ScaleManager#scaleMode scaleMode}, are updated or state-changing methods are invoked.\r\rThe \"refresh\" method _may_ need to be used in a few (rare) situtations when\r\r- a device change event is not correctly detected; or\r- the Parent size changes (and an immediate reflow is desired); or\r- the ScaleManager state is updated by non-standard means; or\r- certain {@link Phaser.ScaleManager#compatibility compatibility} properties are manually changed.\r\rThe queued layout refresh is not immediate but will run promptly in an upcoming `preRender`.","parameters":[]},{"name":"updateLayout","description":"Updates the game / canvas position and size.","parameters":[]},{"name":"getParentBounds","description":"Returns the computed Parent size/bounds that the Display canvas is allowed/expected to fill.\r\rIf in fullscreen mode or without parent (see {@link Phaser.ScaleManager#parentIsWindow parentIsWindow}),\rthis will be the bounds of the visual viewport itself.\r\rThis function takes the {@link Phaser.ScaleManager#windowConstraints windowConstraints} into consideration - if the parent is partially outside\rthe viewport then this function may return a smaller than expected size.\r\rValues are rounded to the nearest pixel.","parameters":[{"name":"target","type":"Phaser.Rectangle","description":"The rectangle to update; a new one is created as needed.","default":"(new Rectangle)","optional":true,"nullable":""}],"returns":{"type":"Phaser.Rectangle","description":"The established parent bounds."}},{"name":"alignCanvas","description":"Update the canvas position/margins - for alignment within the parent container.\r\rThe canvas margins _must_ be reset/cleared prior to invoking this.","parameters":[{"name":"horizontal","type":"boolean","description":"Align horizontally?","default":"","optional":"","nullable":""},{"name":"vertical","type":"boolean","description":"Align vertically?","default":"","optional":"","nullable":""}]},{"name":"reflowGame","description":"Updates the Game state / size.\r\rThe canvas margins may always be adjusted, even if alignment is not in effect.","parameters":[]},{"name":"reflowCanvas","description":"Updates the Display canvas size.\r\rThe canvas margins may always be adjusted, even alignment is not in effect.","parameters":[]},{"name":"resetCanvas","description":"\"Reset\" the Display canvas and set the specified width/height.","parameters":[{"name":"cssWidth","type":"string","description":"The css width to set.","default":"(current width)","optional":true,"nullable":""},{"name":"cssHeight","type":"string","description":"The css height to set.","default":"(current height)","optional":true,"nullable":""}]},{"name":"queueUpdate","description":"Queues/marks a size/bounds check as needing to occur (from `preUpdate`).","parameters":[{"name":"force","type":"boolean","description":"If true resets the parent bounds to ensure the check is dirty.","default":"","optional":"","nullable":""}]},{"name":"reset","description":"Reset internal data/state.","parameters":[]},{"name":"setMaximum","description":"Updates the width/height to that of the window.","parameters":[]},{"name":"setShowAll","description":"Updates the width/height such that the game is scaled proportionally.","parameters":[{"name":"expanding","type":"boolean","description":"If true then the maximizing dimension is chosen.","default":"","optional":"","nullable":""}]},{"name":"setExactFit","description":"Updates the width/height such that the game is stretched to the available size.\rHonors {@link Phaser.ScaleManager#maxWidth maxWidth} and {@link Phaser.ScaleManager#maxHeight maxHeight} when _not_ in fullscreen.","parameters":[]},{"name":"createFullScreenTarget","description":"Creates a fullscreen target. This is called automatically as as needed when entering\rfullscreen mode and the resulting element is supplied to {@link Phaser.ScaleManager#onFullScreenInit onFullScreenInit}.\r\rUse {@link Phaser.ScaleManager#onFullScreenInit onFullScreenInit} to customize the created object.","parameters":[]},{"name":"startFullScreen","description":"Start the browsers fullscreen mode - this _must_ be called from a user input Pointer or Mouse event.\r\rThe Fullscreen API must be supported by the browser for this to work - it is not the same as setting\rthe game size to fill the browser window. See {@link Phaser.ScaleManager#compatibility compatibility.supportsFullScreen} to check if the current\rdevice is reported to support fullscreen mode.\r\rThe {@link Phaser.ScaleManager#fullScreenFailed fullScreenFailed} signal will be dispatched if the fullscreen change request failed or the game does not support the Fullscreen API.","parameters":[{"name":"antialias","type":"boolean","description":"Changes the anti-alias feature of the canvas before jumping in to fullscreen (false = retain pixel art, true = smooth art). If not specified then no change is made. Only works in CANVAS mode.","default":"","optional":true,"nullable":""},{"name":"allowTrampoline","type":"boolean","description":"Internal argument. If `false` click trampolining is suppressed.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"Returns true if the device supports fullscreen mode and fullscreen mode was attempted to be started. (It might not actually start, wait for the signals.)"}},{"name":"stopFullScreen","description":"Stops / exits fullscreen mode, if active.","parameters":[],"returns":{"type":"boolean","description":"Returns true if the browser supports fullscreen mode and fullscreen mode will be exited."}},{"name":"cleanupCreatedTarget","description":"Cleans up the previous fullscreen target, if such was automatically created.\rThis ensures the canvas is restored to its former parent, assuming the target didn't move.","parameters":[]},{"name":"prepScreenMode","description":"Used to prepare/restore extra fullscreen mode settings.\r(This does move any elements within the DOM tree.)","parameters":[{"name":"enteringFullscreen","type":"boolean","description":"True if _entering_ fullscreen, false if _leaving_.","default":"","optional":"","nullable":""}]},{"name":"fullScreenChange","description":"Called automatically when the browser enters of leaves fullscreen mode.","parameters":[{"name":"event","type":"Event","description":"The fullscreenchange event","default":"","optional":true,"nullable":""}]},{"name":"fullScreenError","description":"Called automatically when the browser fullscreen request fails;\ror called when a fullscreen request is made on a device for which it is not supported.","parameters":[{"name":"event","type":"Event","description":"The fullscreenerror event; undefined if invoked on a device that does not support the Fullscreen API.","default":"","optional":true,"nullable":""}]},{"name":"scaleSprite","description":"Takes a Sprite or Image object and scales it to fit the given dimensions.\rScaling happens proportionally without distortion to the sprites texture.\rThe letterBox parameter controls if scaling will produce a letter-box effect or zoom the\rsprite until it fills the given values. Note that with letterBox set to false the scaled sprite may spill out over either\rthe horizontal or vertical sides of the target dimensions. If you wish to stop this you can crop the Sprite.","parameters":[{"name":"sprite","type":["Phaser.Sprite","Phaser.Image"],"description":"The sprite we want to scale.","default":"","optional":"","nullable":""},{"name":"width","type":"integer","description":"The target width that we want to fit the sprite in to. If not given it defaults to ScaleManager.width.","default":"","optional":true,"nullable":""},{"name":"height","type":"integer","description":"The target height that we want to fit the sprite in to. If not given it defaults to ScaleManager.height.","default":"","optional":true,"nullable":""},{"name":"letterBox","type":"boolean","description":"True if we want the `fitted` mode. Otherwise, the function uses the `zoom` mode.","default":"","optional":true,"nullable":""}],"returns":{"type":["Phaser.Sprite","Phaser.Image"],"description":"The scaled sprite."}},{"name":"destroy","description":"Destroys the ScaleManager and removes any event listeners.\rThis should probably only be called when the game is destroyed.","parameters":[]}],"members":[{"name":"game","access":"protected","virtual":false,"description":"A reference to the currently running game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"dom","access":"protected","virtual":false,"description":"Provides access to some cross-device DOM functions.","type":{"names":["Phaser.DOM"]},"default":""},{"name":"grid","access":"public","virtual":false,"description":"_EXPERIMENTAL:_ A responsive grid on which you can align game objects.","type":{"names":["Phaser.FlexGrid"]},"default":""},{"name":"width","access":"","virtual":false,"description":"Target width (in pixels) of the Display canvas.","type":{"names":["number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"Target height (in pixels) of the Display canvas.","type":{"names":["number"]},"default":""},{"name":"minWidth","access":"protected","virtual":false,"description":"Minimum width the canvas should be scaled to (in pixels).\rChange with {@link Phaser.ScaleManager#setMinMax setMinMax}.","type":{"names":["number"]},"default":""},{"name":"maxWidth","access":"protected","virtual":false,"description":"Maximum width the canvas should be scaled to (in pixels).\rIf null it will scale to whatever width the browser can handle.\rChange with {@link Phaser.ScaleManager#setMinMax setMinMax}.","type":{"names":["number"]},"default":""},{"name":"minHeight","access":"protected","virtual":false,"description":"Minimum height the canvas should be scaled to (in pixels).\rChange with {@link Phaser.ScaleManager#setMinMax setMinMax}.","type":{"names":["number"]},"default":""},{"name":"maxHeight","access":"protected","virtual":false,"description":"Maximum height the canvas should be scaled to (in pixels).\rIf null it will scale to whatever height the browser can handle.\rChange with {@link Phaser.ScaleManager#setMinMax setMinMax}.","type":{"names":["number"]},"default":""},{"name":"offset","access":"protected","virtual":false,"description":"The offset coordinates of the Display canvas from the top-left of the browser window.\rThe is used internally by Phaser.Pointer (for Input) and possibly other types.","type":{"names":["Phaser.Point"]},"default":""},{"name":"forceLandscape","access":"protected","virtual":false,"description":"If true, the game should only run in a landscape orientation.\rChange with {@link Phaser.ScaleManager#forceOrientation forceOrientation}.","type":{"names":["boolean"]},"default":""},{"name":"forcePortrait","access":"protected","virtual":false,"description":"If true, the game should only run in a portrait \rChange with {@link Phaser.ScaleManager#forceOrientation forceOrientation}.","type":{"names":["boolean"]},"default":""},{"name":"incorrectOrientation","access":"protected","virtual":false,"description":"True if {@link Phaser.ScaleManager#forceLandscape forceLandscape} or {@link Phaser.ScaleManager#forcePortrait forcePortrait} are set and do not agree with the browser orientation.\r\rThis value is not updated immediately.","type":{"names":["boolean"]},"default":""},{"name":"_pageAlignHorizontally","access":"private","virtual":false,"description":"See {@link Phaser.ScaleManager#pageAlignHorizontally pageAlignHorizontally}.","type":{"names":["boolean"]},"default":""},{"name":"_pageAlignVertically","access":"private","virtual":false,"description":"See {@link Phaser.ScaleManager#pageAlignVertically pageAlignVertically}.","type":{"names":["boolean"]},"default":""},{"name":"onOrientationChange","access":"public","virtual":false,"description":"This signal is dispatched when the orientation changes _or_ the validity of the current orientation changes.\r\rThe signal is supplied with the following arguments:\r- `scale` - the ScaleManager object\r- `prevOrientation`, a string - The previous orientation as per {@link Phaser.ScaleManager#screenOrientation screenOrientation}.\r- `wasIncorrect`, a boolean - True if the previous orientation was last determined to be incorrect.\r\rAccess the current orientation and validity with `scale.screenOrientation` and `scale.incorrectOrientation`.\rThus the following tests can be done:\r\r    // The orientation itself changed:\r    scale.screenOrientation !== prevOrientation\r    // The orientation just became incorrect:\r    scale.incorrectOrientation && !wasIncorrect\r\rIt is possible that this signal is triggered after {@link Phaser.ScaleManager#forceOrientation forceOrientation} so the orientation\rcorrectness changes even if the orientation itself does not change.\r\rThis is signaled from `preUpdate` (or `pauseUpdate`) _even when_ the game is paused.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"enterIncorrectOrientation","access":"public","virtual":false,"description":"This signal is dispatched when the browser enters an incorrect orientation, as defined by {@link Phaser.ScaleManager#forceOrientation forceOrientation}.\r\rThis is signaled from `preUpdate` (or `pauseUpdate`) _even when_ the game is paused.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"leaveIncorrectOrientation","access":"public","virtual":false,"description":"This signal is dispatched when the browser leaves an incorrect orientation, as defined by {@link Phaser.ScaleManager#forceOrientation forceOrientation}.\r\rThis is signaled from `preUpdate` (or `pauseUpdate`) _even when_ the game is paused.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"hasPhaserSetFullScreen","access":"","virtual":false,"description":"This boolean provides you with a way to determine if the browser is in Full Screen\rmode (via the Full Screen API), and Phaser was the one responsible for activating it.\r\rIt's possible that ScaleManager.isFullScreen returns `true` even if Phaser wasn't the\rone that made the browser go full-screen, so this flag lets you determine that.","type":{"names":["boolean"]},"default":""},{"name":"fullScreenTarget","access":"","virtual":false,"description":"If specified, this is the DOM element on which the Fullscreen API enter request will be invoked.\rThe target element must have the correct CSS styling and contain the Display canvas.\r\rThe elements style will be modified (ie. the width and height might be set to 100%)\rbut it will not be added to, removed from, or repositioned within the DOM.\rAn attempt is made to restore relevant style changes when fullscreen mode is left.\r\rFor pre-2.2.0 behavior set `game.scale.fullScreenTarget = game.canvas`.","type":{"names":["DOMElement"]},"default":""},{"name":"_createdFullScreenTarget","access":"private","virtual":false,"description":"The fullscreen target, as created by {@link Phaser.ScaleManager#createFullScreenTarget createFullScreenTarget}.\rThis is not set if {@link Phaser.ScaleManager#fullScreenTarget fullScreenTarget} is used and is cleared when fullscreen mode ends.","type":{"names":["DOMElement"]},"default":""},{"name":"onFullScreenInit","access":"public","virtual":false,"description":"This signal is dispatched when fullscreen mode is ready to be initialized but\rbefore the fullscreen request.\r\rThe signal is passed two arguments: `scale` (the ScaleManager), and an object in the form `{targetElement: DOMElement}`.\r\rThe `targetElement` is the {@link Phaser.ScaleManager#fullScreenTarget fullScreenTarget} element,\rif such is assigned, or a new element created by {@link Phaser.ScaleManager#createFullScreenTarget createFullScreenTarget}.\r\rCustom CSS styling or resets can be applied to `targetElement` as required.\r\rIf `targetElement` is _not_ the same element as {@link Phaser.ScaleManager#fullScreenTarget fullScreenTarget}:\r- After initialization the Display canvas is moved onto the `targetElement` for\r  the duration of the fullscreen mode, and restored to it's original DOM location when fullscreen is exited.\r- The `targetElement` is moved/re-parented within the DOM and may have its CSS styles updated.\r\rThe behavior of a pre-assigned target element is covered in {@link Phaser.ScaleManager#fullScreenTarget fullScreenTarget}.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onFullScreenChange","access":"public","virtual":false,"description":"This signal is dispatched when the browser enters or leaves fullscreen mode, if supported.\r\rThe signal is supplied with a single argument: `scale` (the ScaleManager). Use `scale.isFullScreen` to determine\rif currently running in Fullscreen mode.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onFullScreenError","access":"public","virtual":false,"description":"This signal is dispatched when the browser fails to enter fullscreen mode;\ror if the device does not support fullscreen mode and `startFullScreen` is invoked.\r\rThe signal is supplied with a single argument: `scale` (the ScaleManager).","type":{"names":["Phaser.Signal"]},"default":""},{"name":"screenOrientation","access":"public","virtual":false,"description":"The _last known_ orientation of the screen, as defined in the Window Screen Web API.\rSee {@link Phaser.DOM.getScreenOrientation} for possible values.","type":{"names":["string"]},"default":""},{"name":"scaleFactor","access":"","virtual":false,"description":"The _current_ scale factor based on the game dimensions vs. the scaled dimensions.","type":{"names":["Phaser.Point"]},"default":""},{"name":"scaleFactorInversed","access":"protected","virtual":false,"description":"The _current_ inversed scale factor. The displayed dimensions divided by the game dimensions.","type":{"names":["Phaser.Point"]},"default":""},{"name":"margin","access":"protected","virtual":false,"description":"The Display canvas is aligned by adjusting the margins; the last margins are stored here.","type":{"names":["Bounds-like"]},"default":""},{"name":"bounds","access":"","virtual":false,"description":"The bounds of the scaled game. The x/y will match the offset of the canvas element and the width/height the scaled width and height.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"aspectRatio","access":"","virtual":false,"description":"The aspect ratio of the scaled Display canvas.","type":{"names":["number"]},"default":""},{"name":"sourceAspectRatio","access":"","virtual":false,"description":"The aspect ratio of the original game dimensions.","type":{"names":["number"]},"default":""},{"name":"event","access":"private","virtual":false,"description":"The native browser events from Fullscreen API changes.","type":{"names":["any"]},"default":""},{"name":"windowConstraints","access":"","virtual":false,"description":"The edges on which to constrain the game Display/canvas in _addition_ to the restrictions of the parent container.\r\rThe properties are strings and can be '', 'visual', 'layout', or 'layout-soft'.\r- If 'visual', the edge will be constrained to the Window / displayed screen area\r- If 'layout', the edge will be constrained to the CSS Layout bounds\r- An invalid value is treated as 'visual'","type":"","default":"{\"right\":\"layout\",\"bottom\":\"\"}"},{"name":"compatibility","access":"protected","virtual":false,"description":"Various compatibility settings.\rA value of \"(auto)\" indicates the setting is configured based on device and runtime information.\r\rA {@link Phaser.ScaleManager#refresh refresh} may need to be performed after making changes.","type":"","default":""},{"name":"_scaleMode","access":"private","virtual":false,"description":"Scale mode to be used when not in fullscreen.","type":{"names":["number"]},"default":""},{"name":"parentIsWindow","access":"","virtual":false,"description":"If the parent container of the Game canvas is the browser window itself (i.e. document.body),\rrather than another div, this should set to `true`.\r\rThe {@link Phaser.ScaleManager#parentNode parentNode} property is generally ignored while this is in effect.","type":{"names":["boolean"]},"default":""},{"name":"parentNode","access":"","virtual":false,"description":"The _original_ DOM element for the parent of the Display canvas.\rThis may be different in fullscreen - see {@link Phaser.ScaleManager#createFullScreenTarget createFullScreenTarget}.\r\rThis should only be changed after moving the Game canvas to a different DOM parent.","type":{"names":["DOMElement"]},"default":""},{"name":"parentScaleFactor","access":"","virtual":false,"description":"The scale of the game in relation to its parent container.","type":{"names":["Phaser.Point"]},"default":""},{"name":"trackParentInterval","access":"protected","virtual":false,"description":"The maximum time (in ms) between dimension update checks for the Canvas's parent element (or window).\rUpdate checks normally happen quicker in response to other events.","type":{"names":["integer"]},"default":2000},{"name":"onSizeChange","access":"","virtual":false,"description":"This signal is dispatched when the size of the Display canvas changes _or_ the size of the Game changes. \rWhen invoked this is done _after_ the Canvas size/position have been updated.\r\rThis signal is _only_ called when a change occurs and a reflow may be required.\rFor example, if the canvas does not change sizes because of CSS settings (such as min-width)\rthen this signal will _not_ be triggered.\r\rUse this to handle responsive game layout options.\r\rThis is signaled from `preUpdate` (or `pauseUpdate`) _even when_ the game is paused.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onResize","access":"private","virtual":false,"description":"The callback that will be called each the parent container resizes.","type":{"names":["function"]},"default":""},{"name":"onResizeContext","access":"private","virtual":false,"description":"The context in which the {@link Phaser.ScaleManager#onResize onResize} callback will be called.","type":{"names":["object"]},"default":""},{"name":"_pendingScaleMode","access":"private","virtual":false,"description":"Used to retain the scale mode if set from config before Boot.","type":{"names":["integer"]},"default":""},{"name":"_fullScreenRestore","access":"private","virtual":false,"description":"Information saved when fullscreen mode is started.","type":{"names":["object"]},"default":""},{"name":"_gameSize","access":"private","virtual":false,"description":"The _actual_ game dimensions, as initially set or set by {@link Phaser.ScaleManager#setGameSize setGameSize}.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"_userScaleFactor","access":"private","virtual":false,"description":"The user-supplied scale factor, used with the USER_SCALE scaling mode.","type":{"names":["Phaser.Point"]},"default":""},{"name":"_userScaleTrim","access":"private","virtual":false,"description":"The user-supplied scale trim, used with the USER_SCALE scaling mode.","type":{"names":["Phaser.Point"]},"default":""},{"name":"_lastUpdate","access":"private","virtual":false,"description":"The last time the bounds were checked in `preUpdate`.","type":{"names":["number"]},"default":""},{"name":"_updateThrottle","access":"private","virtual":false,"description":"Size checks updates are delayed according to the throttle.\rThe throttle increases to `trackParentInterval` over time and is used to more\rrapidly detect changes in certain browsers (eg. IE) while providing back-off safety.","type":{"names":["integer"]},"default":""},{"name":"_updateThrottleReset","access":"private","virtual":false,"description":"The minimum throttle allowed until it has slowed down sufficiently.","type":{"names":["integer"]},"default":""},{"name":"_parentBounds","access":"private","virtual":false,"description":"The cached result of the parent (possibly window) bounds; used to invalidate sizing.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"_tempBounds","access":"private","virtual":false,"description":"Temporary bounds used for internal work to cut down on new objects created.","type":"","default":""},{"name":"_lastReportedCanvasSize","access":"private","virtual":false,"description":"The Canvas size at which the last onSizeChange signal was triggered.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"_lastReportedGameSize","access":"private","virtual":false,"description":"The Game size at which the last onSizeChange signal was triggered.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"_booted","access":"private","virtual":false,"description":"ScaleManager booted state.","type":{"names":["boolean"]},"default":""},{"name":"EXACT_FIT","access":"","virtual":false,"description":"A scale mode that stretches content to fill all available space - see {@link Phaser.ScaleManager#scaleMode scaleMode}.","type":{"names":["integer"]},"default":""},{"name":"NO_SCALE","access":"","virtual":false,"description":"A scale mode that prevents any scaling - see {@link Phaser.ScaleManager#scaleMode scaleMode}.","type":{"names":["integer"]},"default":""},{"name":"SHOW_ALL","access":"","virtual":false,"description":"A scale mode that shows the entire game while maintaining proportions - see {@link Phaser.ScaleManager#scaleMode scaleMode}.","type":{"names":["integer"]},"default":""},{"name":"RESIZE","access":"","virtual":false,"description":"A scale mode that causes the Game size to change - see {@link Phaser.ScaleManager#scaleMode scaleMode}.","type":{"names":["integer"]},"default":""},{"name":"USER_SCALE","access":"","virtual":false,"description":"A scale mode that allows a custom scale factor - see {@link Phaser.ScaleManager#scaleMode scaleMode}.","type":{"names":["integer"]},"default":""},{"name":"boundingParent","access":"","virtual":false,"description":"The DOM element that is considered the Parent bounding element, if any.\r\rThis `null` if {@link Phaser.ScaleManager#parentIsWindow parentIsWindow} is true or if fullscreen mode is entered and {@link Phaser.ScaleManager#fullScreenTarget fullScreenTarget} is specified.\rIt will also be null if there is no game canvas or if the game canvas has no parent.","type":{"names":["DOMElement"]},"default":""},{"name":"scaleMode","access":"","virtual":false,"description":"The scaling method used by the ScaleManager when not in fullscreen.\r\r<dl>\r  <dt>{@link Phaser.ScaleManager.NO_SCALE}</dt>\r  <dd>\r      The Game display area will not be scaled - even if it is too large for the canvas/screen.\r      This mode _ignores_ any applied scaling factor and displays the canvas at the Game size.\r  </dd>\r  <dt>{@link Phaser.ScaleManager.EXACT_FIT}</dt>\r  <dd>\r      The Game display area will be _stretched_ to fill the entire size of the canvas's parent element and/or screen.\r      Proportions are not maintained.\r  </dd>\r  <dt>{@link Phaser.ScaleManager.SHOW_ALL}</dt>\r  <dd>\r      Show the entire game display area while _maintaining_ the original aspect ratio.\r  </dd>\r  <dt>{@link Phaser.ScaleManager.RESIZE}</dt>\r  <dd>\r      The dimensions of the game display area are changed to match the size of the parent container.\r      That is, this mode _changes the Game size_ to match the display size.\r      <p>\r      Any manually set Game size (see {@link Phaser.ScaleManager#setGameSize setGameSize}) is ignored while in effect.\r  </dd>\r  <dt>{@link Phaser.ScaleManager.USER_SCALE}</dt>\r  <dd>\r      The game Display is scaled according to the user-specified scale set by {@link Phaser.ScaleManager#setUserScale setUserScale}.\r      <p>\r      This scale can be adjusted in the {@link Phaser.ScaleManager#setResizeCallback resize callback}\r      for flexible custom-sizing needs.\r  </dd>\r</dl>","type":{"names":["integer"]},"default":""},{"name":"fullScreenScaleMode","access":"","virtual":false,"description":"The scaling method used by the ScaleManager when in fullscreen.\r\rSee {@link Phaser.ScaleManager#scaleMode scaleMode} for the different modes allowed.","type":{"names":["integer"]},"default":""},{"name":"currentScaleMode","access":"protected","virtual":false,"description":"Returns the current scale mode - for normal or fullscreen operation.\r\rSee {@link Phaser.ScaleManager#scaleMode scaleMode} for the different modes allowed.","type":{"names":["number"]},"default":""},{"name":"pageAlignHorizontally","access":"","virtual":false,"description":"When enabled the Display canvas will be horizontally-aligned _in the Parent container_ (or {@link Phaser.ScaleManager#parentIsWindow window}).\r\rTo align horizontally across the page the Display canvas should be added directly to page;\ror the parent container should itself be horizontally aligned.\r\rHorizontal alignment is not applicable with the {@link Phaser.ScaleManager.RESIZE RESIZE} scaling mode.","type":{"names":["boolean"]},"default":"false"},{"name":"pageAlignVertically","access":"","virtual":false,"description":"When enabled the Display canvas will be vertically-aligned _in the Parent container_ (or {@link Phaser.ScaleManager#parentIsWindow window}).\r\rTo align vertically the Parent element should have a _non-collapsible_ height, such that it will maintain\ra height _larger_ than the height of the contained Game canvas - the game canvas will then be scaled vertically\r_within_ the remaining available height dictated by the Parent element.\r\rOne way to prevent the parent from collapsing is to add an absolute \"min-height\" CSS property to the parent element.\rIf specifying a relative \"min-height/height\" or adjusting margins, the Parent height must still be non-collapsible (see note).\r\r_Note_: In version 2.2 the minimum document height is _not_ automatically set to the viewport/window height.\rTo automatically update the minimum document height set {@link Phaser.ScaleManager#compatibility compatibility.forceMinimumDocumentHeight} to true.\r\rVertical alignment is not applicable with the {@link Phaser.ScaleManager.RESIZE RESIZE} scaling mode.","type":{"names":["boolean"]},"default":"false"},{"name":"isFullScreen","access":"","virtual":false,"description":"Returns true if the browser is in fullscreen mode, otherwise false.","type":{"names":["boolean"]},"default":""},{"name":"isPortrait","access":"","virtual":false,"description":"Returns true if the screen orientation is in portrait mode.","type":{"names":["boolean"]},"default":""},{"name":"isLandscape","access":"","virtual":false,"description":"Returns true if the screen orientation is in landscape mode.","type":{"names":["boolean"]},"default":""},{"name":"isGamePortrait","access":"","virtual":false,"description":"Returns true if the game dimensions are portrait (height > width).\rThis is especially useful to check when using the RESIZE scale mode \rbut wanting to maintain game orientation on desktop browsers, \rwhere typically the screen orientation will always be landscape regardless of the browser viewport.","type":{"names":["boolean"]},"default":""},{"name":"isGameLandscape","access":"","virtual":false,"description":"Returns true if the game dimensions are landscape (width > height).\rThis is especially useful to check when using the RESIZE scale mode \rbut wanting to maintain game orientation on desktop browsers, \rwhere typically the screen orientation will always be landscape regardless of the browser viewport.","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.Signal","description":"Signals are what Phaser uses to handle events and event dispatching.\rYou can listen for a Signal by binding a callback / function to it.\rThis is done by using either `Signal.add` or `Signal.addOnce`.\r\rFor example you can listen for a touch or click event from the Input Manager \rby using its `onDown` Signal:\r\r`game.input.onDown.add(function() { ... });`\r\rRather than inline your function, you can pass a reference:\r\r`game.input.onDown.add(clicked, this);`\r`function clicked () { ... }`\r\rIn this case the second argument (`this`) is the context in which your function should be called.\r\rNow every time the InputManager dispatches the `onDown` signal (or event), your function\rwill be called.\r\rVery often a Signal will send arguments to your function.\rThis is specific to the Signal itself.\rIf you're unsure then check the documentation, or failing that simply do:\r\r`Signal.add(function() { console.log(arguments); })`\r\rand it will log all of the arguments your function received from the Signal.\r\rSprites have lots of default signals you can listen to in their Events class, such as:\r\r`sprite.events.onKilled`\r\rWhich is called automatically whenever the Sprite is killed.\rThere are lots of other events, see the Events component for a list.\r\rAs well as listening to pre-defined Signals you can also create your own:\r\r`var mySignal = new Phaser.Signal();`\r\rThis creates a new Signal. You can bind a callback to it:\r\r`mySignal.add(myCallback, this);`\r\rand then finally when ready you can dispatch the Signal:\r\r`mySignal.dispatch(your arguments);`\r\rAnd your callback will be invoked. See the dispatch method for more details.","constructor":{"name":"Signal","description":"Signals are what Phaser uses to handle events and event dispatching.\rYou can listen for a Signal by binding a callback / function to it.\rThis is done by using either `Signal.add` or `Signal.addOnce`.\r\rFor example you can listen for a touch or click event from the Input Manager \rby using its `onDown` Signal:\r\r`game.input.onDown.add(function() { ... });`\r\rRather than inline your function, you can pass a reference:\r\r`game.input.onDown.add(clicked, this);`\r`function clicked () { ... }`\r\rIn this case the second argument (`this`) is the context in which your function should be called.\r\rNow every time the InputManager dispatches the `onDown` signal (or event), your function\rwill be called.\r\rVery often a Signal will send arguments to your function.\rThis is specific to the Signal itself.\rIf you're unsure then check the documentation, or failing that simply do:\r\r`Signal.add(function() { console.log(arguments); })`\r\rand it will log all of the arguments your function received from the Signal.\r\rSprites have lots of default signals you can listen to in their Events class, such as:\r\r`sprite.events.onKilled`\r\rWhich is called automatically whenever the Sprite is killed.\rThere are lots of other events, see the Events component for a list.\r\rAs well as listening to pre-defined Signals you can also create your own:\r\r`var mySignal = new Phaser.Signal();`\r\rThis creates a new Signal. You can bind a callback to it:\r\r`mySignal.add(myCallback, this);`\r\rand then finally when ready you can dispatch the Signal:\r\r`mySignal.dispatch(your arguments);`\r\rAnd your callback will be invoked. See the dispatch method for more details.","parameters":[]},"functions":[{"name":"validateListener","description":"","parameters":[{"name":"listener","type":"function","description":"Signal handler function.","default":"","optional":"","nullable":""},{"name":"fnName","type":"string","description":"Function name.","default":"","optional":"","nullable":""}]},{"name":"_registerListener","description":"","parameters":[{"name":"listener","type":"function","description":"Signal handler function.","default":"","optional":"","nullable":""},{"name":"isOnce","type":"boolean","description":"Should the listener only be called once?","default":"","optional":"","nullable":""},{"name":"listenerContext","type":"object","description":"The context under which the listener is invoked.","default":"","optional":true,"nullable":""},{"name":"priority","type":"number","description":"The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added. (default = 0).","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.SignalBinding","description":"An Object representing the binding between the Signal and listener."}},{"name":"_addBinding","description":"","parameters":[{"name":"binding","type":"Phaser.SignalBinding","description":"An Object representing the binding between the Signal and listener.","default":"","optional":"","nullable":""}]},{"name":"_indexOfListener","description":"","parameters":[{"name":"listener","type":"function","description":"Signal handler function.","default":"","optional":"","nullable":""},{"name":"context","type":"object","description":"Signal handler function.","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The index of the listener within the private bindings array."}},{"name":"has","description":"Check if a specific listener is attached.","parameters":[{"name":"listener","type":"function","description":"Signal handler function.","default":"","optional":"","nullable":""},{"name":"context","type":"object","description":"Context on which listener will be executed (object that should represent the `this` variable inside listener function).","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"If Signal has the specified listener."}},{"name":"add","description":"Add an event listener for this signal.\r\rAn event listener is a callback with a related context and priority.\r\rYou can optionally provide extra arguments which will be passed to the callback after any internal parameters.\r\rFor example: `Phaser.Key.onDown` when dispatched will send the Phaser.Key object that caused the signal as the first parameter.\rAny arguments you've specified after `priority` will be sent as well:\r\r`fireButton.onDown.add(shoot, this, 0, 'lazer', 100);`\r\rWhen onDown dispatches it will call the `shoot` callback passing it: `Phaser.Key, 'lazer', 100`.\r\rWhere the first parameter is the one that Key.onDown dispatches internally and 'lazer', \rand the value 100 were the custom arguments given in the call to 'add'.","parameters":[{"name":"listener","type":"function","description":"The function to call when this Signal is dispatched.","default":"","optional":"","nullable":""},{"name":"listenerContext","type":"object","description":"The context under which the listener will be executed (i.e. the object that should represent the `this` variable).","default":"","optional":true,"nullable":""},{"name":"priority","type":"number","description":"The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added (default = 0)","default":"","optional":true,"nullable":""},{"name":"args","type":"any","description":"Additional arguments to pass to the callback (listener) function. They will be appended after any arguments usually dispatched.","default":"(none)","optional":true,"nullable":""}],"returns":{"type":"Phaser.SignalBinding","description":"An Object representing the binding between the Signal and listener."}},{"name":"addOnce","description":"Add a one-time listener - the listener is automatically removed after the first execution.\r\rIf there is as {@link Phaser.Signal#memorize memorized} event then it will be dispatched and\rthe listener will be removed immediately.","parameters":[{"name":"listener","type":"function","description":"The function to call when this Signal is dispatched.","default":"","optional":"","nullable":""},{"name":"listenerContext","type":"object","description":"The context under which the listener will be executed (i.e. the object that should represent the `this` variable).","default":"","optional":true,"nullable":""},{"name":"priority","type":"number","description":"The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added (default = 0)","default":"","optional":true,"nullable":""},{"name":"args","type":"any","description":"Additional arguments to pass to the callback (listener) function. They will be appended after any arguments usually dispatched.","default":"(none)","optional":true,"nullable":""}],"returns":{"type":"Phaser.SignalBinding","description":"An Object representing the binding between the Signal and listener."}},{"name":"remove","description":"Remove a single event listener.","parameters":[{"name":"listener","type":"function","description":"Handler function that should be removed.","default":"","optional":"","nullable":""},{"name":"context","type":"object","description":"Execution context (since you can add the same handler multiple times if executing in a different context).","default":"","optional":true,"nullable":""}],"returns":{"type":"function","description":"Listener handler function."}},{"name":"removeAll","description":"Remove all event listeners.","parameters":[{"name":"context","type":"object","description":"If specified only listeners for the given context will be removed.","default":"","optional":true,"nullable":""}]},{"name":"getNumListeners","description":"Gets the total number of listeners attached to this Signal.","parameters":[],"returns":{"type":"integer","description":"Number of listeners attached to the Signal."}},{"name":"halt","description":"Stop propagation of the event, blocking the dispatch to next listener on the queue.\r\rThis should be called only during event dispatch as calling it before/after dispatch won't affect another broadcast.\rSee {@link Phaser.Signal#active active} to enable/disable the signal entirely.","parameters":[]},{"name":"dispatch","description":"Dispatch / broadcast the event to all listeners.\r\rTo create an instance-bound dispatch for this Signal, use {@link Phaser.Signal#boundDispatch boundDispatch}.","parameters":[{"name":"params","type":"any","description":"Parameters that should be passed to each handler.","default":"","optional":true,"nullable":""}]},{"name":"forget","description":"Forget the currently {@link Phaser.Signal#memorize memorized} event, if any.","parameters":[]},{"name":"dispose","description":"Dispose the signal - no more events can be dispatched.\r\rThis removes all event listeners and clears references to external objects.\rCalling methods on a disposed objects results in undefined behavior.","parameters":[]},{"name":"toString","description":"A string representation of the object.","parameters":[],"returns":{"type":"string","description":"String representation of the object."}}],"members":[{"name":"_bindings","access":"private","virtual":false,"description":"Internal variable.","type":{"names":["Array.<Phaser.SignalBinding>"]},"default":""},{"name":"_prevParams","access":"private","virtual":false,"description":"Internal variable.","type":{"names":["any"]},"default":""},{"name":"memorize","access":"","virtual":false,"description":"Memorize the previously dispatched event?\r\rIf an event has been memorized it is automatically dispatched when a new listener is added with {@link Phaser.Signal#add add} or {@link Phaser.Signal#addOnce addOnce}.\rUse {@link Phaser.Signal#forget forget} to clear any currently memorized event.","type":{"names":["boolean"]},"default":""},{"name":"_shouldPropagate","access":"private","virtual":false,"description":"","type":{"names":["boolean"]},"default":""},{"name":"active","access":"","virtual":false,"description":"Is the Signal active? Only active signals will broadcast dispatched events.\r\rSetting this property during a dispatch will only affect the next dispatch. To stop the propagation of a signal from a listener use {@link Phaser.Signal#halt halt}.","type":{"names":["boolean"]},"default":true},{"name":"_boundDispatch","access":"private","virtual":false,"description":"The bound dispatch function, if any.","type":{"names":["function"]},"default":""}]},{"name":"Phaser.SignalBinding","description":"Object that represents a binding between a Signal and a listener function.\rThis is an internal constructor and shouldn't be created directly.\rInspired by Joa Ebert AS3 SignalBinding and Robert Penner's Slot classes.","constructor":{"name":"SignalBinding","description":"Object that represents a binding between a Signal and a listener function.\rThis is an internal constructor and shouldn't be created directly.\rInspired by Joa Ebert AS3 SignalBinding and Robert Penner's Slot classes.","parameters":[{"name":"signal","type":"Phaser.Signal","description":"Reference to Signal object that listener is currently bound to.","default":"","optional":"","nullable":""},{"name":"listener","type":"function","description":"Handler function bound to the signal.","default":"","optional":"","nullable":""},{"name":"isOnce","type":"boolean","description":"If binding should be executed just once.","default":"","optional":"","nullable":""},{"name":"listenerContext","type":"object","description":"Context on which listener will be executed (object that should represent the `this` variable inside listener function).","default":"","optional":true,"nullable":""},{"name":"priority","type":"number","description":"The priority level of the event listener. (default = 0).","default":"","optional":true,"nullable":""},{"name":"args","type":"any","description":"Additional arguments to pass to the callback (listener) function. They will be appended after any arguments usually dispatched.","default":"(none)","optional":true,"nullable":""}]},"functions":[{"name":"execute","description":"Call listener passing arbitrary parameters.\rIf binding was added using `Signal.addOnce()` it will be automatically removed from signal dispatch queue, this method is used internally for the signal dispatch.","parameters":[{"name":"paramsArr","type":"Array.<any>","description":"Array of parameters that should be passed to the listener.","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"Value returned by the listener."}},{"name":"detach","description":"Detach binding from signal.\ralias to: @see mySignal.remove(myBinding.getListener());","parameters":[],"returns":{"type":["function","null"],"description":"Handler function bound to the signal or `null` if binding was previously detached."}},{"name":"isBound","description":"","parameters":[],"returns":{"type":"boolean","description":"True if binding is still bound to the signal and has a listener."}},{"name":"isOnce","description":"","parameters":[],"returns":{"type":"boolean","description":"If SignalBinding will only be executed once."}},{"name":"getListener","description":"","parameters":[],"returns":{"type":"function","description":"Handler function bound to the signal."}},{"name":"getSignal","description":"","parameters":[],"returns":{"type":"Phaser.Signal","description":"Signal that listener is currently bound to."}},{"name":"_destroy","description":"Delete instance properties","parameters":[]},{"name":"toString","description":"","parameters":[],"returns":{"type":"string","description":"String representation of the object."}}],"members":[{"name":"_listener","access":"private","virtual":false,"description":"Handler function bound to the signal.","type":{"names":["Phaser.Game"]},"default":""},{"name":"_signal","access":"private","virtual":false,"description":"Reference to Signal object that listener is currently bound to.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"context","access":"","virtual":false,"description":"Context on which listener will be executed (object that should represent the `this` variable inside listener function).","type":{"names":["object"]},"default":""},{"name":"_isOnce","access":"private","virtual":false,"description":"If binding should be executed just once.","type":{"names":["boolean"]},"default":""},{"name":"_priority","access":"private","virtual":false,"description":"Listener priority.","type":{"names":["number"]},"default":""},{"name":"_args","access":"private","virtual":false,"description":"Listener arguments.","type":{"names":["array"]},"default":""},{"name":"callCount","access":"","virtual":false,"description":"The number of times the handler function has been called.","type":{"names":["number"]},"default":""},{"name":"active","access":"","virtual":false,"description":"If binding is active and should be executed.","type":{"names":["boolean"]},"default":true},{"name":"params","access":"","virtual":false,"description":"Default parameters passed to listener during `Signal.dispatch` and `SignalBinding.execute` (curried parameters).","type":{"names":["array","null"]},"default":""}]},{"name":"Phaser.Stage","description":"The Stage controls root level display objects upon which everything is displayed.\rIt also handles browser visibility handling and the pausing due to loss of focus.","constructor":{"name":"Stage","description":"The Stage controls root level display objects upon which everything is displayed.\rIt also handles browser visibility handling and the pausing due to loss of focus.","parameters":[{"name":"game","type":"Phaser.Game","description":"Game reference to the currently running game.","default":"","optional":"","nullable":""}]},"functions":[{"name":"parseConfig","description":"Parses a Game configuration object.","parameters":[{"name":"config","type":"object","description":"The configuration object to parse.","default":"","optional":"","nullable":""}]},{"name":"boot","description":"Initialises the stage and adds the event listeners.","parameters":[]},{"name":"preUpdate","description":"This is called automatically after the plugins preUpdate and before the State.update.\rMost objects have preUpdate methods and it's where initial movement and positioning is done.","parameters":[]},{"name":"update","description":"This is called automatically after the State.update, but before particles or plugins update.","parameters":[]},{"name":"postUpdate","description":"This is called automatically before the renderer runs and after the plugins have updated.\rIn postUpdate this is where all the final physics calculations and object positioning happens.\rThe objects are processed in the order of the display list.","parameters":[]},{"name":"updateTransform","description":"Updates the transforms for all objects on the display list.\rThis overrides the Pixi default as we don't need the interactionManager, but do need the game property check.","parameters":[]},{"name":"checkVisibility","description":"Starts a page visibility event listener running, or window.onpagehide/onpageshow if not supported by the browser.\rAlso listens for window.onblur and window.onfocus.","parameters":[]},{"name":"visibilityChange","description":"This method is called when the document visibility is changed.","parameters":[{"name":"event","type":"Event","description":"Its type will be used to decide whether the game should be paused or not.","default":"","optional":"","nullable":""}]},{"name":"setBackgroundColor","description":"Sets the background color for the Stage.\r\rThe color can be given as a hex string (`'#RRGGBB'`), a CSS color string (`'rgb(r,g,b)'`), or a numeric value (`0xRRGGBB`).\r\rAn alpha channel is _not_ supported and will be ignored.\r\rIf you've set your game to be transparent then calls to setBackgroundColor are ignored.","parameters":[{"name":"color","type":["number","string"],"description":"The color of the background.","default":"","optional":"","nullable":""}]},{"name":"destroy","description":"Destroys the Stage and removes event listeners.","parameters":[]},{"name":"addChild","description":"Adds a child to the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to add to the container","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"addChildAt","description":"Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child to add","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The index to place the child in","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"swapChildren","description":"Swaps the position of 2 Display Objects within this container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""},{"name":"child2","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}]},{"name":"getChildIndex","description":"Returns the index position of a child DisplayObject instance","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject instance to identify","default":"","optional":"","nullable":""}],"returns":{"type":"Number","description":"The index position of the child display object to identify"}},{"name":"setChildIndex","description":"Changes the position of an existing child in the display object container","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child DisplayObject instance for which you want to change the index number","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The resulting index number for the child display object","default":"","optional":"","nullable":""}]},{"name":"getChildAt","description":"Returns the child at the specified index","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child at the given index, if any."}},{"name":"removeChild","description":"Removes a child from the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to remove","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildAt","description":"Removes a child from the specified index position.","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildren","description":"Removes all children from this container that are within the begin and end indexes.","parameters":[{"name":"beginIndex","type":"Number","description":"The beginning position. Default value is 0.","default":"","optional":"","nullable":""},{"name":"endIndex","type":"Number","description":"The ending position. Default value is size of the container.","default":"","optional":"","nullable":""}]},{"name":"getBounds","description":"Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.","parameters":[{"name":"targetCoordinateSpace","type":["PIXIDisplayObject","PIXIMatrix"],"description":"Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object.","default":"","optional":true,"nullable":""}],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"getLocalBounds","description":"Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.","parameters":[],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"contains","description":"Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}],"returns":{"type":"Boolean","description":""}},{"name":"_renderWebGL","description":"Renders the object using the WebGL renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""}]},{"name":"_renderCanvas","description":"Renders the object using the Canvas renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""}]}],"members":[{"name":"game","access":"","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"name","access":"","virtual":false,"description":"The name of this object.","type":{"names":["string"]},"default":"_stage_root"},{"name":"disableVisibilityChange","access":"","virtual":false,"description":"By default if the browser tab loses focus the game will pause.\rYou can stop that behavior by setting this property to true.\rNote that the browser can still elect to pause your game if it wishes to do so,\rfor example swapping to another browser tab. This will cause the RAF callback to halt,\reffectively pausing your game, even though no in-game pause event is triggered if you enable this property.","type":{"names":["boolean"]},"default":""},{"name":"exists","access":"","virtual":false,"description":"If exists is true the Stage and all children are updated, otherwise it is skipped.","type":{"names":["boolean"]},"default":true},{"name":"worldTransform","access":"private","virtual":false,"description":"Current transform of the object based on world (parent) factors","type":{"names":["PIXI.Matrix"]},"default":""},{"name":"stage","access":"private","virtual":false,"description":"The stage reference (the Stage is its own stage)","type":{"names":["Phaser.Stage"]},"default":""},{"name":"currentRenderOrderID","access":"","virtual":false,"description":"Reset each frame, keeps a count of the total number of objects updated.","type":{"names":["number"]},"default":""},{"name":"_hiddenVar","access":"private","virtual":false,"description":"The page visibility API event name.","type":"","default":""},{"name":"_onChange","access":"private","virtual":false,"description":"The blur/focus event handler.","type":{"names":["function"]},"default":""},{"name":"_bgColor","access":"private","virtual":false,"description":"Stage background color object. Populated by setBackgroundColor.","type":{"names":["number"]},"default":""},{"name":"backgroundColor","access":"","virtual":false,"description":"Gets and sets the background color of the stage. The color can be given as a number: 0xff0000 or a hex string: '#ff0000'","type":{"names":["number","string"]},"default":""},{"name":"smoothed","access":"","virtual":false,"description":"Enable or disable texture smoothing for all objects on this Stage. Only works for bitmap/image textures. Smoothing is enabled by default. Set to true to smooth all sprites rendered on this Stage, or false to disable smoothing (great for pixel art)","type":{"names":["boolean"]},"default":""},{"name":"children","access":"","virtual":false,"description":"[read-only] The array of children of this container.","type":{"names":["Array.<DisplayObject>"]},"default":""},{"name":"ignoreChildInput","access":"","virtual":false,"description":"If `ignoreChildInput`  is `false` it will allow this objects _children_ to be considered as valid for Input events.\n\nIf this property is `true` then the children will _not_ be considered as valid for Input events.\n\nNote that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.","type":{"names":["Boolean"]},"default":""},{"name":"width","access":"","virtual":false,"description":"The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"position","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject, relative to its parent container.\n\nThe value of this property does not reflect any positioning happening further up the display list.\nTo obtain that value please see the `worldPosition` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"scale","access":"","virtual":false,"description":"The scale of this DisplayObject. A scale of 1:1 represents the DisplayObject\nat its default size. A value of 0.5 would scale this DisplayObject by half, and so on.\n\nThe value of this property does not reflect any scaling happening further up the display list.\nTo obtain that value please see the `worldScale` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"pivot","access":"","virtual":false,"description":"The pivot point of this DisplayObject that it rotates around. The values are expressed\nin pixel values.","type":{"names":["PIXIPoint"]},"default":""},{"name":"rotation","access":"","virtual":false,"description":"The rotation of this DisplayObject. The value is given, and expressed, in radians, and is based on\na right-handed orientation.\n\nThe value of this property does not reflect any rotation happening further up the display list.\nTo obtain that value please see the `worldRotation` property.","type":{"names":["Number"]},"default":""},{"name":"alpha","access":"","virtual":false,"description":"The alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nPlease note that an object with an alpha value of 0 is skipped during the render pass.\n\nThe value of this property does not reflect any alpha values set further up the display list.\nTo obtain that value please see the `worldAlpha` property.","type":{"names":["Number"]},"default":""},{"name":"visible","access":"","virtual":false,"description":"The visibility of this DisplayObject. A value of `false` makes the object invisible.\nA value of `true` makes it visible. Please note that an object with a visible value of\n`false` is skipped during the render pass. Equally a DisplayObject with visible false will\nnot render any of its children.\n\nThe value of this property does not reflect any visible values set further up the display list.\nTo obtain that value please see the `worldVisible` property.","type":{"names":["Boolean"]},"default":""},{"name":"hitArea","access":"","virtual":false,"description":"This is the defined area that will pick up mouse / touch events. It is null by default.\nSetting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)","type":{"names":["Rectangle","Circle","Ellipse","Polygon"]},"default":""},{"name":"renderable","access":"","virtual":false,"description":"Should this DisplayObject be rendered by the renderer? An object with a renderable value of\n`false` is skipped during the render pass.","type":{"names":["Boolean"]},"default":""},{"name":"parent","access":"","virtual":false,"description":"The parent DisplayObjectContainer that this DisplayObject is a child of.\nAll DisplayObjects must belong to a parent in order to be rendered.\nThe root parent is the Stage object. This property is set automatically when the\nDisplayObject is added to, or removed from, a DisplayObjectContainer.","type":{"names":["PIXIDisplayObjectContainer"]},"default":""},{"name":"worldAlpha","access":"","virtual":false,"description":"The multiplied alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nThis value is the calculated total, based on the alpha values of all parents of this DisplayObjects \nin the display list.\n\nTo obtain, and set, the local alpha value, see the `alpha` property.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"worldPosition","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject within the world.\n\nThis property contains the calculated total, based on the positions of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldScale","access":"","virtual":false,"description":"The global scale of this DisplayObject.\n\nThis property contains the calculated total, based on the scales of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldRotation","access":"","virtual":false,"description":"The rotation, in radians, of this DisplayObject.\n\nThis property contains the calculated total, based on the rotations of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"filterArea","access":"","virtual":false,"description":"The rectangular area used by filters when rendering a shader for this DisplayObject.","type":{"names":["Rectangle"]},"default":""},{"name":"_sr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_cr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_bounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_currentBounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_mask","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_cacheAsBitmap","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"_cacheIsDirty","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"x","access":"","virtual":false,"description":"The horizontal position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The vertical position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"worldVisible","access":"","virtual":false,"description":"Indicates if this DisplayObject is visible, based on it, and all of its parents, `visible` property values.","type":{"names":["Boolean"]},"default":""},{"name":"mask","access":"","virtual":false,"description":"Sets a mask for this DisplayObject. A mask is an instance of a Graphics object.\nWhen applied it limits the visible area of this DisplayObject to the shape of the mask.\nUnder a Canvas renderer it uses shape clipping. Under a WebGL renderer it uses a Stencil Buffer.\nTo remove a mask, set this property to `null`.","type":{"names":["PIXIGraphics"]},"default":""},{"name":"filters","access":"","virtual":false,"description":"Sets the filters for this DisplayObject. This is a WebGL only feature, and is ignored by the Canvas\nRenderer. A filter is a shader applied to this DisplayObject. You can modify the placement of the filter\nusing `DisplayObject.filterArea`.\n\nTo remove filters, set this property to `null`.\n\nNote: You cannot have a filter set, and a MULTIPLY Blend Mode active, at the same time. Setting a \nfilter will reset this DisplayObjects blend mode to NORMAL.","type":{"names":["Array"]},"default":""},{"name":"cacheAsBitmap","access":"","virtual":false,"description":"Sets if this DisplayObject should be cached as a bitmap.\n\nWhen invoked it will take a snapshot of the DisplayObject, as it is at that moment, and store it \nin a RenderTexture. This is then used whenever this DisplayObject is rendered. It can provide a\nperformance benefit for complex, but static, DisplayObjects. I.e. those with lots of children.\n\nCached Bitmaps do not track their parents. If you update a property of this DisplayObject, it will not\nre-generate the cached bitmap automatically. To do that you need to call `DisplayObject.updateCache`.\n\nTo remove a cached bitmap, set this property to `null`.","type":{"names":["Boolean"]},"default":""}]},{"name":"Phaser.State","description":"This is a base State class which can be extended if you are creating your own game.\rIt provides quick access to common functions such as the camera, cache, input, match, sound and more.","constructor":{"name":"State","description":"This is a base State class which can be extended if you are creating your own game.\rIt provides quick access to common functions such as the camera, cache, input, match, sound and more.","parameters":[]},"functions":[{"name":"init","description":"init is the very first function called when your State starts up. It's called before preload, create or anything else.\rIf you need to route the game away to another State you could do so here, or if you need to prepare a set of variables\ror objects before the preloading starts.","parameters":[]},{"name":"preload","description":"preload is called first. Normally you'd use this to load your game assets (or those needed for the current State)\rYou shouldn't create any objects in this method that require assets that you're also loading in this method, as\rthey won't yet be available.","parameters":[]},{"name":"loadUpdate","description":"loadUpdate is called during the Loader process. This only happens if you've set one or more assets to load in the preload method.","parameters":[]},{"name":"loadRender","description":"loadRender is called during the Loader process. This only happens if you've set one or more assets to load in the preload method.\rThe difference between loadRender and render is that any objects you render in this method you must be sure their assets exist.","parameters":[]},{"name":"create","description":"create is called once preload has completed, this includes the loading of any assets from the Loader.\rIf you don't have a preload method then create is the first method called in your State.","parameters":[]},{"name":"update","description":"The update method is left empty for your own use.\rIt is called during the core game loop AFTER debug, physics, plugins and the Stage have had their preUpdate methods called.\rIt is called BEFORE Stage, Tweens, Sounds, Input, Physics, Particles and Plugins have had their postUpdate methods called.","parameters":[]},{"name":"preRender","description":"The preRender method is called after all Game Objects have been updated, but before any rendering takes place.","parameters":[]},{"name":"render","description":"Nearly all display objects in Phaser render automatically, you don't need to tell them to render.\rHowever the render method is called AFTER the game renderer and plugins have rendered, so you're able to do any\rfinal post-processing style effects here. Note that this happens before plugins postRender takes place.","parameters":[]},{"name":"resize","description":"If your game is set to Scalemode RESIZE then each time the browser resizes it will call this function, passing in the new width and height.","parameters":[]},{"name":"paused","description":"This method will be called if the core game loop is paused.","parameters":[]},{"name":"resumed","description":"This method will be called when the core game loop resumes from a paused state.","parameters":[]},{"name":"pauseUpdate","description":"pauseUpdate is called while the game is paused instead of preUpdate, update and postUpdate.","parameters":[]},{"name":"shutdown","description":"This method will be called when the State is shutdown (i.e. you switch to another state from this one).","parameters":[]}],"members":[{"name":"game","access":"","virtual":false,"description":"This is a reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"key","access":"","virtual":false,"description":"The string based identifier given to the State when added into the State Manager.","type":{"names":["string"]},"default":""},{"name":"add","access":"","virtual":false,"description":"A reference to the GameObjectFactory which can be used to add new objects to the World.","type":{"names":["Phaser.GameObjectFactory"]},"default":""},{"name":"make","access":"","virtual":false,"description":"A reference to the GameObjectCreator which can be used to make new objects.","type":{"names":["Phaser.GameObjectCreator"]},"default":""},{"name":"camera","access":"","virtual":false,"description":"A handy reference to World.camera.","type":{"names":["Phaser.Camera"]},"default":""},{"name":"cache","access":"","virtual":false,"description":"A reference to the game cache which contains any loaded or generated assets, such as images, sound and more.","type":{"names":["Phaser.Cache"]},"default":""},{"name":"input","access":"","virtual":false,"description":"A reference to the Input Manager.","type":{"names":["Phaser.Input"]},"default":""},{"name":"load","access":"","virtual":false,"description":"A reference to the Loader, which you mostly use in the preload method of your state to load external assets.","type":{"names":["Phaser.Loader"]},"default":""},{"name":"math","access":"","virtual":false,"description":"A reference to Math class with lots of helpful functions.","type":{"names":["Phaser.Math"]},"default":""},{"name":"sound","access":"","virtual":false,"description":"A reference to the Sound Manager which can create, play and stop sounds, as well as adjust global volume.","type":{"names":["Phaser.SoundManager"]},"default":""},{"name":"scale","access":"","virtual":false,"description":"A reference to the Scale Manager which controls the way the game scales on different displays.","type":{"names":["Phaser.ScaleManager"]},"default":""},{"name":"stage","access":"","virtual":false,"description":"A reference to the Stage.","type":{"names":["Phaser.Stage"]},"default":""},{"name":"state","access":"","virtual":false,"description":"A reference to the State Manager, which controls state changes.","type":"","default":""},{"name":"time","access":"","virtual":false,"description":"A reference to the game clock and timed events system.","type":{"names":["Phaser.Time"]},"default":""},{"name":"tweens","access":"","virtual":false,"description":"A reference to the tween manager.","type":{"names":["Phaser.TweenManager"]},"default":""},{"name":"world","access":"","virtual":false,"description":"A reference to the game world. All objects live in the Game World and its size is not bound by the display resolution.","type":{"names":["Phaser.World"]},"default":""},{"name":"particles","access":"","virtual":false,"description":"The Particle Manager. It is called during the core gameloop and updates any Particle Emitters it has created.","type":{"names":["Phaser.Particles"]},"default":""},{"name":"physics","access":"","virtual":false,"description":"A reference to the physics manager which looks after the different physics systems available within Phaser.","type":{"names":["Phaser.Physics"]},"default":""},{"name":"rnd","access":"","virtual":false,"description":"A reference to the seeded and repeatable random data generator.","type":{"names":["Phaser.RandomDataGenerator"]},"default":""}]},{"name":"Phaser.StateManager","description":"The State Manager is responsible for loading, setting up and switching game states.","constructor":{"name":"StateManager","description":"The State Manager is responsible for loading, setting up and switching game states.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"pendingState","type":["Phaser.State","Object"],"description":"A State object to seed the manager with.","default":"","optional":true,"nullable":""}]},"functions":[{"name":"boot","description":"The Boot handler is called by Phaser.Game when it first starts up.","parameters":[]},{"name":"add","description":"Adds a new State into the StateManager. You must give each State a unique key by which you'll identify it.\rThe State can be either a Phaser.State object (or an object that extends it), a plain JavaScript object or a function.\rIf a function is given a new state object will be created by calling it.","parameters":[{"name":"key","type":"string","description":"A unique key you use to reference this state, i.e. \"MainMenu\", \"Level1\".","default":"","optional":"","nullable":""},{"name":"state","type":["Phaser.State","object","function"],"description":"The state you want to switch to.","default":"","optional":"","nullable":""},{"name":"autoStart","type":"boolean","description":"If true the State will be started immediately after adding it.","default":"","optional":true,"nullable":""}]},{"name":"remove","description":"Delete the given state.","parameters":[{"name":"key","type":"string","description":"A unique key you use to reference this state, i.e. \"MainMenu\", \"Level1\".","default":"","optional":"","nullable":""}]},{"name":"start","description":"Start the given State. If a State is already running then State.shutDown will be called (if it exists) before switching to the new State.","parameters":[{"name":"key","type":"string","description":"The key of the state you want to start.","default":"","optional":"","nullable":""},{"name":"clearWorld","type":"boolean","description":"Clear everything in the world? This clears the World display list fully (but not the Stage, so if you've added your own objects to the Stage they will need managing directly)","default":true,"optional":true,"nullable":""},{"name":"clearCache","type":"boolean","description":"Clear the Game.Cache? This purges out all loaded assets. The default is false and you must have clearWorld=true if you want to clearCache as well.","default":"","optional":true,"nullable":""},{"name":"parameter","type":"*","description":"Additional parameters that will be passed to the State.init function (if it has one).","default":"","optional":"","nullable":""}]},{"name":"restart","description":"Restarts the current State. State.shutDown will be called (if it exists) before the State is restarted.","parameters":[{"name":"clearWorld","type":"boolean","description":"Clear everything in the world? This clears the World display list fully (but not the Stage, so if you've added your own objects to the Stage they will need managing directly)","default":true,"optional":true,"nullable":""},{"name":"clearCache","type":"boolean","description":"Clear the Game.Cache? This purges out all loaded assets. The default is false and you must have clearWorld=true if you want to clearCache as well.","default":"","optional":true,"nullable":""},{"name":"parameter","type":"*","description":"Additional parameters that will be passed to the State.init function if it has one.","default":"","optional":"","nullable":""}]},{"name":"dummy","description":"Used by onInit and onShutdown when those functions don't exist on the state","parameters":[]},{"name":"preUpdate","description":"preUpdate is called right at the start of the game loop. It is responsible for changing to a new state that was requested previously.","parameters":[]},{"name":"clearCurrentState","description":"This method clears the current State, calling its shutdown callback. The process also removes any active tweens,\rresets the camera, resets input, clears physics, removes timers and if set clears the world and cache too.","parameters":[]},{"name":"checkState","description":"Checks if a given phaser state is valid. A State is considered valid if it has at least one of the core functions: preload, create, update or render.","parameters":[{"name":"key","type":"string","description":"The key of the state you want to check.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"true if the State has the required functions, otherwise false."}},{"name":"link","description":"Links game properties to the State given by the key.","parameters":[{"name":"key","type":"string","description":"State key.","default":"","optional":"","nullable":""}]},{"name":"unlink","description":"Nulls all State level Phaser properties, including a reference to Game.","parameters":[{"name":"key","type":"string","description":"State key.","default":"","optional":"","nullable":""}]},{"name":"setCurrentState","description":"Sets the current State. Should not be called directly (use StateManager.start)","parameters":[{"name":"key","type":"string","description":"State key.","default":"","optional":"","nullable":""}]},{"name":"getCurrentState","description":"Gets the current State.","parameters":[],"returns":{"type":"Phaser.State","description":""}},{"name":"loadComplete","description":"","parameters":[]},{"name":"pause","description":"","parameters":[]},{"name":"resume","description":"","parameters":[]},{"name":"update","description":"","parameters":[]},{"name":"pauseUpdate","description":"","parameters":[]},{"name":"preRender","description":"","parameters":[{"name":"elapsedTime","type":"number","description":"The time elapsed since the last update.","default":"","optional":"","nullable":""}]},{"name":"resize","description":"","parameters":[]},{"name":"render","description":"","parameters":[]},{"name":"destroy","description":"Removes all StateManager callback references to the State object, nulls the game reference and clears the States object.\rYou don't recover from this without rebuilding the Phaser instance again.","parameters":[]}],"members":[{"name":"game","access":"","virtual":false,"description":"A reference to the currently running game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"states","access":"","virtual":false,"description":"The object containing Phaser.States.","type":{"names":["object"]},"default":""},{"name":"_pendingState","access":"private","virtual":false,"description":"The state to be switched to in the next frame.","type":{"names":["Phaser.State"]},"default":""},{"name":"_clearWorld","access":"private","virtual":false,"description":"Clear the world when we switch state?","type":{"names":["boolean"]},"default":""},{"name":"_clearCache","access":"private","virtual":false,"description":"Clear the cache when we switch state?","type":{"names":["boolean"]},"default":""},{"name":"_created","access":"private","virtual":false,"description":"Flag that sets if the State has been created or not.","type":{"names":["boolean"]},"default":""},{"name":"_args","access":"private","virtual":false,"description":"Temporary container when you pass vars from one State to another.","type":{"names":["Array.<any>"]},"default":""},{"name":"current","access":"","virtual":false,"description":"The current active State object.","type":{"names":["string"]},"default":""},{"name":"onStateChange","access":"","virtual":false,"description":"onStateChange is a Phaser.Signal that is dispatched whenever the game changes state.\r\rIt is dispatched only when the new state is started, which isn't usually at the same time as StateManager.start\ris called because state swapping is done in sync with the game loop. It is dispatched *before* any of the new states\rmethods (such as preload and create) are called, and *after* the previous states shutdown method has been run.\r\rThe callback you specify is sent two parameters: the string based key of the new state, \rand the second parameter is the string based key of the old / previous state.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onInitCallback","access":"","virtual":false,"description":"This is called when the state is set as the active state.","type":{"names":["function"]},"default":""},{"name":"onPreloadCallback","access":"","virtual":false,"description":"This is called when the state starts to load assets.","type":{"names":["function"]},"default":""},{"name":"onCreateCallback","access":"","virtual":false,"description":"This is called when the state preload has finished and creation begins.","type":{"names":["function"]},"default":""},{"name":"onUpdateCallback","access":"","virtual":false,"description":"This is called when the state is updated, every game loop. It doesn't happen during preload (@see onLoadUpdateCallback).","type":{"names":["function"]},"default":""},{"name":"onRenderCallback","access":"","virtual":false,"description":"This is called post-render. It doesn't happen during preload (see onLoadRenderCallback).","type":{"names":["function"]},"default":""},{"name":"onResizeCallback","access":"","virtual":false,"description":"This is called if ScaleManager.scalemode is RESIZE and a resize event occurs. It's passed the new width and height.","type":{"names":["function"]},"default":""},{"name":"onPreRenderCallback","access":"","virtual":false,"description":"This is called before the state is rendered and before the stage is cleared but after all game objects have had their final properties adjusted.","type":{"names":["function"]},"default":""},{"name":"onLoadUpdateCallback","access":"","virtual":false,"description":"This is called when the State is updated during the preload phase.","type":{"names":["function"]},"default":""},{"name":"onLoadRenderCallback","access":"","virtual":false,"description":"This is called when the State is rendered during the preload phase.","type":{"names":["function"]},"default":""},{"name":"onPausedCallback","access":"","virtual":false,"description":"This is called when the game is paused.","type":{"names":["function"]},"default":""},{"name":"onResumedCallback","access":"","virtual":false,"description":"This is called when the game is resumed from a paused state.","type":{"names":["function"]},"default":""},{"name":"onPauseUpdateCallback","access":"","virtual":false,"description":"This is called every frame while the game is paused.","type":{"names":["function"]},"default":""},{"name":"onShutDownCallback","access":"","virtual":false,"description":"This is called when the state is shut down (i.e. swapped to another state).","type":{"names":["function"]},"default":""},{"name":"created","access":"","virtual":false,"description":"True if the current state has had its `create` method run (if it has one, if not this is true by default).","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.World","description":"\"This world is but a canvas to our imagination.\" - Henry David Thoreau\r\rA game has only one world. The world is an abstract place in which all game objects live. It is not bound\rby stage limits and can be any size. You look into the world via cameras. All game objects live within\rthe world at world-based coordinates. By default a world is created the same size as your Stage.","constructor":{"name":"World","description":"\"This world is but a canvas to our imagination.\" - Henry David Thoreau\r\rA game has only one world. The world is an abstract place in which all game objects live. It is not bound\rby stage limits and can be any size. You look into the world via cameras. All game objects live within\rthe world at world-based coordinates. By default a world is created the same size as your Stage.","parameters":[{"name":"game","type":"Phaser.Game","description":"Reference to the current game instance.","default":"","optional":"","nullable":""}]},"functions":[{"name":"boot","description":"Initialises the game world.","parameters":[]},{"name":"stateChange","description":"Called whenever the State changes or resets.\r\rIt resets the world.x and world.y coordinates back to zero,\rthen resets the Camera.","parameters":[]},{"name":"setBounds","description":"Updates the size of this world and sets World.x/y to the given values\rThe Camera bounds and Physics bounds (if set) are also updated to match the new World bounds.","parameters":[{"name":"x","type":"number","description":"Top left most corner of the world.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Top left most corner of the world.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"New width of the game world in pixels.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"New height of the game world in pixels.","default":"","optional":"","nullable":""}]},{"name":"resize","description":"Updates the size of this world. Note that this doesn't modify the world x/y coordinates, just the width and height.","parameters":[{"name":"width","type":"number","description":"New width of the game world in pixels.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"New height of the game world in pixels.","default":"","optional":"","nullable":""}]},{"name":"shutdown","description":"Destroyer of worlds.","parameters":[]},{"name":"wrap","description":"This will take the given game object and check if its x/y coordinates fall outside of the world bounds.\rIf they do it will reposition the object to the opposite side of the world, creating a wrap-around effect.\rIf sprite has a P2 body then the body (sprite.body) should be passed as first parameter to the function.\r\rPlease understand there are limitations to this method. For example if you have scaled the World\rthen objects won't always be re-positioned correctly, and you'll need to employ your own wrapping function.","parameters":[{"name":"sprite","type":["Phaser.Sprite","Phaser.Image","Phaser.TileSprite","Phaser.Text"],"description":"The object you wish to wrap around the world bounds.","default":"","optional":"","nullable":""},{"name":"padding","type":"number","description":"Extra padding added equally to the sprite.x and y coordinates before checking if within the world bounds. Ignored if useBounds is true.","default":"","optional":true,"nullable":""},{"name":"useBounds","type":"boolean","description":"If useBounds is false wrap checks the object.x/y coordinates. If true it does a more accurate bounds check, which is more expensive.","default":"","optional":true,"nullable":""},{"name":"horizontal","type":"boolean","description":"If horizontal is false, wrap will not wrap the object.x coordinates horizontally.","default":true,"optional":true,"nullable":""},{"name":"vertical","type":"boolean","description":"If vertical is false, wrap will not wrap the object.y coordinates vertically.","default":true,"optional":true,"nullable":""}]},{"name":"add","description":"Adds an existing object as the top child in this group.\r\rThe child is automatically added to the top of the group, and is displayed above every previous child.\r\rOr if the _optional_ index is specified, the child is added at the location specified by the index value, \rthis allows you to control child ordering.\r\rIf the child was already in this Group, it is simply returned, and nothing else happens to it.\r\rIf `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.\r\rUse {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.","parameters":[{"name":"child","type":"DisplayObject","description":"The display object to add as a child.","default":"","optional":"","nullable":""},{"name":"silent","type":"boolean","description":"If true the child will not dispatch the `onAddedToGroup` event.","default":"","optional":true,"nullable":""},{"name":"index","type":"integer","description":"The index within the group to insert the child to. Where 0 is the bottom of the Group.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The child that was added to the group."}},{"name":"addAt","description":"Adds an existing object to this group.\r\rThe child is added to the group at the location specified by the index value, this allows you to control child ordering.\r\rIf `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.","parameters":[{"name":"child","type":"DisplayObject","description":"The display object to add as a child.","default":"","optional":"","nullable":""},{"name":"index","type":"integer","description":"The index within the group to insert the child to.","default":"","optional":true,"nullable":""},{"name":"silent","type":"boolean","description":"If true the child will not dispatch the `onAddedToGroup` event.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The child that was added to the group."}},{"name":"addToHash","description":"Adds a child of this Group into the hash array.\rThis call will return false if the child is not a child of this Group, or is already in the hash.","parameters":[{"name":"child","type":"DisplayObject","description":"The display object to add to this Groups hash. Must be a member of this Group already and not present in the hash.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the child was successfully added to the hash, otherwise false."}},{"name":"removeFromHash","description":"Removes a child of this Group from the hash array.\rThis call will return false if the child is not in the hash.","parameters":[{"name":"child","type":"DisplayObject","description":"The display object to remove from this Groups hash. Must be a member of this Group and in the hash.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the child was successfully removed from the hash, otherwise false."}},{"name":"addMultiple","description":"Adds an array of existing Display Objects to this Group.\r\rThe Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.\r\rAs well as an array you can also pass another Group as the first argument. In this case all of the children from that\rGroup will be removed from it and added into this Group.\r\rIf `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.","parameters":[{"name":"children","type":["Array.<DisplayObject>","Phaser.Group"],"description":"An array of display objects or a Phaser.Group. If a Group is given then *all* children will be moved from it.","default":"","optional":"","nullable":""},{"name":"silent","type":"boolean","description":"If true the children will not dispatch the `onAddedToGroup` event.","default":"","optional":true,"nullable":""}],"returns":{"type":["Array.<DisplayObject>","Phaser.Group"],"description":"The array of children or Group of children that were added to this Group."}},{"name":"getAt","description":"Returns the child found at the given index within this group.","parameters":[{"name":"index","type":"integer","description":"The index to return the child from.","default":"","optional":"","nullable":""}],"returns":{"type":["DisplayObject","integer"],"description":"The child that was found at the given index, or -1 for an invalid index."}},{"name":"create","description":"Creates a new Phaser.Sprite object and adds it to the top of this group.\r\rUse {@link Phaser.Group#classType classType} to change the type of object created.\r\rThe child is automatically added to the top of the group, and is displayed above every previous child.\r\rOr if the _optional_ index is specified, the child is added at the location specified by the index value, \rthis allows you to control child ordering.\r\rIf `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.","parameters":[{"name":"x","type":"number","description":"The x coordinate to display the newly created Sprite at. The value is in relation to the group.x point.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate to display the newly created Sprite at. The value is in relation to the group.y point.","default":"","optional":"","nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""},{"name":"exists","type":"boolean","description":"The default exists state of the Sprite.","default":true,"optional":true,"nullable":""},{"name":"index","type":"integer","description":"The index within the group to insert the child to. Where 0 is the bottom of the Group.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The child that was created: will be a {@link Phaser.Sprite} unless {@link #classType} has been changed."}},{"name":"createMultiple","description":"Creates multiple Phaser.Sprite objects and adds them to the top of this Group.\r\rThis method is useful if you need to quickly generate a pool of sprites, such as bullets.\r\rUse {@link Phaser.Group#classType classType} to change the type of object created.\r\rYou can provide an array as the `key` and / or `frame` arguments. When you do this\rit will create `quantity` Sprites for every key (and frame) in the arrays.\r\rFor example:\r\r`createMultiple(25, ['ball', 'carrot'])`\r\rIn the above code there are 2 keys (ball and carrot) which means that 50 sprites will be\rcreated in total, 25 of each. You can also have the `frame` as an array:\r\r`createMultiple(5, 'bricks', [0, 1, 2, 3])`\r\rIn the above there is one key (bricks), which is a sprite sheet. The frames array tells\rthis method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because\rthe quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with\rframe 1, and so on.\r\rIf you set both the key and frame arguments to be arrays then understand it will create\ra total quantity of sprites equal to the size of both arrays times each other. I.e.:\r\r`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`\r\rThe above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2.\rIt will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2.\rIn total it will have created 120 sprites.\r\rBy default the Sprites will have their `exists` property set to `false`, and they will be \rpositioned at 0x0, relative to the `Group.x / y` values.\r\rIf `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.","parameters":[{"name":"quantity","type":"integer","description":"The number of Sprites to create.","default":"","optional":"","nullable":""},{"name":"key","type":["string","array"],"description":"The Cache key of the image that the Sprites will use. Or an Array of keys. See the description for details on how the quantity applies when arrays are used.","default":"","optional":"","nullable":""},{"name":"frame","type":["integer","string","array"],"description":"If the Sprite image contains multiple frames you can specify which one to use here. Or an Array of frames. See the description for details on how the quantity applies when arrays are used.","default":"","optional":true,"nullable":""},{"name":"exists","type":"boolean","description":"The default exists state of the Sprite.","default":"","optional":true,"nullable":""}],"returns":{"type":"array","description":"An array containing all of the Sprites that were created."}},{"name":"updateZ","description":"Internal method that re-applies all of the children's Z values.\r\rThis must be called whenever children ordering is altered so that their `z` indices are correctly updated.","parameters":[]},{"name":"align","description":"This method iterates through all children in the Group (regardless if they are visible or exist)\rand then changes their position so they are arranged in a Grid formation. Children must have\rthe `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have\rthis.\r\rThe grid dimensions are determined by the first four arguments. The `width` and `height` arguments\rrelate to the width and height of the grid respectively.\r\rFor example if the Group had 100 children in it:\r\r`Group.align(10, 10, 32, 32)`\r\rThis will align all of the children into a grid formation of 10x10, using 32 pixels per\rgrid cell. If you want a wider grid, you could do:\r\r`Group.align(25, 4, 32, 32)`\r\rThis will align the children into a grid of 25x4, again using 32 pixels per grid cell.\r\rYou can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method\rto keep on aligning children until there are no children left. For example if this Group had\r48 children in it, the following:\r\r`Group.align(-1, 8, 32, 32)`\r\r... will align the children so that there are 8 children vertically (the second argument), \rand each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)\r\rYou can also do:\r\r`Group.align(10, -1, 32, 32)`\r\rIn this case it will create a grid 10 wide, and as tall as it needs to be in order to fit\rall of the children in.\r\rThe `position` property allows you to control where in each grid cell the child is positioned.\rThis is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, \r`Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, \r`Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.\r\rThe final argument; `offset` lets you start the alignment from a specific child index.","parameters":[{"name":"width","type":"integer","description":"The width of the grid in items (not pixels). Set to -1 for a dynamic width. If -1 then you must set an explicit height value.","default":"","optional":"","nullable":""},{"name":"height","type":"integer","description":"The height of the grid in items (not pixels). Set to -1 for a dynamic height. If -1 then you must set an explicit width value.","default":"","optional":"","nullable":""},{"name":"cellWidth","type":"integer","description":"The width of each grid cell, in pixels.","default":"","optional":"","nullable":""},{"name":"cellHeight","type":"integer","description":"The height of each grid cell, in pixels.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offset","type":"integer","description":"Optional index to start the alignment from. Defaults to zero, the first child in the Group, but can be set to any valid child index value.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the Group children were aligned, otherwise false."}},{"name":"resetCursor","description":"Sets the group cursor to the first child in the group.\r\rIf the optional index parameter is given it sets the cursor to the object at that index instead.","parameters":[{"name":"index","type":"integer","description":"Set the cursor to point to a specific index.","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"The child the cursor now points to."}},{"name":"next","description":"Advances the group cursor to the next (higher) object in the group.\r\rIf the cursor is at the end of the group (top child) it is moved the start of the group (bottom child).","parameters":[],"returns":{"type":"any","description":"The child the cursor now points to."}},{"name":"previous","description":"Moves the group cursor to the previous (lower) child in the group.\r\rIf the cursor is at the start of the group (bottom child) it is moved to the end (top child).","parameters":[],"returns":{"type":"any","description":"The child the cursor now points to."}},{"name":"swap","description":"Swaps the position of two children in this group.\r\rBoth children must be in this group, a child cannot be swapped with itself, and unparented children cannot be swapped.","parameters":[{"name":"child1","type":"any","description":"The first child to swap.","default":"","optional":"","nullable":""},{"name":"child2","type":"any","description":"The second child to swap.","default":"","optional":"","nullable":""}]},{"name":"bringToTop","description":"Brings the given child to the top of this group so it renders above all other children.","parameters":[{"name":"child","type":"any","description":"The child to bring to the top of this group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The child that was moved."}},{"name":"sendToBack","description":"Sends the given child to the bottom of this group so it renders below all other children.","parameters":[{"name":"child","type":"any","description":"The child to send to the bottom of this group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The child that was moved."}},{"name":"moveUp","description":"Moves the given child up one place in this group unless it's already at the top.","parameters":[{"name":"child","type":"any","description":"The child to move up in the group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The child that was moved."}},{"name":"moveDown","description":"Moves the given child down one place in this group unless it's already at the bottom.","parameters":[{"name":"child","type":"any","description":"The child to move down in the group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The child that was moved."}},{"name":"xy","description":"Positions the child found at the given index within this group to the given x and y coordinates.","parameters":[{"name":"index","type":"integer","description":"The index of the child in the group to set the position of.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The new x position of the child.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The new y position of the child.","default":"","optional":"","nullable":""}]},{"name":"reverse","description":"Reverses all children in this group.\r\rThis operation applies only to immediate children and does not propagate to subgroups.","parameters":[]},{"name":"getIndex","description":"Get the index position of the given child in this group, which should match the child's `z` property.","parameters":[{"name":"child","type":"any","description":"The child to get the index for.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The index of the child or -1 if it's not a member of this group."}},{"name":"getByName","description":"Searches the Group for the first instance of a child with the `name`\rproperty matching the given argument. Should more than one child have\rthe same name only the first instance is returned.","parameters":[{"name":"name","type":"string","description":"The name to search for.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The first child with a matching name, or null if none were found."}},{"name":"replace","description":"Replaces a child of this Group with the given newChild. The newChild cannot be a member of this Group.\r\rIf `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.","parameters":[{"name":"oldChild","type":"any","description":"The child in this group that will be replaced.","default":"","optional":"","nullable":""},{"name":"newChild","type":"any","description":"The child to be inserted into this group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"Returns the oldChild that was replaced within this group."}},{"name":"hasProperty","description":"Checks if the child has the given property.\r\rWill scan up to 4 levels deep only.","parameters":[{"name":"child","type":"any","description":"The child to check for the existence of the property on.","default":"","optional":"","nullable":""},{"name":"key","type":"Array.<string>","description":"An array of strings that make up the property.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the child has the property, otherwise false."}},{"name":"setProperty","description":"Sets a property to the given value on the child. The operation parameter controls how the value is set.\r\rThe operations are:\r- 0: set the existing value to the given value; if force is `true` a new property will be created if needed\r- 1: will add the given value to the value already present.\r- 2: will subtract the given value from the value already present.\r- 3: will multiply the value already present by the given value.\r- 4: will divide the value already present by the given value.","parameters":[{"name":"child","type":"any","description":"The child to set the property value on.","default":"","optional":"","nullable":""},{"name":"key","type":"array","description":"An array of strings that make up the property that will be set.","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be set.","default":"","optional":"","nullable":""},{"name":"operation","type":"integer","description":"Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the property was set, false if not."}},{"name":"checkProperty","description":"Checks a property for the given value on the child.","parameters":[{"name":"child","type":"any","description":"The child to check the property value on.","default":"","optional":"","nullable":""},{"name":"key","type":"array","description":"An array of strings that make up the property that will be set.","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be checked.","default":"","optional":"","nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the property was was equal to value, false if not."}},{"name":"set","description":"Quickly set a property on a single child of this group to a new value.\r\rThe operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.","parameters":[{"name":"child","type":"Phaser.Sprite","description":"The child to set the property on.","default":"","optional":"","nullable":""},{"name":"key","type":"string","description":"The property, as a string, to be set. For example: 'body.velocity.x'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be set.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If set then the child will only be updated if alive=true.","default":"","optional":true,"nullable":""},{"name":"checkVisible","type":"boolean","description":"If set then the child will only be updated if visible=true.","default":"","optional":true,"nullable":""},{"name":"operation","type":"integer","description":"Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the property was set, false if not."}},{"name":"setAll","description":"Quickly set the same property across all children of this group to a new value.\r\rThis call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children.\rIf you need that ability please see `Group.setAllChildren`.\r\rThe operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.","parameters":[{"name":"key","type":"string","description":"The property, as a string, to be set. For example: 'body.velocity.x'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be set.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If set then only children with alive=true will be updated. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"checkVisible","type":"boolean","description":"If set then only children with visible=true will be updated. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"operation","type":"integer","description":"Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.","default":"","optional":true,"nullable":""}]},{"name":"setAllChildren","description":"Quickly set the same property across all children of this group, and any child Groups, to a new value.\r\rIf this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom.\rUnlike with `setAll` the property is NOT set on child Groups itself.\r\rThe operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.","parameters":[{"name":"key","type":"string","description":"The property, as a string, to be set. For example: 'body.velocity.x'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be set.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If set then only children with alive=true will be updated. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"checkVisible","type":"boolean","description":"If set then only children with visible=true will be updated. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"operation","type":"integer","description":"Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.","default":"","optional":true,"nullable":""}]},{"name":"checkAll","description":"Quickly check that the same property across all children of this group is equal to the given value.\r\rThis call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.","parameters":[{"name":"key","type":"string","description":"The property, as a string, to be set. For example: 'body.velocity.x'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be checked.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If set then only children with alive=true will be checked. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"checkVisible","type":"boolean","description":"If set then only children with visible=true will be checked. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned.","default":"","optional":true,"nullable":""}]},{"name":"addAll","description":"Adds the amount to the given property on all children in this group.\r\r`Group.addAll('x', 10)` will add 10 to the child.x value for each child.","parameters":[{"name":"property","type":"string","description":"The property to increment, for example 'body.velocity.x' or 'angle'.","default":"","optional":"","nullable":""},{"name":"amount","type":"number","description":"The amount to increment the property by. If child.x = 10 then addAll('x', 40) would make child.x = 50.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If true the property will only be changed if the child is alive.","default":"","optional":"","nullable":""},{"name":"checkVisible","type":"boolean","description":"If true the property will only be changed if the child is visible.","default":"","optional":"","nullable":""}]},{"name":"subAll","description":"Subtracts the amount from the given property on all children in this group.\r\r`Group.subAll('x', 10)` will minus 10 from the child.x value for each child.","parameters":[{"name":"property","type":"string","description":"The property to decrement, for example 'body.velocity.x' or 'angle'.","default":"","optional":"","nullable":""},{"name":"amount","type":"number","description":"The amount to subtract from the property. If child.x = 50 then subAll('x', 40) would make child.x = 10.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If true the property will only be changed if the child is alive.","default":"","optional":"","nullable":""},{"name":"checkVisible","type":"boolean","description":"If true the property will only be changed if the child is visible.","default":"","optional":"","nullable":""}]},{"name":"multiplyAll","description":"Multiplies the given property by the amount on all children in this group.\r\r`Group.multiplyAll('x', 2)` will x2 the child.x value for each child.","parameters":[{"name":"property","type":"string","description":"The property to multiply, for example 'body.velocity.x' or 'angle'.","default":"","optional":"","nullable":""},{"name":"amount","type":"number","description":"The amount to multiply the property by. If child.x = 10 then multiplyAll('x', 2) would make child.x = 20.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If true the property will only be changed if the child is alive.","default":"","optional":"","nullable":""},{"name":"checkVisible","type":"boolean","description":"If true the property will only be changed if the child is visible.","default":"","optional":"","nullable":""}]},{"name":"divideAll","description":"Divides the given property by the amount on all children in this group.\r\r`Group.divideAll('x', 2)` will half the child.x value for each child.","parameters":[{"name":"property","type":"string","description":"The property to divide, for example 'body.velocity.x' or 'angle'.","default":"","optional":"","nullable":""},{"name":"amount","type":"number","description":"The amount to divide the property by. If child.x = 100 then divideAll('x', 2) would make child.x = 50.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If true the property will only be changed if the child is alive.","default":"","optional":"","nullable":""},{"name":"checkVisible","type":"boolean","description":"If true the property will only be changed if the child is visible.","default":"","optional":"","nullable":""}]},{"name":"callAllExists","description":"Calls a function, specified by name, on all children in the group who exist (or do not exist).\r\rAfter the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.","parameters":[{"name":"callback","type":"string","description":"Name of the function on the children to call.","default":"","optional":"","nullable":""},{"name":"existsValue","type":"boolean","description":"Only children with exists=existsValue will be called.","default":"","optional":"","nullable":""},{"name":"parameter","type":"any","description":"Additional parameters that will be passed to the callback.","default":"","optional":"","nullable":""}]},{"name":"callbackFromArray","description":"Returns a reference to a function that exists on a child of the group based on the given callback array.","parameters":[{"name":"child","type":"object","description":"The object to inspect.","default":"","optional":"","nullable":""},{"name":"callback","type":"array","description":"The array of function names.","default":"","optional":"","nullable":""},{"name":"length","type":"integer","description":"The size of the array (pre-calculated in callAll).","default":"","optional":"","nullable":""}]},{"name":"callAll","description":"Calls a function, specified by name, on all on children.\r\rThe function is called for all children regardless if they are dead or alive (see callAllExists for different options).\rAfter the method parameter and context you can add as many extra parameters as you like, which will all be passed to the child.","parameters":[{"name":"method","type":"string","description":"Name of the function on the child to call. Deep property lookup is supported.","default":"","optional":"","nullable":""},{"name":"context","type":"string","description":"A string containing the context under which the method will be executed. Set to null to default to the child.","default":"","optional":true,"nullable":""},{"name":"args","type":"any","description":"Additional parameters that will be passed to the method.","default":"","optional":"","nullable":""}]},{"name":"preUpdate","description":"The core preUpdate - as called by World.","parameters":[]},{"name":"update","description":"The core update - as called by World.","parameters":[]},{"name":"postUpdate","description":"The core postUpdate - as called by World.","parameters":[]},{"name":"filter","description":"Find children matching a certain predicate.\r\rFor example:\r\r    var healthyList = Group.filter(function(child, index, children) {\r        return child.health > 10 ? true : false;\r    }, true);\r    healthyList.callAll('attack');\r\rNote: Currently this will skip any children which are Groups themselves.","parameters":[{"name":"predicate","type":"function","description":"The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, the index as the second, and the entire child array as the third","default":"","optional":"","nullable":""},{"name":"checkExists","type":"boolean","description":"If true, only existing can be selected; otherwise all children can be selected and will be passed to the predicate.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.ArraySet","description":"Returns an array list containing all the children that the predicate returned true for"}},{"name":"forEach","description":"Call a function on each child in this group.\r\rAdditional arguments for the callback can be specified after the `checkExists` parameter. For example,\r\r    Group.forEach(awardBonusGold, this, true, 100, 500)\r\rwould invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.\r\rNote: This check will skip any children which are Groups themselves.","parameters":[{"name":"callback","type":"function","description":"The function that will be called for each applicable child. The child will be passed as the first argument.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":"","nullable":""},{"name":"checkExists","type":"boolean","description":"If set only children matching for which `exists` is true will be passed to the callback, otherwise all children will be passed.","default":"","optional":true,"nullable":""},{"name":"args","type":"any","description":"Additional arguments to pass to the callback function, after the child item.","default":"(none)","optional":true,"nullable":""}]},{"name":"forEachExists","description":"Call a function on each existing child in this group.\r\rSee {@link Phaser.Group#forEach forEach} for details.","parameters":[{"name":"callback","type":"function","description":"The function that will be called for each applicable child. The child will be passed as the first argument.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":"","nullable":""},{"name":"args","type":"any","description":"Additional arguments to pass to the callback function, after the child item.","default":"(none)","optional":true,"nullable":""}]},{"name":"forEachAlive","description":"Call a function on each alive child in this group.\r\rSee {@link Phaser.Group#forEach forEach} for details.","parameters":[{"name":"callback","type":"function","description":"The function that will be called for each applicable child. The child will be passed as the first argument.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":"","nullable":""},{"name":"args","type":"any","description":"Additional arguments to pass to the callback function, after the child item.","default":"(none)","optional":true,"nullable":""}]},{"name":"forEachDead","description":"Call a function on each dead child in this group.\r\rSee {@link Phaser.Group#forEach forEach} for details.","parameters":[{"name":"callback","type":"function","description":"The function that will be called for each applicable child. The child will be passed as the first argument.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":"","nullable":""},{"name":"args","type":"any","description":"Additional arguments to pass to the callback function, after the child item.","default":"(none)","optional":true,"nullable":""}]},{"name":"sort","description":"Sort the children in the group according to a particular key and ordering.\r\rCall this function to sort the group according to a particular key value and order.\r\rFor example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.\r\rInternally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including\ralphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.","parameters":[{"name":"key","type":"string","description":"The name of the property to sort on. Defaults to the objects z-depth value.","default":"'z'","optional":true,"nullable":""},{"name":"order","type":"integer","description":"Order ascending ({@link Phaser.Group.SORT_ASCENDING SORT_ASCENDING}) or descending ({@link Phaser.Group.SORT_DESCENDING SORT_DESCENDING}).","default":"Phaser.Group.SORT_ASCENDING","optional":true,"nullable":""}]},{"name":"customSort","description":"Sort the children in the group according to custom sort function.\r\rThe `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b).\rIt should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.","parameters":[{"name":"sortHandler","type":"function","description":"The custom sort function.","default":"","optional":"","nullable":""},{"name":"context","type":"object","description":"The context in which the sortHandler is called.","default":"","optional":true,"nullable":""}]},{"name":"ascendingSortHandler","description":"An internal helper function for the sort process.","parameters":[{"name":"a","type":"object","description":"The first object being sorted.","default":"","optional":"","nullable":""},{"name":"b","type":"object","description":"The second object being sorted.","default":"","optional":"","nullable":""}]},{"name":"descendingSortHandler","description":"An internal helper function for the sort process.","parameters":[{"name":"a","type":"object","description":"The first object being sorted.","default":"","optional":"","nullable":""},{"name":"b","type":"object","description":"The second object being sorted.","default":"","optional":"","nullable":""}]},{"name":"iterate","description":"Iterates over the children of the group performing one of several actions for matched children.\r\rA child is considered a match when it has a property, named `key`, whose value is equal to `value`\raccording to a strict equality comparison.\r\rThe result depends on the `returnType`:\r\r- {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}:\r    The callback, if any, is applied to all matching children. The number of matched children is returned.\r- {@link Phaser.Group.RETURN_NONE RETURN_NONE}:\r    The callback, if any, is applied to all matching children. No value is returned.\r- {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}:\r    The callback, if any, is applied to the *first* matching child and the *first* matched child is returned.\r    If there is no matching child then null is returned.\r\rIf `args` is specified it must be an array. The matched child will be assigned to the first\relement and the entire array will be applied to the callback function.","parameters":[{"name":"key","type":"string","description":"The child property to check, i.e. 'exists', 'alive', 'health'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"A child matches if `child[key] === value` is true.","default":"","optional":"","nullable":""},{"name":"returnType","type":"integer","description":"How to iterate the children and what to return.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"Optional function that will be called on each matching child. The matched child is supplied as the first argument.","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":true,"nullable":""},{"name":"args","type":"Array.<any>","description":"The arguments supplied to to the callback; the first array index (argument) will be replaced with the matched child.","default":"(none)","optional":true,"nullable":""}],"returns":{"type":"any","description":"Returns either an integer (for RETURN_TOTAL), the first matched child (for RETURN_CHILD), or null."}},{"name":"getFirstExists","description":"Get the first display object that exists, or doesn't exist.\r\rYou can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.\r\rIt works by calling `Group.create` passing it the parameters given to this method, and returning the new child.\r\rIf a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child\rwill be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.","parameters":[{"name":"exists","type":"boolean","description":"If true, find the first existing child; otherwise find the first non-existing child.","default":true,"optional":true,"nullable":""},{"name":"createIfNull","type":"boolean","description":"If `true` and no alive children are found a new one is created.","default":"","optional":true,"nullable":""},{"name":"x","type":"number","description":"The x coordinate to reset the child to. The value is in relation to the group.x point.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to reset the child to. The value is in relation to the group.y point.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The first child, or `null` if none found and `createIfNull` was false."}},{"name":"getFirstAlive","description":"Get the first child that is alive (`child.alive === true`).\r\rThis is handy for choosing a squad leader, etc.\r\rYou can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.\r\rIt works by calling `Group.create` passing it the parameters given to this method, and returning the new child.\r\rIf a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child\rwill be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.","parameters":[{"name":"createIfNull","type":"boolean","description":"If `true` and no alive children are found a new one is created.","default":"","optional":true,"nullable":""},{"name":"x","type":"number","description":"The x coordinate to reset the child to. The value is in relation to the group.x point.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to reset the child to. The value is in relation to the group.y point.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The alive dead child, or `null` if none found and `createIfNull` was false."}},{"name":"getFirstDead","description":"Get the first child that is dead (`child.alive === false`).\r\rThis is handy for checking if everything has been wiped out and adding to the pool as needed.\r\rYou can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.\r\rIt works by calling `Group.create` passing it the parameters given to this method, and returning the new child.\r\rIf a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child\rwill be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.","parameters":[{"name":"createIfNull","type":"boolean","description":"If `true` and no dead children are found a new one is created.","default":"","optional":true,"nullable":""},{"name":"x","type":"number","description":"The x coordinate to reset the child to. The value is in relation to the group.x point.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to reset the child to. The value is in relation to the group.y point.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The first dead child, or `null` if none found and `createIfNull` was false."}},{"name":"resetChild","description":"Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.\r\rIf the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.\r\rThe two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.","parameters":[{"name":"child","type":"DisplayObject","description":"The child to reset and/or load the texture on.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate to reset the child to. The value is in relation to the group.x point.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to reset the child to. The value is in relation to the group.y point.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The child that was reset: usually a {@link Phaser.Sprite}."}},{"name":"getTop","description":"Return the child at the top of this group.\r\rThe top child is the child displayed (rendered) above every other child.","parameters":[],"returns":{"type":"any","description":"The child at the top of the Group."}},{"name":"getBottom","description":"Returns the child at the bottom of this group.\r\rThe bottom child the child being displayed (rendered) below every other child.","parameters":[],"returns":{"type":"any","description":"The child at the bottom of the Group."}},{"name":"getClosestTo","description":"Get the closest child to given Object, with optional callback to filter children.\r\rThis can be a Sprite, Group, Image or any object with public x and y properties.\r\r'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.\r\rYou can use the optional `callback` argument to apply your own filter to the distance checks.\rIf the child is closer then the previous child, it will be sent to `callback` as the first argument,\rwith the distance as the second. The callback should return `true` if it passes your \rfiltering criteria, otherwise it should return `false`.","parameters":[{"name":"object","type":"any","description":"The object used to determine the distance. This can be a Sprite, Group, Image or any object with public x and y properties.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, with the distance as the second. It should return `true` if the child passes the matching criteria.","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"The child closest to given object, or `null` if no child was found."}},{"name":"getFurthestFrom","description":"Get the child furthest away from the given Object, with optional callback to filter children.\r\rThis can be a Sprite, Group, Image or any object with public x and y properties.\r\r'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.\r\rYou can use the optional `callback` argument to apply your own filter to the distance checks.\rIf the child is closer then the previous child, it will be sent to `callback` as the first argument,\rwith the distance as the second. The callback should return `true` if it passes your \rfiltering criteria, otherwise it should return `false`.","parameters":[{"name":"object","type":"any","description":"The object used to determine the distance. This can be a Sprite, Group, Image or any object with public x and y properties.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, with the distance as the second. It should return `true` if the child passes the matching criteria.","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"The child furthest from the given object, or `null` if no child was found."}},{"name":"countLiving","description":"Get the number of living children in this group.","parameters":[],"returns":{"type":"integer","description":"The number of children flagged as alive."}},{"name":"countDead","description":"Get the number of dead children in this group.","parameters":[],"returns":{"type":"integer","description":"The number of children flagged as dead."}},{"name":"getRandom","description":"Returns a random child from the group.","parameters":[{"name":"startIndex","type":"integer","description":"Offset from the front of the group (lowest child).","default":"","optional":true,"nullable":""},{"name":"length","type":"integer","description":"Restriction on the number of values you want to randomly select from.","default":"(to top)","optional":true,"nullable":""}],"returns":{"type":"any","description":"A random child of this Group."}},{"name":"getRandomExists","description":"Returns a random child from the Group that has `exists` set to `true`.\r\rOptionally you can specify a start and end index. For example if this Group had 100 children,\rand you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only\rthe first 50 children in the Group.","parameters":[{"name":"startIndex","type":"integer","description":"The first child index to start the search from.","default":"","optional":true,"nullable":""},{"name":"endIndex","type":"integer","description":"The last child index to search up to.","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"A random child of this Group that exists."}},{"name":"getAll","description":"Returns all children in this Group.\r\rYou can optionally specify a matching criteria using the `property` and `value` arguments.\r\rFor example: `getAll('exists', true)` would return only children that have their exists property set.\r\rOptionally you can specify a start and end index. For example if this Group had 100 children,\rand you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only\rthe first 50 children in the Group.","parameters":[{"name":"property","type":"string","description":"An optional property to test against the value argument.","default":"","optional":true,"nullable":""},{"name":"value","type":"any","description":"If property is set then Child.property must strictly equal this value to be included in the results.","default":"","optional":true,"nullable":""},{"name":"startIndex","type":"integer","description":"The first child index to start the search from.","default":"","optional":true,"nullable":""},{"name":"endIndex","type":"integer","description":"The last child index to search up until.","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"A random existing child of this Group."}},{"name":"remove","description":"Removes the given child from this group.\r\rThis will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.\r\rIf the group cursor was referring to the removed child it is updated to refer to the next child.","parameters":[{"name":"child","type":"any","description":"The child to remove.","default":"","optional":"","nullable":""},{"name":"destroy","type":"boolean","description":"If true `destroy` will be invoked on the removed child.","default":"","optional":true,"nullable":""},{"name":"silent","type":"boolean","description":"If true the the child will not dispatch the `onRemovedFromGroup` event.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"true if the child was removed from this group, otherwise false."}},{"name":"moveAll","description":"Moves all children from this Group to the Group given.","parameters":[{"name":"group","type":"Phaser.Group","description":"The new Group to which the children will be moved to.","default":"","optional":"","nullable":""},{"name":"silent","type":"boolean","description":"If true the children will not dispatch the `onAddedToGroup` event for the new Group.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Group","description":"The Group to which all the children were moved."}},{"name":"removeAll","description":"Removes all children from this Group, but does not remove the group from its parent.\r\rThe children can be optionally destroyed as they are removed.\r\rYou can also optionally also destroy the BaseTexture the Child is using. Be careful if you've\rmore than one Game Object sharing the same BaseTexture.","parameters":[{"name":"destroy","type":"boolean","description":"If true `destroy` will be invoked on each removed child.","default":"","optional":true,"nullable":""},{"name":"silent","type":"boolean","description":"If true the children will not dispatch their `onRemovedFromGroup` events.","default":"","optional":true,"nullable":""},{"name":"destroyTexture","type":"boolean","description":"If true, and if the `destroy` argument is also true, the BaseTexture belonging to the Child is also destroyed. Note that if another Game Object is sharing the same BaseTexture it will invalidate it.","default":"","optional":true,"nullable":""}]},{"name":"removeBetween","description":"Removes all children from this group whose index falls beteen the given startIndex and endIndex values.","parameters":[{"name":"startIndex","type":"integer","description":"The index to start removing children from.","default":"","optional":"","nullable":""},{"name":"endIndex","type":"integer","description":"The index to stop removing children at. Must be higher than startIndex. If undefined this method will remove all children between startIndex and the end of the group.","default":"","optional":true,"nullable":""},{"name":"destroy","type":"boolean","description":"If true `destroy` will be invoked on each removed child.","default":"","optional":true,"nullable":""},{"name":"silent","type":"boolean","description":"If true the children will not dispatch their `onRemovedFromGroup` events.","default":"","optional":true,"nullable":""}]},{"name":"destroy","description":"Destroys this group.\r\rRemoves all children, then removes this group from its parent and nulls references.","parameters":[{"name":"destroyChildren","type":"boolean","description":"If true `destroy` will be invoked on each removed child.","default":true,"optional":true,"nullable":""},{"name":"soft","type":"boolean","description":"A 'soft destroy' (set to true) doesn't remove this group from its parent or null the game reference. Set to false and it does.","default":"","optional":true,"nullable":""}]},{"name":"alignIn","description":"Aligns this Group within another Game Object, or Rectangle, known as the\r'container', to one of 9 possible positions.\r\rThe container must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Groups within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Group to another Game Object does **not** make it a child of\rthe container. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, \r`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, \r`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.\r\rGroups are placed in such a way that their _bounds_ align with the\rcontainer, taking into consideration rotation and scale of its children.\rThis allows you to neatly align Groups, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Group. For example:\r\r`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `group` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the containers bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"container","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Group to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Group","description":"This Group."}},{"name":"alignTo","description":"Aligns this Group to the side of another Game Object, or Rectangle, known as the\r'parent', in one of 11 possible positions.\r\rThe parent must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Groups within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Group to another Game Object does **not** make it a child of\rthe parent. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, \r`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, \r`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` \rand `Phaser.BOTTOM_RIGHT`.\r\rGroups are placed in such a way that their _bounds_ align with the\rparent, taking into consideration rotation and scale of the children.\rThis allows you to neatly align Groups, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Group. For example:\r\r`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `group` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the parents bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"parent","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Group to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Group","description":"This Group."}},{"name":"addChild","description":"Adds a child to the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to add to the container","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"addChildAt","description":"Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child to add","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The index to place the child in","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"swapChildren","description":"Swaps the position of 2 Display Objects within this container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""},{"name":"child2","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}]},{"name":"getChildIndex","description":"Returns the index position of a child DisplayObject instance","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject instance to identify","default":"","optional":"","nullable":""}],"returns":{"type":"Number","description":"The index position of the child display object to identify"}},{"name":"setChildIndex","description":"Changes the position of an existing child in the display object container","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child DisplayObject instance for which you want to change the index number","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The resulting index number for the child display object","default":"","optional":"","nullable":""}]},{"name":"getChildAt","description":"Returns the child at the specified index","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child at the given index, if any."}},{"name":"removeChild","description":"Removes a child from the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to remove","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildAt","description":"Removes a child from the specified index position.","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildren","description":"Removes all children from this container that are within the begin and end indexes.","parameters":[{"name":"beginIndex","type":"Number","description":"The beginning position. Default value is 0.","default":"","optional":"","nullable":""},{"name":"endIndex","type":"Number","description":"The ending position. Default value is size of the container.","default":"","optional":"","nullable":""}]},{"name":"getBounds","description":"Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.","parameters":[{"name":"targetCoordinateSpace","type":["PIXIDisplayObject","PIXIMatrix"],"description":"Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object.","default":"","optional":true,"nullable":""}],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"getLocalBounds","description":"Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.","parameters":[],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"contains","description":"Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}],"returns":{"type":"Boolean","description":""}},{"name":"_renderWebGL","description":"Renders the object using the WebGL renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""}]},{"name":"_renderCanvas","description":"Renders the object using the Canvas renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""}]}],"members":[{"name":"bounds","access":"","virtual":false,"description":"The World has no fixed size, but it does have a bounds outside of which objects are no longer considered as being \"in world\" and you should use this to clean-up the display list and purge dead objects.\rBy default we set the Bounds to be from 0,0 to Game.width,Game.height. I.e. it will match the size given to the game constructor with 0,0 representing the top-left of the display.\rHowever 0,0 is actually the center of the world, and if you rotate or scale the world all of that will happen from 0,0.\rSo if you want to make a game in which the world itself will rotate you should adjust the bounds so that 0,0 is the center point, i.e. set them to -1000,-1000,2000,2000 for a 2000x2000 sized world centered around 0,0. Bound of this world that objects can not escape from.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"camera","access":"","virtual":false,"description":"Camera instance.","type":{"names":["Phaser.Camera"]},"default":""},{"name":"_definedSize","access":"","virtual":false,"description":"True if the World has been given a specifically defined size (i.e. from a Tilemap or direct in code) or false if it's just matched to the Game dimensions.","type":{"names":["boolean"]},"default":""},{"name":"_width","access":"","virtual":false,"description":"The defined width of the World. Sometimes the bounds needs to grow larger than this (if you resize the game) but this retains the original requested dimension.","type":"","default":""},{"name":"_height","access":"","virtual":false,"description":"The defined height of the World. Sometimes the bounds needs to grow larger than this (if you resize the game) but this retains the original requested dimension.","type":"","default":""},{"name":"width","access":"","virtual":false,"description":"Gets or sets the current width of the game world. The world can never be smaller than the game (canvas) dimensions.","type":{"names":["number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"Gets or sets the current height of the game world. The world can never be smaller than the game (canvas) dimensions.","type":{"names":["number"]},"default":""},{"name":"centerX","access":"","virtual":false,"description":"Gets the X position corresponding to the center point of the world.","type":{"names":["number"]},"default":""},{"name":"centerY","access":"","virtual":false,"description":"Gets the Y position corresponding to the center point of the world.","type":{"names":["number"]},"default":""},{"name":"randomX","access":"","virtual":false,"description":"Gets a random integer which is lesser than or equal to the current width of the game world.","type":{"names":["number"]},"default":""},{"name":"randomY","access":"","virtual":false,"description":"Gets a random integer which is lesser than or equal to the current height of the game world.","type":{"names":["number"]},"default":""},{"name":"game","access":"protected","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"name","access":"","virtual":false,"description":"A name for this group. Not used internally but useful for debugging.","type":{"names":["string"]},"default":""},{"name":"z","access":"","virtual":false,"description":"The z-depth value of this object within its parent container/Group - the World is a Group as well.\rThis value must be unique for each child in a Group.","type":{"names":["integer"]},"default":""},{"name":"type","access":"protected","virtual":false,"description":"Internal Phaser Type value.","type":{"names":["integer"]},"default":""},{"name":"physicsType","access":"","virtual":false,"description":"The const physics body type of this object.","type":{"names":["number"]},"default":""},{"name":"alive","access":"","virtual":false,"description":"The alive property is useful for Groups that are children of other Groups and need to be included/excluded in checks like forEachAlive.","type":{"names":["boolean"]},"default":true},{"name":"exists","access":"","virtual":false,"description":"If exists is false the group will be excluded from collision checks and filters such as {@link forEachExists}. The group will not call `preUpdate` and `postUpdate` on its children and the children will not receive physics updates or camera/world boundary checks. The group will still be {@link Phaser.Group#visible visible} and will still call `update` on its children.","type":{"names":["boolean"]},"default":true},{"name":"ignoreDestroy","access":"","virtual":false,"description":"A group with `ignoreDestroy` set to `true` ignores all calls to its `destroy` method.","type":{"names":["boolean"]},"default":""},{"name":"pendingDestroy","access":"","virtual":false,"description":"A Group is that has `pendingDestroy` set to `true` is flagged to have its destroy method\rcalled on the next logic update.\rYou can set it directly to flag the Group to be destroyed on its next update.\r\rThis is extremely useful if you wish to destroy a Group from within one of its own callbacks\ror a callback of one of its children.","type":{"names":["boolean"]},"default":""},{"name":"classType","access":"","virtual":false,"description":"The type of objects that will be created when using {@link Phaser.Group#create create} or {@link Phaser.Group#createMultiple createMultiple}.\r\rAny object may be used but it should extend either Sprite or Image and accept the same constructor arguments:\rwhen a new object is created it is passed the following parameters to its constructor: `(game, x, y, key, frame)`.","type":{"names":["object"]},"default":"{@link Phaser.Sprite}"},{"name":"cursor","access":"","virtual":false,"description":"The current display object that the group cursor is pointing to, if any. (Can be set manually.)\r\rThe cursor is a way to iterate through the children in a Group using {@link Phaser.Group#next next} and {@link Phaser.Group#previous previous}.","type":{"names":["DisplayObject"]},"default":""},{"name":"inputEnableChildren","access":"","virtual":false,"description":"A Group with `inputEnableChildren` set to `true` will automatically call `inputEnabled = true` \ron any children _added_ to, or _created by_, this Group.\r\rIf there are children already in the Group at the time you set this property, they are not changed.","type":{"names":["boolean"]},"default":""},{"name":"onChildInputDown","access":"","virtual":false,"description":"This Signal is dispatched whenever a child of this Group emits an onInputDown signal as a result\rof having been interacted with by a Pointer. You can bind functions to this Signal instead of to\revery child Sprite.\r\rThis Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and\ra reference to the Pointer that caused it.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onChildInputUp","access":"","virtual":false,"description":"This Signal is dispatched whenever a child of this Group emits an onInputUp signal as a result\rof having been interacted with by a Pointer. You can bind functions to this Signal instead of to\revery child Sprite.\r\rThis Signal is sent 3 arguments: A reference to the Sprite that triggered the signal, \ra reference to the Pointer that caused it, and a boolean value `isOver` that tells you if the Pointer\ris still over the Sprite or not.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onChildInputOver","access":"","virtual":false,"description":"This Signal is dispatched whenever a child of this Group emits an onInputOver signal as a result\rof having been interacted with by a Pointer. You can bind functions to this Signal instead of to\revery child Sprite.\r\rThis Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and\ra reference to the Pointer that caused it.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onChildInputOut","access":"","virtual":false,"description":"This Signal is dispatched whenever a child of this Group emits an onInputOut signal as a result\rof having been interacted with by a Pointer. You can bind functions to this Signal instead of to\revery child Sprite.\r\rThis Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and\ra reference to the Pointer that caused it.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"enableBody","access":"","virtual":false,"description":"If true all Sprites created by, or added to this group, will have a physics body enabled on them.\r\rIf there are children already in the Group at the time you set this property, they are not changed.\r\rThe default body type is controlled with {@link Phaser.Group#physicsBodyType physicsBodyType}.","type":{"names":["boolean"]},"default":""},{"name":"enableBodyDebug","access":"","virtual":false,"description":"If true when a physics body is created (via {@link Phaser.Group#enableBody enableBody}) it will create a physics debug object as well.\r\rThis only works for P2 bodies.","type":{"names":["boolean"]},"default":""},{"name":"physicsBodyType","access":"","virtual":false,"description":"If {@link Phaser.Group#enableBody enableBody} is true this is the type of physics body that is created on new Sprites.\r\rThe valid values are {@link Phaser.Physics.ARCADE}, {@link Phaser.Physics.P2JS}, {@link Phaser.Physics.NINJA}, etc.","type":{"names":["integer"]},"default":""},{"name":"physicsSortDirection","access":"","virtual":false,"description":"If this Group contains Arcade Physics Sprites you can set a custom sort direction via this property.\r\rIt should be set to one of the Phaser.Physics.Arcade sort direction constants: \r\rPhaser.Physics.Arcade.SORT_NONE\rPhaser.Physics.Arcade.LEFT_RIGHT\rPhaser.Physics.Arcade.RIGHT_LEFT\rPhaser.Physics.Arcade.TOP_BOTTOM\rPhaser.Physics.Arcade.BOTTOM_TOP\r\rIf set to `null` the Group will use whatever Phaser.Physics.Arcade.sortDirection is set to. This is the default behavior.","type":{"names":["integer"]},"default":""},{"name":"onDestroy","access":"","virtual":false,"description":"This signal is dispatched when the group is destroyed.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"cursorIndex","access":"","virtual":false,"description":"The current index of the Group cursor. Advance it with Group.next.","type":{"names":["integer"]},"default":""},{"name":"fixedToCamera","access":"","virtual":false,"description":"A Group that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Group.cameraOffset.\r\rNote that the cameraOffset values are in addition to any parent in the display list.\rSo if this Group was in a Group that has x: 200, then this will be added to the cameraOffset.x","type":{"names":["boolean"]},"default":""},{"name":"cameraOffset","access":"","virtual":false,"description":"If this object is {@link Phaser.Group#fixedToCamera fixedToCamera} then this stores the x/y position offset relative to the top-left of the camera view.\rIf the parent of this Group is also `fixedToCamera` then the offset here is in addition to that and should typically be disabled.","type":{"names":["Phaser.Point"]},"default":""},{"name":"hash","access":"","virtual":false,"description":"The hash array is an array belonging to this Group into which you can add any of its children via Group.addToHash and Group.removeFromHash.\r\rOnly children of this Group can be added to and removed from the hash.\r\rThis hash is used automatically by Phaser Arcade Physics in order to perform non z-index based destructive sorting.\rHowever if you don't use Arcade Physics, or this isn't a physics enabled Group, then you can use the hash to perform your own\rsorting and filtering of Group children without touching their z-index (and therefore display draw order)","type":{"names":["array"]},"default":""},{"name":"_sortProperty","access":"private","virtual":false,"description":"The property on which children are sorted.","type":{"names":["string"]},"default":""},{"name":"total","access":"","virtual":false,"description":"Total number of existing children in the group.","type":{"names":["integer"]},"default":""},{"name":"length","access":"","virtual":false,"description":"Total number of children in this group, regardless of exists/alive status.","type":{"names":["integer"]},"default":""},{"name":"angle","access":"","virtual":false,"description":"The angle of rotation of the group container, in degrees.\r\rThis adjusts the group itself by modifying its local rotation transform.\r\rThis has no impact on the rotation/angle properties of the children, but it will update their worldTransform\rand on-screen orientation and position.","type":{"names":["number"]},"default":""},{"name":"left","access":"","virtual":false,"description":"The left coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"right","access":"","virtual":false,"description":"The right coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"top","access":"","virtual":false,"description":"The top coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"bottom","access":"","virtual":false,"description":"The bottom coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"x","access":"","virtual":false,"description":"The x coordinate of the group container.\r\rYou can adjust the group container itself by modifying its coordinates.\rThis will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.","type":{"names":["number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The y coordinate of the group container.\r\rYou can adjust the group container itself by modifying its coordinates.\rThis will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.","type":{"names":["number"]},"default":""},{"name":"rotation","access":"","virtual":false,"description":"The angle of rotation of the group container, in radians.\r\rThis will adjust the group container itself by modifying its rotation.\rThis will have no impact on the rotation value of its children, but it will update their worldTransform and on-screen position.","type":{"names":["number"]},"default":""},{"name":"visible","access":"","virtual":false,"description":"The visible state of the group. Non-visible Groups and all of their children are not rendered.","type":{"names":["boolean"]},"default":""},{"name":"alpha","access":"","virtual":false,"description":"The alpha value of the group container.","type":{"names":["number"]},"default":""},{"name":"children","access":"","virtual":false,"description":"[read-only] The array of children of this container.","type":{"names":["Array.<DisplayObject>"]},"default":""},{"name":"ignoreChildInput","access":"","virtual":false,"description":"If `ignoreChildInput`  is `false` it will allow this objects _children_ to be considered as valid for Input events.\n\nIf this property is `true` then the children will _not_ be considered as valid for Input events.\n\nNote that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.","type":{"names":["Boolean"]},"default":""},{"name":"position","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject, relative to its parent container.\n\nThe value of this property does not reflect any positioning happening further up the display list.\nTo obtain that value please see the `worldPosition` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"scale","access":"","virtual":false,"description":"The scale of this DisplayObject. A scale of 1:1 represents the DisplayObject\nat its default size. A value of 0.5 would scale this DisplayObject by half, and so on.\n\nThe value of this property does not reflect any scaling happening further up the display list.\nTo obtain that value please see the `worldScale` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"pivot","access":"","virtual":false,"description":"The pivot point of this DisplayObject that it rotates around. The values are expressed\nin pixel values.","type":{"names":["PIXIPoint"]},"default":""},{"name":"hitArea","access":"","virtual":false,"description":"This is the defined area that will pick up mouse / touch events. It is null by default.\nSetting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)","type":{"names":["Rectangle","Circle","Ellipse","Polygon"]},"default":""},{"name":"renderable","access":"","virtual":false,"description":"Should this DisplayObject be rendered by the renderer? An object with a renderable value of\n`false` is skipped during the render pass.","type":{"names":["Boolean"]},"default":""},{"name":"parent","access":"","virtual":false,"description":"The parent DisplayObjectContainer that this DisplayObject is a child of.\nAll DisplayObjects must belong to a parent in order to be rendered.\nThe root parent is the Stage object. This property is set automatically when the\nDisplayObject is added to, or removed from, a DisplayObjectContainer.","type":{"names":["PIXIDisplayObjectContainer"]},"default":""},{"name":"worldAlpha","access":"","virtual":false,"description":"The multiplied alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nThis value is the calculated total, based on the alpha values of all parents of this DisplayObjects \nin the display list.\n\nTo obtain, and set, the local alpha value, see the `alpha` property.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"worldTransform","access":"","virtual":false,"description":"The current transform of this DisplayObject.\n\nThis property contains the calculated total, based on the transforms of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIMatrix"]},"default":""},{"name":"worldPosition","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject within the world.\n\nThis property contains the calculated total, based on the positions of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldScale","access":"","virtual":false,"description":"The global scale of this DisplayObject.\n\nThis property contains the calculated total, based on the scales of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldRotation","access":"","virtual":false,"description":"The rotation, in radians, of this DisplayObject.\n\nThis property contains the calculated total, based on the rotations of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"filterArea","access":"","virtual":false,"description":"The rectangular area used by filters when rendering a shader for this DisplayObject.","type":{"names":["Rectangle"]},"default":""},{"name":"_sr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_cr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_bounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_currentBounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_mask","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_cacheAsBitmap","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"_cacheIsDirty","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"worldVisible","access":"","virtual":false,"description":"Indicates if this DisplayObject is visible, based on it, and all of its parents, `visible` property values.","type":{"names":["Boolean"]},"default":""},{"name":"mask","access":"","virtual":false,"description":"Sets a mask for this DisplayObject. A mask is an instance of a Graphics object.\nWhen applied it limits the visible area of this DisplayObject to the shape of the mask.\nUnder a Canvas renderer it uses shape clipping. Under a WebGL renderer it uses a Stencil Buffer.\nTo remove a mask, set this property to `null`.","type":{"names":["PIXIGraphics"]},"default":""},{"name":"filters","access":"","virtual":false,"description":"Sets the filters for this DisplayObject. This is a WebGL only feature, and is ignored by the Canvas\nRenderer. A filter is a shader applied to this DisplayObject. You can modify the placement of the filter\nusing `DisplayObject.filterArea`.\n\nTo remove filters, set this property to `null`.\n\nNote: You cannot have a filter set, and a MULTIPLY Blend Mode active, at the same time. Setting a \nfilter will reset this DisplayObjects blend mode to NORMAL.","type":{"names":["Array"]},"default":""},{"name":"cacheAsBitmap","access":"","virtual":false,"description":"Sets if this DisplayObject should be cached as a bitmap.\n\nWhen invoked it will take a snapshot of the DisplayObject, as it is at that moment, and store it \nin a RenderTexture. This is then used whenever this DisplayObject is rendered. It can provide a\nperformance benefit for complex, but static, DisplayObjects. I.e. those with lots of children.\n\nCached Bitmaps do not track their parents. If you update a property of this DisplayObject, it will not\nre-generate the cached bitmap automatically. To do that you need to call `DisplayObject.updateCache`.\n\nTo remove a cached bitmap, set this property to `null`.","type":{"names":["Boolean"]},"default":""}]},{"name":"Phaser.BitmapData","description":"A BitmapData object contains a Canvas element to which you can draw anything you like via normal Canvas context operations.\rA single BitmapData can be used as the texture for one or many Images / Sprites. \rSo if you need to dynamically create a Sprite texture then they are a good choice.\r\rImportant note: Every BitmapData creates its own Canvas element. Because BitmapData's are now Game Objects themselves, and don't\rlive on the display list, they are NOT automatically cleared when you change State. Therefore you _must_ call BitmapData.destroy\rin your State's shutdown method if you wish to free-up the resources the BitmapData used, it will not happen for you.","constructor":{"name":"BitmapData","description":"A BitmapData object contains a Canvas element to which you can draw anything you like via normal Canvas context operations.\rA single BitmapData can be used as the texture for one or many Images / Sprites. \rSo if you need to dynamically create a Sprite texture then they are a good choice.\r\rImportant note: Every BitmapData creates its own Canvas element. Because BitmapData's are now Game Objects themselves, and don't\rlive on the display list, they are NOT automatically cleared when you change State. Therefore you _must_ call BitmapData.destroy\rin your State's shutdown method if you wish to free-up the resources the BitmapData used, it will not happen for you.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"key","type":"string","description":"Internal Phaser reference key for the BitmapData.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The width of the BitmapData in pixels. If undefined or zero it's set to a default value.","default":256,"optional":true,"nullable":""},{"name":"height","type":"number","description":"The height of the BitmapData in pixels. If undefined or zero it's set to a default value.","default":256,"optional":true,"nullable":""},{"name":"skipPool","type":"boolean","description":"When this BitmapData generates its internal canvas to use for rendering, it will get the canvas from the CanvasPool if false, or create its own if true.","default":"","optional":true,"nullable":""}]},"functions":[{"name":"move","description":"Shifts the contents of this BitmapData by the distances given.\r\rThe image will wrap-around the edges on all sides if the wrap argument is true (the default).","parameters":[{"name":"x","type":"integer","description":"The amount of pixels to horizontally shift the canvas by. Use a negative value to shift to the left, positive to the right.","default":"","optional":"","nullable":""},{"name":"y","type":"integer","description":"The amount of pixels to vertically shift the canvas by. Use a negative value to shift up, positive to shift down.","default":"","optional":"","nullable":""},{"name":"wrap","type":"boolean","description":"Wrap the content of the BitmapData.","default":true,"optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"moveH","description":"Shifts the contents of this BitmapData horizontally.\r\rThe image will wrap-around the sides if the wrap argument is true (the default).","parameters":[{"name":"distance","type":"integer","description":"The amount of pixels to horizontally shift the canvas by. Use a negative value to shift to the left, positive to the right.","default":"","optional":"","nullable":""},{"name":"wrap","type":"boolean","description":"Wrap the content of the BitmapData.","default":true,"optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"moveV","description":"Shifts the contents of this BitmapData vertically.\r\rThe image will wrap-around the sides if the wrap argument is true (the default).","parameters":[{"name":"distance","type":"integer","description":"The amount of pixels to vertically shift the canvas by. Use a negative value to shift up, positive to shift down.","default":"","optional":"","nullable":""},{"name":"wrap","type":"boolean","description":"Wrap the content of the BitmapData.","default":true,"optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"add","description":"Updates the given objects so that they use this BitmapData as their texture.\rThis will replace any texture they will currently have set.","parameters":[{"name":"object","type":["Phaser.Sprite","Array.<Phaser.Sprite>","Phaser.Image","Array.<Phaser.Image>"],"description":"Either a single Sprite/Image or an Array of Sprites/Images.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"load","description":"Takes the given Game Object, resizes this BitmapData to match it and then draws it into this BitmapDatas canvas, ready for further processing.\rThe source game object is not modified by this operation.\rIf the source object uses a texture as part of a Texture Atlas or Sprite Sheet, only the current frame will be used for sizing.\rIf a string is given it will assume it's a cache key and look in Phaser.Cache for an image key matching the string.","parameters":[{"name":"source","type":["Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapData","Image","HTMLCanvasElement","string"],"description":"The object that will be used to populate this BitmapData. If you give a string it will try and find the Image in the Game.Cache first.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"clear","description":"Clears the BitmapData context using a clearRect.\r\rYou can optionally define the area to clear.\rIf the arguments are left empty it will clear the entire canvas.\r\rYou may need to call BitmapData.update after this in order to clear out the pixel data, \rbut Phaser will not do this automatically for you.","parameters":[{"name":"x","type":"number","description":"The x coordinate of the top-left of the area to clear.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate of the top-left of the area to clear.","default":"","optional":true,"nullable":""},{"name":"width","type":"number","description":"The width of the area to clear. If undefined it will use BitmapData.width.","default":"","optional":true,"nullable":""},{"name":"height","type":"number","description":"The height of the area to clear. If undefined it will use BitmapData.height.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"cls","description":"Clears the BitmapData context using a clearRect.","parameters":[]},{"name":"fill","description":"Fills the BitmapData with the given color.","parameters":[{"name":"r","type":"number","description":"The red color value, between 0 and 0xFF (255).","default":"","optional":"","nullable":""},{"name":"g","type":"number","description":"The green color value, between 0 and 0xFF (255).","default":"","optional":"","nullable":""},{"name":"b","type":"number","description":"The blue color value, between 0 and 0xFF (255).","default":"","optional":"","nullable":""},{"name":"a","type":"number","description":"The alpha color value, between 0 and 1.","default":1,"optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"generateTexture","description":"Creates a new Image element by converting this BitmapDatas canvas into a dataURL.\r\rThe image is then stored in the image Cache using the key given.\r\rFinally a PIXI.Texture is created based on the image and returned.\r\rYou can apply the texture to a sprite or any other supporting object by using either the\rkey or the texture. First call generateTexture:\r\r`var texture = bitmapdata.generateTexture('ball');`\r\rThen you can either apply the texture to a sprite:\r\r`game.add.sprite(0, 0, texture);`\r\ror by using the string based key:\r\r`game.add.sprite(0, 0, 'ball');`","parameters":[{"name":"key","type":"string","description":"The key which will be used to store the image in the Cache.","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.Texture","description":"The newly generated texture."}},{"name":"resize","description":"Resizes the BitmapData. This changes the size of the underlying canvas and refreshes the buffer.","parameters":[{"name":"width","type":"integer","description":"The new width of the BitmapData.","default":"","optional":"","nullable":""},{"name":"height","type":"integer","description":"The new height of the BitmapData.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"update","description":"This re-creates the BitmapData.imageData from the current context.\rIt then re-builds the ArrayBuffer, the data Uint8ClampedArray reference and the pixels Int32Array.\rIf not given the dimensions defaults to the full size of the context.\r\rWarning: This is a very expensive operation, so use it sparingly.","parameters":[{"name":"x","type":"number","description":"The x coordinate of the top-left of the image data area to grab from.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate of the top-left of the image data area to grab from.","default":"","optional":true,"nullable":""},{"name":"width","type":"number","description":"The width of the image data area.","default":1,"optional":true,"nullable":""},{"name":"height","type":"number","description":"The height of the image data area.","default":1,"optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"processPixelRGB","description":"Scans through the area specified in this BitmapData and sends a color object for every pixel to the given callback.\rThe callback will be sent a color object with 6 properties: `{ r: number, g: number, b: number, a: number, color: number, rgba: string }`.\rWhere r, g, b and a are integers between 0 and 255 representing the color component values for red, green, blue and alpha.\rThe `color` property is an Int32 of the full color. Note the endianess of this will change per system.\rThe `rgba` property is a CSS style rgba() string which can be used with context.fillStyle calls, among others.\rThe callback will also be sent the pixels x and y coordinates respectively.\rThe callback must return either `false`, in which case no change will be made to the pixel, or a new color object.\rIf a new color object is returned the pixel will be set to the r, g, b and a color values given within it.","parameters":[{"name":"callback","type":"function","description":"The callback that will be sent each pixel color object to be processed.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context under which the callback will be called.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate of the top-left of the region to process from.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate of the top-left of the region to process from.","default":"","optional":true,"nullable":""},{"name":"width","type":"number","description":"The width of the region to process.","default":"","optional":true,"nullable":""},{"name":"height","type":"number","description":"The height of the region to process.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"processPixel","description":"Scans through the area specified in this BitmapData and sends the color for every pixel to the given callback along with its x and y coordinates.\rWhatever value the callback returns is set as the new color for that pixel, unless it returns the same color, in which case it's skipped.\rNote that the format of the color received will be different depending on if the system is big or little endian.\rIt is expected that your callback will deal with endianess. If you'd rather Phaser did it then use processPixelRGB instead.\rThe callback will also be sent the pixels x and y coordinates respectively.","parameters":[{"name":"callback","type":"function","description":"The callback that will be sent each pixel color to be processed.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context under which the callback will be called.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate of the top-left of the region to process from.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate of the top-left of the region to process from.","default":"","optional":true,"nullable":""},{"name":"width","type":"number","description":"The width of the region to process.","default":"","optional":true,"nullable":""},{"name":"height","type":"number","description":"The height of the region to process.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"replaceRGB","description":"Replaces all pixels matching one color with another. The color values are given as two sets of RGBA values.\rAn optional region parameter controls if the replacement happens in just a specific area of the BitmapData or the entire thing.","parameters":[{"name":"r1","type":"number","description":"The red color value to be replaced. Between 0 and 255.","default":"","optional":"","nullable":""},{"name":"g1","type":"number","description":"The green color value to be replaced. Between 0 and 255.","default":"","optional":"","nullable":""},{"name":"b1","type":"number","description":"The blue color value to be replaced. Between 0 and 255.","default":"","optional":"","nullable":""},{"name":"a1","type":"number","description":"The alpha color value to be replaced. Between 0 and 255.","default":"","optional":"","nullable":""},{"name":"r2","type":"number","description":"The red color value that is the replacement color. Between 0 and 255.","default":"","optional":"","nullable":""},{"name":"g2","type":"number","description":"The green color value that is the replacement color. Between 0 and 255.","default":"","optional":"","nullable":""},{"name":"b2","type":"number","description":"The blue color value that is the replacement color. Between 0 and 255.","default":"","optional":"","nullable":""},{"name":"a2","type":"number","description":"The alpha color value that is the replacement color. Between 0 and 255.","default":"","optional":"","nullable":""},{"name":"region","type":"Phaser.Rectangle","description":"The area to perform the search over. If not given it will replace over the whole BitmapData.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"setHSL","description":"Sets the hue, saturation and lightness values on every pixel in the given region, or the whole BitmapData if no region was specified.","parameters":[{"name":"h","type":"number","description":"The hue, in the range 0 - 1.","default":"","optional":true,"nullable":""},{"name":"s","type":"number","description":"The saturation, in the range 0 - 1.","default":"","optional":true,"nullable":""},{"name":"l","type":"number","description":"The lightness, in the range 0 - 1.","default":"","optional":true,"nullable":""},{"name":"region","type":"Phaser.Rectangle","description":"The area to perform the operation on. If not given it will run over the whole BitmapData.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"shiftHSL","description":"Shifts any or all of the hue, saturation and lightness values on every pixel in the given region, or the whole BitmapData if no region was specified.\rShifting will add the given value onto the current h, s and l values, not replace them.\rThe hue is wrapped to keep it within the range 0 to 1. Saturation and lightness are clamped to not exceed 1.","parameters":[{"name":"h","type":"number","description":"The amount to shift the hue by.","default":"","optional":true,"nullable":""},{"name":"s","type":"number","description":"The amount to shift the saturation by.","default":"","optional":true,"nullable":""},{"name":"l","type":"number","description":"The amount to shift the lightness by.","default":"","optional":true,"nullable":""},{"name":"region","type":"Phaser.Rectangle","description":"The area to perform the operation on. If not given it will run over the whole BitmapData.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"setPixel32","description":"Sets the color of the given pixel to the specified red, green, blue and alpha values.","parameters":[{"name":"x","type":"integer","description":"The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData and be an integer, not a float.","default":"","optional":"","nullable":""},{"name":"y","type":"integer","description":"The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData and be an integer, not a float.","default":"","optional":"","nullable":""},{"name":"red","type":"number","description":"The red color value, between 0 and 0xFF (255).","default":"","optional":"","nullable":""},{"name":"green","type":"number","description":"The green color value, between 0 and 0xFF (255).","default":"","optional":"","nullable":""},{"name":"blue","type":"number","description":"The blue color value, between 0 and 0xFF (255).","default":"","optional":"","nullable":""},{"name":"alpha","type":"number","description":"The alpha color value, between 0 and 0xFF (255).","default":"","optional":"","nullable":""},{"name":"immediate","type":"boolean","description":"If `true` the context.putImageData will be called and the dirty flag set.","default":true,"optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"setPixel","description":"Sets the color of the given pixel to the specified red, green and blue values.","parameters":[{"name":"x","type":"integer","description":"The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData and be an integer, not a float.","default":"","optional":"","nullable":""},{"name":"y","type":"integer","description":"The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData and be an integer, not a float.","default":"","optional":"","nullable":""},{"name":"red","type":"number","description":"The red color value, between 0 and 0xFF (255).","default":"","optional":"","nullable":""},{"name":"green","type":"number","description":"The green color value, between 0 and 0xFF (255).","default":"","optional":"","nullable":""},{"name":"blue","type":"number","description":"The blue color value, between 0 and 0xFF (255).","default":"","optional":"","nullable":""},{"name":"immediate","type":"boolean","description":"If `true` the context.putImageData will be called and the dirty flag set.","default":true,"optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"getPixel","description":"Get the color of a specific pixel in the context into a color object.\rIf you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer,\rotherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.","parameters":[{"name":"x","type":"integer","description":"The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData and be an integer, not a float.","default":"","optional":"","nullable":""},{"name":"y","type":"integer","description":"The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData and be an integer, not a float.","default":"","optional":"","nullable":""},{"name":"out","type":"object","description":"An object into which 4 properties will be created: r, g, b and a. If not provided a new object will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"object","description":"An object with the red, green, blue and alpha values set in the r, g, b and a properties."}},{"name":"getPixel32","description":"Get the color of a specific pixel including its alpha value.\rIf you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer,\rotherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.\rNote that on little-endian systems the format is 0xAABBGGRR and on big-endian the format is 0xRRGGBBAA.","parameters":[{"name":"x","type":"integer","description":"The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData and be an integer, not a float.","default":"","optional":"","nullable":""},{"name":"y","type":"integer","description":"The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData and be an integer, not a float.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"A native color value integer (format: 0xAARRGGBB)"}},{"name":"getPixelRGB","description":"Get the color of a specific pixel including its alpha value as a color object containing r,g,b,a and rgba properties.\rIf you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer,\rotherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.","parameters":[{"name":"x","type":"integer","description":"The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData and be an integer, not a float.","default":"","optional":"","nullable":""},{"name":"y","type":"integer","description":"The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData and be an integer, not a float.","default":"","optional":"","nullable":""},{"name":"out","type":"object","description":"An object into which 3 properties will be created: r, g and b. If not provided a new object will be created.","default":"","optional":true,"nullable":""},{"name":"hsl","type":"boolean","description":"Also convert the rgb values into hsl?","default":"","optional":true,"nullable":""},{"name":"hsv","type":"boolean","description":"Also convert the rgb values into hsv?","default":"","optional":true,"nullable":""}],"returns":{"type":"object","description":"An object with the red, green and blue values set in the r, g and b properties."}},{"name":"getPixels","description":"Gets all the pixels from the region specified by the given Rectangle object.","parameters":[{"name":"rect","type":"Phaser.Rectangle","description":"The Rectangle region to get.","default":"","optional":"","nullable":""}],"returns":{"type":"ImageData","description":"Returns a ImageData object containing a Uint8ClampedArray data property."}},{"name":"getFirstPixel","description":"Scans the BitmapData, pixel by pixel, until it encounters a pixel that isn't transparent (i.e. has an alpha value > 0).\rIt then stops scanning and returns an object containing the color of the pixel in r, g and b properties and the location in the x and y properties.\r\rThe direction parameter controls from which direction it should start the scan:\r\r0 = top to bottom\r1 = bottom to top\r2 = left to right\r3 = right to left","parameters":[{"name":"direction","type":"number","description":"The direction in which to scan for the first pixel. 0 = top to bottom, 1 = bottom to top, 2 = left to right and 3 = right to left.","default":"","optional":true,"nullable":""}],"returns":{"type":"object","description":"Returns an object containing the color of the pixel in the `r`, `g` and `b` properties and the location in the `x` and `y` properties."}},{"name":"getBounds","description":"Scans the BitmapData and calculates the bounds. This is a rectangle that defines the extent of all non-transparent pixels.\rThe rectangle returned will extend from the top-left of the image to the bottom-right, excluding transparent pixels.","parameters":[{"name":"rect","type":"Phaser.Rectangle","description":"If provided this Rectangle object will be populated with the bounds, otherwise a new object will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Rectangle","description":"A Rectangle whose dimensions encompass the full extent of non-transparent pixels in this BitmapData."}},{"name":"addToWorld","description":"Creates a new Phaser.Image object, assigns this BitmapData to be its texture, adds it to the world then returns it.","parameters":[{"name":"x","type":"number","description":"The x coordinate to place the Image at.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to place the Image at.","default":"","optional":true,"nullable":""},{"name":"anchorX","type":"number","description":"Set the x anchor point of the Image. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right.","default":"","optional":true,"nullable":""},{"name":"anchorY","type":"number","description":"Set the y anchor point of the Image. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right.","default":"","optional":true,"nullable":""},{"name":"scaleX","type":"number","description":"The horizontal scale factor of the Image. A value of 1 means no scaling. 2 would be twice the size, and so on.","default":1,"optional":true,"nullable":""},{"name":"scaleY","type":"number","description":"The vertical scale factor of the Image. A value of 1 means no scaling. 2 would be twice the size, and so on.","default":1,"optional":true,"nullable":""}],"returns":{"type":"Phaser.Image","description":"The newly added Image object."}},{"name":"copy","description":"Copies a rectangular area from the source object to this BitmapData. If you give `null` as the source it will copy from itself.\r\rYou can optionally resize, translate, rotate, scale, alpha or blend as it's drawn.\r\rAll rotation, scaling and drawing takes place around the regions center point by default, but can be changed with the anchor parameters.\r\rNote that the source image can also be this BitmapData, which can create some interesting effects.\r\rThis method has a lot of parameters for maximum control.\rYou can use the more friendly methods like `copyRect` and `draw` to avoid having to remember them all.\r\rYou may prefer to use `copyTransform` if you're simply trying to draw a Sprite to this BitmapData,\rand don't wish to translate, scale or rotate it from its original values.","parameters":[{"name":"source","type":["Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapData","Phaser.RenderTexture","Image","HTMLCanvasElement","string"],"description":"The source to copy from. If you give a string it will try and find the Image in the Game.Cache first. This is quite expensive so try to provide the image itself.","default":"","optional":true,"nullable":""},{"name":"x","type":"number","description":"The x coordinate representing the top-left of the region to copy from the source image.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate representing the top-left of the region to copy from the source image.","default":"","optional":true,"nullable":""},{"name":"width","type":"number","description":"The width of the region to copy from the source image. If not specified it will use the full source image width.","default":"","optional":true,"nullable":""},{"name":"height","type":"number","description":"The height of the region to copy from the source image. If not specified it will use the full source image height.","default":"","optional":true,"nullable":""},{"name":"tx","type":"number","description":"The x coordinate to translate to before drawing. If not specified it will default to the `x` parameter. If `null` and `source` is a Display Object, it will default to `source.x`.","default":"","optional":true,"nullable":""},{"name":"ty","type":"number","description":"The y coordinate to translate to before drawing. If not specified it will default to the `y` parameter. If `null` and `source` is a Display Object, it will default to `source.y`.","default":"","optional":true,"nullable":""},{"name":"newWidth","type":"number","description":"The new width of the block being copied. If not specified it will default to the `width` parameter.","default":"","optional":true,"nullable":""},{"name":"newHeight","type":"number","description":"The new height of the block being copied. If not specified it will default to the `height` parameter.","default":"","optional":true,"nullable":""},{"name":"rotate","type":"number","description":"The angle in radians to rotate the block to before drawing. Rotation takes place around the center by default, but can be changed with the `anchor` parameters.","default":"","optional":true,"nullable":""},{"name":"anchorX","type":"number","description":"The anchor point around which the block is rotated and scaled. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right.","default":"","optional":true,"nullable":""},{"name":"anchorY","type":"number","description":"The anchor point around which the block is rotated and scaled. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right.","default":"","optional":true,"nullable":""},{"name":"scaleX","type":"number","description":"The horizontal scale factor of the block. A value of 1 means no scaling. 2 would be twice the size, and so on.","default":1,"optional":true,"nullable":""},{"name":"scaleY","type":"number","description":"The vertical scale factor of the block. A value of 1 means no scaling. 2 would be twice the size, and so on.","default":1,"optional":true,"nullable":""},{"name":"alpha","type":"number","description":"The alpha that will be set on the context before drawing. A value between 0 (fully transparent) and 1, opaque.","default":1,"optional":true,"nullable":""},{"name":"blendMode","type":"string","description":"The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'.","default":"","optional":true,"nullable":""},{"name":"roundPx","type":"boolean","description":"Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"copyTransform","description":"Draws the given `source` Game Object to this BitmapData, using its `worldTransform` property to set the\rposition, scale and rotation of where it is drawn. This function is used internally by `drawGroup`.\rIt takes the objects tint and scale mode into consideration before drawing.\r\rYou can optionally specify Blend Mode and Round Pixels arguments.","parameters":[{"name":"source","type":["Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapData","Phaser.BitmapText"],"description":"The Game Object to draw.","default":"","optional":true,"nullable":""},{"name":"blendMode","type":"string","description":"The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'.","default":"","optional":true,"nullable":""},{"name":"roundPx","type":"boolean","description":"Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"copyRect","description":"Copies the area defined by the Rectangle parameter from the source image to this BitmapData at the given location.","parameters":[{"name":"source","type":["Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapData","Phaser.RenderTexture","Image","string"],"description":"The Image to copy from. If you give a string it will try and find the Image in the Game.Cache.","default":"","optional":"","nullable":""},{"name":"area","type":"Phaser.Rectangle","description":"The Rectangle region to copy from the source image.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The destination x coordinate to copy the image to.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The destination y coordinate to copy the image to.","default":"","optional":"","nullable":""},{"name":"alpha","type":"number","description":"The alpha that will be set on the context before drawing. A value between 0 (fully transparent) and 1, opaque.","default":1,"optional":true,"nullable":""},{"name":"blendMode","type":"string","description":"The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'.","default":"","optional":true,"nullable":""},{"name":"roundPx","type":"boolean","description":"Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"draw","description":"Draws the given Phaser.Sprite, Phaser.Image or Phaser.Text to this BitmapData at the coordinates specified.\rYou can use the optional width and height values to 'stretch' the sprite as it is drawn. This uses drawImage stretching, not scaling.\r\rThe children will be drawn at their `x` and `y` world space coordinates. If this is outside the bounds of the BitmapData they won't be visible.\rWhen drawing it will take into account the rotation, scale, scaleMode, alpha and tint values.\r\rNote: You should ensure that at least 1 full update has taken place before calling this, \rotherwise the objects are likely to render incorrectly, if at all.\rYou can trigger an update yourself by calling `stage.updateTransform()` before calling `draw`.","parameters":[{"name":"source","type":["Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.RenderTexture"],"description":"The Sprite, Image or Text object to draw onto this BitmapData.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate to translate to before drawing. If not specified it will default to `source.x`.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to translate to before drawing. If not specified it will default to `source.y`.","default":"","optional":true,"nullable":""},{"name":"width","type":"number","description":"The new width of the Sprite being copied. If not specified it will default to `source.width`.","default":"","optional":true,"nullable":""},{"name":"height","type":"number","description":"The new height of the Sprite being copied. If not specified it will default to `source.height`.","default":"","optional":true,"nullable":""},{"name":"blendMode","type":"string","description":"The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'.","default":"","optional":true,"nullable":""},{"name":"roundPx","type":"boolean","description":"Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"drawGroup","description":"Draws the immediate children of a Phaser.Group to this BitmapData.\r\rIt's perfectly valid to pass in `game.world` as the Group, and it will iterate through the entire display list.\r\rChildren are drawn _only_ if they have their `exists` property set to `true`, and have image, or RenderTexture, based Textures.\r\rThe children will be drawn at their `x` and `y` world space coordinates. If this is outside the bounds of the BitmapData they won't be visible.\rWhen drawing it will take into account the rotation, scale, scaleMode, alpha and tint values.\r\rNote: You should ensure that at least 1 full update has taken place before calling this, \rotherwise the objects are likely to render incorrectly, if at all.\rYou can trigger an update yourself by calling `stage.updateTransform()` before calling `drawGroup`.","parameters":[{"name":"group","type":"Phaser.Group","description":"The Group to draw onto this BitmapData. Can also be Phaser.World.","default":"","optional":"","nullable":""},{"name":"blendMode","type":"string","description":"The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'.","default":"","optional":true,"nullable":""},{"name":"roundPx","type":"boolean","description":"Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"drawGroupProxy","description":"A proxy for drawGroup that handles child iteration for more complex Game Objects.","parameters":[{"name":"child","type":["Phaser.Sprite","Phaser.Image","Phaser.BitmapText"],"description":"The child to draw.","default":"","optional":"","nullable":""},{"name":"blendMode","type":"string","description":"The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'.","default":"","optional":true,"nullable":""},{"name":"roundPx","type":"boolean","description":"Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances.","default":"","optional":true,"nullable":""}]},{"name":"drawFull","description":"Draws the Game Object or Group to this BitmapData and then recursively iterates through all of its children.\r\rIf a child has an `exists` property then it (and its children) will be only be drawn if exists is `true`.\r\rThe children will be drawn at their `x` and `y` world space coordinates. If this is outside the bounds of the BitmapData \rthey won't be drawn. Depending on your requirements you may need to resize the BitmapData in advance to match the \rbounds of the top-level Game Object.\r\rWhen drawing it will take into account the child's world rotation, scale and alpha values.\r\rIt's perfectly valid to pass in `game.world` as the parent object, and it will iterate through the entire display list.\r\rNote: If you are trying to grab your entire game at the start of a State then you should ensure that at least 1 full update\rhas taken place before doing so, otherwise all of the objects will render with incorrect positions and scales. You can \rtrigger an update yourself by calling `stage.updateTransform()` before calling `drawFull`.","parameters":[{"name":"parent","type":["Phaser.World","Phaser.Group","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText"],"description":"The Game Object to draw onto this BitmapData and then recursively draw all of its children.","default":"","optional":"","nullable":""},{"name":"blendMode","type":"string","description":"The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'.","default":"","optional":true,"nullable":""},{"name":"roundPx","type":"boolean","description":"Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"shadow","description":"Sets the shadow properties of this BitmapDatas context which will affect all draw operations made to it.\rYou can cancel an existing shadow by calling this method and passing no parameters.\rNote: At the time of writing (October 2014) Chrome still doesn't support shadowBlur used with drawImage.","parameters":[{"name":"color","type":"string","description":"The color of the shadow, given in a CSS format, i.e. `#000000` or `rgba(0,0,0,1)`. If `null` or `undefined` the shadow will be reset.","default":"","optional":"","nullable":""},{"name":"blur","type":"number","description":"The amount the shadow will be blurred by. Low values = a crisp shadow, high values = a softer shadow.","default":5,"optional":true,"nullable":""},{"name":"x","type":"number","description":"The horizontal offset of the shadow in pixels.","default":10,"optional":true,"nullable":""},{"name":"y","type":"number","description":"The vertical offset of the shadow in pixels.","default":10,"optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"alphaMask","description":"Draws the image onto this BitmapData using an image as an alpha mask.","parameters":[{"name":"source","type":["Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapData","Image","HTMLCanvasElement","string"],"description":"The source to copy from. If you give a string it will try and find the Image in the Game.Cache first. This is quite expensive so try to provide the image itself.","default":"","optional":"","nullable":""},{"name":"mask","type":["Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapData","Image","HTMLCanvasElement","string"],"description":"The object to be used as the mask. If you give a string it will try and find the Image in the Game.Cache first. This is quite expensive so try to provide the image itself. If you don't provide a mask it will use this BitmapData as the mask.","default":"","optional":true,"nullable":""},{"name":"sourceRect","type":"Phaser.Rectangle","description":"A Rectangle where x/y define the coordinates to draw the Source image to and width/height define the size.","default":"","optional":true,"nullable":""},{"name":"maskRect","type":"Phaser.Rectangle","description":"A Rectangle where x/y define the coordinates to draw the Mask image to and width/height define the size.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"extract","description":"Scans this BitmapData for all pixels matching the given r,g,b values and then draws them into the given destination BitmapData.\rThe original BitmapData remains unchanged.\rThe destination BitmapData must be large enough to receive all of the pixels that are scanned unless the 'resize' parameter is true.\rAlthough the destination BitmapData is returned from this method, it's actually modified directly in place, meaning this call is perfectly valid:\r`picture.extract(mask, r, g, b)`\rYou can specify optional r2, g2, b2 color values. If given the pixel written to the destination bitmap will be of the r2, g2, b2 color.\rIf not given it will be written as the same color it was extracted. You can provide one or more alternative colors, allowing you to tint\rthe color during extraction.","parameters":[{"name":"destination","type":"Phaser.BitmapData","description":"The BitmapData that the extracted pixels will be drawn to.","default":"","optional":"","nullable":""},{"name":"r","type":"number","description":"The red color component, in the range 0 - 255.","default":"","optional":"","nullable":""},{"name":"g","type":"number","description":"The green color component, in the range 0 - 255.","default":"","optional":"","nullable":""},{"name":"b","type":"number","description":"The blue color component, in the range 0 - 255.","default":"","optional":"","nullable":""},{"name":"a","type":"number","description":"The alpha color component, in the range 0 - 255 that the new pixel will be drawn at.","default":255,"optional":true,"nullable":""},{"name":"resize","type":"boolean","description":"Should the destination BitmapData be resized to match this one before the pixels are copied?","default":"","optional":true,"nullable":""},{"name":"r2","type":"number","description":"An alternative red color component to be written to the destination, in the range 0 - 255.","default":"","optional":true,"nullable":""},{"name":"g2","type":"number","description":"An alternative green color component to be written to the destination, in the range 0 - 255.","default":"","optional":true,"nullable":""},{"name":"b2","type":"number","description":"An alternative blue color component to be written to the destination, in the range 0 - 255.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"The BitmapData that the extract pixels were drawn on."}},{"name":"rect","description":"Draws a filled Rectangle to the BitmapData at the given x, y coordinates and width / height in size.","parameters":[{"name":"x","type":"number","description":"The x coordinate of the top-left of the Rectangle.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate of the top-left of the Rectangle.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The width of the Rectangle.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height of the Rectangle.","default":"","optional":"","nullable":""},{"name":"fillStyle","type":"string","description":"If set the context fillStyle will be set to this value before the rect is drawn.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"text","description":"Draws text to the BitmapData in the given font and color.\rThe default font is 14px Courier, so useful for quickly drawing debug text.\rIf you need to do a lot of font work to this BitmapData we'd recommend implementing your own text draw method.","parameters":[{"name":"text","type":"string","description":"The text to write to the BitmapData.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate of the top-left of the text string.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate of the top-left of the text string.","default":"","optional":"","nullable":""},{"name":"font","type":"string","description":"The font. This is passed directly to Context.font, so anything that can support, this can.","default":"'14px Courier'","optional":true,"nullable":""},{"name":"color","type":"string","description":"The color the text will be drawn in.","default":"'rgb(255,255,255)'","optional":true,"nullable":""},{"name":"shadow","type":"boolean","description":"Draw a single pixel black shadow below the text (offset by text.x/y + 1)","default":true,"optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"circle","description":"Draws a filled Circle to the BitmapData at the given x, y coordinates and radius in size.","parameters":[{"name":"x","type":"number","description":"The x coordinate to draw the Circle at. This is the center of the circle.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate to draw the Circle at. This is the center of the circle.","default":"","optional":"","nullable":""},{"name":"radius","type":"number","description":"The radius of the Circle in pixels. The radius is half the diameter.","default":"","optional":"","nullable":""},{"name":"fillStyle","type":"string","description":"If set the context fillStyle will be set to this value before the circle is drawn.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"line","description":"Draws a line between the coordinates given in the color and thickness specified.","parameters":[{"name":"x1","type":"number","description":"The x coordinate to start the line from.","default":"","optional":"","nullable":""},{"name":"y1","type":"number","description":"The y coordinate to start the line from.","default":"","optional":"","nullable":""},{"name":"x2","type":"number","description":"The x coordinate to draw the line to.","default":"","optional":"","nullable":""},{"name":"y2","type":"number","description":"The y coordinate to draw the line to.","default":"","optional":"","nullable":""},{"name":"color","type":"string","description":"The stroke color that the line will be drawn in.","default":"'#fff'","optional":true,"nullable":""},{"name":"width","type":"number","description":"The line thickness.","default":1,"optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"textureLine","description":"Takes the given Line object and image and renders it to this BitmapData as a repeating texture line.","parameters":[{"name":"line","type":"Phaser.Line","description":"A Phaser.Line object that will be used to plot the start and end of the line.","default":"","optional":"","nullable":""},{"name":"image","type":["string","Image"],"description":"The key of an image in the Phaser.Cache to use as the texture for this line, or an actual Image.","default":"","optional":"","nullable":""},{"name":"repeat","type":"string","description":"The pattern repeat mode to use when drawing the line. Either `repeat`, `repeat-x` or `no-repeat`.","default":"'repeat-x'","optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"render","description":"If the game is running in WebGL this will push the texture up to the GPU if it's dirty.\rThis is called automatically if the BitmapData is being used by a Sprite, otherwise you need to remember to call it in your render function.\rIf you wish to suppress this functionality set BitmapData.disableTextureUpload to `true`.","parameters":[],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"destroy","description":"Destroys this BitmapData and puts the canvas it was using back into the canvas pool for re-use.","parameters":[]},{"name":"blendReset","description":"Resets the blend mode (effectively sets it to 'source-over')","parameters":[],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"blendSourceOver","description":"Sets the blend mode to 'source-over'","parameters":[],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"blendSourceIn","description":"Sets the blend mode to 'source-in'","parameters":[],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"blendSourceOut","description":"Sets the blend mode to 'source-out'","parameters":[],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"blendSourceAtop","description":"Sets the blend mode to 'source-atop'","parameters":[],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"blendDestinationOver","description":"Sets the blend mode to 'destination-over'","parameters":[],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"blendDestinationIn","description":"Sets the blend mode to 'destination-in'","parameters":[],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"blendDestinationOut","description":"Sets the blend mode to 'destination-out'","parameters":[],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"blendDestinationAtop","description":"Sets the blend mode to 'destination-atop'","parameters":[],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"blendXor","description":"Sets the blend mode to 'xor'","parameters":[],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"blendAdd","description":"Sets the blend mode to 'lighter'","parameters":[],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"blendMultiply","description":"Sets the blend mode to 'multiply'","parameters":[],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"blendScreen","description":"Sets the blend mode to 'screen'","parameters":[],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"blendOverlay","description":"Sets the blend mode to 'overlay'","parameters":[],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"blendDarken","description":"Sets the blend mode to 'darken'","parameters":[],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"blendLighten","description":"Sets the blend mode to 'lighten'","parameters":[],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"blendColorDodge","description":"Sets the blend mode to 'color-dodge'","parameters":[],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"blendColorBurn","description":"Sets the blend mode to 'color-burn'","parameters":[],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"blendHardLight","description":"Sets the blend mode to 'hard-light'","parameters":[],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"blendSoftLight","description":"Sets the blend mode to 'soft-light'","parameters":[],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"blendDifference","description":"Sets the blend mode to 'difference'","parameters":[],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"blendExclusion","description":"Sets the blend mode to 'exclusion'","parameters":[],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"blendHue","description":"Sets the blend mode to 'hue'","parameters":[],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"blendSaturation","description":"Sets the blend mode to 'saturation'","parameters":[],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"blendColor","description":"Sets the blend mode to 'color'","parameters":[],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"blendLuminosity","description":"Sets the blend mode to 'luminosity'","parameters":[],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"copyBitmapData","description":"Updates a portion of the BitmapData from a source Bitmap.\rThis optimization is important if calling update() on a large Bitmap is causing performance issues.\rMake sure you use getPixel32() instead of getPixel().\rThis does not work with floating point numbers for x and y.","parameters":[{"name":"source","type":"Phaser.BitmapData","description":"The BitmapData you wish to copy.","default":"","optional":true,"nullable":""},{"name":"x","type":"number","description":"The x coordinate of the top-left of the area to copy.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate of the top-left of the area to copy.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"This BitmapData object for method chaining."}},{"name":"getTransform","description":"Gets a JavaScript object that has 6 properties set that are used by BitmapData in a transform.","parameters":[{"name":"translateX","type":"number","description":"The x translate value.","default":"","optional":"","nullable":""},{"name":"translateY","type":"number","description":"The y translate value.","default":"","optional":"","nullable":""},{"name":"scaleX","type":"number","description":"The scale x value.","default":"","optional":"","nullable":""},{"name":"scaleY","type":"number","description":"The scale y value.","default":"","optional":"","nullable":""},{"name":"skewX","type":"number","description":"The skew x value.","default":"","optional":"","nullable":""},{"name":"skewY","type":"number","description":"The skew y value.","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"A JavaScript object containing all of the properties BitmapData needs for transforms."}}],"members":[{"name":"game","access":"","virtual":false,"description":"A reference to the currently running game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"key","access":"","virtual":false,"description":"The key of the BitmapData in the Cache, if stored there.","type":{"names":["string"]},"default":""},{"name":"width","access":"","virtual":false,"description":"The width of the BitmapData in pixels.","type":{"names":["number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the BitmapData in pixels.","type":{"names":["number"]},"default":""},{"name":"canvas","access":"","virtual":false,"description":"The canvas to which this BitmapData draws.","type":{"names":["HTMLCanvasElement"]},"default":""},{"name":"context","access":"","virtual":false,"description":"The 2d context of the canvas.","type":{"names":["CanvasRenderingContext2D"]},"default":""},{"name":"ctx","access":"","virtual":false,"description":"A reference to BitmapData.context.","type":{"names":["CanvasRenderingContext2D"]},"default":""},{"name":"smoothProperty","access":"","virtual":false,"description":"The context property needed for smoothing this Canvas.","type":{"names":["string"]},"default":""},{"name":"imageData","access":"","virtual":false,"description":"The context image data.\rPlease note that a call to BitmapData.draw() or BitmapData.copy() does not update immediately this property for performance reason. Use BitmapData.update() to do so.\rThis property is updated automatically after the first game loop, according to the dirty flag property.","type":{"names":["ImageData"]},"default":""},{"name":"data","access":"","virtual":false,"description":"A Uint8ClampedArray view into BitmapData.buffer.\rNote that this is unavailable in some browsers (such as Epic Browser due to its security restrictions)","type":{"names":["Uint8ClampedArray"]},"default":""},{"name":"pixels","access":"","virtual":false,"description":"An Uint32Array view into BitmapData.buffer.","type":{"names":["Uint32Array"]},"default":""},{"name":"baseTexture","access":"","virtual":false,"description":"The PIXI.BaseTexture.","type":{"names":["PIXI.BaseTexture"]},"default":""},{"name":"texture","access":"","virtual":false,"description":"The PIXI.Texture.","type":{"names":["PIXI.Texture"]},"default":""},{"name":"frameData","access":"","virtual":false,"description":"The FrameData container this BitmapData uses for rendering.","type":{"names":["Phaser.FrameData"]},"default":""},{"name":"textureFrame","access":"","virtual":false,"description":"The Frame this BitmapData uses for rendering.","type":{"names":["Phaser.Frame"]},"default":""},{"name":"type","access":"","virtual":false,"description":"The const type of this object.","type":{"names":["number"]},"default":""},{"name":"disableTextureUpload","access":"","virtual":false,"description":"If disableTextureUpload is true this BitmapData will never send its image data to the GPU when its dirty flag is true.","type":{"names":["boolean"]},"default":""},{"name":"dirty","access":"","virtual":false,"description":"If dirty this BitmapData will be re-rendered.","type":{"names":["boolean"]},"default":""},{"name":"_image","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["number"]},"default":""},{"name":"_pos","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["Phaser.Point"]},"default":""},{"name":"_size","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["Phaser.Point"]},"default":""},{"name":"_scale","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["Phaser.Point"]},"default":""},{"name":"_rotate","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["number"]},"default":""},{"name":"_alpha","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["object"]},"default":""},{"name":"_anchor","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["Phaser.Point"]},"default":""},{"name":"_tempR","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["number"]},"default":""},{"name":"_tempG","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["number"]},"default":""},{"name":"_tempB","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["number"]},"default":""},{"name":"_circle","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["Phaser.Circle"]},"default":""},{"name":"_swapCanvas","access":"private","virtual":false,"description":"A swap canvas. Used by moveH and moveV, created in those methods.","type":{"names":["HTMLCanvasElement"]},"default":""}]},{"name":"Phaser.BitmapText","description":"BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure.\rIt then generates a new Sprite object for each letter of the text, proportionally spaced out and aligned to \rmatch the font structure.\r\rBitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability \rto use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by\rprocessing the font texture in an image editor, applying fills and any other effects required.\r\rTo create multi-line text insert \\r, \\n or \\r\\n escape codes into the text string.\r\rIf you are having performance issues due to the volume of sprites being rendered, and do not require the text to be constantly\rupdating, you can use BitmapText.generateTexture to create a static texture from this BitmapText.\r\rTo create a BitmapText data files you can use:\r\rBMFont (Windows, free): http://www.angelcode.com/products/bmfont/\rGlyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner\rLittera (Web-based, free): http://kvazars.com/littera/\r\rFor most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of\rconverting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson\r\rIf you were using an older version of Phaser (< 2.4) and using the DOMish parser hack, please remove this. It isn't required any longer.","constructor":{"name":"BitmapText","description":"BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure.\rIt then generates a new Sprite object for each letter of the text, proportionally spaced out and aligned to \rmatch the font structure.\r\rBitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability \rto use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by\rprocessing the font texture in an image editor, applying fills and any other effects required.\r\rTo create multi-line text insert \\r, \\n or \\r\\n escape codes into the text string.\r\rIf you are having performance issues due to the volume of sprites being rendered, and do not require the text to be constantly\rupdating, you can use BitmapText.generateTexture to create a static texture from this BitmapText.\r\rTo create a BitmapText data files you can use:\r\rBMFont (Windows, free): http://www.angelcode.com/products/bmfont/\rGlyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner\rLittera (Web-based, free): http://kvazars.com/littera/\r\rFor most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of\rconverting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson\r\rIf you were using an older version of Phaser (< 2.4) and using the DOMish parser hack, please remove this. It isn't required any longer.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"X coordinate to display the BitmapText object at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y coordinate to display the BitmapText object at.","default":"","optional":"","nullable":""},{"name":"font","type":"string","description":"The key of the BitmapText as stored in Phaser.Cache.","default":"","optional":"","nullable":""},{"name":"text","type":"string","description":"The text that will be rendered. This can also be set later via BitmapText.text.","default":"''","optional":true,"nullable":""},{"name":"size","type":"number","description":"The size the font will be rendered at in pixels.","default":32,"optional":true,"nullable":""},{"name":"align","type":"string","description":"The alignment of multi-line text. Has no effect if there is only one line of text.","default":"'left'","optional":true,"nullable":""}]},"functions":[{"name":"preUpdate","description":"Automatically called by World.preUpdate.","parameters":[],"returns":{"type":"boolean","description":"True if the BitmapText was rendered, otherwise false."}},{"name":"postUpdate","description":"Automatically called by World.preUpdate.","parameters":[]},{"name":"setText","description":"The text to be displayed by this BitmapText object.\r\rIt's faster to use `BitmapText.text = string`, but this is kept for backwards compatibility.","parameters":[{"name":"text","type":"string","description":"The text to be displayed by this BitmapText object.","default":"","optional":"","nullable":""}]},{"name":"scanLine","description":"Given the input text this will scan the characters until either a newline is encountered, \ror the line exceeds maxWidth, taking into account kerning, character widths and scaling.","parameters":[{"name":"data","type":"object","description":"A reference to the font object in the Phaser.Cache.","default":"","optional":"","nullable":""},{"name":"scale","type":"float","description":"The scale of the font in relation to the texture.","default":"","optional":"","nullable":""},{"name":"text","type":"string","description":"The text to parse.","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"An object containing the parsed characters, total pixel width and x offsets."}},{"name":"cleanText","description":"Given a text string this will scan each character in the string to ensure it exists\rin the BitmapText font data. If it doesn't the character is removed, or replaced with the `replace` argument.\r\rIf no font data has been loaded at all this returns an empty string, as nothing can be rendered.","parameters":[{"name":"text","type":"string","description":"The text to parse.","default":"","optional":"","nullable":""},{"name":"replace","type":"string","description":"The replacement string for any missing characters.","default":"''","optional":true,"nullable":""}],"returns":{"type":"string","description":"The cleaned text string."}},{"name":"updateText","description":"Renders text and updates it when needed.","parameters":[]},{"name":"purgeGlyphs","description":"If a BitmapText changes from having a large number of characters to having very few characters it will cause lots of\rSprites to be retained in the BitmapText._glyphs array. Although they are not attached to the display list they\rstill take up memory while sat in the glyphs pool waiting to be re-used in the future.\r\rIf you know that the BitmapText will not grow any larger then you can purge out the excess glyphs from the pool \rby calling this method.\r\rCalling this doesn't prevent you from increasing the length of the text again in the future.","parameters":[],"returns":{"type":"integer","description":"The amount of glyphs removed from the pool."}},{"name":"updateTransform","description":"Updates the transform of this object.","parameters":[]},{"name":"addChild","description":"Adds a child to the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to add to the container","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"addChildAt","description":"Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child to add","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The index to place the child in","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"swapChildren","description":"Swaps the position of 2 Display Objects within this container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""},{"name":"child2","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}]},{"name":"getChildIndex","description":"Returns the index position of a child DisplayObject instance","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject instance to identify","default":"","optional":"","nullable":""}],"returns":{"type":"Number","description":"The index position of the child display object to identify"}},{"name":"setChildIndex","description":"Changes the position of an existing child in the display object container","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child DisplayObject instance for which you want to change the index number","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The resulting index number for the child display object","default":"","optional":"","nullable":""}]},{"name":"getChildAt","description":"Returns the child at the specified index","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child at the given index, if any."}},{"name":"removeChild","description":"Removes a child from the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to remove","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildAt","description":"Removes a child from the specified index position.","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildren","description":"Removes all children from this container that are within the begin and end indexes.","parameters":[{"name":"beginIndex","type":"Number","description":"The beginning position. Default value is 0.","default":"","optional":"","nullable":""},{"name":"endIndex","type":"Number","description":"The ending position. Default value is size of the container.","default":"","optional":"","nullable":""}]},{"name":"getBounds","description":"Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.","parameters":[{"name":"targetCoordinateSpace","type":["PIXIDisplayObject","PIXIMatrix"],"description":"Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object.","default":"","optional":true,"nullable":""}],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"getLocalBounds","description":"Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.","parameters":[],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"contains","description":"Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}],"returns":{"type":"Boolean","description":""}},{"name":"_renderWebGL","description":"Renders the object using the WebGL renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""}]},{"name":"_renderCanvas","description":"Renders the object using the Canvas renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""}]},{"name":"update","description":"Override this method in your own custom objects to handle any update requirements.\rIt is called immediately after `preUpdate` and before `postUpdate`.\rRemember if this Game Object has any children you should call update on those too.","parameters":[]},{"name":"alignIn","description":"Aligns this Game Object within another Game Object, or Rectangle, known as the\r'container', to one of 9 possible positions.\r\rThe container must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Game Objects within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Sprite to another Game Object does **not** make it a child of\rthe container. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, \r`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, \r`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.\r\rThe Game Objects are placed in such a way that their _bounds_ align with the\rcontainer, taking into consideration rotation, scale and the anchor property.\rThis allows you to neatly align Game Objects, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Game Object. For example:\r\r`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the containers bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"container","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Object","description":"This Game Object."}},{"name":"alignTo","description":"Aligns this Game Object to the side of another Game Object, or Rectangle, known as the\r'parent', in one of 11 possible positions.\r\rThe parent must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Game Objects within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Sprite to another Game Object does **not** make it a child of\rthe parent. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, \r`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, \r`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` \rand `Phaser.BOTTOM_RIGHT`.\r\rThe Game Objects are placed in such a way that their _bounds_ align with the\rparent, taking into consideration rotation, scale and the anchor property.\rThis allows you to neatly align Game Objects, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Game Object. For example:\r\r`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the parents bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"parent","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Object","description":"This Game Object."}},{"name":"destroy","description":"Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present\rand nulls its reference to `game`, freeing it up for garbage collection.\r\rIf this Game Object has the Events component it will also dispatch the `onDestroy` event.\r\rYou can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've\rmore than one Game Object sharing the same BaseTexture.","parameters":[{"name":"destroyChildren","type":"boolean","description":"Should every child of this object have its destroy method called as well?","default":true,"optional":true,"nullable":""},{"name":"destroyTexture","type":"boolean","description":"Destroy the BaseTexture this Game Object is using? Note that if another Game Object is sharing the same BaseTexture it will invalidate it.","default":"","optional":true,"nullable":""}]},{"name":"revive","description":"Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.\r\rA resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.\r\rIt will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.","parameters":[{"name":"health","type":"number","description":"The health to give the Game Object. Only set if the GameObject has the Health component.","default":100,"optional":true,"nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"kill","description":"Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.\r\rIt will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.\r\rNote that killing a Game Object is a way for you to quickly recycle it in an object pool,\rit doesn't destroy the object or free it up from memory.\r\rIf you don't need this Game Object any more you should call `destroy` instead.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"reset","description":"Resets the Game Object.\r\rThis moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, \r`visible` and `renderable` to true.\r\rIf this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.\r\rIf this Game Object has a Physics Body it will reset the Body.","parameters":[{"name":"x","type":"number","description":"The x coordinate (in world space) to position the Game Object at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate (in world space) to position the Game Object at.","default":"","optional":"","nullable":""},{"name":"health","type":"number","description":"The health to give the Game Object if it has the Health component.","default":1,"optional":true,"nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}}],"members":[{"name":"type","access":"","virtual":false,"description":"The const type of this object.","type":{"names":["number"]},"default":""},{"name":"physicsType","access":"","virtual":false,"description":"The const physics body type of this object.","type":{"names":["number"]},"default":""},{"name":"textWidth","access":"","virtual":false,"description":"The width in pixels of the overall text area, taking into consideration multi-line text.","type":{"names":["number"]},"default":""},{"name":"textHeight","access":"","virtual":false,"description":"The height in pixels of the overall text area, taking into consideration multi-line text.","type":{"names":["number"]},"default":""},{"name":"anchor","access":"","virtual":false,"description":"The anchor value of this BitmapText.","type":{"names":["Phaser.Point"]},"default":""},{"name":"_prevAnchor","access":"private","virtual":false,"description":"The previous anchor value.","type":{"names":["Phaser.Point"]},"default":""},{"name":"_glyphs","access":"private","virtual":false,"description":"Private tracker for the letter sprite pool.","type":{"names":["array"]},"default":""},{"name":"_maxWidth","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["number"]},"default":""},{"name":"_text","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["string"]},"default":""},{"name":"_data","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["string"]},"default":""},{"name":"_font","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["string"]},"default":""},{"name":"_fontSize","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["number"]},"default":""},{"name":"_align","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["string"]},"default":""},{"name":"_tint","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["number"]},"default":""},{"name":"dirty","access":"","virtual":false,"description":"The dirty state of this object.","type":{"names":["boolean"]},"default":""},{"name":"align","access":"","virtual":false,"description":"Alignment for multi-line text ('left', 'center' or 'right'), does not affect single lines of text.","type":{"names":["string"]},"default":""},{"name":"tint","access":"","virtual":false,"description":"The tint applied to the BitmapText. This is a hex value. Set to white to disable (0xFFFFFF)","type":{"names":["number"]},"default":""},{"name":"font","access":"","virtual":false,"description":"The font the text will be rendered in, i.e. 'Arial'. Must be loaded in the browser before use.","type":{"names":["string"]},"default":""},{"name":"fontSize","access":"","virtual":false,"description":"The size of the font in pixels.","type":{"names":["number"]},"default":""},{"name":"text","access":"","virtual":false,"description":"The text to be displayed by this BitmapText object.","type":{"names":["string"]},"default":""},{"name":"maxWidth","access":"","virtual":false,"description":"The maximum display width of this BitmapText in pixels.\r\rIf BitmapText.text is longer than maxWidth then the lines will be automatically wrapped \rbased on the last whitespace character found in the line.\r\rIf no whitespace was found then no wrapping will take place and consequently the maxWidth value will not be honored.\r\rDisable maxWidth by setting the value to 0. The maximum width of this BitmapText in pixels.","type":{"names":["number"]},"default":""},{"name":"smoothed","access":"","virtual":false,"description":"Enable or disable texture smoothing for this BitmapText.\r\rThe smoothing is applied to the BaseTexture of this font, which all letters of the text reference.\r\rSmoothing is enabled by default.","type":{"names":["boolean"]},"default":""},{"name":"children","access":"","virtual":false,"description":"[read-only] The array of children of this container.","type":{"names":["Array.<DisplayObject>"]},"default":""},{"name":"ignoreChildInput","access":"","virtual":false,"description":"If `ignoreChildInput`  is `false` it will allow this objects _children_ to be considered as valid for Input events.\n\nIf this property is `true` then the children will _not_ be considered as valid for Input events.\n\nNote that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.","type":{"names":["Boolean"]},"default":""},{"name":"width","access":"","virtual":false,"description":"The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"position","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject, relative to its parent container.\n\nThe value of this property does not reflect any positioning happening further up the display list.\nTo obtain that value please see the `worldPosition` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"scale","access":"","virtual":false,"description":"The scale of this DisplayObject. A scale of 1:1 represents the DisplayObject\nat its default size. A value of 0.5 would scale this DisplayObject by half, and so on.\n\nThe value of this property does not reflect any scaling happening further up the display list.\nTo obtain that value please see the `worldScale` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"pivot","access":"","virtual":false,"description":"The pivot point of this DisplayObject that it rotates around. The values are expressed\nin pixel values.","type":{"names":["PIXIPoint"]},"default":""},{"name":"rotation","access":"","virtual":false,"description":"The rotation of this DisplayObject. The value is given, and expressed, in radians, and is based on\na right-handed orientation.\n\nThe value of this property does not reflect any rotation happening further up the display list.\nTo obtain that value please see the `worldRotation` property.","type":{"names":["Number"]},"default":""},{"name":"alpha","access":"","virtual":false,"description":"The alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nPlease note that an object with an alpha value of 0 is skipped during the render pass.\n\nThe value of this property does not reflect any alpha values set further up the display list.\nTo obtain that value please see the `worldAlpha` property.","type":{"names":["Number"]},"default":""},{"name":"visible","access":"","virtual":false,"description":"The visibility of this DisplayObject. A value of `false` makes the object invisible.\nA value of `true` makes it visible. Please note that an object with a visible value of\n`false` is skipped during the render pass. Equally a DisplayObject with visible false will\nnot render any of its children.\n\nThe value of this property does not reflect any visible values set further up the display list.\nTo obtain that value please see the `worldVisible` property.","type":{"names":["Boolean"]},"default":""},{"name":"hitArea","access":"","virtual":false,"description":"This is the defined area that will pick up mouse / touch events. It is null by default.\nSetting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)","type":{"names":["Rectangle","Circle","Ellipse","Polygon"]},"default":""},{"name":"renderable","access":"","virtual":false,"description":"Should this DisplayObject be rendered by the renderer? An object with a renderable value of\n`false` is skipped during the render pass.","type":{"names":["Boolean"]},"default":""},{"name":"parent","access":"","virtual":false,"description":"The parent DisplayObjectContainer that this DisplayObject is a child of.\nAll DisplayObjects must belong to a parent in order to be rendered.\nThe root parent is the Stage object. This property is set automatically when the\nDisplayObject is added to, or removed from, a DisplayObjectContainer.","type":{"names":["PIXIDisplayObjectContainer"]},"default":""},{"name":"worldAlpha","access":"","virtual":false,"description":"The multiplied alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nThis value is the calculated total, based on the alpha values of all parents of this DisplayObjects \nin the display list.\n\nTo obtain, and set, the local alpha value, see the `alpha` property.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"worldTransform","access":"","virtual":false,"description":"The current transform of this DisplayObject.\n\nThis property contains the calculated total, based on the transforms of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIMatrix"]},"default":""},{"name":"worldPosition","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject within the world.\n\nThis property contains the calculated total, based on the positions of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldScale","access":"","virtual":false,"description":"The global scale of this DisplayObject.\n\nThis property contains the calculated total, based on the scales of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldRotation","access":"","virtual":false,"description":"The rotation, in radians, of this DisplayObject.\n\nThis property contains the calculated total, based on the rotations of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"filterArea","access":"","virtual":false,"description":"The rectangular area used by filters when rendering a shader for this DisplayObject.","type":{"names":["Rectangle"]},"default":""},{"name":"_sr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_cr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_bounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_currentBounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_mask","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_cacheAsBitmap","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"_cacheIsDirty","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"x","access":"","virtual":false,"description":"The horizontal position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The vertical position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"worldVisible","access":"","virtual":false,"description":"Indicates if this DisplayObject is visible, based on it, and all of its parents, `visible` property values.","type":{"names":["Boolean"]},"default":""},{"name":"mask","access":"","virtual":false,"description":"Sets a mask for this DisplayObject. A mask is an instance of a Graphics object.\nWhen applied it limits the visible area of this DisplayObject to the shape of the mask.\nUnder a Canvas renderer it uses shape clipping. Under a WebGL renderer it uses a Stencil Buffer.\nTo remove a mask, set this property to `null`.","type":{"names":["PIXIGraphics"]},"default":""},{"name":"filters","access":"","virtual":false,"description":"Sets the filters for this DisplayObject. This is a WebGL only feature, and is ignored by the Canvas\nRenderer. A filter is a shader applied to this DisplayObject. You can modify the placement of the filter\nusing `DisplayObject.filterArea`.\n\nTo remove filters, set this property to `null`.\n\nNote: You cannot have a filter set, and a MULTIPLY Blend Mode active, at the same time. Setting a \nfilter will reset this DisplayObjects blend mode to NORMAL.","type":{"names":["Array"]},"default":""},{"name":"cacheAsBitmap","access":"","virtual":false,"description":"Sets if this DisplayObject should be cached as a bitmap.\n\nWhen invoked it will take a snapshot of the DisplayObject, as it is at that moment, and store it \nin a RenderTexture. This is then used whenever this DisplayObject is rendered. It can provide a\nperformance benefit for complex, but static, DisplayObjects. I.e. those with lots of children.\n\nCached Bitmaps do not track their parents. If you update a property of this DisplayObject, it will not\nre-generate the cached bitmap automatically. To do that you need to call `DisplayObject.updateCache`.\n\nTo remove a cached bitmap, set this property to `null`.","type":{"names":["Boolean"]},"default":""},{"name":"game","access":"","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"name","access":"","virtual":false,"description":"A user defined name given to this Game Object.\rThis value isn't ever used internally by Phaser, it is meant as a game level property.","type":{"names":["string"]},"default":""},{"name":"data","access":"","virtual":false,"description":"An empty Object that belongs to this Game Object.\rThis value isn't ever used internally by Phaser, but may be used by your own code, or\rby Phaser Plugins, to store data that needs to be associated with the Game Object,\rwithout polluting the Game Object directly.","type":{"names":["Object"]},"default":"{}"},{"name":"components","access":"protected","virtual":false,"description":"The components this Game Object has installed.","type":{"names":["object"]},"default":""},{"name":"z","access":"","virtual":false,"description":"The z depth of this Game Object within its parent Group.\rNo two objects in a Group can have the same z value.\rThis value is adjusted automatically whenever the Group hierarchy changes.\rIf you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.","type":{"names":["number"]},"default":""},{"name":"events","access":"","virtual":false,"description":"All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this\rGame Object, or any of its components.","type":{"names":["Phaser.Events"]},"default":""},{"name":"animations","access":"","virtual":false,"description":"If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance.\rThrough it you can create, play, pause and stop animations.","type":{"names":["Phaser.AnimationManager"]},"default":""},{"name":"key","access":"","virtual":false,"description":"The key of the image or texture used by this Game Object during rendering.\rIf it is a string it's the string used to retrieve the texture from the Phaser Image Cache.\rIt can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.\rIf a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache.\rIf a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.","type":{"names":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"]},"default":""},{"name":"world","access":"","virtual":false,"description":"The world coordinates of this Game Object in pixels.\rDepending on where in the display list this Game Object is placed this value can differ from `position`, \rwhich contains the x/y coordinates relative to the Game Objects parent.","type":{"names":["Phaser.Point"]},"default":""},{"name":"debug","access":"","virtual":false,"description":"A debug flag designed for use with `Game.enableStep`.","type":{"names":["boolean"]},"default":""},{"name":"previousPosition","access":"","virtual":false,"description":"The position the Game Object was located in the previous frame.","type":{"names":["Phaser.Point"]},"default":""},{"name":"previousRotation","access":"","virtual":false,"description":"The rotation the Game Object was in set to in the previous frame. Value is in radians.","type":{"names":["number"]},"default":""},{"name":"renderOrderID","access":"","virtual":false,"description":"The render order ID is used internally by the renderer and Input Manager and should not be modified.\rThis property is mostly used internally by the renderers, but is exposed for the use of plugins.","type":{"names":["number"]},"default":""},{"name":"fresh","access":"","virtual":false,"description":"A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update.\rThis property is mostly used internally by the physics systems, but is exposed for the use of plugins.","type":{"names":["boolean"]},"default":""},{"name":"pendingDestroy","access":"","virtual":false,"description":"A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update.\rYou can set it directly to allow you to flag an object to be destroyed on its next update.\r\rThis is extremely useful if you wish to destroy an object from within one of its own callbacks \rsuch as with Buttons or other Input events.","type":{"names":["boolean"]},"default":""},{"name":"_exists","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["boolean"]},"default":""},{"name":"exists","access":"","virtual":false,"description":"Controls if this Game Object is processed by the core game loop.\rIf this Game Object has a physics body it also controls if its physics body is updated or not.\rWhen `exists` is set to `false` it will remove its physics body from the physics world if it has one.\rIt also toggles the `visible` property to false as well.\r\rSetting `exists` to true will add its physics body back in to the physics world, if it has one.\rIt will also set the `visible` property to `true`.","type":{"names":["boolean"]},"default":""},{"name":"angle","access":"","virtual":false,"description":"The angle property is the rotation of the Game Object in *degrees* from its original orientation.\r\rValues from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.\r\rValues outside this range are added to or subtracted from 360 to obtain a value within the range. \rFor example, the statement player.angle = 450 is the same as player.angle = 90.\r\rIf you wish to work in radians instead of degrees you can use the property `rotation` instead. \rWorking in radians is slightly faster as it doesn't have to perform any calculations.","type":{"names":["number"]},"default":""},{"name":"autoCull","access":"","virtual":false,"description":"A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame.\rIf it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`.\rThis keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.\r\rThis is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,\ror you have tested performance and find it acceptable.","type":{"names":["boolean"]},"default":""},{"name":"inCamera","access":"","virtual":false,"description":"Checks if the Game Objects bounds intersect with the Game Camera bounds.\rReturns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.","type":{"names":["boolean"]},"default":""},{"name":"offsetX","access":"","virtual":false,"description":"The amount the Game Object is visually offset from its x coordinate.\rThis is the same as `width * anchor.x`.\rIt will only be > 0 if anchor.x is not equal to zero.","type":{"names":["number"]},"default":""},{"name":"offsetY","access":"","virtual":false,"description":"The amount the Game Object is visually offset from its y coordinate.\rThis is the same as `height * anchor.y`.\rIt will only be > 0 if anchor.y is not equal to zero.","type":{"names":["number"]},"default":""},{"name":"centerX","access":"","virtual":false,"description":"The center x coordinate of the Game Object.\rThis is the same as `(x - offsetX) + (width / 2)`.","type":{"names":["number"]},"default":""},{"name":"centerY","access":"","virtual":false,"description":"The center y coordinate of the Game Object.\rThis is the same as `(y - offsetY) + (height / 2)`.","type":{"names":["number"]},"default":""},{"name":"left","access":"","virtual":false,"description":"The left coordinate of the Game Object.\rThis is the same as `x - offsetX`.","type":{"names":["number"]},"default":""},{"name":"right","access":"","virtual":false,"description":"The right coordinate of the Game Object.\rThis is the same as `x + width - offsetX`.","type":{"names":["number"]},"default":""},{"name":"top","access":"","virtual":false,"description":"The y coordinate of the Game Object.\rThis is the same as `y - offsetY`.","type":{"names":["number"]},"default":""},{"name":"bottom","access":"","virtual":false,"description":"The sum of the y and height properties.\rThis is the same as `y + height - offsetY`.","type":{"names":["number"]},"default":""},{"name":"destroyPhase","access":"","virtual":false,"description":"As a Game Object runs through its destroy method this flag is set to true, \rand can be checked in any sub-systems or plugins it is being destroyed from.","type":{"names":["boolean"]},"default":""},{"name":"_fixedToCamera","access":"private","virtual":false,"description":"","type":{"names":["boolean"]},"default":""},{"name":"fixedToCamera","access":"","virtual":false,"description":"A Game Object that is \"fixed\" to the camera is rendered at a given x/y offsets from the top left of the camera. The offsets \rare stored in the `cameraOffset` property, which is initialized with the current object coordinates. \r\rThe values are adjusted at the rendering stage, overriding the Game Objects actual world position.\r\rThe end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world\rthe camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times \rregardless where in the world the camera is.\r\rNote that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.\r\rBe careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.","type":{"names":["boolean"]},"default":""},{"name":"cameraOffset","access":"","virtual":false,"description":"The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.\r\rThe values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.","type":{"names":["Phaser.Point"]},"default":""},{"name":"input","access":"","virtual":false,"description":"The Input Handler for this Game Object.\r\rBy default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.\r\rAfter you have done this, this property will be a reference to the Phaser InputHandler.","type":{"names":["Phaser.InputHandler","null"]},"default":""},{"name":"inputEnabled","access":"","virtual":false,"description":"By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created\rfor this Game Object and it will then start to process click / touch events and more.\r\rYou can then access the Input Handler via `this.input`.\r\rNote that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.\r\rIf you set this property to false it will stop the Input Handler from processing any more input events.\r\rIf you want to _temporarily_ disable input for a Game Object, then it's better to set\r`input.enabled = false`, as it won't reset any of the Input Handlers internal properties.\rYou can then toggle this back on as needed.","type":{"names":["boolean"]},"default":""},{"name":"checkWorldBounds","access":"","virtual":false,"description":"If this is set to `true` the Game Object checks if it is within the World bounds each frame. \r\rWhen it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.\r\rIf it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.\r\rIt also optionally kills the Game Object if `outOfBoundsKill` is `true`.\r\rWhen `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.\r\rThis is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,\ror you have tested performance and find it acceptable.","type":{"names":["boolean"]},"default":""},{"name":"outOfBoundsKill","access":"","virtual":false,"description":"If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.","type":{"names":["boolean"]},"default":""},{"name":"outOfCameraBoundsKill","access":"","virtual":false,"description":"If this and the `autoCull` property are both set to `true`, then the `kill` method\ris called as soon as the Game Object leaves the camera bounds.","type":{"names":["boolean"]},"default":""},{"name":"_outOfBoundsFired","access":"private","virtual":false,"description":"Internal state var.","type":{"names":["boolean"]},"default":""},{"name":"inWorld","access":"","virtual":false,"description":"Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.","type":{"names":["boolean"]},"default":""},{"name":"alive","access":"","virtual":false,"description":"A useful flag to control if the Game Object is alive or dead.\r\rThis is set automatically by the Health components `damage` method should the object run out of health.\rOr you can toggle it via your game code.\r\rThis property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates.\rHowever you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.","type":{"names":["boolean"]},"default":true},{"name":"lifespan","access":"","virtual":false,"description":"The lifespan allows you to give a Game Object a lifespan in milliseconds.\r\rOnce the Game Object is 'born' you can set this to a positive value.\r\rIt is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame.\rWhen it reaches zero it will call the `kill` method.\r\rVery handy for particles, bullets, collectibles, or any other short-lived entity.","type":{"names":["number"]},"default":""},{"name":"body","access":"","virtual":false,"description":"`body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated \rproperties and methods via it.\r\rBy default Game Objects won't add themselves to any physics system and their `body` property will be `null`.\r\rTo enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object\rand `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.\r\rYou can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.\r\rImportant: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5, \rso the physics body is centered on the Game Object.\r\rIf you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.","type":{"names":["Phaser.Physics.Arcade.Body","Phaser.Physics.P2.Body","Phaser.Physics.Ninja.Body","null"]},"default":""}]},{"name":"Phaser.Button","description":"Create a new `Button` object. A Button is a special type of Sprite that is set-up to handle Pointer events automatically.\r\rThe four states a Button responds to are:\r\r* 'Over' - when the Pointer moves over the Button. This is also commonly known as 'hover'.\r* 'Out' - when the Pointer that was previously over the Button moves out of it.\r* 'Down' - when the Pointer is pressed down on the Button. I.e. touched on a touch enabled device or clicked with the mouse.\r* 'Up' - when the Pointer that was pressed down on the Button is released again.\r\rA different texture/frame and activation sound can be specified for any of the states.\r\rFrames can be specified as either an integer (the frame ID) or a string (the frame name); the same values that can be used with a Sprite constructor.","constructor":{"name":"Button","description":"Create a new `Button` object. A Button is a special type of Sprite that is set-up to handle Pointer events automatically.\r\rThe four states a Button responds to are:\r\r* 'Over' - when the Pointer moves over the Button. This is also commonly known as 'hover'.\r* 'Out' - when the Pointer that was previously over the Button moves out of it.\r* 'Down' - when the Pointer is pressed down on the Button. I.e. touched on a touch enabled device or clicked with the mouse.\r* 'Up' - when the Pointer that was pressed down on the Button is released again.\r\rA different texture/frame and activation sound can be specified for any of the states.\r\rFrames can be specified as either an integer (the frame ID) or a string (the frame name); the same values that can be used with a Sprite constructor.","parameters":[{"name":"game","type":"Phaser.Game","description":"Current game instance.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"X position of the Button.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"Y position of the Button.","default":"","optional":true,"nullable":""},{"name":"key","type":"string","description":"The image key (in the Game.Cache) to use as the texture for this Button.","default":"","optional":true,"nullable":""},{"name":"callback","type":"function","description":"The function to call when this Button is pressed.","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the callback will be called (usually 'this').","default":"","optional":true,"nullable":""},{"name":"overFrame","type":["string","integer"],"description":"The frame / frameName when the button is in the Over state.","default":"","optional":true,"nullable":""},{"name":"outFrame","type":["string","integer"],"description":"The frame / frameName when the button is in the Out state.","default":"","optional":true,"nullable":""},{"name":"downFrame","type":["string","integer"],"description":"The frame / frameName when the button is in the Down state.","default":"","optional":true,"nullable":""},{"name":"upFrame","type":["string","integer"],"description":"The frame / frameName when the button is in the Up state.","default":"","optional":true,"nullable":""}]},"functions":[{"name":"clearFrames","description":"Clears all of the frames set on this Button.","parameters":[]},{"name":"removedFromWorld","description":"Called when this Button is removed from the World.","parameters":[]},{"name":"setStateFrame","description":"Set the frame name/ID for the given state.","parameters":[{"name":"state","type":"object","description":"See `STATE_*`","default":"","optional":"","nullable":""},{"name":"frame","type":["number","string"],"description":"The number or string representing the frame.","default":"","optional":"","nullable":""},{"name":"switchImmediately","type":"boolean","description":"Immediately switch to the frame if it was set - and this is true.","default":"","optional":"","nullable":""}]},{"name":"changeStateFrame","description":"Change the frame to that of the given state, _if_ the state has a frame assigned _and_ if the frames are not currently \"frozen\".","parameters":[{"name":"state","type":"object","description":"See `STATE_*`","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True only if the frame was assigned a value, possibly the same one it already had."}},{"name":"setFrames","description":"Used to manually set the frames that will be used for the different states of the Button.\r\rFrames can be specified as either an integer (the frame ID) or a string (the frame name); these are the same values that can be used with a Sprite constructor.","parameters":[{"name":"overFrame","type":["string","integer"],"description":"The frame / frameName when the button is in the Over state.","default":"","optional":true,"nullable":""},{"name":"outFrame","type":["string","integer"],"description":"The frame / frameName when the button is in the Out state.","default":"","optional":true,"nullable":""},{"name":"downFrame","type":["string","integer"],"description":"The frame / frameName when the button is in the Down state.","default":"","optional":true,"nullable":""},{"name":"upFrame","type":["string","integer"],"description":"The frame / frameName when the button is in the Up state.","default":"","optional":true,"nullable":""}]},{"name":"setStateSound","description":"Set the sound/marker for the given state.","parameters":[{"name":"state","type":"object","description":"See `STATE_*`","default":"","optional":"","nullable":""},{"name":"sound","type":["Phaser.Sound","Phaser.AudioSprite"],"description":"Sound.","default":"","optional":true,"nullable":""},{"name":"marker","type":"string","description":"Sound marker.","default":"''","optional":true,"nullable":""}]},{"name":"playStateSound","description":"Play the sound for the given state, _if_ the state has a sound assigned.","parameters":[{"name":"state","type":"object","description":"See `STATE_*`","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True only if a sound was played."}},{"name":"setSounds","description":"Sets the sounds to be played whenever this Button is interacted with. Sounds can be either full Sound objects, or markers pointing to a section of a Sound object.\rThe most common forms of sounds are 'hover' effects and 'click' effects, which is why the order of the parameters is overSound then downSound.\r\rCall this function with no parameters to reset all sounds on this Button.","parameters":[{"name":"overSound","type":["Phaser.Sound","Phaser.AudioSprite"],"description":"Over Button Sound.","default":"","optional":true,"nullable":""},{"name":"overMarker","type":"string","description":"Over Button Sound Marker.","default":"","optional":true,"nullable":""},{"name":"downSound","type":["Phaser.Sound","Phaser.AudioSprite"],"description":"Down Button Sound.","default":"","optional":true,"nullable":""},{"name":"downMarker","type":"string","description":"Down Button Sound Marker.","default":"","optional":true,"nullable":""},{"name":"outSound","type":["Phaser.Sound","Phaser.AudioSprite"],"description":"Out Button Sound.","default":"","optional":true,"nullable":""},{"name":"outMarker","type":"string","description":"Out Button Sound Marker.","default":"","optional":true,"nullable":""},{"name":"upSound","type":["Phaser.Sound","Phaser.AudioSprite"],"description":"Up Button Sound.","default":"","optional":true,"nullable":""},{"name":"upMarker","type":"string","description":"Up Button Sound Marker.","default":"","optional":true,"nullable":""}]},{"name":"setOverSound","description":"The Sound to be played when a Pointer moves over this Button.","parameters":[{"name":"sound","type":["Phaser.Sound","Phaser.AudioSprite"],"description":"The Sound that will be played.","default":"","optional":"","nullable":""},{"name":"marker","type":"string","description":"A Sound Marker that will be used in the playback.","default":"","optional":true,"nullable":""}]},{"name":"setOutSound","description":"The Sound to be played when a Pointer moves out of this Button.","parameters":[{"name":"sound","type":["Phaser.Sound","Phaser.AudioSprite"],"description":"The Sound that will be played.","default":"","optional":"","nullable":""},{"name":"marker","type":"string","description":"A Sound Marker that will be used in the playback.","default":"","optional":true,"nullable":""}]},{"name":"setDownSound","description":"The Sound to be played when a Pointer presses down on this Button.","parameters":[{"name":"sound","type":["Phaser.Sound","Phaser.AudioSprite"],"description":"The Sound that will be played.","default":"","optional":"","nullable":""},{"name":"marker","type":"string","description":"A Sound Marker that will be used in the playback.","default":"","optional":true,"nullable":""}]},{"name":"setUpSound","description":"The Sound to be played when a Pointer has pressed down and is released from this Button.","parameters":[{"name":"sound","type":["Phaser.Sound","Phaser.AudioSprite"],"description":"The Sound that will be played.","default":"","optional":"","nullable":""},{"name":"marker","type":"string","description":"A Sound Marker that will be used in the playback.","default":"","optional":true,"nullable":""}]},{"name":"onInputOverHandler","description":"Internal function that handles input events.","parameters":[{"name":"sprite","type":"Phaser.Button","description":"The Button that the event occurred on.","default":"","optional":"","nullable":""},{"name":"pointer","type":"Phaser.Pointer","description":"The Pointer that activated the Button.","default":"","optional":"","nullable":""}]},{"name":"onInputOutHandler","description":"Internal function that handles input events.","parameters":[{"name":"sprite","type":"Phaser.Button","description":"The Button that the event occurred on.","default":"","optional":"","nullable":""},{"name":"pointer","type":"Phaser.Pointer","description":"The Pointer that activated the Button.","default":"","optional":"","nullable":""}]},{"name":"onInputDownHandler","description":"Internal function that handles input events.","parameters":[{"name":"sprite","type":"Phaser.Button","description":"The Button that the event occurred on.","default":"","optional":"","nullable":""},{"name":"pointer","type":"Phaser.Pointer","description":"The Pointer that activated the Button.","default":"","optional":"","nullable":""}]},{"name":"onInputUpHandler","description":"Internal function that handles input events.","parameters":[{"name":"sprite","type":"Phaser.Button","description":"The Button that the event occurred on.","default":"","optional":"","nullable":""},{"name":"pointer","type":"Phaser.Pointer","description":"The Pointer that activated the Button.","default":"","optional":"","nullable":""}]},{"name":"preUpdate","description":"Automatically called by World.preUpdate.","parameters":[]},{"name":"setTexture","description":"Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous\ntexture this Sprite was using.","parameters":[{"name":"texture","type":"PIXI.Texture","description":"The PIXI texture that is displayed by the sprite","default":"","optional":"","nullable":""},{"name":"destroy","type":"Boolean","description":"Call Texture.destroy on the current texture before replacing it with the new one?","default":"","optional":true,"nullable":""}]},{"name":"onTextureUpdate","description":"When the texture is updated, this event will fire to update the scale and frame","parameters":[{"name":"event","type":"","description":"-","default":"","optional":"","nullable":""}]},{"name":"getBounds","description":"Returns the bounds of the Sprite as a rectangle.\nThe bounds calculation takes the worldTransform into account.\n\nIt is important to note that the transform is not updated when you call this method.\nSo if this Sprite is the child of a Display Object which has had its transform\nupdated since the last render pass, those changes will not yet have been applied\nto this Sprites worldTransform. If you need to ensure that all parent transforms\nare factored into this getBounds operation then you should call `updateTransform`\non the root most object in this Sprites display list first.","parameters":[{"name":"matrix","type":"Matrix","description":"the transformation matrix of the sprite","default":"","optional":"","nullable":""}],"returns":{"type":"Rectangle","description":"the framing rectangle"}},{"name":"getLocalBounds","description":"Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.","parameters":[],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"_renderWebGL","description":"Renders the object using the WebGL renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""},{"name":"matrix","type":"Matrix","description":"- Optional matrix. If provided the Display Object will be rendered using this matrix, otherwise it will use its worldTransform.","default":"","optional":true,"nullable":""}]},{"name":"_renderCanvas","description":"Renders the object using the Canvas renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""},{"name":"matrix","type":"Matrix","description":"- Optional matrix. If provided the Display Object will be rendered using this matrix, otherwise it will use its worldTransform.","default":"","optional":true,"nullable":""}]},{"name":"addChild","description":"Adds a child to the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to add to the container","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"addChildAt","description":"Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child to add","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The index to place the child in","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"swapChildren","description":"Swaps the position of 2 Display Objects within this container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""},{"name":"child2","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}]},{"name":"getChildIndex","description":"Returns the index position of a child DisplayObject instance","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject instance to identify","default":"","optional":"","nullable":""}],"returns":{"type":"Number","description":"The index position of the child display object to identify"}},{"name":"setChildIndex","description":"Changes the position of an existing child in the display object container","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child DisplayObject instance for which you want to change the index number","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The resulting index number for the child display object","default":"","optional":"","nullable":""}]},{"name":"getChildAt","description":"Returns the child at the specified index","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child at the given index, if any."}},{"name":"removeChild","description":"Removes a child from the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to remove","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildAt","description":"Removes a child from the specified index position.","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildren","description":"Removes all children from this container that are within the begin and end indexes.","parameters":[{"name":"beginIndex","type":"Number","description":"The beginning position. Default value is 0.","default":"","optional":"","nullable":""},{"name":"endIndex","type":"Number","description":"The ending position. Default value is size of the container.","default":"","optional":"","nullable":""}]},{"name":"contains","description":"Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}],"returns":{"type":"Boolean","description":""}},{"name":"update","description":"Override this method in your own custom objects to handle any update requirements.\rIt is called immediately after `preUpdate` and before `postUpdate`.\rRemember if this Game Object has any children you should call update on those too.","parameters":[]},{"name":"postUpdate","description":"Internal method called by the World postUpdate cycle.","parameters":[]},{"name":"play","description":"Plays an Animation.\r\rThe animation should have previously been created via `animations.add`.\r\rIf the animation is already playing calling this again won't do anything.\rIf you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.","parameters":[{"name":"name","type":"string","description":"The name of the animation to be played, e.g. \"fire\", \"walk\", \"jump\". Must have been previously created via 'AnimationManager.add'.","default":"","optional":"","nullable":""},{"name":"frameRate","type":"number","description":"The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used.","default":"","optional":true,"nullable":""},{"name":"loop","type":"boolean","description":"Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.","default":"","optional":true,"nullable":""},{"name":"killOnComplete","type":"boolean","description":"If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Animation","description":"A reference to playing Animation."}},{"name":"alignIn","description":"Aligns this Game Object within another Game Object, or Rectangle, known as the\r'container', to one of 9 possible positions.\r\rThe container must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Game Objects within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Sprite to another Game Object does **not** make it a child of\rthe container. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, \r`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, \r`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.\r\rThe Game Objects are placed in such a way that their _bounds_ align with the\rcontainer, taking into consideration rotation, scale and the anchor property.\rThis allows you to neatly align Game Objects, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Game Object. For example:\r\r`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the containers bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"container","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Object","description":"This Game Object."}},{"name":"alignTo","description":"Aligns this Game Object to the side of another Game Object, or Rectangle, known as the\r'parent', in one of 11 possible positions.\r\rThe parent must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Game Objects within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Sprite to another Game Object does **not** make it a child of\rthe parent. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, \r`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, \r`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` \rand `Phaser.BOTTOM_RIGHT`.\r\rThe Game Objects are placed in such a way that their _bounds_ align with the\rparent, taking into consideration rotation, scale and the anchor property.\rThis allows you to neatly align Game Objects, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Game Object. For example:\r\r`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the parents bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"parent","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Object","description":"This Game Object."}},{"name":"bringToTop","description":"Brings this Game Object to the top of its parents display list.\rVisually this means it will render over the top of any old child in the same Group.\r\rIf this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"sendToBack","description":"Sends this Game Object to the bottom of its parents display list.\rVisually this means it will render below all other children in the same Group.\r\rIf this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"moveUp","description":"Moves this Game Object up one place in its parents display list.\rThis call has no effect if the Game Object is already at the top of the display list.\r\rIf this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"moveDown","description":"Moves this Game Object down one place in its parents display list.\rThis call has no effect if the Game Object is already at the bottom of the display list.\r\rIf this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"crop","description":"Crop allows you to crop the texture being used to display this Game Object.\rSetting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.\r\rCropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method,\ror by modifying `cropRect` property directly and then calling `updateCrop`.\r\rThe rectangle object given to this method can be either a `Phaser.Rectangle` or any other object \rso long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.\r\rA reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, \rin which case the values are duplicated to a local object.","parameters":[{"name":"rect","type":"Phaser.Rectangle","description":"The Rectangle used during cropping. Pass null or no parameters to clear a previously set crop rectangle.","default":"","optional":"","nullable":""},{"name":"copy","type":"boolean","description":"If false `cropRect` will be stored as a reference to the given rect. If true it will copy the rect values into a local Phaser Rectangle object stored in cropRect.","default":"","optional":true,"nullable":""}]},{"name":"updateCrop","description":"If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property,\ror the rectangle it references, then you need to update the crop frame by calling this method.","parameters":[]},{"name":"destroy","description":"Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present\rand nulls its reference to `game`, freeing it up for garbage collection.\r\rIf this Game Object has the Events component it will also dispatch the `onDestroy` event.\r\rYou can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've\rmore than one Game Object sharing the same BaseTexture.","parameters":[{"name":"destroyChildren","type":"boolean","description":"Should every child of this object have its destroy method called as well?","default":true,"optional":true,"nullable":""},{"name":"destroyTexture","type":"boolean","description":"Destroy the BaseTexture this Game Object is using? Note that if another Game Object is sharing the same BaseTexture it will invalidate it.","default":"","optional":true,"nullable":""}]},{"name":"revive","description":"Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.\r\rA resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.\r\rIt will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.","parameters":[{"name":"health","type":"number","description":"The health to give the Game Object. Only set if the GameObject has the Health component.","default":100,"optional":true,"nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"kill","description":"Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.\r\rIt will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.\r\rNote that killing a Game Object is a way for you to quickly recycle it in an object pool,\rit doesn't destroy the object or free it up from memory.\r\rIf you don't need this Game Object any more you should call `destroy` instead.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"loadTexture","description":"Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.\r\rIf your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.\r\rYou should only use `loadTexture` if you want to replace the base texture entirely.\r\rCalling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.\r\rYou can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. \rDoing this then sets the key to be the `frame` argument (the frame is set to zero). \r\rThis allows you to create sprites using `load.image` during development, and then change them \rto use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' \rand swapping it to be the key of the atlas data.\r\rNote: You cannot use a RenderTexture as a texture for a TileSprite.","parameters":[{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":"","nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""},{"name":"stopAnimation","type":"boolean","description":"If an animation is already playing on this Sprite you can choose to stop it or let it carry on playing.","default":true,"optional":true,"nullable":""}]},{"name":"setFrame","description":"Sets the texture frame the Game Object uses for rendering.\r\rThis is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.","parameters":[{"name":"frame","type":"Phaser.Frame","description":"The Frame to be used by the texture.","default":"","optional":"","nullable":""}]},{"name":"resizeFrame","description":"Resizes the Frame dimensions that the Game Object uses for rendering.\r\rYou shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData\rit can be useful to adjust the dimensions directly in this way.","parameters":[{"name":"parent","type":"object","description":"The parent texture object that caused the resize, i.e. a Phaser.Video object.","default":"","optional":"","nullable":""},{"name":"width","type":"integer","description":"The new width of the texture.","default":"","optional":"","nullable":""},{"name":"height","type":"integer","description":"The new height of the texture.","default":"","optional":"","nullable":""}]},{"name":"resetFrame","description":"Resets the texture frame dimensions that the Game Object uses for rendering.","parameters":[]},{"name":"overlap","description":"Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object, \rwhich can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.\r\rThis check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.\r\rTherefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency.\rIt should be fine for low-volume testing where physics isn't required.","parameters":[{"name":"displayObject","type":["Phaser.Sprite","Phaser.Image","Phaser.TileSprite","Phaser.Button","PIXI.DisplayObject"],"description":"The display object to check against.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the bounds of this Game Object intersects at any point with the bounds of the given display object."}},{"name":"reset","description":"Resets the Game Object.\r\rThis moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, \r`visible` and `renderable` to true.\r\rIf this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.\r\rIf this Game Object has a Physics Body it will reset the Body.","parameters":[{"name":"x","type":"number","description":"The x coordinate (in world space) to position the Game Object at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate (in world space) to position the Game Object at.","default":"","optional":"","nullable":""},{"name":"health","type":"number","description":"The health to give the Game Object if it has the Health component.","default":1,"optional":true,"nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"checkTransform","description":"Adjust scaling limits, if set, to this Game Object.","parameters":[{"name":"wt","type":"PIXI.Matrix","description":"The updated worldTransform matrix.","default":"","optional":"","nullable":""}]},{"name":"setScaleMinMax","description":"Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.\r\rFor example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored \rand the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.\r\rBy setting these values you can carefully control how Game Objects deal with responsive scaling.\r\rIf only one parameter is given then that value will be used for both scaleMin and scaleMax:\r`setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1\r\rIf only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y:\r`setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2\r\rIf you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly, \ror pass `null` for the `maxX` and `maxY` parameters.\r\rCall `setScaleMinMax(null)` to clear all previously set values.","parameters":[{"name":"minX","type":["number","null"],"description":"The minimum horizontal scale value this Game Object can scale down to.","default":"","optional":"","nullable":""},{"name":"minY","type":["number","null"],"description":"The minimum vertical scale value this Game Object can scale down to.","default":"","optional":"","nullable":""},{"name":"maxX","type":["number","null"],"description":"The maximum horizontal scale value this Game Object can scale up to.","default":"","optional":"","nullable":""},{"name":"maxY","type":["number","null"],"description":"The maximum vertical scale value this Game Object can scale up to.","default":"","optional":"","nullable":""}]}],"members":[{"name":"type","access":"","virtual":false,"description":"The Phaser Object Type.","type":{"names":["number"]},"default":""},{"name":"physicsType","access":"","virtual":false,"description":"The const physics body type of this object.","type":{"names":["number"]},"default":""},{"name":"_onOverFrame","access":"private","virtual":false,"description":"The name or ID of the Over state frame.","type":"","default":""},{"name":"_onOutFrame","access":"private","virtual":false,"description":"The name or ID of the Out state frame.","type":"","default":""},{"name":"_onDownFrame","access":"private","virtual":false,"description":"The name or ID of the Down state frame.","type":"","default":""},{"name":"_onUpFrame","access":"private","virtual":false,"description":"The name or ID of the Up state frame.","type":"","default":""},{"name":"onOverSound","access":"","virtual":false,"description":"The Sound to be played when this Buttons Over state is activated.","type":{"names":["Phaser.Sound","Phaser.AudioSprite","null"]},"default":""},{"name":"onOutSound","access":"","virtual":false,"description":"The Sound to be played when this Buttons Out state is activated.","type":{"names":["Phaser.Sound","Phaser.AudioSprite","null"]},"default":""},{"name":"onDownSound","access":"","virtual":false,"description":"The Sound to be played when this Buttons Down state is activated.","type":{"names":["Phaser.Sound","Phaser.AudioSprite","null"]},"default":""},{"name":"onUpSound","access":"","virtual":false,"description":"The Sound to be played when this Buttons Up state is activated.","type":{"names":["Phaser.Sound","Phaser.AudioSprite","null"]},"default":""},{"name":"onOverSoundMarker","access":"","virtual":false,"description":"The Sound Marker used in conjunction with the onOverSound.","type":{"names":["string"]},"default":""},{"name":"onOutSoundMarker","access":"","virtual":false,"description":"The Sound Marker used in conjunction with the onOutSound.","type":{"names":["string"]},"default":""},{"name":"onDownSoundMarker","access":"","virtual":false,"description":"The Sound Marker used in conjunction with the onDownSound.","type":{"names":["string"]},"default":""},{"name":"onUpSoundMarker","access":"","virtual":false,"description":"The Sound Marker used in conjunction with the onUpSound.","type":{"names":["string"]},"default":""},{"name":"onInputOver","access":"","virtual":false,"description":"The Signal (or event) dispatched when this Button is in an Over state.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onInputOut","access":"","virtual":false,"description":"The Signal (or event) dispatched when this Button is in an Out state.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onInputDown","access":"","virtual":false,"description":"The Signal (or event) dispatched when this Button is in an Down state.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onInputUp","access":"","virtual":false,"description":"The Signal (or event) dispatched when this Button is in an Up state.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onOverMouseOnly","access":"","virtual":false,"description":"If true then onOver events (such as onOverSound) will only be triggered if the Pointer object causing them was the Mouse Pointer.\rThe frame will still be changed as applicable.","type":{"names":["boolean"]},"default":true},{"name":"justReleasedPreventsOver","access":"","virtual":false,"description":"Suppress the over event if a pointer was just released and it matches the given {@link Phaser.PointerModer pointer mode bitmask}.\r\rThis behavior was introduced in Phaser 2.3.1; this property is a soft-revert of the change.","type":{"names":["Phaser.PointerMode"]},"default":""},{"name":"freezeFrames","access":"","virtual":false,"description":"When true the the texture frame will not be automatically switched on up/down/over/out events.","type":{"names":["boolean"]},"default":""},{"name":"forceOut","access":"","virtual":false,"description":"When the Button is touched / clicked and then released you can force it to enter a state of \"out\" instead of \"up\".\r\rThis can also accept a {@link Phaser.PointerModer pointer mode bitmask} for more refined control.","type":{"names":["boolean","Phaser.PointerMode"]},"default":""},{"name":"anchor","access":"","virtual":false,"description":"The anchor sets the origin point of the texture.\nThe default is 0,0 this means the texture's origin is the top left\nSetting than anchor to 0.5,0.5 means the textures origin is centered\nSetting the anchor to 1,1 would mean the textures origin points will be the bottom right corner","type":{"names":["Point"]},"default":""},{"name":"texture","access":"","virtual":false,"description":"The texture that the sprite is using","type":{"names":["PIXI.Texture"]},"default":""},{"name":"_width","access":"private","virtual":false,"description":"The width of the sprite (this is initially set by the texture)","type":{"names":["Number"]},"default":""},{"name":"_height","access":"private","virtual":false,"description":"The height of the sprite (this is initially set by the texture)","type":{"names":["Number"]},"default":""},{"name":"tint","access":"","virtual":false,"description":"The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.","type":{"names":["Number"]},"default":"0xFFFFFF"},{"name":"cachedTint","access":"private","virtual":false,"description":"The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.","type":{"names":["Number"]},"default":"-1"},{"name":"tintedTexture","access":"","virtual":false,"description":"A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)","type":{"names":["Canvas"]},"default":"null"},{"name":"blendMode","access":"","virtual":false,"description":"The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.\n\nWarning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.","type":{"names":["Number"]},"default":"PIXI.blendModes.NORMAL;"},{"name":"shader","access":"","virtual":false,"description":"The shader that will be used to render this Sprite.\nSet to null to remove a current shader.","type":{"names":["PhaserFilter"]},"default":"null"},{"name":"exists","access":"","virtual":false,"description":"Controls if this Sprite is processed by the core Phaser game loops and Group loops.","type":{"names":["Boolean"]},"default":"true"},{"name":"width","access":"","virtual":false,"description":"The width of the sprite, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the sprite, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"children","access":"","virtual":false,"description":"[read-only] The array of children of this container.","type":{"names":["Array.<DisplayObject>"]},"default":""},{"name":"ignoreChildInput","access":"","virtual":false,"description":"If `ignoreChildInput`  is `false` it will allow this objects _children_ to be considered as valid for Input events.\n\nIf this property is `true` then the children will _not_ be considered as valid for Input events.\n\nNote that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.","type":{"names":["Boolean"]},"default":""},{"name":"position","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject, relative to its parent container.\n\nThe value of this property does not reflect any positioning happening further up the display list.\nTo obtain that value please see the `worldPosition` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"scale","access":"","virtual":false,"description":"The scale of this DisplayObject. A scale of 1:1 represents the DisplayObject\nat its default size. A value of 0.5 would scale this DisplayObject by half, and so on.\n\nThe value of this property does not reflect any scaling happening further up the display list.\nTo obtain that value please see the `worldScale` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"pivot","access":"","virtual":false,"description":"The pivot point of this DisplayObject that it rotates around. The values are expressed\nin pixel values.","type":{"names":["PIXIPoint"]},"default":""},{"name":"rotation","access":"","virtual":false,"description":"The rotation of this DisplayObject. The value is given, and expressed, in radians, and is based on\na right-handed orientation.\n\nThe value of this property does not reflect any rotation happening further up the display list.\nTo obtain that value please see the `worldRotation` property.","type":{"names":["Number"]},"default":""},{"name":"alpha","access":"","virtual":false,"description":"The alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nPlease note that an object with an alpha value of 0 is skipped during the render pass.\n\nThe value of this property does not reflect any alpha values set further up the display list.\nTo obtain that value please see the `worldAlpha` property.","type":{"names":["Number"]},"default":""},{"name":"visible","access":"","virtual":false,"description":"The visibility of this DisplayObject. A value of `false` makes the object invisible.\nA value of `true` makes it visible. Please note that an object with a visible value of\n`false` is skipped during the render pass. Equally a DisplayObject with visible false will\nnot render any of its children.\n\nThe value of this property does not reflect any visible values set further up the display list.\nTo obtain that value please see the `worldVisible` property.","type":{"names":["Boolean"]},"default":""},{"name":"hitArea","access":"","virtual":false,"description":"This is the defined area that will pick up mouse / touch events. It is null by default.\nSetting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)","type":{"names":["Rectangle","Circle","Ellipse","Polygon"]},"default":""},{"name":"renderable","access":"","virtual":false,"description":"Should this DisplayObject be rendered by the renderer? An object with a renderable value of\n`false` is skipped during the render pass.","type":{"names":["Boolean"]},"default":""},{"name":"parent","access":"","virtual":false,"description":"The parent DisplayObjectContainer that this DisplayObject is a child of.\nAll DisplayObjects must belong to a parent in order to be rendered.\nThe root parent is the Stage object. This property is set automatically when the\nDisplayObject is added to, or removed from, a DisplayObjectContainer.","type":{"names":["PIXIDisplayObjectContainer"]},"default":""},{"name":"worldAlpha","access":"","virtual":false,"description":"The multiplied alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nThis value is the calculated total, based on the alpha values of all parents of this DisplayObjects \nin the display list.\n\nTo obtain, and set, the local alpha value, see the `alpha` property.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"worldTransform","access":"","virtual":false,"description":"The current transform of this DisplayObject.\n\nThis property contains the calculated total, based on the transforms of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIMatrix"]},"default":""},{"name":"worldPosition","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject within the world.\n\nThis property contains the calculated total, based on the positions of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldScale","access":"","virtual":false,"description":"The global scale of this DisplayObject.\n\nThis property contains the calculated total, based on the scales of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldRotation","access":"","virtual":false,"description":"The rotation, in radians, of this DisplayObject.\n\nThis property contains the calculated total, based on the rotations of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"filterArea","access":"","virtual":false,"description":"The rectangular area used by filters when rendering a shader for this DisplayObject.","type":{"names":["Rectangle"]},"default":""},{"name":"_sr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_cr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_bounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_currentBounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_mask","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_cacheAsBitmap","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"_cacheIsDirty","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"x","access":"","virtual":false,"description":"The horizontal position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The vertical position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"worldVisible","access":"","virtual":false,"description":"Indicates if this DisplayObject is visible, based on it, and all of its parents, `visible` property values.","type":{"names":["Boolean"]},"default":""},{"name":"mask","access":"","virtual":false,"description":"Sets a mask for this DisplayObject. A mask is an instance of a Graphics object.\nWhen applied it limits the visible area of this DisplayObject to the shape of the mask.\nUnder a Canvas renderer it uses shape clipping. Under a WebGL renderer it uses a Stencil Buffer.\nTo remove a mask, set this property to `null`.","type":{"names":["PIXIGraphics"]},"default":""},{"name":"filters","access":"","virtual":false,"description":"Sets the filters for this DisplayObject. This is a WebGL only feature, and is ignored by the Canvas\nRenderer. A filter is a shader applied to this DisplayObject. You can modify the placement of the filter\nusing `DisplayObject.filterArea`.\n\nTo remove filters, set this property to `null`.\n\nNote: You cannot have a filter set, and a MULTIPLY Blend Mode active, at the same time. Setting a \nfilter will reset this DisplayObjects blend mode to NORMAL.","type":{"names":["Array"]},"default":""},{"name":"cacheAsBitmap","access":"","virtual":false,"description":"Sets if this DisplayObject should be cached as a bitmap.\n\nWhen invoked it will take a snapshot of the DisplayObject, as it is at that moment, and store it \nin a RenderTexture. This is then used whenever this DisplayObject is rendered. It can provide a\nperformance benefit for complex, but static, DisplayObjects. I.e. those with lots of children.\n\nCached Bitmaps do not track their parents. If you update a property of this DisplayObject, it will not\nre-generate the cached bitmap automatically. To do that you need to call `DisplayObject.updateCache`.\n\nTo remove a cached bitmap, set this property to `null`.","type":{"names":["Boolean"]},"default":""},{"name":"game","access":"","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"name","access":"","virtual":false,"description":"A user defined name given to this Game Object.\rThis value isn't ever used internally by Phaser, it is meant as a game level property.","type":{"names":["string"]},"default":""},{"name":"data","access":"","virtual":false,"description":"An empty Object that belongs to this Game Object.\rThis value isn't ever used internally by Phaser, but may be used by your own code, or\rby Phaser Plugins, to store data that needs to be associated with the Game Object,\rwithout polluting the Game Object directly.","type":{"names":["Object"]},"default":"{}"},{"name":"components","access":"protected","virtual":false,"description":"The components this Game Object has installed.","type":{"names":["object"]},"default":""},{"name":"z","access":"","virtual":false,"description":"The z depth of this Game Object within its parent Group.\rNo two objects in a Group can have the same z value.\rThis value is adjusted automatically whenever the Group hierarchy changes.\rIf you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.","type":{"names":["number"]},"default":""},{"name":"events","access":"","virtual":false,"description":"All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this\rGame Object, or any of its components.","type":{"names":["Phaser.Events"]},"default":""},{"name":"animations","access":"","virtual":false,"description":"If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance.\rThrough it you can create, play, pause and stop animations.","type":{"names":["Phaser.AnimationManager"]},"default":""},{"name":"key","access":"","virtual":false,"description":"The key of the image or texture used by this Game Object during rendering.\rIf it is a string it's the string used to retrieve the texture from the Phaser Image Cache.\rIt can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.\rIf a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache.\rIf a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.","type":{"names":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"]},"default":""},{"name":"world","access":"","virtual":false,"description":"The world coordinates of this Game Object in pixels.\rDepending on where in the display list this Game Object is placed this value can differ from `position`, \rwhich contains the x/y coordinates relative to the Game Objects parent.","type":{"names":["Phaser.Point"]},"default":""},{"name":"debug","access":"","virtual":false,"description":"A debug flag designed for use with `Game.enableStep`.","type":{"names":["boolean"]},"default":""},{"name":"previousPosition","access":"","virtual":false,"description":"The position the Game Object was located in the previous frame.","type":{"names":["Phaser.Point"]},"default":""},{"name":"previousRotation","access":"","virtual":false,"description":"The rotation the Game Object was in set to in the previous frame. Value is in radians.","type":{"names":["number"]},"default":""},{"name":"renderOrderID","access":"","virtual":false,"description":"The render order ID is used internally by the renderer and Input Manager and should not be modified.\rThis property is mostly used internally by the renderers, but is exposed for the use of plugins.","type":{"names":["number"]},"default":""},{"name":"fresh","access":"","virtual":false,"description":"A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update.\rThis property is mostly used internally by the physics systems, but is exposed for the use of plugins.","type":{"names":["boolean"]},"default":""},{"name":"pendingDestroy","access":"","virtual":false,"description":"A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update.\rYou can set it directly to allow you to flag an object to be destroyed on its next update.\r\rThis is extremely useful if you wish to destroy an object from within one of its own callbacks \rsuch as with Buttons or other Input events.","type":{"names":["boolean"]},"default":""},{"name":"_exists","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["boolean"]},"default":""},{"name":"angle","access":"","virtual":false,"description":"The angle property is the rotation of the Game Object in *degrees* from its original orientation.\r\rValues from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.\r\rValues outside this range are added to or subtracted from 360 to obtain a value within the range. \rFor example, the statement player.angle = 450 is the same as player.angle = 90.\r\rIf you wish to work in radians instead of degrees you can use the property `rotation` instead. \rWorking in radians is slightly faster as it doesn't have to perform any calculations.","type":{"names":["number"]},"default":""},{"name":"autoCull","access":"","virtual":false,"description":"A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame.\rIf it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`.\rThis keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.\r\rThis is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,\ror you have tested performance and find it acceptable.","type":{"names":["boolean"]},"default":""},{"name":"inCamera","access":"","virtual":false,"description":"Checks if the Game Objects bounds intersect with the Game Camera bounds.\rReturns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.","type":{"names":["boolean"]},"default":""},{"name":"offsetX","access":"","virtual":false,"description":"The amount the Game Object is visually offset from its x coordinate.\rThis is the same as `width * anchor.x`.\rIt will only be > 0 if anchor.x is not equal to zero.","type":{"names":["number"]},"default":""},{"name":"offsetY","access":"","virtual":false,"description":"The amount the Game Object is visually offset from its y coordinate.\rThis is the same as `height * anchor.y`.\rIt will only be > 0 if anchor.y is not equal to zero.","type":{"names":["number"]},"default":""},{"name":"centerX","access":"","virtual":false,"description":"The center x coordinate of the Game Object.\rThis is the same as `(x - offsetX) + (width / 2)`.","type":{"names":["number"]},"default":""},{"name":"centerY","access":"","virtual":false,"description":"The center y coordinate of the Game Object.\rThis is the same as `(y - offsetY) + (height / 2)`.","type":{"names":["number"]},"default":""},{"name":"left","access":"","virtual":false,"description":"The left coordinate of the Game Object.\rThis is the same as `x - offsetX`.","type":{"names":["number"]},"default":""},{"name":"right","access":"","virtual":false,"description":"The right coordinate of the Game Object.\rThis is the same as `x + width - offsetX`.","type":{"names":["number"]},"default":""},{"name":"top","access":"","virtual":false,"description":"The y coordinate of the Game Object.\rThis is the same as `y - offsetY`.","type":{"names":["number"]},"default":""},{"name":"bottom","access":"","virtual":false,"description":"The sum of the y and height properties.\rThis is the same as `y + height - offsetY`.","type":{"names":["number"]},"default":""},{"name":"cropRect","access":"","virtual":false,"description":"The Rectangle used to crop the texture this Game Object uses.\rSet this property via `crop`. \rIf you modify this property directly you must call `updateCrop` in order to have the change take effect.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"_crop","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"destroyPhase","access":"","virtual":false,"description":"As a Game Object runs through its destroy method this flag is set to true, \rand can be checked in any sub-systems or plugins it is being destroyed from.","type":{"names":["boolean"]},"default":""},{"name":"_fixedToCamera","access":"private","virtual":false,"description":"","type":{"names":["boolean"]},"default":""},{"name":"fixedToCamera","access":"","virtual":false,"description":"A Game Object that is \"fixed\" to the camera is rendered at a given x/y offsets from the top left of the camera. The offsets \rare stored in the `cameraOffset` property, which is initialized with the current object coordinates. \r\rThe values are adjusted at the rendering stage, overriding the Game Objects actual world position.\r\rThe end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world\rthe camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times \rregardless where in the world the camera is.\r\rNote that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.\r\rBe careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.","type":{"names":["boolean"]},"default":""},{"name":"cameraOffset","access":"","virtual":false,"description":"The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.\r\rThe values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.","type":{"names":["Phaser.Point"]},"default":""},{"name":"input","access":"","virtual":false,"description":"The Input Handler for this Game Object.\r\rBy default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.\r\rAfter you have done this, this property will be a reference to the Phaser InputHandler.","type":{"names":["Phaser.InputHandler","null"]},"default":""},{"name":"inputEnabled","access":"","virtual":false,"description":"By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created\rfor this Game Object and it will then start to process click / touch events and more.\r\rYou can then access the Input Handler via `this.input`.\r\rNote that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.\r\rIf you set this property to false it will stop the Input Handler from processing any more input events.\r\rIf you want to _temporarily_ disable input for a Game Object, then it's better to set\r`input.enabled = false`, as it won't reset any of the Input Handlers internal properties.\rYou can then toggle this back on as needed.","type":{"names":["boolean"]},"default":""},{"name":"alive","access":"","virtual":false,"description":"A useful flag to control if the Game Object is alive or dead.\r\rThis is set automatically by the Health components `damage` method should the object run out of health.\rOr you can toggle it via your game code.\r\rThis property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates.\rHowever you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.","type":{"names":["boolean"]},"default":true},{"name":"lifespan","access":"","virtual":false,"description":"The lifespan allows you to give a Game Object a lifespan in milliseconds.\r\rOnce the Game Object is 'born' you can set this to a positive value.\r\rIt is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame.\rWhen it reaches zero it will call the `kill` method.\r\rVery handy for particles, bullets, collectibles, or any other short-lived entity.","type":{"names":["number"]},"default":""},{"name":"customRender","access":"private","virtual":false,"description":"Does this texture require a custom render call? (as set by BitmapData, Video, etc)","type":{"names":["boolean"]},"default":""},{"name":"_frame","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"frame","access":"","virtual":false,"description":"Gets or sets the current frame index of the texture being used to render this Game Object.\r\rTo change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use,\rfor example: `player.frame = 4`.\r\rIf the frame index given doesn't exist it will revert to the first frame found in the texture.\r\rIf you are using a texture atlas then you should use the `frameName` property instead.\r\rIf you wish to fully replace the texture being used see `loadTexture`.","type":{"names":["integer"]},"default":""},{"name":"frameName","access":"","virtual":false,"description":"Gets or sets the current frame name of the texture being used to render this Game Object.\r\rTo change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use, \rfor example: `player.frameName = \"idle\"`.\r\rIf the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.\r\rIf you are using a sprite sheet then you should use the `frame` property instead.\r\rIf you wish to fully replace the texture being used see `loadTexture`.","type":{"names":["string"]},"default":""},{"name":"transformCallback","access":"","virtual":false,"description":"The callback that will apply any scale limiting to the worldTransform.","type":{"names":["function"]},"default":""},{"name":"transformCallbackContext","access":"","virtual":false,"description":"The context under which `transformCallback` is called.","type":{"names":["object"]},"default":""},{"name":"scaleMin","access":"","virtual":false,"description":"The minimum scale this Game Object will scale down to.\r\rIt allows you to prevent a parent from scaling this Game Object lower than the given value.\r\rSet it to `null` to remove the limit.","type":{"names":["Phaser.Point"]},"default":""},{"name":"scaleMax","access":"","virtual":false,"description":"The maximum scale this Game Object will scale up to. \r\rIt allows you to prevent a parent from scaling this Game Object higher than the given value.\r\rSet it to `null` to remove the limit.","type":{"names":["Phaser.Point"]},"default":""},{"name":"smoothed","access":"","virtual":false,"description":"Enable or disable texture smoothing for this Game Object.\r\rIt only takes effect if the Game Object is using an image based texture.\r\rSmoothing is enabled by default.","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.Component.Angle","description":"The Angle Component provides access to an `angle` property; the rotation of a Game Object in degrees.","constructor":{"name":"Angle","description":"The Angle Component provides access to an `angle` property; the rotation of a Game Object in degrees.","parameters":[]},"functions":[],"members":[{"name":"angle","access":"","virtual":false,"description":"The angle property is the rotation of the Game Object in *degrees* from its original orientation.\r\rValues from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.\r\rValues outside this range are added to or subtracted from 360 to obtain a value within the range. \rFor example, the statement player.angle = 450 is the same as player.angle = 90.\r\rIf you wish to work in radians instead of degrees you can use the property `rotation` instead. \rWorking in radians is slightly faster as it doesn't have to perform any calculations.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.Component.Animation","description":"The Animation Component provides a `play` method, which is a proxy to the `AnimationManager.play` method.","constructor":{"name":"Animation","description":"The Animation Component provides a `play` method, which is a proxy to the `AnimationManager.play` method.","parameters":[]},"functions":[{"name":"play","description":"Plays an Animation.\r\rThe animation should have previously been created via `animations.add`.\r\rIf the animation is already playing calling this again won't do anything.\rIf you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.","parameters":[{"name":"name","type":"string","description":"The name of the animation to be played, e.g. \"fire\", \"walk\", \"jump\". Must have been previously created via 'AnimationManager.add'.","default":"","optional":"","nullable":""},{"name":"frameRate","type":"number","description":"The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used.","default":"","optional":true,"nullable":""},{"name":"loop","type":"boolean","description":"Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.","default":"","optional":true,"nullable":""},{"name":"killOnComplete","type":"boolean","description":"If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Animation","description":"A reference to playing Animation."}}],"members":[]},{"name":"Phaser.Component.AutoCull","description":"The AutoCull Component is responsible for providing methods that check if a Game Object is within the bounds of the World Camera.\rIt is used by the InWorld component.","constructor":{"name":"AutoCull","description":"The AutoCull Component is responsible for providing methods that check if a Game Object is within the bounds of the World Camera.\rIt is used by the InWorld component.","parameters":[]},"functions":[],"members":[{"name":"autoCull","access":"","virtual":false,"description":"A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame.\rIf it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`.\rThis keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.\r\rThis is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,\ror you have tested performance and find it acceptable.","type":{"names":["boolean"]},"default":""},{"name":"inCamera","access":"","virtual":false,"description":"Checks if the Game Objects bounds intersect with the Game Camera bounds.\rReturns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.Component.Bounds","description":"The Bounds component contains properties related to the bounds of the Game Object.","constructor":{"name":"Bounds","description":"The Bounds component contains properties related to the bounds of the Game Object.","parameters":[]},"functions":[{"name":"alignIn","description":"Aligns this Game Object within another Game Object, or Rectangle, known as the\r'container', to one of 9 possible positions.\r\rThe container must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Game Objects within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Sprite to another Game Object does **not** make it a child of\rthe container. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, \r`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, \r`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.\r\rThe Game Objects are placed in such a way that their _bounds_ align with the\rcontainer, taking into consideration rotation, scale and the anchor property.\rThis allows you to neatly align Game Objects, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Game Object. For example:\r\r`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the containers bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"container","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Object","description":"This Game Object."}},{"name":"alignTo","description":"Aligns this Game Object to the side of another Game Object, or Rectangle, known as the\r'parent', in one of 11 possible positions.\r\rThe parent must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Game Objects within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Sprite to another Game Object does **not** make it a child of\rthe parent. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, \r`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, \r`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` \rand `Phaser.BOTTOM_RIGHT`.\r\rThe Game Objects are placed in such a way that their _bounds_ align with the\rparent, taking into consideration rotation, scale and the anchor property.\rThis allows you to neatly align Game Objects, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Game Object. For example:\r\r`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the parents bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"parent","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Object","description":"This Game Object."}}],"members":[{"name":"offsetX","access":"","virtual":false,"description":"The amount the Game Object is visually offset from its x coordinate.\rThis is the same as `width * anchor.x`.\rIt will only be > 0 if anchor.x is not equal to zero.","type":{"names":["number"]},"default":""},{"name":"offsetY","access":"","virtual":false,"description":"The amount the Game Object is visually offset from its y coordinate.\rThis is the same as `height * anchor.y`.\rIt will only be > 0 if anchor.y is not equal to zero.","type":{"names":["number"]},"default":""},{"name":"centerX","access":"","virtual":false,"description":"The center x coordinate of the Game Object.\rThis is the same as `(x - offsetX) + (width / 2)`.","type":{"names":["number"]},"default":""},{"name":"centerY","access":"","virtual":false,"description":"The center y coordinate of the Game Object.\rThis is the same as `(y - offsetY) + (height / 2)`.","type":{"names":["number"]},"default":""},{"name":"left","access":"","virtual":false,"description":"The left coordinate of the Game Object.\rThis is the same as `x - offsetX`.","type":{"names":["number"]},"default":""},{"name":"right","access":"","virtual":false,"description":"The right coordinate of the Game Object.\rThis is the same as `x + width - offsetX`.","type":{"names":["number"]},"default":""},{"name":"top","access":"","virtual":false,"description":"The y coordinate of the Game Object.\rThis is the same as `y - offsetY`.","type":{"names":["number"]},"default":""},{"name":"bottom","access":"","virtual":false,"description":"The sum of the y and height properties.\rThis is the same as `y + height - offsetY`.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.Component.BringToTop","description":"The BringToTop Component features quick access to Group sorting related methods.","constructor":{"name":"BringToTop","description":"The BringToTop Component features quick access to Group sorting related methods.","parameters":[]},"functions":[{"name":"bringToTop","description":"Brings this Game Object to the top of its parents display list.\rVisually this means it will render over the top of any old child in the same Group.\r\rIf this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"sendToBack","description":"Sends this Game Object to the bottom of its parents display list.\rVisually this means it will render below all other children in the same Group.\r\rIf this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"moveUp","description":"Moves this Game Object up one place in its parents display list.\rThis call has no effect if the Game Object is already at the top of the display list.\r\rIf this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"moveDown","description":"Moves this Game Object down one place in its parents display list.\rThis call has no effect if the Game Object is already at the bottom of the display list.\r\rIf this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}}],"members":[]},{"name":"Phaser.Component.Core","description":"Core Component Features.","constructor":{"name":"Core","description":"Core Component Features.","parameters":[]},"functions":[{"name":"install","description":"Installs / registers mixin components.\r\rThe `this` context should be that of the applicable object instance or prototype.","parameters":[]},{"name":"init","description":"Initializes the mixin components.\r\rThe `this` context should be an instance of the component mixin target.","parameters":[]},{"name":"update","description":"Override this method in your own custom objects to handle any update requirements.\rIt is called immediately after `preUpdate` and before `postUpdate`.\rRemember if this Game Object has any children you should call update on those too.","parameters":[]},{"name":"postUpdate","description":"Internal method called by the World postUpdate cycle.","parameters":[]}],"members":[{"name":"game","access":"","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"name","access":"","virtual":false,"description":"A user defined name given to this Game Object.\rThis value isn't ever used internally by Phaser, it is meant as a game level property.","type":{"names":["string"]},"default":""},{"name":"data","access":"","virtual":false,"description":"An empty Object that belongs to this Game Object.\rThis value isn't ever used internally by Phaser, but may be used by your own code, or\rby Phaser Plugins, to store data that needs to be associated with the Game Object,\rwithout polluting the Game Object directly.","type":{"names":["Object"]},"default":"{}"},{"name":"components","access":"protected","virtual":false,"description":"The components this Game Object has installed.","type":{"names":["object"]},"default":""},{"name":"z","access":"","virtual":false,"description":"The z depth of this Game Object within its parent Group.\rNo two objects in a Group can have the same z value.\rThis value is adjusted automatically whenever the Group hierarchy changes.\rIf you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.","type":{"names":["number"]},"default":""},{"name":"events","access":"","virtual":false,"description":"All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this\rGame Object, or any of its components.","type":{"names":["Phaser.Events"]},"default":""},{"name":"animations","access":"","virtual":false,"description":"If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance.\rThrough it you can create, play, pause and stop animations.","type":{"names":["Phaser.AnimationManager"]},"default":""},{"name":"key","access":"","virtual":false,"description":"The key of the image or texture used by this Game Object during rendering.\rIf it is a string it's the string used to retrieve the texture from the Phaser Image Cache.\rIt can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.\rIf a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache.\rIf a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.","type":{"names":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"]},"default":""},{"name":"world","access":"","virtual":false,"description":"The world coordinates of this Game Object in pixels.\rDepending on where in the display list this Game Object is placed this value can differ from `position`, \rwhich contains the x/y coordinates relative to the Game Objects parent.","type":{"names":["Phaser.Point"]},"default":""},{"name":"debug","access":"","virtual":false,"description":"A debug flag designed for use with `Game.enableStep`.","type":{"names":["boolean"]},"default":""},{"name":"previousPosition","access":"","virtual":false,"description":"The position the Game Object was located in the previous frame.","type":{"names":["Phaser.Point"]},"default":""},{"name":"previousRotation","access":"","virtual":false,"description":"The rotation the Game Object was in set to in the previous frame. Value is in radians.","type":{"names":["number"]},"default":""},{"name":"renderOrderID","access":"","virtual":false,"description":"The render order ID is used internally by the renderer and Input Manager and should not be modified.\rThis property is mostly used internally by the renderers, but is exposed for the use of plugins.","type":{"names":["number"]},"default":""},{"name":"fresh","access":"","virtual":false,"description":"A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update.\rThis property is mostly used internally by the physics systems, but is exposed for the use of plugins.","type":{"names":["boolean"]},"default":""},{"name":"pendingDestroy","access":"","virtual":false,"description":"A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update.\rYou can set it directly to allow you to flag an object to be destroyed on its next update.\r\rThis is extremely useful if you wish to destroy an object from within one of its own callbacks \rsuch as with Buttons or other Input events.","type":{"names":["boolean"]},"default":""},{"name":"_bounds","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"_exists","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["boolean"]},"default":""},{"name":"exists","access":"","virtual":false,"description":"Controls if this Game Object is processed by the core game loop.\rIf this Game Object has a physics body it also controls if its physics body is updated or not.\rWhen `exists` is set to `false` it will remove its physics body from the physics world if it has one.\rIt also toggles the `visible` property to false as well.\r\rSetting `exists` to true will add its physics body back in to the physics world, if it has one.\rIt will also set the `visible` property to `true`.","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.Component.Crop","description":"The Crop component provides the ability to crop a texture based Game Object to a defined rectangle, \rwhich can be updated in real-time.","constructor":{"name":"Crop","description":"The Crop component provides the ability to crop a texture based Game Object to a defined rectangle, \rwhich can be updated in real-time.","parameters":[]},"functions":[{"name":"crop","description":"Crop allows you to crop the texture being used to display this Game Object.\rSetting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.\r\rCropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method,\ror by modifying `cropRect` property directly and then calling `updateCrop`.\r\rThe rectangle object given to this method can be either a `Phaser.Rectangle` or any other object \rso long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.\r\rA reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, \rin which case the values are duplicated to a local object.","parameters":[{"name":"rect","type":"Phaser.Rectangle","description":"The Rectangle used during cropping. Pass null or no parameters to clear a previously set crop rectangle.","default":"","optional":"","nullable":""},{"name":"copy","type":"boolean","description":"If false `cropRect` will be stored as a reference to the given rect. If true it will copy the rect values into a local Phaser Rectangle object stored in cropRect.","default":"","optional":true,"nullable":""}]},{"name":"updateCrop","description":"If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property,\ror the rectangle it references, then you need to update the crop frame by calling this method.","parameters":[]}],"members":[{"name":"cropRect","access":"","virtual":false,"description":"The Rectangle used to crop the texture this Game Object uses.\rSet this property via `crop`. \rIf you modify this property directly you must call `updateCrop` in order to have the change take effect.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"_crop","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["Phaser.Rectangle"]},"default":""}]},{"name":"Phaser.Component.Delta","description":"The Delta component provides access to delta values between the Game Objects current and previous position.","constructor":{"name":"Delta","description":"The Delta component provides access to delta values between the Game Objects current and previous position.","parameters":[]},"functions":[],"members":[{"name":"deltaX","access":"","virtual":false,"description":"Returns the delta x value. The difference between world.x now and in the previous frame.\r\rThe value will be positive if the Game Object has moved to the right or negative if to the left.","type":{"names":["number"]},"default":""},{"name":"deltaY","access":"","virtual":false,"description":"Returns the delta y value. The difference between world.y now and in the previous frame.\r\rThe value will be positive if the Game Object has moved down or negative if up.","type":{"names":["number"]},"default":""},{"name":"deltaZ","access":"","virtual":false,"description":"Returns the delta z value. The difference between rotation now and in the previous frame. The delta value.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.Component.Destroy","description":"The Destroy component is responsible for destroying a Game Object.","constructor":{"name":"Destroy","description":"The Destroy component is responsible for destroying a Game Object.","parameters":[]},"functions":[{"name":"destroy","description":"Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present\rand nulls its reference to `game`, freeing it up for garbage collection.\r\rIf this Game Object has the Events component it will also dispatch the `onDestroy` event.\r\rYou can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've\rmore than one Game Object sharing the same BaseTexture.","parameters":[{"name":"destroyChildren","type":"boolean","description":"Should every child of this object have its destroy method called as well?","default":true,"optional":true,"nullable":""},{"name":"destroyTexture","type":"boolean","description":"Destroy the BaseTexture this Game Object is using? Note that if another Game Object is sharing the same BaseTexture it will invalidate it.","default":"","optional":true,"nullable":""}]}],"members":[{"name":"destroyPhase","access":"","virtual":false,"description":"As a Game Object runs through its destroy method this flag is set to true, \rand can be checked in any sub-systems or plugins it is being destroyed from.","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.Events","description":"The Events component is a collection of events fired by the parent Game Object.\r\rPhaser uses what are known as 'Signals' for all event handling. All of the events in\rthis class are signals you can subscribe to, much in the same way you'd \"listen\" for\ran event.\r\rFor example to tell when a Sprite has been added to a new group, you can bind a function\rto the `onAddedToGroup` signal:\r\r`sprite.events.onAddedToGroup.add(yourFunction, this);`\r\rWhere `yourFunction` is the function you want called when this event occurs.\r\rFor more details about how signals work please see the Phaser.Signal class.\r\rThe Input-related events will only be dispatched if the Sprite has had `inputEnabled` set to `true`\rand the Animation-related events only apply to game objects with animations like {@link Phaser.Sprite}.","constructor":{"name":"Events","description":"The Events component is a collection of events fired by the parent Game Object.\r\rPhaser uses what are known as 'Signals' for all event handling. All of the events in\rthis class are signals you can subscribe to, much in the same way you'd \"listen\" for\ran event.\r\rFor example to tell when a Sprite has been added to a new group, you can bind a function\rto the `onAddedToGroup` signal:\r\r`sprite.events.onAddedToGroup.add(yourFunction, this);`\r\rWhere `yourFunction` is the function you want called when this event occurs.\r\rFor more details about how signals work please see the Phaser.Signal class.\r\rThe Input-related events will only be dispatched if the Sprite has had `inputEnabled` set to `true`\rand the Animation-related events only apply to game objects with animations like {@link Phaser.Sprite}.","parameters":[{"name":"sprite","type":"Phaser.Sprite","description":"A reference to the game object / Sprite that owns this Events object.","default":"","optional":"","nullable":""}]},"functions":[{"name":"destroy","description":"Removes all events.","parameters":[]}],"members":[{"name":"parent","access":"","virtual":false,"description":"The Sprite that owns these events.","type":{"names":["Phaser.Sprite"]},"default":""},{"name":"onAddedToGroup","access":"","virtual":false,"description":"This signal is dispatched when this Game Object is added to a new Group.\rIt is sent two arguments:\r{any} The Game Object that was added to the Group.\r{Phaser.Group} The Group it was added to.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onRemovedFromGroup","access":"","virtual":false,"description":"This signal is dispatched when the Game Object is removed from a Group.\rIt is sent two arguments:\r{any} The Game Object that was removed from the Group.\r{Phaser.Group} The Group it was removed from.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onRemovedFromWorld","access":"","virtual":false,"description":"This Signal is never used internally by Phaser and is now deprecated.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onDestroy","access":"","virtual":false,"description":"This signal is dispatched when the Game Object is destroyed.\rThis happens when `Sprite.destroy()` is called, or `Group.destroy()` with `destroyChildren` set to true.\rIt is sent one argument:\r{any} The Game Object that was destroyed.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onKilled","access":"","virtual":false,"description":"This signal is dispatched when the Game Object is killed.\rThis happens when `Sprite.kill()` is called.\rPlease understand the difference between `kill` and `destroy` by looking at their respective methods.\rIt is sent one argument:\r{any} The Game Object that was killed.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onRevived","access":"","virtual":false,"description":"This signal is dispatched when the Game Object is revived from a previously killed state.\rThis happens when `Sprite.revive()` is called.\rIt is sent one argument:\r{any} The Game Object that was revived.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onOutOfBounds","access":"","virtual":false,"description":"This signal is dispatched when the Game Object leaves the Phaser.World bounds.\rThis signal is only if `Sprite.checkWorldBounds` is set to `true`.\rIt is sent one argument:\r{any} The Game Object that left the World bounds.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onEnterBounds","access":"","virtual":false,"description":"This signal is dispatched when the Game Object returns within the Phaser.World bounds, having previously been outside of them.\rThis signal is only if `Sprite.checkWorldBounds` is set to `true`.\rIt is sent one argument:\r{any} The Game Object that entered the World bounds.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onInputOver","access":"","virtual":false,"description":"This signal is dispatched if the Game Object has `inputEnabled` set to `true`, \rand receives an over event from a Phaser.Pointer.\rIt is sent two arguments:\r{any} The Game Object that received the event.\r{Phaser.Pointer} The Phaser.Pointer object that caused the event.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onInputOut","access":"","virtual":false,"description":"This signal is dispatched if the Game Object has `inputEnabled` set to `true`, \rand receives an out event from a Phaser.Pointer, which was previously over it.\rIt is sent two arguments:\r{any} The Game Object that received the event.\r{Phaser.Pointer} The Phaser.Pointer object that caused the event.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onInputDown","access":"","virtual":false,"description":"This signal is dispatched if the Game Object has `inputEnabled` set to `true`, \rand receives a down event from a Phaser.Pointer. This effectively means the Pointer has been\rpressed down (but not yet released) on the Game Object.\rIt is sent two arguments:\r{any} The Game Object that received the event.\r{Phaser.Pointer} The Phaser.Pointer object that caused the event.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onInputUp","access":"","virtual":false,"description":"This signal is dispatched if the Game Object has `inputEnabled` set to `true`, \rand receives an up event from a Phaser.Pointer. This effectively means the Pointer had been\rpressed down, and was then released on the Game Object.\rIt is sent three arguments:\r{any} The Game Object that received the event.\r{Phaser.Pointer} The Phaser.Pointer object that caused the event.\r{boolean} isOver - Is the Pointer still over the Game Object?","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onDragStart","access":"","virtual":false,"description":"This signal is dispatched if the Game Object has been `inputEnabled` and `enableDrag` has been set.\rIt is sent when a Phaser.Pointer starts to drag the Game Object, taking into consideration the various\rdrag limitations that may be set.\rIt is sent four arguments:\r{any} The Game Object that received the event.\r{Phaser.Pointer} The Phaser.Pointer object that caused the event.\r{number} The x coordinate that the drag started from.\r{number} The y coordinate that the drag started from.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onDragUpdate","access":"","virtual":false,"description":"This signal is dispatched if the Game Object has been `inputEnabled` and `enableDrag` has been set.\rIt is sent when a Phaser.Pointer is actively dragging the Game Object.\rBe warned: This is a high volume Signal. Be careful what you bind to it.\rIt is sent six arguments:\r{any} The Game Object that received the event.\r{Phaser.Pointer} The Phaser.Pointer object that caused the event.\r{number} The new x coordinate of the Game Object.\r{number} The new y coordinate of the Game Object.\r{Phaser.Point} A Point object that contains the point the Game Object was snapped to, if `snapOnDrag` has been enabled.\r{boolean} The `fromStart` boolean, indicates if this is the first update immediately after the drag has started.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onDragStop","access":"","virtual":false,"description":"This signal is dispatched if the Game Object has been `inputEnabled` and `enableDrag` has been set.\rIt is sent when a Phaser.Pointer stops dragging the Game Object.\rIt is sent two arguments:\r{any} The Game Object that received the event.\r{Phaser.Pointer} The Phaser.Pointer object that caused the event.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onAnimationStart","access":"","virtual":false,"description":"This signal is dispatched if the Game Object has the AnimationManager component, \rand an Animation has been played.\rYou can also listen to `Animation.onStart` rather than via the Game Objects events.\rIt is sent two arguments:\r{any} The Game Object that received the event.\r{Phaser.Animation} The Phaser.Animation that was started.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onAnimationComplete","access":"","virtual":false,"description":"This signal is dispatched if the Game Object has the AnimationManager component, \rand an Animation has been stopped (via `animation.stop()` and the `dispatchComplete` argument has been set.\rYou can also listen to `Animation.onComplete` rather than via the Game Objects events.\rIt is sent two arguments:\r{any} The Game Object that received the event.\r{Phaser.Animation} The Phaser.Animation that was stopped.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onAnimationLoop","access":"","virtual":false,"description":"This signal is dispatched if the Game Object has the AnimationManager component, \rand an Animation has looped playback.\rYou can also listen to `Animation.onLoop` rather than via the Game Objects events.\rIt is sent two arguments:\r{any} The Game Object that received the event.\r{Phaser.Animation} The Phaser.Animation that looped.","type":{"names":["Phaser.Signal"]},"default":""}]},{"name":"Phaser.Component.FixedToCamera","description":"The FixedToCamera component enables a Game Object to be rendered relative to the game camera coordinates, regardless \rof where in the world the camera is. This is used for things like sticking game UI to the camera that scrolls as it moves around the world.","constructor":{"name":"FixedToCamera","description":"The FixedToCamera component enables a Game Object to be rendered relative to the game camera coordinates, regardless \rof where in the world the camera is. This is used for things like sticking game UI to the camera that scrolls as it moves around the world.","parameters":[]},"functions":[{"name":"postUpdate","description":"The FixedToCamera component postUpdate handler.\rCalled automatically by the Game Object.","parameters":[]}],"members":[{"name":"_fixedToCamera","access":"private","virtual":false,"description":"","type":{"names":["boolean"]},"default":""},{"name":"fixedToCamera","access":"","virtual":false,"description":"A Game Object that is \"fixed\" to the camera is rendered at a given x/y offsets from the top left of the camera. The offsets \rare stored in the `cameraOffset` property, which is initialized with the current object coordinates. \r\rThe values are adjusted at the rendering stage, overriding the Game Objects actual world position.\r\rThe end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world\rthe camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times \rregardless where in the world the camera is.\r\rNote that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.\r\rBe careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.","type":{"names":["boolean"]},"default":""},{"name":"cameraOffset","access":"","virtual":false,"description":"The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.\r\rThe values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.","type":{"names":["Phaser.Point"]},"default":""}]},{"name":"Phaser.Component.Health","description":"The Health component provides the ability for Game Objects to have a `health` property \rthat can be damaged and reset through game code.\rRequires the LifeSpan component.","constructor":{"name":"Health","description":"The Health component provides the ability for Game Objects to have a `health` property \rthat can be damaged and reset through game code.\rRequires the LifeSpan component.","parameters":[]},"functions":[],"members":[{"name":"health","access":"","virtual":false,"description":"The Game Objects health value. This is a handy property for setting and manipulating health on a Game Object.\r\rIt can be used in combination with the `damage` method or modified directly.","type":{"names":["number"]},"default":1},{"name":"maxHealth","access":"","virtual":false,"description":"The Game Objects maximum health value. This works in combination with the `heal` method to ensure\rthe health value never exceeds the maximum.","type":{"names":["number"]},"default":100},{"name":"damage","access":"","virtual":false,"description":"Damages the Game Object. This removes the given amount of health from the `health` property.\r\rIf health is taken below or is equal to zero then the `kill` method is called.","type":"","default":""},{"name":"setHealth","access":"","virtual":false,"description":"Sets the health property of the Game Object to the given amount.\rWill never exceed the `maxHealth` value.","type":"","default":""},{"name":"heal","access":"","virtual":false,"description":"Heal the Game Object. This adds the given amount of health to the `health` property.","type":"","default":""}]},{"name":"Phaser.Component.InCamera","description":"The InCamera component checks if the Game Object intersects with the Game Camera.","constructor":{"name":"InCamera","description":"The InCamera component checks if the Game Object intersects with the Game Camera.","parameters":[]},"functions":[],"members":[{"name":"inCamera","access":"","virtual":false,"description":"Checks if this Game Objects bounds intersects with the Game Cameras bounds.\r\rIt will be `true` if they intersect, or `false` if the Game Object is fully outside of the Cameras bounds.\r\rAn object outside the bounds can be considered for camera culling if it has the AutoCull component.","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.Component.InputEnabled","description":"The InputEnabled component allows a Game Object to have its own InputHandler and process input related events.","constructor":{"name":"InputEnabled","description":"The InputEnabled component allows a Game Object to have its own InputHandler and process input related events.","parameters":[]},"functions":[],"members":[{"name":"input","access":"","virtual":false,"description":"The Input Handler for this Game Object.\r\rBy default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.\r\rAfter you have done this, this property will be a reference to the Phaser InputHandler.","type":{"names":["Phaser.InputHandler","null"]},"default":""},{"name":"inputEnabled","access":"","virtual":false,"description":"By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created\rfor this Game Object and it will then start to process click / touch events and more.\r\rYou can then access the Input Handler via `this.input`.\r\rNote that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.\r\rIf you set this property to false it will stop the Input Handler from processing any more input events.\r\rIf you want to _temporarily_ disable input for a Game Object, then it's better to set\r`input.enabled = false`, as it won't reset any of the Input Handlers internal properties.\rYou can then toggle this back on as needed.","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.Component.InWorld","description":"The InWorld component checks if a Game Object is within the Game World Bounds.\rAn object is considered as being \"in bounds\" so long as its own bounds intersects at any point with the World bounds.\rIf the AutoCull component is enabled on the Game Object then it will check the Game Object against the Camera bounds as well.","constructor":{"name":"InWorld","description":"The InWorld component checks if a Game Object is within the Game World Bounds.\rAn object is considered as being \"in bounds\" so long as its own bounds intersects at any point with the World bounds.\rIf the AutoCull component is enabled on the Game Object then it will check the Game Object against the Camera bounds as well.","parameters":[]},"functions":[{"name":"preUpdate","description":"The InWorld component preUpdate handler.\rCalled automatically by the Game Object.","parameters":[]}],"members":[{"name":"checkWorldBounds","access":"","virtual":false,"description":"If this is set to `true` the Game Object checks if it is within the World bounds each frame. \r\rWhen it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.\r\rIf it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.\r\rIt also optionally kills the Game Object if `outOfBoundsKill` is `true`.\r\rWhen `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.\r\rThis is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,\ror you have tested performance and find it acceptable.","type":{"names":["boolean"]},"default":""},{"name":"outOfBoundsKill","access":"","virtual":false,"description":"If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.","type":{"names":["boolean"]},"default":""},{"name":"outOfCameraBoundsKill","access":"","virtual":false,"description":"If this and the `autoCull` property are both set to `true`, then the `kill` method\ris called as soon as the Game Object leaves the camera bounds.","type":{"names":["boolean"]},"default":""},{"name":"_outOfBoundsFired","access":"private","virtual":false,"description":"Internal state var.","type":{"names":["boolean"]},"default":""},{"name":"inWorld","access":"","virtual":false,"description":"Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.Component.LifeSpan","description":"LifeSpan Component Features.","constructor":{"name":"LifeSpan","description":"LifeSpan Component Features.","parameters":[]},"functions":[{"name":"preUpdate","description":"The LifeSpan component preUpdate handler.\rCalled automatically by the Game Object.","parameters":[]},{"name":"revive","description":"Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.\r\rA resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.\r\rIt will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.","parameters":[{"name":"health","type":"number","description":"The health to give the Game Object. Only set if the GameObject has the Health component.","default":100,"optional":true,"nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"kill","description":"Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.\r\rIt will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.\r\rNote that killing a Game Object is a way for you to quickly recycle it in an object pool,\rit doesn't destroy the object or free it up from memory.\r\rIf you don't need this Game Object any more you should call `destroy` instead.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}}],"members":[{"name":"alive","access":"","virtual":false,"description":"A useful flag to control if the Game Object is alive or dead.\r\rThis is set automatically by the Health components `damage` method should the object run out of health.\rOr you can toggle it via your game code.\r\rThis property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates.\rHowever you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.","type":{"names":["boolean"]},"default":true},{"name":"lifespan","access":"","virtual":false,"description":"The lifespan allows you to give a Game Object a lifespan in milliseconds.\r\rOnce the Game Object is 'born' you can set this to a positive value.\r\rIt is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame.\rWhen it reaches zero it will call the `kill` method.\r\rVery handy for particles, bullets, collectibles, or any other short-lived entity.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.Component.LoadTexture","description":"The LoadTexture component manages the loading of a texture into the Game Object and the changing of frames.","constructor":{"name":"LoadTexture","description":"The LoadTexture component manages the loading of a texture into the Game Object and the changing of frames.","parameters":[]},"functions":[{"name":"loadTexture","description":"Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.\r\rIf your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.\r\rYou should only use `loadTexture` if you want to replace the base texture entirely.\r\rCalling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.\r\rYou can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. \rDoing this then sets the key to be the `frame` argument (the frame is set to zero). \r\rThis allows you to create sprites using `load.image` during development, and then change them \rto use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' \rand swapping it to be the key of the atlas data.\r\rNote: You cannot use a RenderTexture as a texture for a TileSprite.","parameters":[{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":"","nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""},{"name":"stopAnimation","type":"boolean","description":"If an animation is already playing on this Sprite you can choose to stop it or let it carry on playing.","default":true,"optional":true,"nullable":""}]},{"name":"setFrame","description":"Sets the texture frame the Game Object uses for rendering.\r\rThis is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.","parameters":[{"name":"frame","type":"Phaser.Frame","description":"The Frame to be used by the texture.","default":"","optional":"","nullable":""}]},{"name":"resizeFrame","description":"Resizes the Frame dimensions that the Game Object uses for rendering.\r\rYou shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData\rit can be useful to adjust the dimensions directly in this way.","parameters":[{"name":"parent","type":"object","description":"The parent texture object that caused the resize, i.e. a Phaser.Video object.","default":"","optional":"","nullable":""},{"name":"width","type":"integer","description":"The new width of the texture.","default":"","optional":"","nullable":""},{"name":"height","type":"integer","description":"The new height of the texture.","default":"","optional":"","nullable":""}]},{"name":"resetFrame","description":"Resets the texture frame dimensions that the Game Object uses for rendering.","parameters":[]}],"members":[{"name":"customRender","access":"private","virtual":false,"description":"Does this texture require a custom render call? (as set by BitmapData, Video, etc)","type":{"names":["boolean"]},"default":""},{"name":"_frame","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"frame","access":"","virtual":false,"description":"Gets or sets the current frame index of the texture being used to render this Game Object.\r\rTo change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use,\rfor example: `player.frame = 4`.\r\rIf the frame index given doesn't exist it will revert to the first frame found in the texture.\r\rIf you are using a texture atlas then you should use the `frameName` property instead.\r\rIf you wish to fully replace the texture being used see `loadTexture`.","type":{"names":["integer"]},"default":""},{"name":"frameName","access":"","virtual":false,"description":"Gets or sets the current frame name of the texture being used to render this Game Object.\r\rTo change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use, \rfor example: `player.frameName = \"idle\"`.\r\rIf the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.\r\rIf you are using a sprite sheet then you should use the `frame` property instead.\r\rIf you wish to fully replace the texture being used see `loadTexture`.","type":{"names":["string"]},"default":""}]},{"name":"Phaser.Component.Overlap","description":"The Overlap component allows a Game Object to check if it overlaps with the bounds of another Game Object.","constructor":{"name":"Overlap","description":"The Overlap component allows a Game Object to check if it overlaps with the bounds of another Game Object.","parameters":[]},"functions":[{"name":"overlap","description":"Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object, \rwhich can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.\r\rThis check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.\r\rTherefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency.\rIt should be fine for low-volume testing where physics isn't required.","parameters":[{"name":"displayObject","type":["Phaser.Sprite","Phaser.Image","Phaser.TileSprite","Phaser.Button","PIXI.DisplayObject"],"description":"The display object to check against.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the bounds of this Game Object intersects at any point with the bounds of the given display object."}}],"members":[]},{"name":"Phaser.Component.PhysicsBody","description":"The PhysicsBody component manages the Game Objects physics body and physics enabling.\rIt also overrides the x and y properties, ensuring that any manual adjustment of them is reflected in the physics body itself.","constructor":{"name":"PhysicsBody","description":"The PhysicsBody component manages the Game Objects physics body and physics enabling.\rIt also overrides the x and y properties, ensuring that any manual adjustment of them is reflected in the physics body itself.","parameters":[]},"functions":[{"name":"preUpdate","description":"The PhysicsBody component preUpdate handler.\rCalled automatically by the Game Object.","parameters":[]},{"name":"postUpdate","description":"The PhysicsBody component postUpdate handler.\rCalled automatically by the Game Object.","parameters":[]}],"members":[{"name":"body","access":"","virtual":false,"description":"`body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated \rproperties and methods via it.\r\rBy default Game Objects won't add themselves to any physics system and their `body` property will be `null`.\r\rTo enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object\rand `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.\r\rYou can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.\r\rImportant: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5, \rso the physics body is centered on the Game Object.\r\rIf you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.","type":{"names":["Phaser.Physics.Arcade.Body","Phaser.Physics.P2.Body","Phaser.Physics.Ninja.Body","null"]},"default":""},{"name":"x","access":"","virtual":false,"description":"The position of the Game Object on the x axis relative to the local coordinates of the parent.","type":{"names":["number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The position of the Game Object on the y axis relative to the local coordinates of the parent.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.Component.Reset","description":"The Reset component allows a Game Object to be reset and repositioned to a new location.","constructor":{"name":"Reset","description":"The Reset component allows a Game Object to be reset and repositioned to a new location.","parameters":[]},"functions":[{"name":"reset","description":"Resets the Game Object.\r\rThis moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, \r`visible` and `renderable` to true.\r\rIf this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.\r\rIf this Game Object has a Physics Body it will reset the Body.","parameters":[{"name":"x","type":"number","description":"The x coordinate (in world space) to position the Game Object at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate (in world space) to position the Game Object at.","default":"","optional":"","nullable":""},{"name":"health","type":"number","description":"The health to give the Game Object if it has the Health component.","default":1,"optional":true,"nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}}],"members":[]},{"name":"Phaser.Component.ScaleMinMax","description":"The ScaleMinMax component allows a Game Object to limit how far it can be scaled by its parent.","constructor":{"name":"ScaleMinMax","description":"The ScaleMinMax component allows a Game Object to limit how far it can be scaled by its parent.","parameters":[]},"functions":[{"name":"checkTransform","description":"Adjust scaling limits, if set, to this Game Object.","parameters":[{"name":"wt","type":"PIXI.Matrix","description":"The updated worldTransform matrix.","default":"","optional":"","nullable":""}]},{"name":"setScaleMinMax","description":"Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.\r\rFor example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored \rand the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.\r\rBy setting these values you can carefully control how Game Objects deal with responsive scaling.\r\rIf only one parameter is given then that value will be used for both scaleMin and scaleMax:\r`setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1\r\rIf only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y:\r`setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2\r\rIf you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly, \ror pass `null` for the `maxX` and `maxY` parameters.\r\rCall `setScaleMinMax(null)` to clear all previously set values.","parameters":[{"name":"minX","type":["number","null"],"description":"The minimum horizontal scale value this Game Object can scale down to.","default":"","optional":"","nullable":""},{"name":"minY","type":["number","null"],"description":"The minimum vertical scale value this Game Object can scale down to.","default":"","optional":"","nullable":""},{"name":"maxX","type":["number","null"],"description":"The maximum horizontal scale value this Game Object can scale up to.","default":"","optional":"","nullable":""},{"name":"maxY","type":["number","null"],"description":"The maximum vertical scale value this Game Object can scale up to.","default":"","optional":"","nullable":""}]}],"members":[{"name":"transformCallback","access":"","virtual":false,"description":"The callback that will apply any scale limiting to the worldTransform.","type":{"names":["function"]},"default":""},{"name":"transformCallbackContext","access":"","virtual":false,"description":"The context under which `transformCallback` is called.","type":{"names":["object"]},"default":""},{"name":"scaleMin","access":"","virtual":false,"description":"The minimum scale this Game Object will scale down to.\r\rIt allows you to prevent a parent from scaling this Game Object lower than the given value.\r\rSet it to `null` to remove the limit.","type":{"names":["Phaser.Point"]},"default":""},{"name":"scaleMax","access":"","virtual":false,"description":"The maximum scale this Game Object will scale up to. \r\rIt allows you to prevent a parent from scaling this Game Object higher than the given value.\r\rSet it to `null` to remove the limit.","type":{"names":["Phaser.Point"]},"default":""}]},{"name":"Phaser.Component.Smoothed","description":"The Smoothed component allows a Game Object to control anti-aliasing of an image based texture.","constructor":{"name":"Smoothed","description":"The Smoothed component allows a Game Object to control anti-aliasing of an image based texture.","parameters":[]},"functions":[],"members":[{"name":"smoothed","access":"","virtual":false,"description":"Enable or disable texture smoothing for this Game Object.\r\rIt only takes effect if the Game Object is using an image based texture.\r\rSmoothing is enabled by default.","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.Creature","description":"Creature is a custom Game Object used in conjunction with the Creature Runtime libraries by Kestrel Moon Studios.\r\rIt allows you to display animated Game Objects that were created with the [Creature Automated Animation Tool](http://www.kestrelmoon.com/creature/).\r\rNote 1: You can only use Phaser.Creature objects in WebGL enabled games. They do not work in Canvas mode games.\r\rNote 2: You must use a build of Phaser that includes the CreatureMeshBone.js runtime and gl-matrix.js, or have them\rloaded before your Phaser game boots.\r\rSee the Phaser custom build process for more details.\r\rBy default the Creature runtimes are NOT included in any pre-configured version of Phaser.\r\rSo you'll need to do `grunt custom` to create a build that includes them.","constructor":{"name":"Creature","description":"Creature is a custom Game Object used in conjunction with the Creature Runtime libraries by Kestrel Moon Studios.\r\rIt allows you to display animated Game Objects that were created with the [Creature Automated Animation Tool](http://www.kestrelmoon.com/creature/).\r\rNote 1: You can only use Phaser.Creature objects in WebGL enabled games. They do not work in Canvas mode games.\r\rNote 2: You must use a build of Phaser that includes the CreatureMeshBone.js runtime and gl-matrix.js, or have them\rloaded before your Phaser game boots.\r\rSee the Phaser custom build process for more details.\r\rBy default the Creature runtimes are NOT included in any pre-configured version of Phaser.\r\rSo you'll need to do `grunt custom` to create a build that includes them.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate of the Game Object. The coordinate is relative to any parent container this Game Object may be in.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate of the Game Object. The coordinate is relative to any parent container this Game Object may be in.","default":"","optional":"","nullable":""},{"name":"key","type":["string","PIXI.Texture"],"description":"The texture used by the Creature Object during rendering. It can be a string which is a reference to the Cache entry, or an instance of a PIXI.Texture.","default":"","optional":"","nullable":""},{"name":"mesh","type":"string","description":"The mesh data for the Creature Object. It should be a string which is a reference to the Cache JSON entry.","default":"","optional":"","nullable":""},{"name":"animation","type":"string","description":"The animation within the mesh data  to play.","default":"'default'","optional":true,"nullable":""}]},"functions":[{"name":"preUpdate","description":"Automatically called by World.preUpdate.","parameters":[]},{"name":"_initWebGL","description":"","parameters":[]},{"name":"_renderWebGL","description":"","parameters":[]},{"name":"_renderCreature","description":"","parameters":[]},{"name":"updateCreatureBounds","description":"","parameters":[]},{"name":"updateData","description":"","parameters":[]},{"name":"updateRenderData","description":"","parameters":[]},{"name":"setAnimation","description":"Sets the Animation this Creature object will play, as defined in the mesh data.","parameters":[{"name":"key","type":"string","description":"The key of the animation to set, as defined in the mesh data.","default":"","optional":"","nullable":""}]},{"name":"play","description":"Plays the currently set animation.","parameters":[{"name":"loop","type":"boolean","description":"Should the animation loop?","default":"","optional":true,"nullable":""}]},{"name":"stop","description":"Stops the currently playing animation.","parameters":[]},{"name":"addChild","description":"Adds a child to the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to add to the container","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"addChildAt","description":"Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child to add","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The index to place the child in","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"swapChildren","description":"Swaps the position of 2 Display Objects within this container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""},{"name":"child2","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}]},{"name":"getChildIndex","description":"Returns the index position of a child DisplayObject instance","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject instance to identify","default":"","optional":"","nullable":""}],"returns":{"type":"Number","description":"The index position of the child display object to identify"}},{"name":"setChildIndex","description":"Changes the position of an existing child in the display object container","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child DisplayObject instance for which you want to change the index number","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The resulting index number for the child display object","default":"","optional":"","nullable":""}]},{"name":"getChildAt","description":"Returns the child at the specified index","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child at the given index, if any."}},{"name":"removeChild","description":"Removes a child from the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to remove","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildAt","description":"Removes a child from the specified index position.","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildren","description":"Removes all children from this container that are within the begin and end indexes.","parameters":[{"name":"beginIndex","type":"Number","description":"The beginning position. Default value is 0.","default":"","optional":"","nullable":""},{"name":"endIndex","type":"Number","description":"The ending position. Default value is size of the container.","default":"","optional":"","nullable":""}]},{"name":"getBounds","description":"Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.","parameters":[{"name":"targetCoordinateSpace","type":["PIXIDisplayObject","PIXIMatrix"],"description":"Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object.","default":"","optional":true,"nullable":""}],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"getLocalBounds","description":"Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.","parameters":[],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"contains","description":"Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}],"returns":{"type":"Boolean","description":""}},{"name":"_renderCanvas","description":"Renders the object using the Canvas renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""}]},{"name":"update","description":"Override this method in your own custom objects to handle any update requirements.\rIt is called immediately after `preUpdate` and before `postUpdate`.\rRemember if this Game Object has any children you should call update on those too.","parameters":[]},{"name":"postUpdate","description":"Internal method called by the World postUpdate cycle.","parameters":[]},{"name":"bringToTop","description":"Brings this Game Object to the top of its parents display list.\rVisually this means it will render over the top of any old child in the same Group.\r\rIf this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"sendToBack","description":"Sends this Game Object to the bottom of its parents display list.\rVisually this means it will render below all other children in the same Group.\r\rIf this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"moveUp","description":"Moves this Game Object up one place in its parents display list.\rThis call has no effect if the Game Object is already at the top of the display list.\r\rIf this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"moveDown","description":"Moves this Game Object down one place in its parents display list.\rThis call has no effect if the Game Object is already at the bottom of the display list.\r\rIf this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"destroy","description":"Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present\rand nulls its reference to `game`, freeing it up for garbage collection.\r\rIf this Game Object has the Events component it will also dispatch the `onDestroy` event.\r\rYou can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've\rmore than one Game Object sharing the same BaseTexture.","parameters":[{"name":"destroyChildren","type":"boolean","description":"Should every child of this object have its destroy method called as well?","default":true,"optional":true,"nullable":""},{"name":"destroyTexture","type":"boolean","description":"Destroy the BaseTexture this Game Object is using? Note that if another Game Object is sharing the same BaseTexture it will invalidate it.","default":"","optional":true,"nullable":""}]},{"name":"revive","description":"Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.\r\rA resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.\r\rIt will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.","parameters":[{"name":"health","type":"number","description":"The health to give the Game Object. Only set if the GameObject has the Health component.","default":100,"optional":true,"nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"kill","description":"Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.\r\rIt will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.\r\rNote that killing a Game Object is a way for you to quickly recycle it in an object pool,\rit doesn't destroy the object or free it up from memory.\r\rIf you don't need this Game Object any more you should call `destroy` instead.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"reset","description":"Resets the Game Object.\r\rThis moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, \r`visible` and `renderable` to true.\r\rIf this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.\r\rIf this Game Object has a Physics Body it will reset the Body.","parameters":[{"name":"x","type":"number","description":"The x coordinate (in world space) to position the Game Object at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate (in world space) to position the Game Object at.","default":"","optional":"","nullable":""},{"name":"health","type":"number","description":"The health to give the Game Object if it has the Health component.","default":1,"optional":true,"nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}}],"members":[{"name":"type","access":"","virtual":false,"description":"The const type of this object.","type":{"names":["number"]},"default":""},{"name":"_creature","access":"private","virtual":false,"description":"The Creature instance.","type":{"names":["Creature"]},"default":""},{"name":"animation","access":"","virtual":false,"description":"The CreatureAnimation instance.","type":{"names":["CreatureAnimation"]},"default":""},{"name":"manager","access":"","virtual":false,"description":"The CreatureManager instance for this object.","type":{"names":["CreatureManager"]},"default":""},{"name":"timeDelta","access":"","virtual":false,"description":"How quickly the animation advances.","type":{"names":["number"]},"default":0.05},{"name":"texture","access":"","virtual":false,"description":"The texture the animation is using.","type":{"names":["PIXI.Texture"]},"default":""},{"name":"creatureBoundsMin","access":"protected","virtual":false,"description":"The minimum bounds point.","type":{"names":["Phaser.Point"]},"default":""},{"name":"creatureBoundsMax","access":"protected","virtual":false,"description":"The maximum bounds point.","type":{"names":["Phaser.Point"]},"default":""},{"name":"vertices","access":"protected","virtual":false,"description":"The vertices data.","type":{"names":["Float32Array"]},"default":""},{"name":"uvs","access":"protected","virtual":false,"description":"The UV data.","type":{"names":["Float32Array"]},"default":""},{"name":"indices","access":"protected","virtual":false,"description":"","type":{"names":["Uint16Array"]},"default":""},{"name":"colors","access":"protected","virtual":false,"description":"The vertices colors","type":{"names":["Uint16Array"]},"default":""},{"name":"isPlaying","access":"","virtual":false,"description":"Is the _current_ animation playing?","type":{"names":["boolean"]},"default":""},{"name":"loop","access":"","virtual":false,"description":"Should the _current_ animation loop or not?","type":{"names":["boolean"]},"default":""},{"name":"children","access":"","virtual":false,"description":"[read-only] The array of children of this container.","type":{"names":["Array.<DisplayObject>"]},"default":""},{"name":"ignoreChildInput","access":"","virtual":false,"description":"If `ignoreChildInput`  is `false` it will allow this objects _children_ to be considered as valid for Input events.\n\nIf this property is `true` then the children will _not_ be considered as valid for Input events.\n\nNote that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.","type":{"names":["Boolean"]},"default":""},{"name":"width","access":"","virtual":false,"description":"The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"position","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject, relative to its parent container.\n\nThe value of this property does not reflect any positioning happening further up the display list.\nTo obtain that value please see the `worldPosition` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"scale","access":"","virtual":false,"description":"The scale of this DisplayObject. A scale of 1:1 represents the DisplayObject\nat its default size. A value of 0.5 would scale this DisplayObject by half, and so on.\n\nThe value of this property does not reflect any scaling happening further up the display list.\nTo obtain that value please see the `worldScale` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"pivot","access":"","virtual":false,"description":"The pivot point of this DisplayObject that it rotates around. The values are expressed\nin pixel values.","type":{"names":["PIXIPoint"]},"default":""},{"name":"rotation","access":"","virtual":false,"description":"The rotation of this DisplayObject. The value is given, and expressed, in radians, and is based on\na right-handed orientation.\n\nThe value of this property does not reflect any rotation happening further up the display list.\nTo obtain that value please see the `worldRotation` property.","type":{"names":["Number"]},"default":""},{"name":"alpha","access":"","virtual":false,"description":"The alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nPlease note that an object with an alpha value of 0 is skipped during the render pass.\n\nThe value of this property does not reflect any alpha values set further up the display list.\nTo obtain that value please see the `worldAlpha` property.","type":{"names":["Number"]},"default":""},{"name":"visible","access":"","virtual":false,"description":"The visibility of this DisplayObject. A value of `false` makes the object invisible.\nA value of `true` makes it visible. Please note that an object with a visible value of\n`false` is skipped during the render pass. Equally a DisplayObject with visible false will\nnot render any of its children.\n\nThe value of this property does not reflect any visible values set further up the display list.\nTo obtain that value please see the `worldVisible` property.","type":{"names":["Boolean"]},"default":""},{"name":"hitArea","access":"","virtual":false,"description":"This is the defined area that will pick up mouse / touch events. It is null by default.\nSetting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)","type":{"names":["Rectangle","Circle","Ellipse","Polygon"]},"default":""},{"name":"renderable","access":"","virtual":false,"description":"Should this DisplayObject be rendered by the renderer? An object with a renderable value of\n`false` is skipped during the render pass.","type":{"names":["Boolean"]},"default":""},{"name":"parent","access":"","virtual":false,"description":"The parent DisplayObjectContainer that this DisplayObject is a child of.\nAll DisplayObjects must belong to a parent in order to be rendered.\nThe root parent is the Stage object. This property is set automatically when the\nDisplayObject is added to, or removed from, a DisplayObjectContainer.","type":{"names":["PIXIDisplayObjectContainer"]},"default":""},{"name":"worldAlpha","access":"","virtual":false,"description":"The multiplied alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nThis value is the calculated total, based on the alpha values of all parents of this DisplayObjects \nin the display list.\n\nTo obtain, and set, the local alpha value, see the `alpha` property.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"worldTransform","access":"","virtual":false,"description":"The current transform of this DisplayObject.\n\nThis property contains the calculated total, based on the transforms of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIMatrix"]},"default":""},{"name":"worldPosition","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject within the world.\n\nThis property contains the calculated total, based on the positions of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldScale","access":"","virtual":false,"description":"The global scale of this DisplayObject.\n\nThis property contains the calculated total, based on the scales of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldRotation","access":"","virtual":false,"description":"The rotation, in radians, of this DisplayObject.\n\nThis property contains the calculated total, based on the rotations of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"filterArea","access":"","virtual":false,"description":"The rectangular area used by filters when rendering a shader for this DisplayObject.","type":{"names":["Rectangle"]},"default":""},{"name":"_sr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_cr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_bounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_currentBounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_mask","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_cacheAsBitmap","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"_cacheIsDirty","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"x","access":"","virtual":false,"description":"The horizontal position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The vertical position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"worldVisible","access":"","virtual":false,"description":"Indicates if this DisplayObject is visible, based on it, and all of its parents, `visible` property values.","type":{"names":["Boolean"]},"default":""},{"name":"mask","access":"","virtual":false,"description":"Sets a mask for this DisplayObject. A mask is an instance of a Graphics object.\nWhen applied it limits the visible area of this DisplayObject to the shape of the mask.\nUnder a Canvas renderer it uses shape clipping. Under a WebGL renderer it uses a Stencil Buffer.\nTo remove a mask, set this property to `null`.","type":{"names":["PIXIGraphics"]},"default":""},{"name":"filters","access":"","virtual":false,"description":"Sets the filters for this DisplayObject. This is a WebGL only feature, and is ignored by the Canvas\nRenderer. A filter is a shader applied to this DisplayObject. You can modify the placement of the filter\nusing `DisplayObject.filterArea`.\n\nTo remove filters, set this property to `null`.\n\nNote: You cannot have a filter set, and a MULTIPLY Blend Mode active, at the same time. Setting a \nfilter will reset this DisplayObjects blend mode to NORMAL.","type":{"names":["Array"]},"default":""},{"name":"cacheAsBitmap","access":"","virtual":false,"description":"Sets if this DisplayObject should be cached as a bitmap.\n\nWhen invoked it will take a snapshot of the DisplayObject, as it is at that moment, and store it \nin a RenderTexture. This is then used whenever this DisplayObject is rendered. It can provide a\nperformance benefit for complex, but static, DisplayObjects. I.e. those with lots of children.\n\nCached Bitmaps do not track their parents. If you update a property of this DisplayObject, it will not\nre-generate the cached bitmap automatically. To do that you need to call `DisplayObject.updateCache`.\n\nTo remove a cached bitmap, set this property to `null`.","type":{"names":["Boolean"]},"default":""},{"name":"game","access":"","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"name","access":"","virtual":false,"description":"A user defined name given to this Game Object.\rThis value isn't ever used internally by Phaser, it is meant as a game level property.","type":{"names":["string"]},"default":""},{"name":"data","access":"","virtual":false,"description":"An empty Object that belongs to this Game Object.\rThis value isn't ever used internally by Phaser, but may be used by your own code, or\rby Phaser Plugins, to store data that needs to be associated with the Game Object,\rwithout polluting the Game Object directly.","type":{"names":["Object"]},"default":"{}"},{"name":"components","access":"protected","virtual":false,"description":"The components this Game Object has installed.","type":{"names":["object"]},"default":""},{"name":"z","access":"","virtual":false,"description":"The z depth of this Game Object within its parent Group.\rNo two objects in a Group can have the same z value.\rThis value is adjusted automatically whenever the Group hierarchy changes.\rIf you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.","type":{"names":["number"]},"default":""},{"name":"events","access":"","virtual":false,"description":"All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this\rGame Object, or any of its components.","type":{"names":["Phaser.Events"]},"default":""},{"name":"animations","access":"","virtual":false,"description":"If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance.\rThrough it you can create, play, pause and stop animations.","type":{"names":["Phaser.AnimationManager"]},"default":""},{"name":"key","access":"","virtual":false,"description":"The key of the image or texture used by this Game Object during rendering.\rIf it is a string it's the string used to retrieve the texture from the Phaser Image Cache.\rIt can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.\rIf a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache.\rIf a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.","type":{"names":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"]},"default":""},{"name":"world","access":"","virtual":false,"description":"The world coordinates of this Game Object in pixels.\rDepending on where in the display list this Game Object is placed this value can differ from `position`, \rwhich contains the x/y coordinates relative to the Game Objects parent.","type":{"names":["Phaser.Point"]},"default":""},{"name":"debug","access":"","virtual":false,"description":"A debug flag designed for use with `Game.enableStep`.","type":{"names":["boolean"]},"default":""},{"name":"previousPosition","access":"","virtual":false,"description":"The position the Game Object was located in the previous frame.","type":{"names":["Phaser.Point"]},"default":""},{"name":"previousRotation","access":"","virtual":false,"description":"The rotation the Game Object was in set to in the previous frame. Value is in radians.","type":{"names":["number"]},"default":""},{"name":"renderOrderID","access":"","virtual":false,"description":"The render order ID is used internally by the renderer and Input Manager and should not be modified.\rThis property is mostly used internally by the renderers, but is exposed for the use of plugins.","type":{"names":["number"]},"default":""},{"name":"fresh","access":"","virtual":false,"description":"A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update.\rThis property is mostly used internally by the physics systems, but is exposed for the use of plugins.","type":{"names":["boolean"]},"default":""},{"name":"pendingDestroy","access":"","virtual":false,"description":"A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update.\rYou can set it directly to allow you to flag an object to be destroyed on its next update.\r\rThis is extremely useful if you wish to destroy an object from within one of its own callbacks \rsuch as with Buttons or other Input events.","type":{"names":["boolean"]},"default":""},{"name":"_exists","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["boolean"]},"default":""},{"name":"exists","access":"","virtual":false,"description":"Controls if this Game Object is processed by the core game loop.\rIf this Game Object has a physics body it also controls if its physics body is updated or not.\rWhen `exists` is set to `false` it will remove its physics body from the physics world if it has one.\rIt also toggles the `visible` property to false as well.\r\rSetting `exists` to true will add its physics body back in to the physics world, if it has one.\rIt will also set the `visible` property to `true`.","type":{"names":["boolean"]},"default":""},{"name":"angle","access":"","virtual":false,"description":"The angle property is the rotation of the Game Object in *degrees* from its original orientation.\r\rValues from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.\r\rValues outside this range are added to or subtracted from 360 to obtain a value within the range. \rFor example, the statement player.angle = 450 is the same as player.angle = 90.\r\rIf you wish to work in radians instead of degrees you can use the property `rotation` instead. \rWorking in radians is slightly faster as it doesn't have to perform any calculations.","type":{"names":["number"]},"default":""},{"name":"autoCull","access":"","virtual":false,"description":"A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame.\rIf it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`.\rThis keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.\r\rThis is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,\ror you have tested performance and find it acceptable.","type":{"names":["boolean"]},"default":""},{"name":"inCamera","access":"","virtual":false,"description":"Checks if the Game Objects bounds intersect with the Game Camera bounds.\rReturns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.","type":{"names":["boolean"]},"default":""},{"name":"destroyPhase","access":"","virtual":false,"description":"As a Game Object runs through its destroy method this flag is set to true, \rand can be checked in any sub-systems or plugins it is being destroyed from.","type":{"names":["boolean"]},"default":""},{"name":"_fixedToCamera","access":"private","virtual":false,"description":"","type":{"names":["boolean"]},"default":""},{"name":"fixedToCamera","access":"","virtual":false,"description":"A Game Object that is \"fixed\" to the camera is rendered at a given x/y offsets from the top left of the camera. The offsets \rare stored in the `cameraOffset` property, which is initialized with the current object coordinates. \r\rThe values are adjusted at the rendering stage, overriding the Game Objects actual world position.\r\rThe end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world\rthe camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times \rregardless where in the world the camera is.\r\rNote that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.\r\rBe careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.","type":{"names":["boolean"]},"default":""},{"name":"cameraOffset","access":"","virtual":false,"description":"The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.\r\rThe values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.","type":{"names":["Phaser.Point"]},"default":""},{"name":"alive","access":"","virtual":false,"description":"A useful flag to control if the Game Object is alive or dead.\r\rThis is set automatically by the Health components `damage` method should the object run out of health.\rOr you can toggle it via your game code.\r\rThis property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates.\rHowever you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.","type":{"names":["boolean"]},"default":true},{"name":"lifespan","access":"","virtual":false,"description":"The lifespan allows you to give a Game Object a lifespan in milliseconds.\r\rOnce the Game Object is 'born' you can set this to a positive value.\r\rIt is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame.\rWhen it reaches zero it will call the `kill` method.\r\rVery handy for particles, bullets, collectibles, or any other short-lived entity.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.GameObjectCreator","description":"The GameObjectCreator is a quick way to create common game objects _without_ adding them to the game world.\rThe object creator can be accessed with {@linkcode Phaser.Game#make `game.make`}.","constructor":{"name":"GameObjectCreator","description":"The GameObjectCreator is a quick way to create common game objects _without_ adding them to the game world.\rThe object creator can be accessed with {@linkcode Phaser.Game#make `game.make`}.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""}]},"functions":[{"name":"image","description":"Create a new Image object.\r\rAn Image is a light-weight object you can use to display anything that doesn't need physics or animation.\rIt can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.","parameters":[{"name":"x","type":"number","description":"X position of the image.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the image.","default":"","optional":"","nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.","default":"","optional":"","nullable":""},{"name":"frame","type":["string","number"],"description":"If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Image","description":"the newly created sprite object."}},{"name":"sprite","description":"Create a new Sprite with specific position and sprite sheet key.","parameters":[{"name":"x","type":"number","description":"X position of the new sprite.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the new sprite.","default":"","optional":"","nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.","default":"","optional":"","nullable":""},{"name":"frame","type":["string","number"],"description":"If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Sprite","description":"the newly created sprite object."}},{"name":"tween","description":"Create a tween object for a specific object.\r\rThe object can be any JavaScript object or Phaser object such as Sprite.","parameters":[{"name":"obj","type":"object","description":"Object the tween will be run on.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Tween","description":"The Tween object."}},{"name":"group","description":"A Group is a container for display objects that allows for fast pooling, recycling and collision checks.","parameters":[{"name":"parent","type":"any","description":"The parent Group or DisplayObjectContainer that will hold this group, if any.","default":"","optional":"","nullable":""},{"name":"name","type":"string","description":"A name for this Group. Not used internally but useful for debugging.","default":"'group'","optional":true,"nullable":""},{"name":"addToStage","type":"boolean","description":"If set to true this Group will be added directly to the Game.Stage instead of Game.World.","default":"","optional":true,"nullable":""},{"name":"enableBody","type":"boolean","description":"If true all Sprites created with `Group.create` or `Group.createMulitple` will have a physics body created on them. Change the body type with physicsBodyType.","default":"","optional":true,"nullable":""},{"name":"physicsBodyType","type":"number","description":"If enableBody is true this is the type of physics body that is created on new Sprites. Phaser.Physics.ARCADE, Phaser.Physics.P2, Phaser.Physics.NINJA, etc.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Group","description":"The newly created Group."}},{"name":"spriteBatch","description":"Create a new SpriteBatch.","parameters":[{"name":"parent","type":"any","description":"The parent Group or DisplayObjectContainer that will hold this group, if any.","default":"","optional":"","nullable":""},{"name":"name","type":"string","description":"A name for this Group. Not used internally but useful for debugging.","default":"'group'","optional":true,"nullable":""},{"name":"addToStage","type":"boolean","description":"If set to true this Group will be added directly to the Game.Stage instead of Game.World.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.SpriteBatch","description":"The newly created group."}},{"name":"audio","description":"Creates a new Sound object.","parameters":[{"name":"key","type":"string","description":"The Game.cache key of the sound that this object will use.","default":"","optional":"","nullable":""},{"name":"volume","type":"number","description":"The volume at which the sound will be played.","default":1,"optional":true,"nullable":""},{"name":"loop","type":"boolean","description":"Whether or not the sound will loop.","default":"","optional":true,"nullable":""},{"name":"connect","type":"boolean","description":"Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio.","default":true,"optional":true,"nullable":""}],"returns":{"type":"Phaser.Sound","description":"The newly created text object."}},{"name":"audioSprite","description":"Creates a new AudioSprite object.","parameters":[{"name":"key","type":"string","description":"The Game.cache key of the sound that this object will use.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.AudioSprite","description":"The newly created AudioSprite object."}},{"name":"sound","description":"Creates a new Sound object.","parameters":[{"name":"key","type":"string","description":"The Game.cache key of the sound that this object will use.","default":"","optional":"","nullable":""},{"name":"volume","type":"number","description":"The volume at which the sound will be played.","default":1,"optional":true,"nullable":""},{"name":"loop","type":"boolean","description":"Whether or not the sound will loop.","default":"","optional":true,"nullable":""},{"name":"connect","type":"boolean","description":"Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio.","default":true,"optional":true,"nullable":""}],"returns":{"type":"Phaser.Sound","description":"The newly created text object."}},{"name":"tileSprite","description":"Creates a new TileSprite object.","parameters":[{"name":"x","type":"number","description":"The x coordinate (in world space) to position the TileSprite at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate (in world space) to position the TileSprite at.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The width of the TileSprite.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height of the TileSprite.","default":"","optional":"","nullable":""},{"name":"key","type":["string","Phaser.BitmapData","PIXI.Texture"],"description":"This is the image or texture used by the TileSprite during rendering. It can be a string which is a reference to the Phaser Image Cache entry, or an instance of a PIXI.Texture or BitmapData.","default":"","optional":"","nullable":""},{"name":"frame","type":["string","number"],"description":"If this TileSprite 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.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.TileSprite","description":"The newly created tileSprite object."}},{"name":"rope","description":"Creates a new Rope object.","parameters":[{"name":"x","type":"number","description":"The x coordinate (in world space) to position the Rope at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate (in world space) to position the Rope at.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The width of the Rope.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height of the Rope.","default":"","optional":"","nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","PIXI.Texture"],"description":"This is the image or texture used by the TileSprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.","default":"","optional":"","nullable":""},{"name":"frame","type":["string","number"],"description":"If this Rope 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.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Rope","description":"The newly created rope object."}},{"name":"text","description":"Creates a new Text object.","parameters":[{"name":"x","type":"number","description":"X position of the new text object.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the new text object.","default":"","optional":"","nullable":""},{"name":"text","type":"string","description":"The actual text that will be written.","default":"","optional":"","nullable":""},{"name":"style","type":"object","description":"The style object containing style attributes like font, font size , etc.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Text","description":"The newly created text object."}},{"name":"button","description":"Creates a new Button object.","parameters":[{"name":"x","type":"number","description":"X position of the new button object.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"Y position of the new button object.","default":"","optional":true,"nullable":""},{"name":"key","type":"string","description":"The image key as defined in the Game.Cache to use as the texture for this button.","default":"","optional":true,"nullable":""},{"name":"callback","type":"function","description":"The function to call when this button is pressed","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the callback will be called (usually 'this')","default":"","optional":true,"nullable":""},{"name":"overFrame","type":["string","number"],"description":"This is the frame or frameName that will be set when this button is in an over state. Give either a number to use a frame ID or a string for a frame name.","default":"","optional":true,"nullable":""},{"name":"outFrame","type":["string","number"],"description":"This is the frame or frameName that will be set when this button is in an out state. Give either a number to use a frame ID or a string for a frame name.","default":"","optional":true,"nullable":""},{"name":"downFrame","type":["string","number"],"description":"This is the frame or frameName that will be set when this button is in a down state. Give either a number to use a frame ID or a string for a frame name.","default":"","optional":true,"nullable":""},{"name":"upFrame","type":["string","number"],"description":"This is the frame or frameName that will be set when this button is in an up state. Give either a number to use a frame ID or a string for a frame name.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Button","description":"The newly created button object."}},{"name":"graphics","description":"Creates a new Graphics object.","parameters":[{"name":"x","type":"number","description":"X position of the new graphics object.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"Y position of the new graphics object.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Graphics","description":"The newly created graphics object."}},{"name":"emitter","description":"Creat a new Emitter.\r\rAn Emitter is a lightweight particle emitter. It can be used for one-time explosions or for\rcontinuous effects like rain and fire. All it really does is launch Particle objects out\rat set intervals, and fixes their positions and velocities accorindgly.","parameters":[{"name":"x","type":"number","description":"The x coordinate within the Emitter that the particles are emitted from.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate within the Emitter that the particles are emitted from.","default":"","optional":true,"nullable":""},{"name":"maxParticles","type":"number","description":"The total number of particles in this emitter.","default":50,"optional":true,"nullable":""}],"returns":{"type":"Phaser.Emitter","description":"The newly created emitter object."}},{"name":"retroFont","description":"Create a new RetroFont object.\r\rA RetroFont can be used as a texture for an Image or Sprite and optionally add it to the Cache.\rA RetroFont uses a bitmap which contains fixed with characters for the font set. You use character spacing to define the set.\rIf you need variable width character support then use a BitmapText object instead. The main difference between a RetroFont and a BitmapText\ris that a RetroFont creates a single texture that you can apply to a game object, where-as a BitmapText creates one Sprite object per letter of text.\rThe texture can be asssigned or one or multiple images/sprites, but note that the text the RetroFont uses will be shared across them all,\ri.e. if you need each Image to have different text in it, then you need to create multiple RetroFont objects.","parameters":[{"name":"font","type":"string","description":"The key of the image in the Game.Cache that the RetroFont will use.","default":"","optional":"","nullable":""},{"name":"characterWidth","type":"number","description":"The width of each character in the font set.","default":"","optional":"","nullable":""},{"name":"characterHeight","type":"number","description":"The height of each character in the font set.","default":"","optional":"","nullable":""},{"name":"chars","type":"string","description":"The characters used in the font set, in display order. You can use the TEXT_SET consts for common font set arrangements.","default":"","optional":"","nullable":""},{"name":"charsPerRow","type":"number","description":"The number of characters per row in the font set.","default":"","optional":"","nullable":""},{"name":"xSpacing","type":"number","description":"If the characters in the font set have horizontal spacing between them set the required amount here.","default":"","optional":true,"nullable":""},{"name":"ySpacing","type":"number","description":"If the characters in the font set have vertical spacing between them set the required amount here.","default":"","optional":true,"nullable":""},{"name":"xOffset","type":"number","description":"If the font set doesn't start at the top left of the given image, specify the X coordinate offset here.","default":"","optional":true,"nullable":""},{"name":"yOffset","type":"number","description":"If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.RetroFont","description":"The newly created RetroFont texture which can be applied to an Image or Sprite."}},{"name":"bitmapText","description":"Create a new BitmapText object.\r\rBitmapText objects work by taking a texture file and an XML file that describes the font structure.\rIt then generates a new Sprite object for each letter of the text, proportionally spaced out and aligned to \rmatch the font structure.\r\rBitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability \rto use Web Fonts. However you trade this flexibility for pure rendering speed. You can also create visually compelling BitmapTexts by \rprocessing the font texture in an image editor first, applying fills and any other effects required.\r\rTo create multi-line text insert \\r, \\n or \\r\\n escape codes into the text string.\r\rTo create a BitmapText data files you can use:\r\rBMFont (Windows, free): http://www.angelcode.com/products/bmfont/\rGlyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner\rLittera (Web-based, free): http://kvazars.com/littera/","parameters":[{"name":"x","type":"number","description":"X coordinate to display the BitmapText object at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y coordinate to display the BitmapText object at.","default":"","optional":"","nullable":""},{"name":"font","type":"string","description":"The key of the BitmapText as stored in Phaser.Cache.","default":"","optional":"","nullable":""},{"name":"text","type":"string","description":"The text that will be rendered. This can also be set later via BitmapText.text.","default":"''","optional":true,"nullable":""},{"name":"size","type":"number","description":"The size the font will be rendered at in pixels.","default":32,"optional":true,"nullable":""},{"name":"align","type":"string","description":"The alignment of multi-line text. Has no effect if there is only one line of text.","default":"'left'","optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapText","description":"The newly created bitmapText object."}},{"name":"tilemap","description":"Creates a new Phaser.Tilemap object.\r\rThe map can either be populated with data from a Tiled JSON file or from a CSV file.\rTo do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key.\rWhen using CSV data you must provide the key and the tileWidth and tileHeight parameters.\rIf creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here.\rNote that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it.","parameters":[{"name":"key","type":"string","description":"The key of the tilemap data as stored in the Cache. If you're creating a blank map either leave this parameter out or pass `null`.","default":"","optional":true,"nullable":""},{"name":"tileWidth","type":"number","description":"The pixel width of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data.","default":32,"optional":true,"nullable":""},{"name":"tileHeight","type":"number","description":"The pixel height of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data.","default":32,"optional":true,"nullable":""},{"name":"width","type":"number","description":"The width of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this.","default":10,"optional":true,"nullable":""},{"name":"height","type":"number","description":"The height of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this.","default":10,"optional":true,"nullable":""}]},{"name":"renderTexture","description":"A dynamic initially blank canvas to which images can be drawn.","parameters":[{"name":"width","type":"number","description":"the width of the RenderTexture.","default":100,"optional":true,"nullable":""},{"name":"height","type":"number","description":"the height of the RenderTexture.","default":100,"optional":true,"nullable":""},{"name":"key","type":"string","description":"Asset key for the RenderTexture when stored in the Cache (see addToCache parameter).","default":"''","optional":true,"nullable":""},{"name":"addToCache","type":"boolean","description":"Should this RenderTexture be added to the Game.Cache? If so you can retrieve it with Cache.getTexture(key)","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.RenderTexture","description":"The newly created RenderTexture object."}},{"name":"bitmapData","description":"Create a BitmpaData object.\r\rA BitmapData object can be manipulated and drawn to like a traditional Canvas object and used to texture Sprites.","parameters":[{"name":"width","type":"number","description":"The width of the BitmapData in pixels.","default":256,"optional":true,"nullable":""},{"name":"height","type":"number","description":"The height of the BitmapData in pixels.","default":256,"optional":true,"nullable":""},{"name":"key","type":"string","description":"Asset key for the BitmapData when stored in the Cache (see addToCache parameter).","default":"''","optional":true,"nullable":""},{"name":"addToCache","type":"boolean","description":"Should this BitmapData be added to the Game.Cache? If so you can retrieve it with Cache.getBitmapData(key)","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"The newly created BitmapData object."}},{"name":"filter","description":"A WebGL shader/filter that can be applied to Sprites.","parameters":[{"name":"filter","type":"string","description":"The name of the filter you wish to create, for example HueRotate or SineWave.","default":"","optional":"","nullable":""},{"type":"any","description":"Whatever parameters are needed to be passed to the filter init function.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Filter","description":"The newly created Phaser.Filter object."}}],"members":[{"name":"game","access":"protected","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"world","access":"protected","virtual":false,"description":"A reference to the game world.","type":{"names":["Phaser.World"]},"default":""}]},{"name":"Phaser.GameObjectFactory","description":"The GameObjectFactory is a quick way to create many common game objects\rusing {@linkcode Phaser.Game#add `game.add`}.\r\rCreated objects are _automatically added_ to the appropriate Manager, World, or manually specified parent Group.","constructor":{"name":"GameObjectFactory","description":"The GameObjectFactory is a quick way to create many common game objects\rusing {@linkcode Phaser.Game#add `game.add`}.\r\rCreated objects are _automatically added_ to the appropriate Manager, World, or manually specified parent Group.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""}]},"functions":[{"name":"existing","description":"Adds an existing display object to the game world.","parameters":[{"name":"object","type":"any","description":"An instance of Phaser.Sprite, Phaser.Button or any other display object.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The child that was added to the World."}},{"name":"weapon","description":"Weapons provide the ability to easily create a bullet pool and manager.\r\rWeapons fire Phaser.Bullet objects, which are essentially Sprites with a few extra properties.\rThe Bullets are enabled for Arcade Physics. They do not currently work with P2 Physics.\r\rThe Bullets are created inside of `Weapon.bullets`, which is a Phaser.Group instance. Anything you\rcan usually do with a Group, such as move it around the display list, iterate it, etc can be done\rto the bullets Group too.\r\rBullets can have textures and even animations. You can control the speed at which they are fired,\rthe firing rate, the firing angle, and even set things like gravity for them.","parameters":[{"name":"quantity","type":"integer","description":"The quantity of bullets to seed the Weapon with. If -1 it will set the pool to automatically expand.","default":1,"optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"The image used as a texture by the bullets during rendering. If a string Phaser will get for an entry in the Image Cache. Or it can be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If a Texture Atlas or Sprite Sheet is used this allows you to specify the frame to be used by the bullets. Use either an integer for a Frame ID or a string for a frame name.","default":"","optional":true,"nullable":""},{"name":"group","type":"Phaser.Group","description":"Optional Group to add the Weapon to. If not specified it will be added to the World group.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Weapon","description":"A Weapon instance."}},{"name":"image","description":"Create a new `Image` object.\r\rAn Image is a light-weight object you can use to display anything that doesn't need physics or animation.\r\rIt can still rotate, scale, crop and receive input events. \rThis makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.","parameters":[{"name":"x","type":"number","description":"The x coordinate of the Image. The coordinate is relative to any parent container this Image may be in.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate of the Image. The coordinate is relative to any parent container this Image may be in.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"The image used as a texture by this display object during rendering. If a string Phaser will get for an entry in the Image Cache. Or it can be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If a Texture Atlas or Sprite Sheet is used this allows you to specify the frame to be used. Use either an integer for a Frame ID or a string for a frame name.","default":"","optional":true,"nullable":""},{"name":"group","type":"Phaser.Group","description":"Optional Group to add the object to. If not specified it will be added to the World group.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Image","description":"The newly created Image object."}},{"name":"sprite","description":"Create a new Sprite with specific position and sprite sheet key.\r\rAt its most basic a Sprite consists of a set of coordinates and a texture that is used when rendered.\rThey also contain additional properties allowing for physics motion (via Sprite.body), input handling (via Sprite.input),\revents (via Sprite.events), animation (via Sprite.animations), camera culling and more. Please see the Examples for use cases.","parameters":[{"name":"x","type":"number","description":"The x coordinate of the sprite. The coordinate is relative to any parent container this sprite may be in.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate of the sprite. The coordinate is relative to any parent container this sprite may be in.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"The image used as a texture by this display object during rendering. If a string Phaser will get for an entry in the Image Cache. Or it can be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If a Texture Atlas or Sprite Sheet is used this allows you to specify the frame to be used. Use either an integer for a Frame ID or a string for a frame name.","default":"","optional":true,"nullable":""},{"name":"group","type":"Phaser.Group","description":"Optional Group to add the object to. If not specified it will be added to the World group.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Sprite","description":"The newly created Sprite object."}},{"name":"creature","description":"Create a new Creature Animation object.\r\rCreature is a custom Game Object used in conjunction with the Creature Runtime libraries by Kestrel Moon Studios.\r\rIt allows you to display animated Game Objects that were created with the [Creature Automated Animation Tool](http://www.kestrelmoon.com/creature/).\r\rNote 1: You can only use Phaser.Creature objects in WebGL enabled games. They do not work in Canvas mode games.\r\rNote 2: You must use a build of Phaser that includes the CreatureMeshBone.js runtime and gl-matrix.js, or have them\rloaded before your Phaser game boots.\r\rSee the Phaser custom build process for more details.","parameters":[{"name":"x","type":"number","description":"The x coordinate of the creature. The coordinate is relative to any parent container this creature may be in.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate of the creature. The coordinate is relative to any parent container this creature may be in.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","PIXI.Texture"],"description":"The image used as a texture by this creature object during rendering. If a string Phaser will get for an entry in the Image Cache. Or it can be an instance of a PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"group","type":"Phaser.Group","description":"Optional Group to add the object to. If not specified it will be added to the World group.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Creature","description":"The newly created Creature object."}},{"name":"tween","description":"Create a tween on a specific object.\r\rThe object can be any JavaScript object or Phaser object such as Sprite.","parameters":[{"name":"object","type":"object","description":"Object the tween will be run on.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Tween","description":"The newly created Phaser.Tween object."}},{"name":"group","description":"A Group is a container for display objects that allows for fast pooling, recycling and collision checks.","parameters":[{"name":"parent","type":"any","description":"The parent Group or DisplayObjectContainer that will hold this group, if any. If set to null the Group won't be added to the display list. If undefined it will be added to World by default.","default":"","optional":true,"nullable":""},{"name":"name","type":"string","description":"A name for this Group. Not used internally but useful for debugging.","default":"'group'","optional":true,"nullable":""},{"name":"addToStage","type":"boolean","description":"If set to true this Group will be added directly to the Game.Stage instead of Game.World.","default":"","optional":true,"nullable":""},{"name":"enableBody","type":"boolean","description":"If true all Sprites created with `Group.create` or `Group.createMulitple` will have a physics body created on them. Change the body type with physicsBodyType.","default":"","optional":true,"nullable":""},{"name":"physicsBodyType","type":"number","description":"If enableBody is true this is the type of physics body that is created on new Sprites. Phaser.Physics.ARCADE, Phaser.Physics.P2, Phaser.Physics.NINJA, etc.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Group","description":"The newly created Group."}},{"name":"physicsGroup","description":"A Group is a container for display objects that allows for fast pooling, recycling and collision checks.\r\rA Physics Group is the same as an ordinary Group except that is has enableBody turned on by default, so any Sprites it creates\rare automatically given a physics body.","parameters":[{"name":"physicsBodyType","type":"number","description":"If enableBody is true this is the type of physics body that is created on new Sprites. Phaser.Physics.ARCADE, Phaser.Physics.P2JS, Phaser.Physics.NINJA, etc.","default":"Phaser.Physics.ARCADE","optional":true,"nullable":""},{"name":"parent","type":"any","description":"The parent Group or DisplayObjectContainer that will hold this group, if any. If set to null the Group won't be added to the display list. If undefined it will be added to World by default.","default":"","optional":true,"nullable":""},{"name":"name","type":"string","description":"A name for this Group. Not used internally but useful for debugging.","default":"'group'","optional":true,"nullable":""},{"name":"addToStage","type":"boolean","description":"If set to true this Group will be added directly to the Game.Stage instead of Game.World.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Group","description":"The newly created Group."}},{"name":"spriteBatch","description":"A SpriteBatch is a really fast version of a Phaser Group built solely for speed.\rUse when you need a lot of sprites or particles all sharing the same texture.\rThe speed gains are specifically for WebGL. In Canvas mode you won't see any real difference.","parameters":[{"name":"parent","type":["Phaser.Group","null"],"description":"The parent Group that will hold this Sprite Batch. Set to `undefined` or `null` to add directly to game.world.","default":"","optional":"","nullable":""},{"name":"name","type":"string","description":"A name for this Sprite Batch. Not used internally but useful for debugging.","default":"'group'","optional":true,"nullable":""},{"name":"addToStage","type":"boolean","description":"If set to true this Sprite Batch will be added directly to the Game.Stage instead of the parent.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.SpriteBatch","description":"The newly created Sprite Batch."}},{"name":"audio","description":"Creates a new Sound object.","parameters":[{"name":"key","type":"string","description":"The Game.cache key of the sound that this object will use.","default":"","optional":"","nullable":""},{"name":"volume","type":"number","description":"The volume at which the sound will be played.","default":1,"optional":true,"nullable":""},{"name":"loop","type":"boolean","description":"Whether or not the sound will loop.","default":"","optional":true,"nullable":""},{"name":"connect","type":"boolean","description":"Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio.","default":true,"optional":true,"nullable":""}],"returns":{"type":"Phaser.Sound","description":"The newly created sound object."}},{"name":"sound","description":"Creates a new Sound object.","parameters":[{"name":"key","type":"string","description":"The Game.cache key of the sound that this object will use.","default":"","optional":"","nullable":""},{"name":"volume","type":"number","description":"The volume at which the sound will be played.","default":1,"optional":true,"nullable":""},{"name":"loop","type":"boolean","description":"Whether or not the sound will loop.","default":"","optional":true,"nullable":""},{"name":"connect","type":"boolean","description":"Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio.","default":true,"optional":true,"nullable":""}],"returns":{"type":"Phaser.Sound","description":"The newly created sound object."}},{"name":"audioSprite","description":"Creates a new AudioSprite object.","parameters":[{"name":"key","type":"string","description":"The Game.cache key of the sound that this object will use.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.AudioSprite","description":"The newly created AudioSprite object."}},{"name":"tileSprite","description":"Creates a new TileSprite object.","parameters":[{"name":"x","type":"number","description":"The x coordinate of the TileSprite. The coordinate is relative to any parent container this TileSprite may be in.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate of the TileSprite. The coordinate is relative to any parent container this TileSprite may be in.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The width of the TileSprite.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height of the TileSprite.","default":"","optional":"","nullable":""},{"name":"key","type":["string","Phaser.BitmapData","PIXI.Texture"],"description":"This is the image or texture used by the TileSprite during rendering. It can be a string which is a reference to the Phaser Image Cache entry, or an instance of a PIXI.Texture or BitmapData.","default":"","optional":"","nullable":""},{"name":"frame","type":["string","number"],"description":"If a Texture Atlas or Sprite Sheet is used this allows you to specify the frame to be used. Use either an integer for a Frame ID or a string for a frame name.","default":"","optional":true,"nullable":""},{"name":"group","type":"Phaser.Group","description":"Optional Group to add the object to. If not specified it will be added to the World group.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.TileSprite","description":"The newly created TileSprite object."}},{"name":"rope","description":"Creates a new Rope object.\r\rExample usage: https://github.com/codevinsky/phaser-rope-demo/blob/master/dist/demo.js","parameters":[{"name":"x","type":"number","description":"The x coordinate of the Rope. The coordinate is relative to any parent container this rope may be in.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate of the Rope. The coordinate is relative to any parent container this rope may be in.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"The image used as a texture by this display object during rendering. If a string Phaser will get for an entry in the Image Cache. Or it can be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If a Texture Atlas or Sprite Sheet is used this allows you to specify the frame to be used. Use either an integer for a Frame ID or a string for a frame name.","default":"","optional":true,"nullable":""},{"name":"points","type":"Array","description":"An array of {Phaser.Point}.","default":"","optional":"","nullable":""},{"name":"group","type":"Phaser.Group","description":"Optional Group to add the object to. If not specified it will be added to the World group.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Rope","description":"The newly created Rope object."}},{"name":"text","description":"Creates a new Text object.","parameters":[{"name":"x","type":"number","description":"The x coordinate of the Text. The coordinate is relative to any parent container this text may be in.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate of the Text. The coordinate is relative to any parent container this text may be in.","default":"","optional":true,"nullable":""},{"name":"text","type":"string","description":"The text string that will be displayed.","default":"''","optional":true,"nullable":""},{"name":"style","type":"object","description":"The style object containing style attributes like font, font size , etc.","default":"","optional":true,"nullable":""},{"name":"group","type":"Phaser.Group","description":"Optional Group to add the object to. If not specified it will be added to the World group.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Text","description":"The newly created text object."}},{"name":"button","description":"Creates a new Button object.","parameters":[{"name":"x","type":"number","description":"The x coordinate of the Button. The coordinate is relative to any parent container this button may be in.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate of the Button. The coordinate is relative to any parent container this button may be in.","default":"","optional":true,"nullable":""},{"name":"key","type":"string","description":"The image key as defined in the Game.Cache to use as the texture for this button.","default":"","optional":true,"nullable":""},{"name":"callback","type":"function","description":"The function to call when this button is pressed","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the callback will be called (usually 'this')","default":"","optional":true,"nullable":""},{"name":"overFrame","type":["string","number"],"description":"This is the frame or frameName that will be set when this button is in an over state. Give either a number to use a frame ID or a string for a frame name.","default":"","optional":true,"nullable":""},{"name":"outFrame","type":["string","number"],"description":"This is the frame or frameName that will be set when this button is in an out state. Give either a number to use a frame ID or a string for a frame name.","default":"","optional":true,"nullable":""},{"name":"downFrame","type":["string","number"],"description":"This is the frame or frameName that will be set when this button is in a down state. Give either a number to use a frame ID or a string for a frame name.","default":"","optional":true,"nullable":""},{"name":"upFrame","type":["string","number"],"description":"This is the frame or frameName that will be set when this button is in an up state. Give either a number to use a frame ID or a string for a frame name.","default":"","optional":true,"nullable":""},{"name":"group","type":"Phaser.Group","description":"Optional Group to add the object to. If not specified it will be added to the World group.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Button","description":"The newly created Button object."}},{"name":"graphics","description":"Creates a new Graphics object.","parameters":[{"name":"x","type":"number","description":"The x coordinate of the Graphic. The coordinate is relative to any parent container this object may be in.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate of the Graphic. The coordinate is relative to any parent container this object may be in.","default":"","optional":true,"nullable":""},{"name":"group","type":"Phaser.Group","description":"Optional Group to add the object to. If not specified it will be added to the World group.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Graphics","description":"The newly created graphics object."}},{"name":"emitter","description":"Create a new Emitter.\r\rA particle emitter can be used for one-time explosions or for\rcontinuous effects like rain and fire. All it really does is launch Particle objects out\rat set intervals, and fixes their positions and velocities accordingly.","parameters":[{"name":"x","type":"number","description":"The x coordinate within the Emitter that the particles are emitted from.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate within the Emitter that the particles are emitted from.","default":"","optional":true,"nullable":""},{"name":"maxParticles","type":"number","description":"The total number of particles in this emitter.","default":50,"optional":true,"nullable":""}],"returns":{"type":"Phaser.Particles.Arcade.Emitter","description":"The newly created emitter object."}},{"name":"retroFont","description":"Create a new RetroFont object.\r\rA RetroFont can be used as a texture for an Image or Sprite and optionally add it to the Cache.\rA RetroFont uses a bitmap which contains fixed with characters for the font set. You use character spacing to define the set.\rIf you need variable width character support then use a BitmapText object instead. The main difference between a RetroFont and a BitmapText\ris that a RetroFont creates a single texture that you can apply to a game object, where-as a BitmapText creates one Sprite object per letter of text.\rThe texture can be asssigned or one or multiple images/sprites, but note that the text the RetroFont uses will be shared across them all,\ri.e. if you need each Image to have different text in it, then you need to create multiple RetroFont objects.","parameters":[{"name":"font","type":"string","description":"The key of the image in the Game.Cache that the RetroFont will use.","default":"","optional":"","nullable":""},{"name":"characterWidth","type":"number","description":"The width of each character in the font set.","default":"","optional":"","nullable":""},{"name":"characterHeight","type":"number","description":"The height of each character in the font set.","default":"","optional":"","nullable":""},{"name":"chars","type":"string","description":"The characters used in the font set, in display order. You can use the TEXT_SET consts for common font set arrangements.","default":"","optional":"","nullable":""},{"name":"charsPerRow","type":"number","description":"The number of characters per row in the font set.","default":"","optional":"","nullable":""},{"name":"xSpacing","type":"number","description":"If the characters in the font set have horizontal spacing between them set the required amount here.","default":"","optional":true,"nullable":""},{"name":"ySpacing","type":"number","description":"If the characters in the font set have vertical spacing between them set the required amount here.","default":"","optional":true,"nullable":""},{"name":"xOffset","type":"number","description":"If the font set doesn't start at the top left of the given image, specify the X coordinate offset here.","default":"","optional":true,"nullable":""},{"name":"yOffset","type":"number","description":"If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.RetroFont","description":"The newly created RetroFont texture which can be applied to an Image or Sprite."}},{"name":"bitmapText","description":"Create a new BitmapText object.\r\rBitmapText objects work by taking a texture file and an XML file that describes the font structure.\rIt then generates a new Sprite object for each letter of the text, proportionally spaced out and aligned to \rmatch the font structure.\r\rBitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability \rto use Web Fonts. However you trade this flexibility for pure rendering speed. You can also create visually compelling BitmapTexts by \rprocessing the font texture in an image editor first, applying fills and any other effects required.\r\rTo create multi-line text insert \\r, \\n or \\r\\n escape codes into the text string.\r\rTo create a BitmapText data files you can use:\r\rBMFont (Windows, free): http://www.angelcode.com/products/bmfont/\rGlyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner\rLittera (Web-based, free): http://kvazars.com/littera/","parameters":[{"name":"x","type":"number","description":"X coordinate to display the BitmapText object at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y coordinate to display the BitmapText object at.","default":"","optional":"","nullable":""},{"name":"font","type":"string","description":"The key of the BitmapText as stored in Phaser.Cache.","default":"","optional":"","nullable":""},{"name":"text","type":"string","description":"The text that will be rendered. This can also be set later via BitmapText.text.","default":"''","optional":true,"nullable":""},{"name":"size","type":"number","description":"The size the font will be rendered at in pixels.","default":32,"optional":true,"nullable":""},{"name":"group","type":"Phaser.Group","description":"Optional Group to add the object to. If not specified it will be added to the World group.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapText","description":"The newly created bitmapText object."}},{"name":"tilemap","description":"Creates a new Phaser.Tilemap object.\r\rThe map can either be populated with data from a Tiled JSON file or from a CSV file.\rTo do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key.\rWhen using CSV data you must provide the key and the tileWidth and tileHeight parameters.\rIf creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here.\rNote that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it.","parameters":[{"name":"key","type":"string","description":"The key of the tilemap data as stored in the Cache. If you're creating a blank map either leave this parameter out or pass `null`.","default":"","optional":true,"nullable":""},{"name":"tileWidth","type":"number","description":"The pixel width of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data.","default":32,"optional":true,"nullable":""},{"name":"tileHeight","type":"number","description":"The pixel height of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data.","default":32,"optional":true,"nullable":""},{"name":"width","type":"number","description":"The width of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this.","default":10,"optional":true,"nullable":""},{"name":"height","type":"number","description":"The height of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this.","default":10,"optional":true,"nullable":""}],"returns":{"type":"Phaser.Tilemap","description":"The newly created tilemap object."}},{"name":"renderTexture","description":"A dynamic initially blank canvas to which images can be drawn.","parameters":[{"name":"width","type":"number","description":"the width of the RenderTexture.","default":100,"optional":true,"nullable":""},{"name":"height","type":"number","description":"the height of the RenderTexture.","default":100,"optional":true,"nullable":""},{"name":"key","type":"string","description":"Asset key for the RenderTexture when stored in the Cache (see addToCache parameter).","default":"''","optional":true,"nullable":""},{"name":"addToCache","type":"boolean","description":"Should this RenderTexture be added to the Game.Cache? If so you can retrieve it with Cache.getTexture(key)","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.RenderTexture","description":"The newly created RenderTexture object."}},{"name":"video","description":"Create a Video object.\r\rThis will return a Phaser.Video object which you can pass to a Sprite to be used as a texture.","parameters":[{"name":"key","type":["string","null"],"description":"The key of the video file in the Phaser.Cache that this Video object will play. Set to `null` or leave undefined if you wish to use a webcam as the source. See `startMediaStream` to start webcam capture.","default":"","optional":true,"nullable":""},{"name":"url","type":["string","null"],"description":"If the video hasn't been loaded then you can provide a full URL to the file here (make sure to set key to null)","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Video","description":"The newly created Video object."}},{"name":"bitmapData","description":"Create a BitmapData object.\r\rA BitmapData object can be manipulated and drawn to like a traditional Canvas object and used to texture Sprites.","parameters":[{"name":"width","type":"number","description":"The width of the BitmapData in pixels.","default":256,"optional":true,"nullable":""},{"name":"height","type":"number","description":"The height of the BitmapData in pixels.","default":256,"optional":true,"nullable":""},{"name":"key","type":"string","description":"Asset key for the BitmapData when stored in the Cache (see addToCache parameter).","default":"''","optional":true,"nullable":""},{"name":"addToCache","type":"boolean","description":"Should this BitmapData be added to the Game.Cache? If so you can retrieve it with Cache.getBitmapData(key)","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"The newly created BitmapData object."}},{"name":"filter","description":"A WebGL shader/filter that can be applied to Sprites.","parameters":[{"name":"filter","type":"string","description":"The name of the filter you wish to create, for example HueRotate or SineWave.","default":"","optional":"","nullable":""},{"type":"any","description":"Whatever parameters are needed to be passed to the filter init function.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Filter","description":"The newly created Phaser.Filter object."}},{"name":"plugin","description":"Add a new Plugin into the PluginManager.\r\rThe Plugin must have 2 properties: `game` and `parent`. Plugin.game is set to the game reference the PluginManager uses, and parent is set to the PluginManager.","parameters":[{"name":"plugin","type":["object","Phaser.Plugin"],"description":"The Plugin to add into the PluginManager. This can be a function or an existing object.","default":"","optional":"","nullable":""},{"name":"parameter","type":"*","description":"Additional parameters that will be passed to the Plugin.init method.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Plugin","description":"The Plugin that was added to the manager."}}],"members":[{"name":"game","access":"protected","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"world","access":"protected","virtual":false,"description":"A reference to the game world.","type":{"names":["Phaser.World"]},"default":""}]},{"name":"Phaser.Graphics","description":"A Graphics object is a way to draw primitives to your game. Primitives include forms of geometry, such as Rectangles,\rCircles and Polygons. They also include lines, arcs and curves. When you initially create a Graphics object it will\rbe empty. To 'draw' to it you first specify a lineStyle or fillStyle (or both), and then draw a shape. For example:\r\r```\rgraphics.beginFill(0xff0000);\rgraphics.drawCircle(50, 50, 100);\rgraphics.endFill();\r```\r\rThis will draw a circle shape to the Graphics object, with a diameter of 100, located at x: 50, y: 50.\r\rWhen a Graphics object is rendered it will render differently based on if the game is running under Canvas or\rWebGL. Under Canvas it will use the HTML Canvas context drawing operations to draw the path. Under WebGL the\rgraphics data is decomposed into polygons. Both of these are expensive processes, especially with complex shapes.\r\rIf your Graphics object doesn't change much (or at all) once you've drawn your shape to it, then you will help\rperformance by calling `Graphics.generateTexture`. This will 'bake' the Graphics object into a Texture, and return it.\rYou can then use this Texture for Sprites or other display objects. If your Graphics object updates frequently then\ryou should avoid doing this, as it will constantly generate new textures, which will consume memory.\r\rAs you can tell, Graphics objects are a bit of a trade-off. While they are extremely useful, you need to be careful\rin their complexity and quantity of them in your game.","constructor":{"name":"Graphics","description":"A Graphics object is a way to draw primitives to your game. Primitives include forms of geometry, such as Rectangles,\rCircles and Polygons. They also include lines, arcs and curves. When you initially create a Graphics object it will\rbe empty. To 'draw' to it you first specify a lineStyle or fillStyle (or both), and then draw a shape. For example:\r\r```\rgraphics.beginFill(0xff0000);\rgraphics.drawCircle(50, 50, 100);\rgraphics.endFill();\r```\r\rThis will draw a circle shape to the Graphics object, with a diameter of 100, located at x: 50, y: 50.\r\rWhen a Graphics object is rendered it will render differently based on if the game is running under Canvas or\rWebGL. Under Canvas it will use the HTML Canvas context drawing operations to draw the path. Under WebGL the\rgraphics data is decomposed into polygons. Both of these are expensive processes, especially with complex shapes.\r\rIf your Graphics object doesn't change much (or at all) once you've drawn your shape to it, then you will help\rperformance by calling `Graphics.generateTexture`. This will 'bake' the Graphics object into a Texture, and return it.\rYou can then use this Texture for Sprites or other display objects. If your Graphics object updates frequently then\ryou should avoid doing this, as it will constantly generate new textures, which will consume memory.\r\rAs you can tell, Graphics objects are a bit of a trade-off. While they are extremely useful, you need to be careful\rin their complexity and quantity of them in your game.","parameters":[{"name":"game","type":"Phaser.Game","description":"Current game instance.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"X position of the new graphics object.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"Y position of the new graphics object.","default":"","optional":true,"nullable":""}]},"functions":[{"name":"preUpdate","description":"Automatically called by World.preUpdate.","parameters":[]},{"name":"postUpdate","description":"Automatically called by World","parameters":[]},{"name":"destroy","description":"Destroy this Graphics instance.","parameters":[{"name":"destroyChildren","type":"boolean","description":"Should every child of this object have its destroy method called?","default":true,"optional":true,"nullable":""}]},{"name":"containsPoint","description":"Tests if a point is inside this graphics object","parameters":[{"name":"point","type":"Point","description":"the point to test","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"the result of the test"}},{"name":"addChild","description":"Adds a child to the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to add to the container","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"addChildAt","description":"Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child to add","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The index to place the child in","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"swapChildren","description":"Swaps the position of 2 Display Objects within this container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""},{"name":"child2","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}]},{"name":"getChildIndex","description":"Returns the index position of a child DisplayObject instance","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject instance to identify","default":"","optional":"","nullable":""}],"returns":{"type":"Number","description":"The index position of the child display object to identify"}},{"name":"setChildIndex","description":"Changes the position of an existing child in the display object container","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child DisplayObject instance for which you want to change the index number","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The resulting index number for the child display object","default":"","optional":"","nullable":""}]},{"name":"getChildAt","description":"Returns the child at the specified index","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child at the given index, if any."}},{"name":"removeChild","description":"Removes a child from the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to remove","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildAt","description":"Removes a child from the specified index position.","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildren","description":"Removes all children from this container that are within the begin and end indexes.","parameters":[{"name":"beginIndex","type":"Number","description":"The beginning position. Default value is 0.","default":"","optional":"","nullable":""},{"name":"endIndex","type":"Number","description":"The ending position. Default value is size of the container.","default":"","optional":"","nullable":""}]},{"name":"getBounds","description":"Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.","parameters":[{"name":"targetCoordinateSpace","type":["PIXIDisplayObject","PIXIMatrix"],"description":"Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object.","default":"","optional":true,"nullable":""}],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"getLocalBounds","description":"Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.","parameters":[],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"contains","description":"Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}],"returns":{"type":"Boolean","description":""}},{"name":"_renderWebGL","description":"Renders the object using the WebGL renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""}]},{"name":"_renderCanvas","description":"Renders the object using the Canvas renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""}]},{"name":"update","description":"Override this method in your own custom objects to handle any update requirements.\rIt is called immediately after `preUpdate` and before `postUpdate`.\rRemember if this Game Object has any children you should call update on those too.","parameters":[]},{"name":"alignIn","description":"Aligns this Game Object within another Game Object, or Rectangle, known as the\r'container', to one of 9 possible positions.\r\rThe container must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Game Objects within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Sprite to another Game Object does **not** make it a child of\rthe container. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, \r`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, \r`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.\r\rThe Game Objects are placed in such a way that their _bounds_ align with the\rcontainer, taking into consideration rotation, scale and the anchor property.\rThis allows you to neatly align Game Objects, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Game Object. For example:\r\r`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the containers bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"container","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Object","description":"This Game Object."}},{"name":"alignTo","description":"Aligns this Game Object to the side of another Game Object, or Rectangle, known as the\r'parent', in one of 11 possible positions.\r\rThe parent must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Game Objects within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Sprite to another Game Object does **not** make it a child of\rthe parent. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, \r`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, \r`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` \rand `Phaser.BOTTOM_RIGHT`.\r\rThe Game Objects are placed in such a way that their _bounds_ align with the\rparent, taking into consideration rotation, scale and the anchor property.\rThis allows you to neatly align Game Objects, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Game Object. For example:\r\r`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the parents bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"parent","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Object","description":"This Game Object."}},{"name":"revive","description":"Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.\r\rA resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.\r\rIt will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.","parameters":[{"name":"health","type":"number","description":"The health to give the Game Object. Only set if the GameObject has the Health component.","default":100,"optional":true,"nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"kill","description":"Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.\r\rIt will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.\r\rNote that killing a Game Object is a way for you to quickly recycle it in an object pool,\rit doesn't destroy the object or free it up from memory.\r\rIf you don't need this Game Object any more you should call `destroy` instead.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"reset","description":"Resets the Game Object.\r\rThis moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, \r`visible` and `renderable` to true.\r\rIf this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.\r\rIf this Game Object has a Physics Body it will reset the Body.","parameters":[{"name":"x","type":"number","description":"The x coordinate (in world space) to position the Game Object at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate (in world space) to position the Game Object at.","default":"","optional":"","nullable":""},{"name":"health","type":"number","description":"The health to give the Game Object if it has the Health component.","default":1,"optional":true,"nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}}],"members":[{"name":"type","access":"","virtual":false,"description":"The const type of this object.","type":{"names":["number"]},"default":""},{"name":"physicsType","access":"","virtual":false,"description":"The const physics body type of this object.","type":{"names":["number"]},"default":""},{"name":"anchor","access":"private","virtual":false,"description":"Required for a Graphics shape to work as a Physics body, do not modify this value.","type":{"names":["Phaser.Point"]},"default":""},{"name":"fillAlpha","access":"","virtual":false,"description":"The alpha value used when filling the Graphics object.","type":{"names":["Number"]},"default":""},{"name":"lineWidth","access":"","virtual":false,"description":"The width (thickness) of any lines drawn.","type":{"names":["Number"]},"default":""},{"name":"lineColor","access":"","virtual":false,"description":"The color of any lines drawn.","type":{"names":["String"]},"default":"0"},{"name":"graphicsData","access":"private","virtual":false,"description":"Graphics data","type":{"names":["Array"]},"default":""},{"name":"tint","access":"","virtual":false,"description":"The tint applied to the graphic shape. This is a hex value. Apply a value of 0xFFFFFF to reset the tint.","type":{"names":["Number"]},"default":"0xFFFFFF"},{"name":"blendMode","access":"","virtual":false,"description":"The blend mode to be applied to the graphic shape. Apply a value of PIXI.blendModes.NORMAL to reset the blend mode.","type":{"names":["Number"]},"default":"PIXI.blendModes.NORMAL;"},{"name":"currentPath","access":"private","virtual":false,"description":"Current path","type":{"names":["Object"]},"default":""},{"name":"_webGL","access":"private","virtual":false,"description":"Array containing some WebGL-related properties used by the WebGL renderer.","type":{"names":["Array"]},"default":""},{"name":"isMask","access":"","virtual":false,"description":"Whether this shape is being used as a mask.","type":{"names":["Boolean"]},"default":""},{"name":"boundsPadding","access":"","virtual":false,"description":"The bounds' padding used for bounds calculation.","type":{"names":["Number"]},"default":""},{"name":"dirty","access":"private","virtual":false,"description":"Used to detect if the graphics object has changed. If this is set to true then the graphics object will be recalculated.","type":{"names":["Boolean"]},"default":""},{"name":"_boundsDirty","access":"private","virtual":false,"description":"Used to detect if the bounds have been invalidated, by this Graphics being cleared or drawn to.\rIf this is set to true then the updateLocalBounds is called once in the postUpdate method.","type":{"names":["Boolean"]},"default":""},{"name":"webGLDirty","access":"private","virtual":false,"description":"Used to detect if the webgl graphics object has changed. If this is set to true then the graphics object will be recalculated.","type":{"names":["Boolean"]},"default":""},{"name":"cachedSpriteDirty","access":"private","virtual":false,"description":"Used to detect if the cached sprite object needs to be updated.","type":{"names":["Boolean"]},"default":""},{"name":"children","access":"","virtual":false,"description":"[read-only] The array of children of this container.","type":{"names":["Array.<DisplayObject>"]},"default":""},{"name":"ignoreChildInput","access":"","virtual":false,"description":"If `ignoreChildInput`  is `false` it will allow this objects _children_ to be considered as valid for Input events.\n\nIf this property is `true` then the children will _not_ be considered as valid for Input events.\n\nNote that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.","type":{"names":["Boolean"]},"default":""},{"name":"width","access":"","virtual":false,"description":"The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"position","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject, relative to its parent container.\n\nThe value of this property does not reflect any positioning happening further up the display list.\nTo obtain that value please see the `worldPosition` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"scale","access":"","virtual":false,"description":"The scale of this DisplayObject. A scale of 1:1 represents the DisplayObject\nat its default size. A value of 0.5 would scale this DisplayObject by half, and so on.\n\nThe value of this property does not reflect any scaling happening further up the display list.\nTo obtain that value please see the `worldScale` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"pivot","access":"","virtual":false,"description":"The pivot point of this DisplayObject that it rotates around. The values are expressed\nin pixel values.","type":{"names":["PIXIPoint"]},"default":""},{"name":"rotation","access":"","virtual":false,"description":"The rotation of this DisplayObject. The value is given, and expressed, in radians, and is based on\na right-handed orientation.\n\nThe value of this property does not reflect any rotation happening further up the display list.\nTo obtain that value please see the `worldRotation` property.","type":{"names":["Number"]},"default":""},{"name":"alpha","access":"","virtual":false,"description":"The alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nPlease note that an object with an alpha value of 0 is skipped during the render pass.\n\nThe value of this property does not reflect any alpha values set further up the display list.\nTo obtain that value please see the `worldAlpha` property.","type":{"names":["Number"]},"default":""},{"name":"visible","access":"","virtual":false,"description":"The visibility of this DisplayObject. A value of `false` makes the object invisible.\nA value of `true` makes it visible. Please note that an object with a visible value of\n`false` is skipped during the render pass. Equally a DisplayObject with visible false will\nnot render any of its children.\n\nThe value of this property does not reflect any visible values set further up the display list.\nTo obtain that value please see the `worldVisible` property.","type":{"names":["Boolean"]},"default":""},{"name":"hitArea","access":"","virtual":false,"description":"This is the defined area that will pick up mouse / touch events. It is null by default.\nSetting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)","type":{"names":["Rectangle","Circle","Ellipse","Polygon"]},"default":""},{"name":"renderable","access":"","virtual":false,"description":"Should this DisplayObject be rendered by the renderer? An object with a renderable value of\n`false` is skipped during the render pass.","type":{"names":["Boolean"]},"default":""},{"name":"parent","access":"","virtual":false,"description":"The parent DisplayObjectContainer that this DisplayObject is a child of.\nAll DisplayObjects must belong to a parent in order to be rendered.\nThe root parent is the Stage object. This property is set automatically when the\nDisplayObject is added to, or removed from, a DisplayObjectContainer.","type":{"names":["PIXIDisplayObjectContainer"]},"default":""},{"name":"worldAlpha","access":"","virtual":false,"description":"The multiplied alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nThis value is the calculated total, based on the alpha values of all parents of this DisplayObjects \nin the display list.\n\nTo obtain, and set, the local alpha value, see the `alpha` property.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"worldTransform","access":"","virtual":false,"description":"The current transform of this DisplayObject.\n\nThis property contains the calculated total, based on the transforms of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIMatrix"]},"default":""},{"name":"worldPosition","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject within the world.\n\nThis property contains the calculated total, based on the positions of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldScale","access":"","virtual":false,"description":"The global scale of this DisplayObject.\n\nThis property contains the calculated total, based on the scales of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldRotation","access":"","virtual":false,"description":"The rotation, in radians, of this DisplayObject.\n\nThis property contains the calculated total, based on the rotations of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"filterArea","access":"","virtual":false,"description":"The rectangular area used by filters when rendering a shader for this DisplayObject.","type":{"names":["Rectangle"]},"default":""},{"name":"_sr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_cr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_bounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_currentBounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_mask","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_cacheAsBitmap","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"_cacheIsDirty","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"x","access":"","virtual":false,"description":"The horizontal position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The vertical position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"worldVisible","access":"","virtual":false,"description":"Indicates if this DisplayObject is visible, based on it, and all of its parents, `visible` property values.","type":{"names":["Boolean"]},"default":""},{"name":"mask","access":"","virtual":false,"description":"Sets a mask for this DisplayObject. A mask is an instance of a Graphics object.\nWhen applied it limits the visible area of this DisplayObject to the shape of the mask.\nUnder a Canvas renderer it uses shape clipping. Under a WebGL renderer it uses a Stencil Buffer.\nTo remove a mask, set this property to `null`.","type":{"names":["PIXIGraphics"]},"default":""},{"name":"filters","access":"","virtual":false,"description":"Sets the filters for this DisplayObject. This is a WebGL only feature, and is ignored by the Canvas\nRenderer. A filter is a shader applied to this DisplayObject. You can modify the placement of the filter\nusing `DisplayObject.filterArea`.\n\nTo remove filters, set this property to `null`.\n\nNote: You cannot have a filter set, and a MULTIPLY Blend Mode active, at the same time. Setting a \nfilter will reset this DisplayObjects blend mode to NORMAL.","type":{"names":["Array"]},"default":""},{"name":"cacheAsBitmap","access":"","virtual":false,"description":"Sets if this DisplayObject should be cached as a bitmap.\n\nWhen invoked it will take a snapshot of the DisplayObject, as it is at that moment, and store it \nin a RenderTexture. This is then used whenever this DisplayObject is rendered. It can provide a\nperformance benefit for complex, but static, DisplayObjects. I.e. those with lots of children.\n\nCached Bitmaps do not track their parents. If you update a property of this DisplayObject, it will not\nre-generate the cached bitmap automatically. To do that you need to call `DisplayObject.updateCache`.\n\nTo remove a cached bitmap, set this property to `null`.","type":{"names":["Boolean"]},"default":""},{"name":"game","access":"","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"name","access":"","virtual":false,"description":"A user defined name given to this Game Object.\rThis value isn't ever used internally by Phaser, it is meant as a game level property.","type":{"names":["string"]},"default":""},{"name":"data","access":"","virtual":false,"description":"An empty Object that belongs to this Game Object.\rThis value isn't ever used internally by Phaser, but may be used by your own code, or\rby Phaser Plugins, to store data that needs to be associated with the Game Object,\rwithout polluting the Game Object directly.","type":{"names":["Object"]},"default":"{}"},{"name":"components","access":"protected","virtual":false,"description":"The components this Game Object has installed.","type":{"names":["object"]},"default":""},{"name":"z","access":"","virtual":false,"description":"The z depth of this Game Object within its parent Group.\rNo two objects in a Group can have the same z value.\rThis value is adjusted automatically whenever the Group hierarchy changes.\rIf you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.","type":{"names":["number"]},"default":""},{"name":"events","access":"","virtual":false,"description":"All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this\rGame Object, or any of its components.","type":{"names":["Phaser.Events"]},"default":""},{"name":"animations","access":"","virtual":false,"description":"If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance.\rThrough it you can create, play, pause and stop animations.","type":{"names":["Phaser.AnimationManager"]},"default":""},{"name":"key","access":"","virtual":false,"description":"The key of the image or texture used by this Game Object during rendering.\rIf it is a string it's the string used to retrieve the texture from the Phaser Image Cache.\rIt can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.\rIf a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache.\rIf a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.","type":{"names":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"]},"default":""},{"name":"world","access":"","virtual":false,"description":"The world coordinates of this Game Object in pixels.\rDepending on where in the display list this Game Object is placed this value can differ from `position`, \rwhich contains the x/y coordinates relative to the Game Objects parent.","type":{"names":["Phaser.Point"]},"default":""},{"name":"debug","access":"","virtual":false,"description":"A debug flag designed for use with `Game.enableStep`.","type":{"names":["boolean"]},"default":""},{"name":"previousPosition","access":"","virtual":false,"description":"The position the Game Object was located in the previous frame.","type":{"names":["Phaser.Point"]},"default":""},{"name":"previousRotation","access":"","virtual":false,"description":"The rotation the Game Object was in set to in the previous frame. Value is in radians.","type":{"names":["number"]},"default":""},{"name":"renderOrderID","access":"","virtual":false,"description":"The render order ID is used internally by the renderer and Input Manager and should not be modified.\rThis property is mostly used internally by the renderers, but is exposed for the use of plugins.","type":{"names":["number"]},"default":""},{"name":"fresh","access":"","virtual":false,"description":"A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update.\rThis property is mostly used internally by the physics systems, but is exposed for the use of plugins.","type":{"names":["boolean"]},"default":""},{"name":"pendingDestroy","access":"","virtual":false,"description":"A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update.\rYou can set it directly to allow you to flag an object to be destroyed on its next update.\r\rThis is extremely useful if you wish to destroy an object from within one of its own callbacks \rsuch as with Buttons or other Input events.","type":{"names":["boolean"]},"default":""},{"name":"_exists","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["boolean"]},"default":""},{"name":"exists","access":"","virtual":false,"description":"Controls if this Game Object is processed by the core game loop.\rIf this Game Object has a physics body it also controls if its physics body is updated or not.\rWhen `exists` is set to `false` it will remove its physics body from the physics world if it has one.\rIt also toggles the `visible` property to false as well.\r\rSetting `exists` to true will add its physics body back in to the physics world, if it has one.\rIt will also set the `visible` property to `true`.","type":{"names":["boolean"]},"default":""},{"name":"angle","access":"","virtual":false,"description":"The angle property is the rotation of the Game Object in *degrees* from its original orientation.\r\rValues from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.\r\rValues outside this range are added to or subtracted from 360 to obtain a value within the range. \rFor example, the statement player.angle = 450 is the same as player.angle = 90.\r\rIf you wish to work in radians instead of degrees you can use the property `rotation` instead. \rWorking in radians is slightly faster as it doesn't have to perform any calculations.","type":{"names":["number"]},"default":""},{"name":"autoCull","access":"","virtual":false,"description":"A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame.\rIf it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`.\rThis keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.\r\rThis is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,\ror you have tested performance and find it acceptable.","type":{"names":["boolean"]},"default":""},{"name":"inCamera","access":"","virtual":false,"description":"Checks if the Game Objects bounds intersect with the Game Camera bounds.\rReturns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.","type":{"names":["boolean"]},"default":""},{"name":"offsetX","access":"","virtual":false,"description":"The amount the Game Object is visually offset from its x coordinate.\rThis is the same as `width * anchor.x`.\rIt will only be > 0 if anchor.x is not equal to zero.","type":{"names":["number"]},"default":""},{"name":"offsetY","access":"","virtual":false,"description":"The amount the Game Object is visually offset from its y coordinate.\rThis is the same as `height * anchor.y`.\rIt will only be > 0 if anchor.y is not equal to zero.","type":{"names":["number"]},"default":""},{"name":"centerX","access":"","virtual":false,"description":"The center x coordinate of the Game Object.\rThis is the same as `(x - offsetX) + (width / 2)`.","type":{"names":["number"]},"default":""},{"name":"centerY","access":"","virtual":false,"description":"The center y coordinate of the Game Object.\rThis is the same as `(y - offsetY) + (height / 2)`.","type":{"names":["number"]},"default":""},{"name":"left","access":"","virtual":false,"description":"The left coordinate of the Game Object.\rThis is the same as `x - offsetX`.","type":{"names":["number"]},"default":""},{"name":"right","access":"","virtual":false,"description":"The right coordinate of the Game Object.\rThis is the same as `x + width - offsetX`.","type":{"names":["number"]},"default":""},{"name":"top","access":"","virtual":false,"description":"The y coordinate of the Game Object.\rThis is the same as `y - offsetY`.","type":{"names":["number"]},"default":""},{"name":"bottom","access":"","virtual":false,"description":"The sum of the y and height properties.\rThis is the same as `y + height - offsetY`.","type":{"names":["number"]},"default":""},{"name":"destroyPhase","access":"","virtual":false,"description":"As a Game Object runs through its destroy method this flag is set to true, \rand can be checked in any sub-systems or plugins it is being destroyed from.","type":{"names":["boolean"]},"default":""},{"name":"_fixedToCamera","access":"private","virtual":false,"description":"","type":{"names":["boolean"]},"default":""},{"name":"fixedToCamera","access":"","virtual":false,"description":"A Game Object that is \"fixed\" to the camera is rendered at a given x/y offsets from the top left of the camera. The offsets \rare stored in the `cameraOffset` property, which is initialized with the current object coordinates. \r\rThe values are adjusted at the rendering stage, overriding the Game Objects actual world position.\r\rThe end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world\rthe camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times \rregardless where in the world the camera is.\r\rNote that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.\r\rBe careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.","type":{"names":["boolean"]},"default":""},{"name":"cameraOffset","access":"","virtual":false,"description":"The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.\r\rThe values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.","type":{"names":["Phaser.Point"]},"default":""},{"name":"input","access":"","virtual":false,"description":"The Input Handler for this Game Object.\r\rBy default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.\r\rAfter you have done this, this property will be a reference to the Phaser InputHandler.","type":{"names":["Phaser.InputHandler","null"]},"default":""},{"name":"inputEnabled","access":"","virtual":false,"description":"By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created\rfor this Game Object and it will then start to process click / touch events and more.\r\rYou can then access the Input Handler via `this.input`.\r\rNote that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.\r\rIf you set this property to false it will stop the Input Handler from processing any more input events.\r\rIf you want to _temporarily_ disable input for a Game Object, then it's better to set\r`input.enabled = false`, as it won't reset any of the Input Handlers internal properties.\rYou can then toggle this back on as needed.","type":{"names":["boolean"]},"default":""},{"name":"checkWorldBounds","access":"","virtual":false,"description":"If this is set to `true` the Game Object checks if it is within the World bounds each frame. \r\rWhen it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.\r\rIf it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.\r\rIt also optionally kills the Game Object if `outOfBoundsKill` is `true`.\r\rWhen `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.\r\rThis is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,\ror you have tested performance and find it acceptable.","type":{"names":["boolean"]},"default":""},{"name":"outOfBoundsKill","access":"","virtual":false,"description":"If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.","type":{"names":["boolean"]},"default":""},{"name":"outOfCameraBoundsKill","access":"","virtual":false,"description":"If this and the `autoCull` property are both set to `true`, then the `kill` method\ris called as soon as the Game Object leaves the camera bounds.","type":{"names":["boolean"]},"default":""},{"name":"_outOfBoundsFired","access":"private","virtual":false,"description":"Internal state var.","type":{"names":["boolean"]},"default":""},{"name":"inWorld","access":"","virtual":false,"description":"Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.","type":{"names":["boolean"]},"default":""},{"name":"alive","access":"","virtual":false,"description":"A useful flag to control if the Game Object is alive or dead.\r\rThis is set automatically by the Health components `damage` method should the object run out of health.\rOr you can toggle it via your game code.\r\rThis property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates.\rHowever you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.","type":{"names":["boolean"]},"default":true},{"name":"lifespan","access":"","virtual":false,"description":"The lifespan allows you to give a Game Object a lifespan in milliseconds.\r\rOnce the Game Object is 'born' you can set this to a positive value.\r\rIt is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame.\rWhen it reaches zero it will call the `kill` method.\r\rVery handy for particles, bullets, collectibles, or any other short-lived entity.","type":{"names":["number"]},"default":""},{"name":"body","access":"","virtual":false,"description":"`body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated \rproperties and methods via it.\r\rBy default Game Objects won't add themselves to any physics system and their `body` property will be `null`.\r\rTo enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object\rand `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.\r\rYou can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.\r\rImportant: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5, \rso the physics body is centered on the Game Object.\r\rIf you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.","type":{"names":["Phaser.Physics.Arcade.Body","Phaser.Physics.P2.Body","Phaser.Physics.Ninja.Body","null"]},"default":""}]},{"name":"PIXI.Phaser.GraphicsData","description":"A GraphicsData object.","constructor":{"name":"Phaser.GraphicsData","description":"A GraphicsData object.","parameters":[{"name":"lineWidth","type":"number","description":"the width of the line to draw","default":"","optional":"","nullable":""},{"name":"lineColor","type":"number","description":"the color of the line to draw","default":"","optional":"","nullable":""},{"name":"lineAlpha","type":"number","description":"the alpha of the line to draw","default":"","optional":"","nullable":""},{"name":"fillColor","type":"number","description":"the color of the fill","default":"","optional":"","nullable":""},{"name":"fillAlpha","type":"number","description":"the alpha of the fill","default":"","optional":"","nullable":""},{"name":"fill","type":"boolean","description":"whether or not the shape is filled with a colour","default":"","optional":"","nullable":""},{"name":"shape","type":["Circle","Rectangle","Ellipse","Line","Polygon"],"description":"The shape object to draw.","default":"","optional":"","nullable":""}]},"functions":[],"members":[]},{"name":"Phaser.Image","description":"An Image is a light-weight object you can use to display anything that doesn't need physics or animation.\rIt can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.","constructor":{"name":"Image","description":"An Image is a light-weight object you can use to display anything that doesn't need physics or animation.\rIt can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate of the Image. The coordinate is relative to any parent container this Image may be in.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate of the Image. The coordinate is relative to any parent container this Image may be in.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","PIXI.Texture"],"description":"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.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"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.","default":"","optional":true,"nullable":""}]},"functions":[{"name":"preUpdate","description":"Automatically called by World.preUpdate.","parameters":[]},{"name":"setTexture","description":"Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous\ntexture this Sprite was using.","parameters":[{"name":"texture","type":"PIXI.Texture","description":"The PIXI texture that is displayed by the sprite","default":"","optional":"","nullable":""},{"name":"destroy","type":"Boolean","description":"Call Texture.destroy on the current texture before replacing it with the new one?","default":"","optional":true,"nullable":""}]},{"name":"onTextureUpdate","description":"When the texture is updated, this event will fire to update the scale and frame","parameters":[{"name":"event","type":"","description":"-","default":"","optional":"","nullable":""}]},{"name":"getBounds","description":"Returns the bounds of the Sprite as a rectangle.\nThe bounds calculation takes the worldTransform into account.\n\nIt is important to note that the transform is not updated when you call this method.\nSo if this Sprite is the child of a Display Object which has had its transform\nupdated since the last render pass, those changes will not yet have been applied\nto this Sprites worldTransform. If you need to ensure that all parent transforms\nare factored into this getBounds operation then you should call `updateTransform`\non the root most object in this Sprites display list first.","parameters":[{"name":"matrix","type":"Matrix","description":"the transformation matrix of the sprite","default":"","optional":"","nullable":""}],"returns":{"type":"Rectangle","description":"the framing rectangle"}},{"name":"getLocalBounds","description":"Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.","parameters":[],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"_renderWebGL","description":"Renders the object using the WebGL renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""},{"name":"matrix","type":"Matrix","description":"- Optional matrix. If provided the Display Object will be rendered using this matrix, otherwise it will use its worldTransform.","default":"","optional":true,"nullable":""}]},{"name":"_renderCanvas","description":"Renders the object using the Canvas renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""},{"name":"matrix","type":"Matrix","description":"- Optional matrix. If provided the Display Object will be rendered using this matrix, otherwise it will use its worldTransform.","default":"","optional":true,"nullable":""}]},{"name":"addChild","description":"Adds a child to the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to add to the container","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"addChildAt","description":"Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child to add","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The index to place the child in","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"swapChildren","description":"Swaps the position of 2 Display Objects within this container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""},{"name":"child2","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}]},{"name":"getChildIndex","description":"Returns the index position of a child DisplayObject instance","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject instance to identify","default":"","optional":"","nullable":""}],"returns":{"type":"Number","description":"The index position of the child display object to identify"}},{"name":"setChildIndex","description":"Changes the position of an existing child in the display object container","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child DisplayObject instance for which you want to change the index number","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The resulting index number for the child display object","default":"","optional":"","nullable":""}]},{"name":"getChildAt","description":"Returns the child at the specified index","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child at the given index, if any."}},{"name":"removeChild","description":"Removes a child from the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to remove","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildAt","description":"Removes a child from the specified index position.","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildren","description":"Removes all children from this container that are within the begin and end indexes.","parameters":[{"name":"beginIndex","type":"Number","description":"The beginning position. Default value is 0.","default":"","optional":"","nullable":""},{"name":"endIndex","type":"Number","description":"The ending position. Default value is size of the container.","default":"","optional":"","nullable":""}]},{"name":"contains","description":"Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}],"returns":{"type":"Boolean","description":""}},{"name":"update","description":"Override this method in your own custom objects to handle any update requirements.\rIt is called immediately after `preUpdate` and before `postUpdate`.\rRemember if this Game Object has any children you should call update on those too.","parameters":[]},{"name":"postUpdate","description":"Internal method called by the World postUpdate cycle.","parameters":[]},{"name":"play","description":"Plays an Animation.\r\rThe animation should have previously been created via `animations.add`.\r\rIf the animation is already playing calling this again won't do anything.\rIf you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.","parameters":[{"name":"name","type":"string","description":"The name of the animation to be played, e.g. \"fire\", \"walk\", \"jump\". Must have been previously created via 'AnimationManager.add'.","default":"","optional":"","nullable":""},{"name":"frameRate","type":"number","description":"The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used.","default":"","optional":true,"nullable":""},{"name":"loop","type":"boolean","description":"Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.","default":"","optional":true,"nullable":""},{"name":"killOnComplete","type":"boolean","description":"If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Animation","description":"A reference to playing Animation."}},{"name":"alignIn","description":"Aligns this Game Object within another Game Object, or Rectangle, known as the\r'container', to one of 9 possible positions.\r\rThe container must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Game Objects within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Sprite to another Game Object does **not** make it a child of\rthe container. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, \r`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, \r`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.\r\rThe Game Objects are placed in such a way that their _bounds_ align with the\rcontainer, taking into consideration rotation, scale and the anchor property.\rThis allows you to neatly align Game Objects, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Game Object. For example:\r\r`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the containers bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"container","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Object","description":"This Game Object."}},{"name":"alignTo","description":"Aligns this Game Object to the side of another Game Object, or Rectangle, known as the\r'parent', in one of 11 possible positions.\r\rThe parent must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Game Objects within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Sprite to another Game Object does **not** make it a child of\rthe parent. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, \r`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, \r`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` \rand `Phaser.BOTTOM_RIGHT`.\r\rThe Game Objects are placed in such a way that their _bounds_ align with the\rparent, taking into consideration rotation, scale and the anchor property.\rThis allows you to neatly align Game Objects, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Game Object. For example:\r\r`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the parents bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"parent","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Object","description":"This Game Object."}},{"name":"bringToTop","description":"Brings this Game Object to the top of its parents display list.\rVisually this means it will render over the top of any old child in the same Group.\r\rIf this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"sendToBack","description":"Sends this Game Object to the bottom of its parents display list.\rVisually this means it will render below all other children in the same Group.\r\rIf this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"moveUp","description":"Moves this Game Object up one place in its parents display list.\rThis call has no effect if the Game Object is already at the top of the display list.\r\rIf this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"moveDown","description":"Moves this Game Object down one place in its parents display list.\rThis call has no effect if the Game Object is already at the bottom of the display list.\r\rIf this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"crop","description":"Crop allows you to crop the texture being used to display this Game Object.\rSetting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.\r\rCropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method,\ror by modifying `cropRect` property directly and then calling `updateCrop`.\r\rThe rectangle object given to this method can be either a `Phaser.Rectangle` or any other object \rso long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.\r\rA reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, \rin which case the values are duplicated to a local object.","parameters":[{"name":"rect","type":"Phaser.Rectangle","description":"The Rectangle used during cropping. Pass null or no parameters to clear a previously set crop rectangle.","default":"","optional":"","nullable":""},{"name":"copy","type":"boolean","description":"If false `cropRect` will be stored as a reference to the given rect. If true it will copy the rect values into a local Phaser Rectangle object stored in cropRect.","default":"","optional":true,"nullable":""}]},{"name":"updateCrop","description":"If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property,\ror the rectangle it references, then you need to update the crop frame by calling this method.","parameters":[]},{"name":"destroy","description":"Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present\rand nulls its reference to `game`, freeing it up for garbage collection.\r\rIf this Game Object has the Events component it will also dispatch the `onDestroy` event.\r\rYou can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've\rmore than one Game Object sharing the same BaseTexture.","parameters":[{"name":"destroyChildren","type":"boolean","description":"Should every child of this object have its destroy method called as well?","default":true,"optional":true,"nullable":""},{"name":"destroyTexture","type":"boolean","description":"Destroy the BaseTexture this Game Object is using? Note that if another Game Object is sharing the same BaseTexture it will invalidate it.","default":"","optional":true,"nullable":""}]},{"name":"revive","description":"Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.\r\rA resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.\r\rIt will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.","parameters":[{"name":"health","type":"number","description":"The health to give the Game Object. Only set if the GameObject has the Health component.","default":100,"optional":true,"nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"kill","description":"Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.\r\rIt will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.\r\rNote that killing a Game Object is a way for you to quickly recycle it in an object pool,\rit doesn't destroy the object or free it up from memory.\r\rIf you don't need this Game Object any more you should call `destroy` instead.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"loadTexture","description":"Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.\r\rIf your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.\r\rYou should only use `loadTexture` if you want to replace the base texture entirely.\r\rCalling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.\r\rYou can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. \rDoing this then sets the key to be the `frame` argument (the frame is set to zero). \r\rThis allows you to create sprites using `load.image` during development, and then change them \rto use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' \rand swapping it to be the key of the atlas data.\r\rNote: You cannot use a RenderTexture as a texture for a TileSprite.","parameters":[{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":"","nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""},{"name":"stopAnimation","type":"boolean","description":"If an animation is already playing on this Sprite you can choose to stop it or let it carry on playing.","default":true,"optional":true,"nullable":""}]},{"name":"setFrame","description":"Sets the texture frame the Game Object uses for rendering.\r\rThis is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.","parameters":[{"name":"frame","type":"Phaser.Frame","description":"The Frame to be used by the texture.","default":"","optional":"","nullable":""}]},{"name":"resizeFrame","description":"Resizes the Frame dimensions that the Game Object uses for rendering.\r\rYou shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData\rit can be useful to adjust the dimensions directly in this way.","parameters":[{"name":"parent","type":"object","description":"The parent texture object that caused the resize, i.e. a Phaser.Video object.","default":"","optional":"","nullable":""},{"name":"width","type":"integer","description":"The new width of the texture.","default":"","optional":"","nullable":""},{"name":"height","type":"integer","description":"The new height of the texture.","default":"","optional":"","nullable":""}]},{"name":"resetFrame","description":"Resets the texture frame dimensions that the Game Object uses for rendering.","parameters":[]},{"name":"overlap","description":"Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object, \rwhich can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.\r\rThis check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.\r\rTherefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency.\rIt should be fine for low-volume testing where physics isn't required.","parameters":[{"name":"displayObject","type":["Phaser.Sprite","Phaser.Image","Phaser.TileSprite","Phaser.Button","PIXI.DisplayObject"],"description":"The display object to check against.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the bounds of this Game Object intersects at any point with the bounds of the given display object."}},{"name":"reset","description":"Resets the Game Object.\r\rThis moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, \r`visible` and `renderable` to true.\r\rIf this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.\r\rIf this Game Object has a Physics Body it will reset the Body.","parameters":[{"name":"x","type":"number","description":"The x coordinate (in world space) to position the Game Object at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate (in world space) to position the Game Object at.","default":"","optional":"","nullable":""},{"name":"health","type":"number","description":"The health to give the Game Object if it has the Health component.","default":1,"optional":true,"nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"checkTransform","description":"Adjust scaling limits, if set, to this Game Object.","parameters":[{"name":"wt","type":"PIXI.Matrix","description":"The updated worldTransform matrix.","default":"","optional":"","nullable":""}]},{"name":"setScaleMinMax","description":"Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.\r\rFor example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored \rand the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.\r\rBy setting these values you can carefully control how Game Objects deal with responsive scaling.\r\rIf only one parameter is given then that value will be used for both scaleMin and scaleMax:\r`setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1\r\rIf only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y:\r`setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2\r\rIf you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly, \ror pass `null` for the `maxX` and `maxY` parameters.\r\rCall `setScaleMinMax(null)` to clear all previously set values.","parameters":[{"name":"minX","type":["number","null"],"description":"The minimum horizontal scale value this Game Object can scale down to.","default":"","optional":"","nullable":""},{"name":"minY","type":["number","null"],"description":"The minimum vertical scale value this Game Object can scale down to.","default":"","optional":"","nullable":""},{"name":"maxX","type":["number","null"],"description":"The maximum horizontal scale value this Game Object can scale up to.","default":"","optional":"","nullable":""},{"name":"maxY","type":["number","null"],"description":"The maximum vertical scale value this Game Object can scale up to.","default":"","optional":"","nullable":""}]}],"members":[{"name":"type","access":"","virtual":false,"description":"The const type of this object.","type":{"names":["number"]},"default":""},{"name":"anchor","access":"","virtual":false,"description":"The anchor sets the origin point of the texture.\nThe default is 0,0 this means the texture's origin is the top left\nSetting than anchor to 0.5,0.5 means the textures origin is centered\nSetting the anchor to 1,1 would mean the textures origin points will be the bottom right corner","type":{"names":["Point"]},"default":""},{"name":"texture","access":"","virtual":false,"description":"The texture that the sprite is using","type":{"names":["PIXI.Texture"]},"default":""},{"name":"_width","access":"private","virtual":false,"description":"The width of the sprite (this is initially set by the texture)","type":{"names":["Number"]},"default":""},{"name":"_height","access":"private","virtual":false,"description":"The height of the sprite (this is initially set by the texture)","type":{"names":["Number"]},"default":""},{"name":"tint","access":"","virtual":false,"description":"The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.","type":{"names":["Number"]},"default":"0xFFFFFF"},{"name":"cachedTint","access":"private","virtual":false,"description":"The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.","type":{"names":["Number"]},"default":"-1"},{"name":"tintedTexture","access":"","virtual":false,"description":"A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)","type":{"names":["Canvas"]},"default":"null"},{"name":"blendMode","access":"","virtual":false,"description":"The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.\n\nWarning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.","type":{"names":["Number"]},"default":"PIXI.blendModes.NORMAL;"},{"name":"shader","access":"","virtual":false,"description":"The shader that will be used to render this Sprite.\nSet to null to remove a current shader.","type":{"names":["PhaserFilter"]},"default":"null"},{"name":"exists","access":"","virtual":false,"description":"Controls if this Sprite is processed by the core Phaser game loops and Group loops.","type":{"names":["Boolean"]},"default":"true"},{"name":"width","access":"","virtual":false,"description":"The width of the sprite, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the sprite, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"children","access":"","virtual":false,"description":"[read-only] The array of children of this container.","type":{"names":["Array.<DisplayObject>"]},"default":""},{"name":"ignoreChildInput","access":"","virtual":false,"description":"If `ignoreChildInput`  is `false` it will allow this objects _children_ to be considered as valid for Input events.\n\nIf this property is `true` then the children will _not_ be considered as valid for Input events.\n\nNote that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.","type":{"names":["Boolean"]},"default":""},{"name":"position","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject, relative to its parent container.\n\nThe value of this property does not reflect any positioning happening further up the display list.\nTo obtain that value please see the `worldPosition` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"scale","access":"","virtual":false,"description":"The scale of this DisplayObject. A scale of 1:1 represents the DisplayObject\nat its default size. A value of 0.5 would scale this DisplayObject by half, and so on.\n\nThe value of this property does not reflect any scaling happening further up the display list.\nTo obtain that value please see the `worldScale` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"pivot","access":"","virtual":false,"description":"The pivot point of this DisplayObject that it rotates around. The values are expressed\nin pixel values.","type":{"names":["PIXIPoint"]},"default":""},{"name":"rotation","access":"","virtual":false,"description":"The rotation of this DisplayObject. The value is given, and expressed, in radians, and is based on\na right-handed orientation.\n\nThe value of this property does not reflect any rotation happening further up the display list.\nTo obtain that value please see the `worldRotation` property.","type":{"names":["Number"]},"default":""},{"name":"alpha","access":"","virtual":false,"description":"The alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nPlease note that an object with an alpha value of 0 is skipped during the render pass.\n\nThe value of this property does not reflect any alpha values set further up the display list.\nTo obtain that value please see the `worldAlpha` property.","type":{"names":["Number"]},"default":""},{"name":"visible","access":"","virtual":false,"description":"The visibility of this DisplayObject. A value of `false` makes the object invisible.\nA value of `true` makes it visible. Please note that an object with a visible value of\n`false` is skipped during the render pass. Equally a DisplayObject with visible false will\nnot render any of its children.\n\nThe value of this property does not reflect any visible values set further up the display list.\nTo obtain that value please see the `worldVisible` property.","type":{"names":["Boolean"]},"default":""},{"name":"hitArea","access":"","virtual":false,"description":"This is the defined area that will pick up mouse / touch events. It is null by default.\nSetting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)","type":{"names":["Rectangle","Circle","Ellipse","Polygon"]},"default":""},{"name":"renderable","access":"","virtual":false,"description":"Should this DisplayObject be rendered by the renderer? An object with a renderable value of\n`false` is skipped during the render pass.","type":{"names":["Boolean"]},"default":""},{"name":"parent","access":"","virtual":false,"description":"The parent DisplayObjectContainer that this DisplayObject is a child of.\nAll DisplayObjects must belong to a parent in order to be rendered.\nThe root parent is the Stage object. This property is set automatically when the\nDisplayObject is added to, or removed from, a DisplayObjectContainer.","type":{"names":["PIXIDisplayObjectContainer"]},"default":""},{"name":"worldAlpha","access":"","virtual":false,"description":"The multiplied alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nThis value is the calculated total, based on the alpha values of all parents of this DisplayObjects \nin the display list.\n\nTo obtain, and set, the local alpha value, see the `alpha` property.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"worldTransform","access":"","virtual":false,"description":"The current transform of this DisplayObject.\n\nThis property contains the calculated total, based on the transforms of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIMatrix"]},"default":""},{"name":"worldPosition","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject within the world.\n\nThis property contains the calculated total, based on the positions of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldScale","access":"","virtual":false,"description":"The global scale of this DisplayObject.\n\nThis property contains the calculated total, based on the scales of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldRotation","access":"","virtual":false,"description":"The rotation, in radians, of this DisplayObject.\n\nThis property contains the calculated total, based on the rotations of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"filterArea","access":"","virtual":false,"description":"The rectangular area used by filters when rendering a shader for this DisplayObject.","type":{"names":["Rectangle"]},"default":""},{"name":"_sr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_cr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_bounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_currentBounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_mask","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_cacheAsBitmap","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"_cacheIsDirty","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"x","access":"","virtual":false,"description":"The horizontal position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The vertical position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"worldVisible","access":"","virtual":false,"description":"Indicates if this DisplayObject is visible, based on it, and all of its parents, `visible` property values.","type":{"names":["Boolean"]},"default":""},{"name":"mask","access":"","virtual":false,"description":"Sets a mask for this DisplayObject. A mask is an instance of a Graphics object.\nWhen applied it limits the visible area of this DisplayObject to the shape of the mask.\nUnder a Canvas renderer it uses shape clipping. Under a WebGL renderer it uses a Stencil Buffer.\nTo remove a mask, set this property to `null`.","type":{"names":["PIXIGraphics"]},"default":""},{"name":"filters","access":"","virtual":false,"description":"Sets the filters for this DisplayObject. This is a WebGL only feature, and is ignored by the Canvas\nRenderer. A filter is a shader applied to this DisplayObject. You can modify the placement of the filter\nusing `DisplayObject.filterArea`.\n\nTo remove filters, set this property to `null`.\n\nNote: You cannot have a filter set, and a MULTIPLY Blend Mode active, at the same time. Setting a \nfilter will reset this DisplayObjects blend mode to NORMAL.","type":{"names":["Array"]},"default":""},{"name":"cacheAsBitmap","access":"","virtual":false,"description":"Sets if this DisplayObject should be cached as a bitmap.\n\nWhen invoked it will take a snapshot of the DisplayObject, as it is at that moment, and store it \nin a RenderTexture. This is then used whenever this DisplayObject is rendered. It can provide a\nperformance benefit for complex, but static, DisplayObjects. I.e. those with lots of children.\n\nCached Bitmaps do not track their parents. If you update a property of this DisplayObject, it will not\nre-generate the cached bitmap automatically. To do that you need to call `DisplayObject.updateCache`.\n\nTo remove a cached bitmap, set this property to `null`.","type":{"names":["Boolean"]},"default":""},{"name":"game","access":"","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"name","access":"","virtual":false,"description":"A user defined name given to this Game Object.\rThis value isn't ever used internally by Phaser, it is meant as a game level property.","type":{"names":["string"]},"default":""},{"name":"data","access":"","virtual":false,"description":"An empty Object that belongs to this Game Object.\rThis value isn't ever used internally by Phaser, but may be used by your own code, or\rby Phaser Plugins, to store data that needs to be associated with the Game Object,\rwithout polluting the Game Object directly.","type":{"names":["Object"]},"default":"{}"},{"name":"components","access":"protected","virtual":false,"description":"The components this Game Object has installed.","type":{"names":["object"]},"default":""},{"name":"z","access":"","virtual":false,"description":"The z depth of this Game Object within its parent Group.\rNo two objects in a Group can have the same z value.\rThis value is adjusted automatically whenever the Group hierarchy changes.\rIf you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.","type":{"names":["number"]},"default":""},{"name":"events","access":"","virtual":false,"description":"All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this\rGame Object, or any of its components.","type":{"names":["Phaser.Events"]},"default":""},{"name":"animations","access":"","virtual":false,"description":"If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance.\rThrough it you can create, play, pause and stop animations.","type":{"names":["Phaser.AnimationManager"]},"default":""},{"name":"key","access":"","virtual":false,"description":"The key of the image or texture used by this Game Object during rendering.\rIf it is a string it's the string used to retrieve the texture from the Phaser Image Cache.\rIt can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.\rIf a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache.\rIf a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.","type":{"names":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"]},"default":""},{"name":"world","access":"","virtual":false,"description":"The world coordinates of this Game Object in pixels.\rDepending on where in the display list this Game Object is placed this value can differ from `position`, \rwhich contains the x/y coordinates relative to the Game Objects parent.","type":{"names":["Phaser.Point"]},"default":""},{"name":"debug","access":"","virtual":false,"description":"A debug flag designed for use with `Game.enableStep`.","type":{"names":["boolean"]},"default":""},{"name":"previousPosition","access":"","virtual":false,"description":"The position the Game Object was located in the previous frame.","type":{"names":["Phaser.Point"]},"default":""},{"name":"previousRotation","access":"","virtual":false,"description":"The rotation the Game Object was in set to in the previous frame. Value is in radians.","type":{"names":["number"]},"default":""},{"name":"renderOrderID","access":"","virtual":false,"description":"The render order ID is used internally by the renderer and Input Manager and should not be modified.\rThis property is mostly used internally by the renderers, but is exposed for the use of plugins.","type":{"names":["number"]},"default":""},{"name":"fresh","access":"","virtual":false,"description":"A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update.\rThis property is mostly used internally by the physics systems, but is exposed for the use of plugins.","type":{"names":["boolean"]},"default":""},{"name":"pendingDestroy","access":"","virtual":false,"description":"A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update.\rYou can set it directly to allow you to flag an object to be destroyed on its next update.\r\rThis is extremely useful if you wish to destroy an object from within one of its own callbacks \rsuch as with Buttons or other Input events.","type":{"names":["boolean"]},"default":""},{"name":"_exists","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["boolean"]},"default":""},{"name":"angle","access":"","virtual":false,"description":"The angle property is the rotation of the Game Object in *degrees* from its original orientation.\r\rValues from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.\r\rValues outside this range are added to or subtracted from 360 to obtain a value within the range. \rFor example, the statement player.angle = 450 is the same as player.angle = 90.\r\rIf you wish to work in radians instead of degrees you can use the property `rotation` instead. \rWorking in radians is slightly faster as it doesn't have to perform any calculations.","type":{"names":["number"]},"default":""},{"name":"autoCull","access":"","virtual":false,"description":"A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame.\rIf it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`.\rThis keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.\r\rThis is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,\ror you have tested performance and find it acceptable.","type":{"names":["boolean"]},"default":""},{"name":"inCamera","access":"","virtual":false,"description":"Checks if the Game Objects bounds intersect with the Game Camera bounds.\rReturns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.","type":{"names":["boolean"]},"default":""},{"name":"offsetX","access":"","virtual":false,"description":"The amount the Game Object is visually offset from its x coordinate.\rThis is the same as `width * anchor.x`.\rIt will only be > 0 if anchor.x is not equal to zero.","type":{"names":["number"]},"default":""},{"name":"offsetY","access":"","virtual":false,"description":"The amount the Game Object is visually offset from its y coordinate.\rThis is the same as `height * anchor.y`.\rIt will only be > 0 if anchor.y is not equal to zero.","type":{"names":["number"]},"default":""},{"name":"centerX","access":"","virtual":false,"description":"The center x coordinate of the Game Object.\rThis is the same as `(x - offsetX) + (width / 2)`.","type":{"names":["number"]},"default":""},{"name":"centerY","access":"","virtual":false,"description":"The center y coordinate of the Game Object.\rThis is the same as `(y - offsetY) + (height / 2)`.","type":{"names":["number"]},"default":""},{"name":"left","access":"","virtual":false,"description":"The left coordinate of the Game Object.\rThis is the same as `x - offsetX`.","type":{"names":["number"]},"default":""},{"name":"right","access":"","virtual":false,"description":"The right coordinate of the Game Object.\rThis is the same as `x + width - offsetX`.","type":{"names":["number"]},"default":""},{"name":"top","access":"","virtual":false,"description":"The y coordinate of the Game Object.\rThis is the same as `y - offsetY`.","type":{"names":["number"]},"default":""},{"name":"bottom","access":"","virtual":false,"description":"The sum of the y and height properties.\rThis is the same as `y + height - offsetY`.","type":{"names":["number"]},"default":""},{"name":"cropRect","access":"","virtual":false,"description":"The Rectangle used to crop the texture this Game Object uses.\rSet this property via `crop`. \rIf you modify this property directly you must call `updateCrop` in order to have the change take effect.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"_crop","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"destroyPhase","access":"","virtual":false,"description":"As a Game Object runs through its destroy method this flag is set to true, \rand can be checked in any sub-systems or plugins it is being destroyed from.","type":{"names":["boolean"]},"default":""},{"name":"_fixedToCamera","access":"private","virtual":false,"description":"","type":{"names":["boolean"]},"default":""},{"name":"fixedToCamera","access":"","virtual":false,"description":"A Game Object that is \"fixed\" to the camera is rendered at a given x/y offsets from the top left of the camera. The offsets \rare stored in the `cameraOffset` property, which is initialized with the current object coordinates. \r\rThe values are adjusted at the rendering stage, overriding the Game Objects actual world position.\r\rThe end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world\rthe camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times \rregardless where in the world the camera is.\r\rNote that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.\r\rBe careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.","type":{"names":["boolean"]},"default":""},{"name":"cameraOffset","access":"","virtual":false,"description":"The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.\r\rThe values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.","type":{"names":["Phaser.Point"]},"default":""},{"name":"input","access":"","virtual":false,"description":"The Input Handler for this Game Object.\r\rBy default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.\r\rAfter you have done this, this property will be a reference to the Phaser InputHandler.","type":{"names":["Phaser.InputHandler","null"]},"default":""},{"name":"inputEnabled","access":"","virtual":false,"description":"By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created\rfor this Game Object and it will then start to process click / touch events and more.\r\rYou can then access the Input Handler via `this.input`.\r\rNote that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.\r\rIf you set this property to false it will stop the Input Handler from processing any more input events.\r\rIf you want to _temporarily_ disable input for a Game Object, then it's better to set\r`input.enabled = false`, as it won't reset any of the Input Handlers internal properties.\rYou can then toggle this back on as needed.","type":{"names":["boolean"]},"default":""},{"name":"alive","access":"","virtual":false,"description":"A useful flag to control if the Game Object is alive or dead.\r\rThis is set automatically by the Health components `damage` method should the object run out of health.\rOr you can toggle it via your game code.\r\rThis property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates.\rHowever you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.","type":{"names":["boolean"]},"default":true},{"name":"lifespan","access":"","virtual":false,"description":"The lifespan allows you to give a Game Object a lifespan in milliseconds.\r\rOnce the Game Object is 'born' you can set this to a positive value.\r\rIt is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame.\rWhen it reaches zero it will call the `kill` method.\r\rVery handy for particles, bullets, collectibles, or any other short-lived entity.","type":{"names":["number"]},"default":""},{"name":"customRender","access":"private","virtual":false,"description":"Does this texture require a custom render call? (as set by BitmapData, Video, etc)","type":{"names":["boolean"]},"default":""},{"name":"_frame","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"frame","access":"","virtual":false,"description":"Gets or sets the current frame index of the texture being used to render this Game Object.\r\rTo change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use,\rfor example: `player.frame = 4`.\r\rIf the frame index given doesn't exist it will revert to the first frame found in the texture.\r\rIf you are using a texture atlas then you should use the `frameName` property instead.\r\rIf you wish to fully replace the texture being used see `loadTexture`.","type":{"names":["integer"]},"default":""},{"name":"frameName","access":"","virtual":false,"description":"Gets or sets the current frame name of the texture being used to render this Game Object.\r\rTo change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use, \rfor example: `player.frameName = \"idle\"`.\r\rIf the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.\r\rIf you are using a sprite sheet then you should use the `frame` property instead.\r\rIf you wish to fully replace the texture being used see `loadTexture`.","type":{"names":["string"]},"default":""},{"name":"transformCallback","access":"","virtual":false,"description":"The callback that will apply any scale limiting to the worldTransform.","type":{"names":["function"]},"default":""},{"name":"transformCallbackContext","access":"","virtual":false,"description":"The context under which `transformCallback` is called.","type":{"names":["object"]},"default":""},{"name":"scaleMin","access":"","virtual":false,"description":"The minimum scale this Game Object will scale down to.\r\rIt allows you to prevent a parent from scaling this Game Object lower than the given value.\r\rSet it to `null` to remove the limit.","type":{"names":["Phaser.Point"]},"default":""},{"name":"scaleMax","access":"","virtual":false,"description":"The maximum scale this Game Object will scale up to. \r\rIt allows you to prevent a parent from scaling this Game Object higher than the given value.\r\rSet it to `null` to remove the limit.","type":{"names":["Phaser.Point"]},"default":""},{"name":"smoothed","access":"","virtual":false,"description":"Enable or disable texture smoothing for this Game Object.\r\rIt only takes effect if the Game Object is using an image based texture.\r\rSmoothing is enabled by default.","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.Particle","description":"Create a new `Particle` object. Particles are extended Sprites that are emitted by a particle emitter such as Phaser.Particles.Arcade.Emitter.","constructor":{"name":"Particle","description":"Create a new `Particle` object. Particles are extended Sprites that are emitted by a particle emitter such as Phaser.Particles.Arcade.Emitter.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate (in world space) to position the Particle at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate (in world space) to position the Particle at.","default":"","optional":"","nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","PIXI.Texture"],"description":"This is the image or texture used by the Particle during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.","default":"","optional":"","nullable":""},{"name":"frame","type":["string","number"],"description":"If this Particle 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.","default":"","optional":"","nullable":""}]},"functions":[{"name":"update","description":"Updates the Particle scale or alpha if autoScale and autoAlpha are set.","parameters":[]},{"name":"onEmit","description":"Called by the Emitter when this particle is emitted. Left empty for you to over-ride as required.","parameters":[]},{"name":"setAlphaData","description":"Called by the Emitter if autoAlpha has been enabled. Passes over the alpha ease data and resets the alpha counter.","parameters":[]},{"name":"setScaleData","description":"Called by the Emitter if autoScale has been enabled. Passes over the scale ease data and resets the scale counter.","parameters":[]},{"name":"reset","description":"Resets the Particle. This places the Particle at the given x/y world coordinates and then\rsets alive, exists, visible and renderable all to true. Also resets the outOfBounds state and health values.\rIf the Particle has a physics body that too is reset.","parameters":[{"name":"x","type":"number","description":"The x coordinate (in world space) to position the Particle at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate (in world space) to position the Particle at.","default":"","optional":"","nullable":""},{"name":"health","type":"number","description":"The health to give the Particle.","default":1,"optional":true,"nullable":""}],"returns":{"type":"Phaser.Particle","description":"This instance."}},{"name":"preUpdate","description":"Automatically called by World.preUpdate.","parameters":[],"returns":{"type":"boolean","description":"True if the Sprite was rendered, otherwise false."}},{"name":"setTexture","description":"Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous\ntexture this Sprite was using.","parameters":[{"name":"texture","type":"PIXI.Texture","description":"The PIXI texture that is displayed by the sprite","default":"","optional":"","nullable":""},{"name":"destroy","type":"Boolean","description":"Call Texture.destroy on the current texture before replacing it with the new one?","default":"","optional":true,"nullable":""}]},{"name":"onTextureUpdate","description":"When the texture is updated, this event will fire to update the scale and frame","parameters":[{"name":"event","type":"","description":"-","default":"","optional":"","nullable":""}]},{"name":"getBounds","description":"Returns the bounds of the Sprite as a rectangle.\nThe bounds calculation takes the worldTransform into account.\n\nIt is important to note that the transform is not updated when you call this method.\nSo if this Sprite is the child of a Display Object which has had its transform\nupdated since the last render pass, those changes will not yet have been applied\nto this Sprites worldTransform. If you need to ensure that all parent transforms\nare factored into this getBounds operation then you should call `updateTransform`\non the root most object in this Sprites display list first.","parameters":[{"name":"matrix","type":"Matrix","description":"the transformation matrix of the sprite","default":"","optional":"","nullable":""}],"returns":{"type":"Rectangle","description":"the framing rectangle"}},{"name":"getLocalBounds","description":"Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.","parameters":[],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"_renderWebGL","description":"Renders the object using the WebGL renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""},{"name":"matrix","type":"Matrix","description":"- Optional matrix. If provided the Display Object will be rendered using this matrix, otherwise it will use its worldTransform.","default":"","optional":true,"nullable":""}]},{"name":"_renderCanvas","description":"Renders the object using the Canvas renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""},{"name":"matrix","type":"Matrix","description":"- Optional matrix. If provided the Display Object will be rendered using this matrix, otherwise it will use its worldTransform.","default":"","optional":true,"nullable":""}]},{"name":"addChild","description":"Adds a child to the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to add to the container","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"addChildAt","description":"Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child to add","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The index to place the child in","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"swapChildren","description":"Swaps the position of 2 Display Objects within this container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""},{"name":"child2","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}]},{"name":"getChildIndex","description":"Returns the index position of a child DisplayObject instance","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject instance to identify","default":"","optional":"","nullable":""}],"returns":{"type":"Number","description":"The index position of the child display object to identify"}},{"name":"setChildIndex","description":"Changes the position of an existing child in the display object container","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child DisplayObject instance for which you want to change the index number","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The resulting index number for the child display object","default":"","optional":"","nullable":""}]},{"name":"getChildAt","description":"Returns the child at the specified index","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child at the given index, if any."}},{"name":"removeChild","description":"Removes a child from the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to remove","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildAt","description":"Removes a child from the specified index position.","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildren","description":"Removes all children from this container that are within the begin and end indexes.","parameters":[{"name":"beginIndex","type":"Number","description":"The beginning position. Default value is 0.","default":"","optional":"","nullable":""},{"name":"endIndex","type":"Number","description":"The ending position. Default value is size of the container.","default":"","optional":"","nullable":""}]},{"name":"contains","description":"Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}],"returns":{"type":"Boolean","description":""}},{"name":"postUpdate","description":"Internal method called by the World postUpdate cycle.","parameters":[]},{"name":"play","description":"Plays an Animation.\r\rThe animation should have previously been created via `animations.add`.\r\rIf the animation is already playing calling this again won't do anything.\rIf you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.","parameters":[{"name":"name","type":"string","description":"The name of the animation to be played, e.g. \"fire\", \"walk\", \"jump\". Must have been previously created via 'AnimationManager.add'.","default":"","optional":"","nullable":""},{"name":"frameRate","type":"number","description":"The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used.","default":"","optional":true,"nullable":""},{"name":"loop","type":"boolean","description":"Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.","default":"","optional":true,"nullable":""},{"name":"killOnComplete","type":"boolean","description":"If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Animation","description":"A reference to playing Animation."}},{"name":"alignIn","description":"Aligns this Game Object within another Game Object, or Rectangle, known as the\r'container', to one of 9 possible positions.\r\rThe container must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Game Objects within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Sprite to another Game Object does **not** make it a child of\rthe container. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, \r`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, \r`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.\r\rThe Game Objects are placed in such a way that their _bounds_ align with the\rcontainer, taking into consideration rotation, scale and the anchor property.\rThis allows you to neatly align Game Objects, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Game Object. For example:\r\r`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the containers bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"container","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Object","description":"This Game Object."}},{"name":"alignTo","description":"Aligns this Game Object to the side of another Game Object, or Rectangle, known as the\r'parent', in one of 11 possible positions.\r\rThe parent must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Game Objects within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Sprite to another Game Object does **not** make it a child of\rthe parent. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, \r`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, \r`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` \rand `Phaser.BOTTOM_RIGHT`.\r\rThe Game Objects are placed in such a way that their _bounds_ align with the\rparent, taking into consideration rotation, scale and the anchor property.\rThis allows you to neatly align Game Objects, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Game Object. For example:\r\r`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the parents bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"parent","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Object","description":"This Game Object."}},{"name":"bringToTop","description":"Brings this Game Object to the top of its parents display list.\rVisually this means it will render over the top of any old child in the same Group.\r\rIf this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"sendToBack","description":"Sends this Game Object to the bottom of its parents display list.\rVisually this means it will render below all other children in the same Group.\r\rIf this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"moveUp","description":"Moves this Game Object up one place in its parents display list.\rThis call has no effect if the Game Object is already at the top of the display list.\r\rIf this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"moveDown","description":"Moves this Game Object down one place in its parents display list.\rThis call has no effect if the Game Object is already at the bottom of the display list.\r\rIf this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"crop","description":"Crop allows you to crop the texture being used to display this Game Object.\rSetting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.\r\rCropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method,\ror by modifying `cropRect` property directly and then calling `updateCrop`.\r\rThe rectangle object given to this method can be either a `Phaser.Rectangle` or any other object \rso long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.\r\rA reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, \rin which case the values are duplicated to a local object.","parameters":[{"name":"rect","type":"Phaser.Rectangle","description":"The Rectangle used during cropping. Pass null or no parameters to clear a previously set crop rectangle.","default":"","optional":"","nullable":""},{"name":"copy","type":"boolean","description":"If false `cropRect` will be stored as a reference to the given rect. If true it will copy the rect values into a local Phaser Rectangle object stored in cropRect.","default":"","optional":true,"nullable":""}]},{"name":"updateCrop","description":"If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property,\ror the rectangle it references, then you need to update the crop frame by calling this method.","parameters":[]},{"name":"destroy","description":"Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present\rand nulls its reference to `game`, freeing it up for garbage collection.\r\rIf this Game Object has the Events component it will also dispatch the `onDestroy` event.\r\rYou can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've\rmore than one Game Object sharing the same BaseTexture.","parameters":[{"name":"destroyChildren","type":"boolean","description":"Should every child of this object have its destroy method called as well?","default":true,"optional":true,"nullable":""},{"name":"destroyTexture","type":"boolean","description":"Destroy the BaseTexture this Game Object is using? Note that if another Game Object is sharing the same BaseTexture it will invalidate it.","default":"","optional":true,"nullable":""}]},{"name":"revive","description":"Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.\r\rA resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.\r\rIt will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.","parameters":[{"name":"health","type":"number","description":"The health to give the Game Object. Only set if the GameObject has the Health component.","default":100,"optional":true,"nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"kill","description":"Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.\r\rIt will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.\r\rNote that killing a Game Object is a way for you to quickly recycle it in an object pool,\rit doesn't destroy the object or free it up from memory.\r\rIf you don't need this Game Object any more you should call `destroy` instead.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"loadTexture","description":"Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.\r\rIf your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.\r\rYou should only use `loadTexture` if you want to replace the base texture entirely.\r\rCalling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.\r\rYou can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. \rDoing this then sets the key to be the `frame` argument (the frame is set to zero). \r\rThis allows you to create sprites using `load.image` during development, and then change them \rto use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' \rand swapping it to be the key of the atlas data.\r\rNote: You cannot use a RenderTexture as a texture for a TileSprite.","parameters":[{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":"","nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""},{"name":"stopAnimation","type":"boolean","description":"If an animation is already playing on this Sprite you can choose to stop it or let it carry on playing.","default":true,"optional":true,"nullable":""}]},{"name":"setFrame","description":"Sets the texture frame the Game Object uses for rendering.\r\rThis is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.","parameters":[{"name":"frame","type":"Phaser.Frame","description":"The Frame to be used by the texture.","default":"","optional":"","nullable":""}]},{"name":"resizeFrame","description":"Resizes the Frame dimensions that the Game Object uses for rendering.\r\rYou shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData\rit can be useful to adjust the dimensions directly in this way.","parameters":[{"name":"parent","type":"object","description":"The parent texture object that caused the resize, i.e. a Phaser.Video object.","default":"","optional":"","nullable":""},{"name":"width","type":"integer","description":"The new width of the texture.","default":"","optional":"","nullable":""},{"name":"height","type":"integer","description":"The new height of the texture.","default":"","optional":"","nullable":""}]},{"name":"resetFrame","description":"Resets the texture frame dimensions that the Game Object uses for rendering.","parameters":[]},{"name":"overlap","description":"Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object, \rwhich can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.\r\rThis check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.\r\rTherefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency.\rIt should be fine for low-volume testing where physics isn't required.","parameters":[{"name":"displayObject","type":["Phaser.Sprite","Phaser.Image","Phaser.TileSprite","Phaser.Button","PIXI.DisplayObject"],"description":"The display object to check against.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the bounds of this Game Object intersects at any point with the bounds of the given display object."}},{"name":"checkTransform","description":"Adjust scaling limits, if set, to this Game Object.","parameters":[{"name":"wt","type":"PIXI.Matrix","description":"The updated worldTransform matrix.","default":"","optional":"","nullable":""}]},{"name":"setScaleMinMax","description":"Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.\r\rFor example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored \rand the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.\r\rBy setting these values you can carefully control how Game Objects deal with responsive scaling.\r\rIf only one parameter is given then that value will be used for both scaleMin and scaleMax:\r`setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1\r\rIf only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y:\r`setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2\r\rIf you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly, \ror pass `null` for the `maxX` and `maxY` parameters.\r\rCall `setScaleMinMax(null)` to clear all previously set values.","parameters":[{"name":"minX","type":["number","null"],"description":"The minimum horizontal scale value this Game Object can scale down to.","default":"","optional":"","nullable":""},{"name":"minY","type":["number","null"],"description":"The minimum vertical scale value this Game Object can scale down to.","default":"","optional":"","nullable":""},{"name":"maxX","type":["number","null"],"description":"The maximum horizontal scale value this Game Object can scale up to.","default":"","optional":"","nullable":""},{"name":"maxY","type":["number","null"],"description":"The maximum vertical scale value this Game Object can scale up to.","default":"","optional":"","nullable":""}]}],"members":[{"name":"autoScale","access":"protected","virtual":false,"description":"If this Particle automatically scales this is set to true by Particle.setScaleData.","type":{"names":["boolean"]},"default":""},{"name":"scaleData","access":"protected","virtual":false,"description":"A reference to the scaleData array owned by the Emitter that emitted this Particle.","type":{"names":["array"]},"default":""},{"name":"_s","access":"private","virtual":false,"description":"Internal cache var for tracking auto scale.","type":{"names":["number"]},"default":""},{"name":"autoAlpha","access":"protected","virtual":false,"description":"If this Particle automatically changes alpha this is set to true by Particle.setAlphaData.","type":{"names":["boolean"]},"default":""},{"name":"alphaData","access":"protected","virtual":false,"description":"A reference to the alphaData array owned by the Emitter that emitted this Particle.","type":{"names":["array"]},"default":""},{"name":"_a","access":"private","virtual":false,"description":"Internal cache var for tracking auto alpha.","type":{"names":["number"]},"default":""},{"name":"type","access":"","virtual":false,"description":"The const type of this object.","type":{"names":["number"]},"default":""},{"name":"physicsType","access":"","virtual":false,"description":"The const physics body type of this object.","type":{"names":["number"]},"default":""},{"name":"anchor","access":"","virtual":false,"description":"The anchor sets the origin point of the texture.\nThe default is 0,0 this means the texture's origin is the top left\nSetting than anchor to 0.5,0.5 means the textures origin is centered\nSetting the anchor to 1,1 would mean the textures origin points will be the bottom right corner","type":{"names":["Point"]},"default":""},{"name":"texture","access":"","virtual":false,"description":"The texture that the sprite is using","type":{"names":["PIXI.Texture"]},"default":""},{"name":"_width","access":"private","virtual":false,"description":"The width of the sprite (this is initially set by the texture)","type":{"names":["Number"]},"default":""},{"name":"_height","access":"private","virtual":false,"description":"The height of the sprite (this is initially set by the texture)","type":{"names":["Number"]},"default":""},{"name":"tint","access":"","virtual":false,"description":"The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.","type":{"names":["Number"]},"default":"0xFFFFFF"},{"name":"cachedTint","access":"private","virtual":false,"description":"The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.","type":{"names":["Number"]},"default":"-1"},{"name":"tintedTexture","access":"","virtual":false,"description":"A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)","type":{"names":["Canvas"]},"default":"null"},{"name":"blendMode","access":"","virtual":false,"description":"The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.\n\nWarning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.","type":{"names":["Number"]},"default":"PIXI.blendModes.NORMAL;"},{"name":"shader","access":"","virtual":false,"description":"The shader that will be used to render this Sprite.\nSet to null to remove a current shader.","type":{"names":["PhaserFilter"]},"default":"null"},{"name":"exists","access":"","virtual":false,"description":"Controls if this Sprite is processed by the core Phaser game loops and Group loops.","type":{"names":["Boolean"]},"default":"true"},{"name":"width","access":"","virtual":false,"description":"The width of the sprite, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the sprite, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"children","access":"","virtual":false,"description":"[read-only] The array of children of this container.","type":{"names":["Array.<DisplayObject>"]},"default":""},{"name":"ignoreChildInput","access":"","virtual":false,"description":"If `ignoreChildInput`  is `false` it will allow this objects _children_ to be considered as valid for Input events.\n\nIf this property is `true` then the children will _not_ be considered as valid for Input events.\n\nNote that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.","type":{"names":["Boolean"]},"default":""},{"name":"position","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject, relative to its parent container.\n\nThe value of this property does not reflect any positioning happening further up the display list.\nTo obtain that value please see the `worldPosition` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"scale","access":"","virtual":false,"description":"The scale of this DisplayObject. A scale of 1:1 represents the DisplayObject\nat its default size. A value of 0.5 would scale this DisplayObject by half, and so on.\n\nThe value of this property does not reflect any scaling happening further up the display list.\nTo obtain that value please see the `worldScale` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"pivot","access":"","virtual":false,"description":"The pivot point of this DisplayObject that it rotates around. The values are expressed\nin pixel values.","type":{"names":["PIXIPoint"]},"default":""},{"name":"rotation","access":"","virtual":false,"description":"The rotation of this DisplayObject. The value is given, and expressed, in radians, and is based on\na right-handed orientation.\n\nThe value of this property does not reflect any rotation happening further up the display list.\nTo obtain that value please see the `worldRotation` property.","type":{"names":["Number"]},"default":""},{"name":"alpha","access":"","virtual":false,"description":"The alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nPlease note that an object with an alpha value of 0 is skipped during the render pass.\n\nThe value of this property does not reflect any alpha values set further up the display list.\nTo obtain that value please see the `worldAlpha` property.","type":{"names":["Number"]},"default":""},{"name":"visible","access":"","virtual":false,"description":"The visibility of this DisplayObject. A value of `false` makes the object invisible.\nA value of `true` makes it visible. Please note that an object with a visible value of\n`false` is skipped during the render pass. Equally a DisplayObject with visible false will\nnot render any of its children.\n\nThe value of this property does not reflect any visible values set further up the display list.\nTo obtain that value please see the `worldVisible` property.","type":{"names":["Boolean"]},"default":""},{"name":"hitArea","access":"","virtual":false,"description":"This is the defined area that will pick up mouse / touch events. It is null by default.\nSetting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)","type":{"names":["Rectangle","Circle","Ellipse","Polygon"]},"default":""},{"name":"renderable","access":"","virtual":false,"description":"Should this DisplayObject be rendered by the renderer? An object with a renderable value of\n`false` is skipped during the render pass.","type":{"names":["Boolean"]},"default":""},{"name":"parent","access":"","virtual":false,"description":"The parent DisplayObjectContainer that this DisplayObject is a child of.\nAll DisplayObjects must belong to a parent in order to be rendered.\nThe root parent is the Stage object. This property is set automatically when the\nDisplayObject is added to, or removed from, a DisplayObjectContainer.","type":{"names":["PIXIDisplayObjectContainer"]},"default":""},{"name":"worldAlpha","access":"","virtual":false,"description":"The multiplied alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nThis value is the calculated total, based on the alpha values of all parents of this DisplayObjects \nin the display list.\n\nTo obtain, and set, the local alpha value, see the `alpha` property.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"worldTransform","access":"","virtual":false,"description":"The current transform of this DisplayObject.\n\nThis property contains the calculated total, based on the transforms of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIMatrix"]},"default":""},{"name":"worldPosition","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject within the world.\n\nThis property contains the calculated total, based on the positions of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldScale","access":"","virtual":false,"description":"The global scale of this DisplayObject.\n\nThis property contains the calculated total, based on the scales of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldRotation","access":"","virtual":false,"description":"The rotation, in radians, of this DisplayObject.\n\nThis property contains the calculated total, based on the rotations of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"filterArea","access":"","virtual":false,"description":"The rectangular area used by filters when rendering a shader for this DisplayObject.","type":{"names":["Rectangle"]},"default":""},{"name":"_sr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_cr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_bounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_currentBounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_mask","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_cacheAsBitmap","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"_cacheIsDirty","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"x","access":"","virtual":false,"description":"The horizontal position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The vertical position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"worldVisible","access":"","virtual":false,"description":"Indicates if this DisplayObject is visible, based on it, and all of its parents, `visible` property values.","type":{"names":["Boolean"]},"default":""},{"name":"mask","access":"","virtual":false,"description":"Sets a mask for this DisplayObject. A mask is an instance of a Graphics object.\nWhen applied it limits the visible area of this DisplayObject to the shape of the mask.\nUnder a Canvas renderer it uses shape clipping. Under a WebGL renderer it uses a Stencil Buffer.\nTo remove a mask, set this property to `null`.","type":{"names":["PIXIGraphics"]},"default":""},{"name":"filters","access":"","virtual":false,"description":"Sets the filters for this DisplayObject. This is a WebGL only feature, and is ignored by the Canvas\nRenderer. A filter is a shader applied to this DisplayObject. You can modify the placement of the filter\nusing `DisplayObject.filterArea`.\n\nTo remove filters, set this property to `null`.\n\nNote: You cannot have a filter set, and a MULTIPLY Blend Mode active, at the same time. Setting a \nfilter will reset this DisplayObjects blend mode to NORMAL.","type":{"names":["Array"]},"default":""},{"name":"cacheAsBitmap","access":"","virtual":false,"description":"Sets if this DisplayObject should be cached as a bitmap.\n\nWhen invoked it will take a snapshot of the DisplayObject, as it is at that moment, and store it \nin a RenderTexture. This is then used whenever this DisplayObject is rendered. It can provide a\nperformance benefit for complex, but static, DisplayObjects. I.e. those with lots of children.\n\nCached Bitmaps do not track their parents. If you update a property of this DisplayObject, it will not\nre-generate the cached bitmap automatically. To do that you need to call `DisplayObject.updateCache`.\n\nTo remove a cached bitmap, set this property to `null`.","type":{"names":["Boolean"]},"default":""},{"name":"game","access":"","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"name","access":"","virtual":false,"description":"A user defined name given to this Game Object.\rThis value isn't ever used internally by Phaser, it is meant as a game level property.","type":{"names":["string"]},"default":""},{"name":"data","access":"","virtual":false,"description":"An empty Object that belongs to this Game Object.\rThis value isn't ever used internally by Phaser, but may be used by your own code, or\rby Phaser Plugins, to store data that needs to be associated with the Game Object,\rwithout polluting the Game Object directly.","type":{"names":["Object"]},"default":"{}"},{"name":"components","access":"protected","virtual":false,"description":"The components this Game Object has installed.","type":{"names":["object"]},"default":""},{"name":"z","access":"","virtual":false,"description":"The z depth of this Game Object within its parent Group.\rNo two objects in a Group can have the same z value.\rThis value is adjusted automatically whenever the Group hierarchy changes.\rIf you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.","type":{"names":["number"]},"default":""},{"name":"events","access":"","virtual":false,"description":"All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this\rGame Object, or any of its components.","type":{"names":["Phaser.Events"]},"default":""},{"name":"animations","access":"","virtual":false,"description":"If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance.\rThrough it you can create, play, pause and stop animations.","type":{"names":["Phaser.AnimationManager"]},"default":""},{"name":"key","access":"","virtual":false,"description":"The key of the image or texture used by this Game Object during rendering.\rIf it is a string it's the string used to retrieve the texture from the Phaser Image Cache.\rIt can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.\rIf a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache.\rIf a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.","type":{"names":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"]},"default":""},{"name":"world","access":"","virtual":false,"description":"The world coordinates of this Game Object in pixels.\rDepending on where in the display list this Game Object is placed this value can differ from `position`, \rwhich contains the x/y coordinates relative to the Game Objects parent.","type":{"names":["Phaser.Point"]},"default":""},{"name":"debug","access":"","virtual":false,"description":"A debug flag designed for use with `Game.enableStep`.","type":{"names":["boolean"]},"default":""},{"name":"previousPosition","access":"","virtual":false,"description":"The position the Game Object was located in the previous frame.","type":{"names":["Phaser.Point"]},"default":""},{"name":"previousRotation","access":"","virtual":false,"description":"The rotation the Game Object was in set to in the previous frame. Value is in radians.","type":{"names":["number"]},"default":""},{"name":"renderOrderID","access":"","virtual":false,"description":"The render order ID is used internally by the renderer and Input Manager and should not be modified.\rThis property is mostly used internally by the renderers, but is exposed for the use of plugins.","type":{"names":["number"]},"default":""},{"name":"fresh","access":"","virtual":false,"description":"A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update.\rThis property is mostly used internally by the physics systems, but is exposed for the use of plugins.","type":{"names":["boolean"]},"default":""},{"name":"pendingDestroy","access":"","virtual":false,"description":"A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update.\rYou can set it directly to allow you to flag an object to be destroyed on its next update.\r\rThis is extremely useful if you wish to destroy an object from within one of its own callbacks \rsuch as with Buttons or other Input events.","type":{"names":["boolean"]},"default":""},{"name":"_exists","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["boolean"]},"default":""},{"name":"angle","access":"","virtual":false,"description":"The angle property is the rotation of the Game Object in *degrees* from its original orientation.\r\rValues from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.\r\rValues outside this range are added to or subtracted from 360 to obtain a value within the range. \rFor example, the statement player.angle = 450 is the same as player.angle = 90.\r\rIf you wish to work in radians instead of degrees you can use the property `rotation` instead. \rWorking in radians is slightly faster as it doesn't have to perform any calculations.","type":{"names":["number"]},"default":""},{"name":"autoCull","access":"","virtual":false,"description":"A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame.\rIf it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`.\rThis keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.\r\rThis is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,\ror you have tested performance and find it acceptable.","type":{"names":["boolean"]},"default":""},{"name":"inCamera","access":"","virtual":false,"description":"Checks if the Game Objects bounds intersect with the Game Camera bounds.\rReturns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.","type":{"names":["boolean"]},"default":""},{"name":"offsetX","access":"","virtual":false,"description":"The amount the Game Object is visually offset from its x coordinate.\rThis is the same as `width * anchor.x`.\rIt will only be > 0 if anchor.x is not equal to zero.","type":{"names":["number"]},"default":""},{"name":"offsetY","access":"","virtual":false,"description":"The amount the Game Object is visually offset from its y coordinate.\rThis is the same as `height * anchor.y`.\rIt will only be > 0 if anchor.y is not equal to zero.","type":{"names":["number"]},"default":""},{"name":"centerX","access":"","virtual":false,"description":"The center x coordinate of the Game Object.\rThis is the same as `(x - offsetX) + (width / 2)`.","type":{"names":["number"]},"default":""},{"name":"centerY","access":"","virtual":false,"description":"The center y coordinate of the Game Object.\rThis is the same as `(y - offsetY) + (height / 2)`.","type":{"names":["number"]},"default":""},{"name":"left","access":"","virtual":false,"description":"The left coordinate of the Game Object.\rThis is the same as `x - offsetX`.","type":{"names":["number"]},"default":""},{"name":"right","access":"","virtual":false,"description":"The right coordinate of the Game Object.\rThis is the same as `x + width - offsetX`.","type":{"names":["number"]},"default":""},{"name":"top","access":"","virtual":false,"description":"The y coordinate of the Game Object.\rThis is the same as `y - offsetY`.","type":{"names":["number"]},"default":""},{"name":"bottom","access":"","virtual":false,"description":"The sum of the y and height properties.\rThis is the same as `y + height - offsetY`.","type":{"names":["number"]},"default":""},{"name":"cropRect","access":"","virtual":false,"description":"The Rectangle used to crop the texture this Game Object uses.\rSet this property via `crop`. \rIf you modify this property directly you must call `updateCrop` in order to have the change take effect.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"_crop","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"deltaX","access":"","virtual":false,"description":"Returns the delta x value. The difference between world.x now and in the previous frame.\r\rThe value will be positive if the Game Object has moved to the right or negative if to the left.","type":{"names":["number"]},"default":""},{"name":"deltaY","access":"","virtual":false,"description":"Returns the delta y value. The difference between world.y now and in the previous frame.\r\rThe value will be positive if the Game Object has moved down or negative if up.","type":{"names":["number"]},"default":""},{"name":"deltaZ","access":"","virtual":false,"description":"Returns the delta z value. The difference between rotation now and in the previous frame. The delta value.","type":{"names":["number"]},"default":""},{"name":"destroyPhase","access":"","virtual":false,"description":"As a Game Object runs through its destroy method this flag is set to true, \rand can be checked in any sub-systems or plugins it is being destroyed from.","type":{"names":["boolean"]},"default":""},{"name":"_fixedToCamera","access":"private","virtual":false,"description":"","type":{"names":["boolean"]},"default":""},{"name":"fixedToCamera","access":"","virtual":false,"description":"A Game Object that is \"fixed\" to the camera is rendered at a given x/y offsets from the top left of the camera. The offsets \rare stored in the `cameraOffset` property, which is initialized with the current object coordinates. \r\rThe values are adjusted at the rendering stage, overriding the Game Objects actual world position.\r\rThe end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world\rthe camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times \rregardless where in the world the camera is.\r\rNote that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.\r\rBe careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.","type":{"names":["boolean"]},"default":""},{"name":"cameraOffset","access":"","virtual":false,"description":"The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.\r\rThe values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.","type":{"names":["Phaser.Point"]},"default":""},{"name":"health","access":"","virtual":false,"description":"The Game Objects health value. This is a handy property for setting and manipulating health on a Game Object.\r\rIt can be used in combination with the `damage` method or modified directly.","type":{"names":["number"]},"default":1},{"name":"maxHealth","access":"","virtual":false,"description":"The Game Objects maximum health value. This works in combination with the `heal` method to ensure\rthe health value never exceeds the maximum.","type":{"names":["number"]},"default":100},{"name":"damage","access":"","virtual":false,"description":"Damages the Game Object. This removes the given amount of health from the `health` property.\r\rIf health is taken below or is equal to zero then the `kill` method is called.","type":"","default":""},{"name":"setHealth","access":"","virtual":false,"description":"Sets the health property of the Game Object to the given amount.\rWill never exceed the `maxHealth` value.","type":"","default":""},{"name":"heal","access":"","virtual":false,"description":"Heal the Game Object. This adds the given amount of health to the `health` property.","type":"","default":""},{"name":"input","access":"","virtual":false,"description":"The Input Handler for this Game Object.\r\rBy default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.\r\rAfter you have done this, this property will be a reference to the Phaser InputHandler.","type":{"names":["Phaser.InputHandler","null"]},"default":""},{"name":"inputEnabled","access":"","virtual":false,"description":"By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created\rfor this Game Object and it will then start to process click / touch events and more.\r\rYou can then access the Input Handler via `this.input`.\r\rNote that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.\r\rIf you set this property to false it will stop the Input Handler from processing any more input events.\r\rIf you want to _temporarily_ disable input for a Game Object, then it's better to set\r`input.enabled = false`, as it won't reset any of the Input Handlers internal properties.\rYou can then toggle this back on as needed.","type":{"names":["boolean"]},"default":""},{"name":"checkWorldBounds","access":"","virtual":false,"description":"If this is set to `true` the Game Object checks if it is within the World bounds each frame. \r\rWhen it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.\r\rIf it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.\r\rIt also optionally kills the Game Object if `outOfBoundsKill` is `true`.\r\rWhen `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.\r\rThis is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,\ror you have tested performance and find it acceptable.","type":{"names":["boolean"]},"default":""},{"name":"outOfBoundsKill","access":"","virtual":false,"description":"If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.","type":{"names":["boolean"]},"default":""},{"name":"outOfCameraBoundsKill","access":"","virtual":false,"description":"If this and the `autoCull` property are both set to `true`, then the `kill` method\ris called as soon as the Game Object leaves the camera bounds.","type":{"names":["boolean"]},"default":""},{"name":"_outOfBoundsFired","access":"private","virtual":false,"description":"Internal state var.","type":{"names":["boolean"]},"default":""},{"name":"inWorld","access":"","virtual":false,"description":"Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.","type":{"names":["boolean"]},"default":""},{"name":"alive","access":"","virtual":false,"description":"A useful flag to control if the Game Object is alive or dead.\r\rThis is set automatically by the Health components `damage` method should the object run out of health.\rOr you can toggle it via your game code.\r\rThis property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates.\rHowever you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.","type":{"names":["boolean"]},"default":true},{"name":"lifespan","access":"","virtual":false,"description":"The lifespan allows you to give a Game Object a lifespan in milliseconds.\r\rOnce the Game Object is 'born' you can set this to a positive value.\r\rIt is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame.\rWhen it reaches zero it will call the `kill` method.\r\rVery handy for particles, bullets, collectibles, or any other short-lived entity.","type":{"names":["number"]},"default":""},{"name":"customRender","access":"private","virtual":false,"description":"Does this texture require a custom render call? (as set by BitmapData, Video, etc)","type":{"names":["boolean"]},"default":""},{"name":"_frame","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"frame","access":"","virtual":false,"description":"Gets or sets the current frame index of the texture being used to render this Game Object.\r\rTo change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use,\rfor example: `player.frame = 4`.\r\rIf the frame index given doesn't exist it will revert to the first frame found in the texture.\r\rIf you are using a texture atlas then you should use the `frameName` property instead.\r\rIf you wish to fully replace the texture being used see `loadTexture`.","type":{"names":["integer"]},"default":""},{"name":"frameName","access":"","virtual":false,"description":"Gets or sets the current frame name of the texture being used to render this Game Object.\r\rTo change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use, \rfor example: `player.frameName = \"idle\"`.\r\rIf the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.\r\rIf you are using a sprite sheet then you should use the `frame` property instead.\r\rIf you wish to fully replace the texture being used see `loadTexture`.","type":{"names":["string"]},"default":""},{"name":"body","access":"","virtual":false,"description":"`body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated \rproperties and methods via it.\r\rBy default Game Objects won't add themselves to any physics system and their `body` property will be `null`.\r\rTo enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object\rand `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.\r\rYou can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.\r\rImportant: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5, \rso the physics body is centered on the Game Object.\r\rIf you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.","type":{"names":["Phaser.Physics.Arcade.Body","Phaser.Physics.P2.Body","Phaser.Physics.Ninja.Body","null"]},"default":""},{"name":"transformCallback","access":"","virtual":false,"description":"The callback that will apply any scale limiting to the worldTransform.","type":{"names":["function"]},"default":""},{"name":"transformCallbackContext","access":"","virtual":false,"description":"The context under which `transformCallback` is called.","type":{"names":["object"]},"default":""},{"name":"scaleMin","access":"","virtual":false,"description":"The minimum scale this Game Object will scale down to.\r\rIt allows you to prevent a parent from scaling this Game Object lower than the given value.\r\rSet it to `null` to remove the limit.","type":{"names":["Phaser.Point"]},"default":""},{"name":"scaleMax","access":"","virtual":false,"description":"The maximum scale this Game Object will scale up to. \r\rIt allows you to prevent a parent from scaling this Game Object higher than the given value.\r\rSet it to `null` to remove the limit.","type":{"names":["Phaser.Point"]},"default":""},{"name":"smoothed","access":"","virtual":false,"description":"Enable or disable texture smoothing for this Game Object.\r\rIt only takes effect if the Game Object is using an image based texture.\r\rSmoothing is enabled by default.","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.RenderTexture","description":"A RenderTexture is a special texture that allows any displayObject to be rendered to it. It allows you to take many complex objects and\rrender them down into a single quad (on WebGL) which can then be used to texture other display objects with. A way of generating textures at run-time.","constructor":{"name":"RenderTexture","description":"A RenderTexture is a special texture that allows any displayObject to be rendered to it. It allows you to take many complex objects and\rrender them down into a single quad (on WebGL) which can then be used to texture other display objects with. A way of generating textures at run-time.","parameters":[{"name":"game","type":"Phaser.Game","description":"Current game instance.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The width of the render texture.","default":100,"optional":true,"nullable":""},{"name":"height","type":"number","description":"The height of the render texture.","default":100,"optional":true,"nullable":""},{"name":"key","type":"string","description":"The key of the RenderTexture in the Cache, if stored there.","default":"''","optional":true,"nullable":""},{"name":"scaleMode","type":"number","description":"One of the Phaser.scaleModes consts.","default":"Phaser.scaleModes.DEFAULT","optional":true,"nullable":""},{"name":"resolution","type":"number","description":"The resolution of the texture being generated.","default":1,"optional":true,"nullable":""}]},"functions":[{"name":"renderXY","description":"This function will draw the display object to the RenderTexture at the given coordinates.\r\rWhen the display object is drawn it takes into account scale and rotation.\r\rIf you don't want those then use RenderTexture.renderRawXY instead.","parameters":[{"name":"displayObject","type":["Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Group"],"description":"The display object to render to this texture.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x position to render the object at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y position to render the object at.","default":"","optional":"","nullable":""},{"name":"clear","type":"boolean","description":"If true the texture will be cleared before the display object is drawn.","default":"","optional":true,"nullable":""}]},{"name":"renderRawXY","description":"This function will draw the display object to the RenderTexture at the given coordinates.\r\rWhen the display object is drawn it doesn't take into account scale, rotation or translation.\r\rIf you need those then use RenderTexture.renderXY instead.","parameters":[{"name":"displayObject","type":["Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Group"],"description":"The display object to render to this texture.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x position to render the object at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y position to render the object at.","default":"","optional":"","nullable":""},{"name":"clear","type":"boolean","description":"If true the texture will be cleared before the display object is drawn.","default":"","optional":true,"nullable":""}]},{"name":"render","description":"This function will draw the display object to the RenderTexture.\r\rIn versions of Phaser prior to 2.4.0 the second parameter was a Phaser.Point object. \rThis is now a Matrix allowing you much more control over how the Display Object is rendered.\rIf you need to replicate the earlier behavior please use Phaser.RenderTexture.renderXY instead.\r\rIf you wish for the displayObject to be rendered taking its current scale, rotation and translation into account then either\rpass `null`, leave it undefined or pass `displayObject.worldTransform` as the matrix value.","parameters":[{"name":"displayObject","type":["Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Group"],"description":"The display object to render to this texture.","default":"","optional":"","nullable":""},{"name":"matrix","type":"Phaser.Matrix","description":"Optional matrix to apply to the display object before rendering. If null or undefined it will use the worldTransform matrix of the given display object.","default":"","optional":true,"nullable":""},{"name":"clear","type":"boolean","description":"If true the texture will be cleared before the display object is drawn.","default":"","optional":true,"nullable":""}]},{"name":"resize","description":"Resizes the RenderTexture.","parameters":[{"name":"width","type":"number","description":"The width to resize to.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height to resize to.","default":"","optional":"","nullable":""},{"name":"updateBase","type":"boolean","description":"Should the baseTexture.width and height values be resized as well?","default":"","optional":"","nullable":""}]},{"name":"clear","description":"Clears the RenderTexture.","parameters":[]},{"name":"_renderWebGL","description":"This function will draw the display object to the texture.","parameters":[{"name":"displayObject","type":"DisplayObject","description":"The display object to render this texture on","default":"","optional":"","nullable":""},{"name":"matrix","type":"Matrix","description":"Optional matrix to apply to the display object before rendering.","default":"","optional":true,"nullable":""},{"name":"clear","type":"Boolean","description":"If true the texture will be cleared before the displayObject is drawn","default":"","optional":true,"nullable":""}]},{"name":"_renderCanvas","description":"This function will draw the display object to the texture.","parameters":[{"name":"displayObject","type":"DisplayObject","description":"The display object to render this texture on","default":"","optional":"","nullable":""},{"name":"matrix","type":"Matrix","description":"Optional matrix to apply to the display object before rendering.","default":"","optional":true,"nullable":""},{"name":"clear","type":"Boolean","description":"If true the texture will be cleared before the displayObject is drawn","default":"","optional":true,"nullable":""}]},{"name":"getImage","description":"Will return a HTML Image of the texture","parameters":[],"returns":{"type":"Image","description":""}},{"name":"getBase64","description":"Will return a base64 encoded string of this texture. It works by calling RenderTexture.getCanvas and then running toDataURL on that.","parameters":[],"returns":{"type":"String","description":"A base64 encoded string of the texture."}},{"name":"getCanvas","description":"Creates a Canvas element, renders this RenderTexture to it and then returns it.","parameters":[],"returns":{"type":"HTMLCanvasElement","description":"A Canvas element with the texture rendered on."}},{"name":"onBaseTextureLoaded","description":"Called when the base texture is loaded","parameters":[]},{"name":"destroy","description":"Destroys this texture","parameters":[{"name":"destroyBase","type":"Boolean","description":"Whether to destroy the base texture as well","default":"","optional":"","nullable":""}]},{"name":"setFrame","description":"Specifies the region of the baseTexture that this texture will use.","parameters":[{"name":"frame","type":"Rectangle","description":"The frame of the texture to set it to","default":"","optional":"","nullable":""}]},{"name":"_updateUvs","description":"Updates the internal WebGL UV cache.","parameters":[]},{"name":"_updateUvsInverted","description":"Updates the internal WebGL UV cache.","parameters":[]}],"members":[{"name":"game","access":"","virtual":false,"description":"A reference to the currently running game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"key","access":"","virtual":false,"description":"The key of the RenderTexture in the Cache, if stored there.","type":{"names":["string"]},"default":""},{"name":"type","access":"","virtual":false,"description":"Base Phaser object type.","type":{"names":["number"]},"default":""},{"name":"_tempMatrix","access":"private","virtual":false,"description":"The matrix that is applied when display objects are rendered to this RenderTexture.","type":{"names":["Phaser.Matrix"]},"default":""},{"name":"baseTexture","access":"","virtual":false,"description":"The base texture object that this texture uses","type":{"names":["BaseTexture"]},"default":""},{"name":"renderer","access":"","virtual":false,"description":"The renderer this RenderTexture uses. A RenderTexture can only belong to one renderer at the moment if its webGL.","type":{"names":["CanvasRenderer","WebGLRenderer"]},"default":""},{"name":"valid","access":"","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"noFrame","access":"","virtual":false,"description":"Does this Texture have any frame data assigned to it?","type":{"names":["Boolean"]},"default":""},{"name":"frame","access":"","virtual":false,"description":"The frame specifies the region of the base texture that this texture uses","type":{"names":["Rectangle"]},"default":""},{"name":"trim","access":"","virtual":false,"description":"The texture trim data.","type":{"names":["Rectangle"]},"default":""},{"name":"isTiling","access":"","virtual":false,"description":"Is this a tiling texture? As used by the likes of a TilingSprite.","type":{"names":["Boolean"]},"default":""},{"name":"requiresUpdate","access":"","virtual":false,"description":"This will let a renderer know that a texture has been updated (used mainly for webGL uv updates)","type":{"names":["Boolean"]},"default":""},{"name":"requiresReTint","access":"","virtual":false,"description":"This will let a renderer know that a tinted parent has updated its texture.","type":{"names":["Boolean"]},"default":""},{"name":"_uvs","access":"private","virtual":false,"description":"The WebGL UV data cache.","type":{"names":["Object"]},"default":""},{"name":"width","access":"","virtual":false,"description":"The width of the Texture in pixels.","type":{"names":["Number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the Texture in pixels.","type":{"names":["Number"]},"default":""},{"name":"crop","access":"","virtual":false,"description":"This is the area of the BaseTexture image to actually copy to the Canvas / WebGL when rendering,\nirrespective of the actual frame size or placement (which can be influenced by trimmed texture atlases)","type":{"names":["Rectangle"]},"default":""},{"name":"rotated","access":"","virtual":false,"description":"A flag that controls if this frame is rotated or not.\nRotation allows you to use rotated frames in texture atlas packing, it has nothing to do with\nSprite rotation.","type":{"names":["Boolean"]},"default":""}]},{"name":"Phaser.RetroFont","description":"A Retro Font is similar to a BitmapFont, in that it uses a texture to render the text. However unlike a BitmapFont every character in a RetroFont\ris the same size. This makes it similar to a sprite sheet. You typically find font sheets like this from old 8/16-bit games and demos.","constructor":{"name":"RetroFont","description":"A Retro Font is similar to a BitmapFont, in that it uses a texture to render the text. However unlike a BitmapFont every character in a RetroFont\ris the same size. This makes it similar to a sprite sheet. You typically find font sheets like this from old 8/16-bit games and demos.","parameters":[{"name":"game","type":"Phaser.Game","description":"Current game instance.","default":"","optional":"","nullable":""},{"name":"key","type":"string","description":"The font set graphic set as stored in the Game.Cache.","default":"","optional":"","nullable":""},{"name":"characterWidth","type":"number","description":"The width of each character in the font set.","default":"","optional":"","nullable":""},{"name":"characterHeight","type":"number","description":"The height of each character in the font set.","default":"","optional":"","nullable":""},{"name":"chars","type":"string","description":"The characters used in the font set, in display order. You can use the TEXT_SET consts for common font set arrangements.","default":"","optional":"","nullable":""},{"name":"charsPerRow","type":"number","description":"The number of characters per row in the font set. If not given charsPerRow will be the image width / characterWidth.","default":"","optional":true,"nullable":""},{"name":"xSpacing","type":"number","description":"If the characters in the font set have horizontal spacing between them set the required amount here.","default":"","optional":true,"nullable":""},{"name":"ySpacing","type":"number","description":"If the characters in the font set have vertical spacing between them set the required amount here.","default":"","optional":true,"nullable":""},{"name":"xOffset","type":"number","description":"If the font set doesn't start at the top left of the given image, specify the X coordinate offset here.","default":"","optional":true,"nullable":""},{"name":"yOffset","type":"number","description":"If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here.","default":"","optional":true,"nullable":""}]},"functions":[{"name":"setFixedWidth","description":"If you need this RetroFont to have a fixed width and custom alignment you can set the width here.\rIf text is wider than the width specified it will be cropped off.","parameters":[{"name":"width","type":"number","description":"Width in pixels of this RetroFont. Set to zero to disable and re-enable automatic resizing.","default":"","optional":"","nullable":""},{"name":"lineAlignment","type":"string","description":"Align the text within this width. Set to RetroFont.ALIGN_LEFT (default), RetroFont.ALIGN_RIGHT or RetroFont.ALIGN_CENTER.","default":"'left'","optional":true,"nullable":""}]},{"name":"setText","description":"A helper function that quickly sets lots of variables at once, and then updates the text.","parameters":[{"name":"content","type":"string","description":"The text of this sprite.","default":"","optional":"","nullable":""},{"name":"multiLine","type":"boolean","description":"Set to true if you want to support carriage-returns in the text and create a multi-line sprite instead of a single line.","default":"","optional":true,"nullable":""},{"name":"characterSpacing","type":"number","description":"To add horizontal spacing between each character specify the amount in pixels.","default":"","optional":true,"nullable":""},{"name":"lineSpacing","type":"number","description":"To add vertical spacing between each line of text, set the amount in pixels.","default":"","optional":true,"nullable":""},{"name":"lineAlignment","type":"string","description":"Align each line of multi-line text. Set to RetroFont.ALIGN_LEFT, RetroFont.ALIGN_RIGHT or RetroFont.ALIGN_CENTER.","default":"'left'","optional":true,"nullable":""},{"name":"allowLowerCase","type":"boolean","description":"Lots of bitmap font sets only include upper-case characters, if yours needs to support lower case then set this to true.","default":"","optional":true,"nullable":""}]},{"name":"buildRetroFontText","description":"Updates the texture with the new text.","parameters":[]},{"name":"pasteLine","description":"Internal function that takes a single line of text (2nd parameter) and pastes it into the BitmapData at the given coordinates.\rUsed by getLine and getMultiLine","parameters":[{"name":"line","type":"string","description":"The single line of text to paste.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate.","default":"","optional":"","nullable":""},{"name":"customSpacingX","type":"number","description":"Custom X spacing.","default":"","optional":"","nullable":""}]},{"name":"getLongestLine","description":"Works out the longest line of text in _text and returns its length","parameters":[],"returns":{"type":"number","description":"The length of the longest line of text."}},{"name":"removeUnsupportedCharacters","description":"Internal helper function that removes all unsupported characters from the _text String, leaving only characters contained in the font set.","parameters":[{"name":"stripCR","type":"boolean","description":"Should it strip carriage returns as well?","default":true,"optional":true,"nullable":""}],"returns":{"type":"string","description":"A clean version of the string."}},{"name":"updateOffset","description":"Updates the x and/or y offset that the font is rendered from. This updates all of the texture frames, so be careful how often it is called.\rNote that the values given for the x and y properties are either ADDED to or SUBTRACTED from (if negative) the existing offsetX/Y values of the characters.\rSo if the current offsetY is 8 and you want it to start rendering from y16 you would call updateOffset(0, 8) to add 8 to the current y offset.","parameters":[{"name":"xOffset","type":"number","description":"If the font set doesn't start at the top left of the given image, specify the X coordinate offset here.","default":"","optional":true,"nullable":""},{"name":"yOffset","type":"number","description":"If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here.","default":"","optional":true,"nullable":""}]},{"name":"renderXY","description":"This function will draw the display object to the RenderTexture at the given coordinates.\r\rWhen the display object is drawn it takes into account scale and rotation.\r\rIf you don't want those then use RenderTexture.renderRawXY instead.","parameters":[{"name":"displayObject","type":["Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Group"],"description":"The display object to render to this texture.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x position to render the object at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y position to render the object at.","default":"","optional":"","nullable":""},{"name":"clear","type":"boolean","description":"If true the texture will be cleared before the display object is drawn.","default":"","optional":true,"nullable":""}]},{"name":"renderRawXY","description":"This function will draw the display object to the RenderTexture at the given coordinates.\r\rWhen the display object is drawn it doesn't take into account scale, rotation or translation.\r\rIf you need those then use RenderTexture.renderXY instead.","parameters":[{"name":"displayObject","type":["Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Group"],"description":"The display object to render to this texture.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x position to render the object at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y position to render the object at.","default":"","optional":"","nullable":""},{"name":"clear","type":"boolean","description":"If true the texture will be cleared before the display object is drawn.","default":"","optional":true,"nullable":""}]},{"name":"render","description":"This function will draw the display object to the RenderTexture.\r\rIn versions of Phaser prior to 2.4.0 the second parameter was a Phaser.Point object. \rThis is now a Matrix allowing you much more control over how the Display Object is rendered.\rIf you need to replicate the earlier behavior please use Phaser.RenderTexture.renderXY instead.\r\rIf you wish for the displayObject to be rendered taking its current scale, rotation and translation into account then either\rpass `null`, leave it undefined or pass `displayObject.worldTransform` as the matrix value.","parameters":[{"name":"displayObject","type":["Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Group"],"description":"The display object to render to this texture.","default":"","optional":"","nullable":""},{"name":"matrix","type":"Phaser.Matrix","description":"Optional matrix to apply to the display object before rendering. If null or undefined it will use the worldTransform matrix of the given display object.","default":"","optional":true,"nullable":""},{"name":"clear","type":"boolean","description":"If true the texture will be cleared before the display object is drawn.","default":"","optional":true,"nullable":""}]},{"name":"resize","description":"Resizes the RenderTexture.","parameters":[{"name":"width","type":"number","description":"The width to resize to.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height to resize to.","default":"","optional":"","nullable":""},{"name":"updateBase","type":"boolean","description":"Should the baseTexture.width and height values be resized as well?","default":"","optional":"","nullable":""}]},{"name":"clear","description":"Clears the RenderTexture.","parameters":[]},{"name":"_renderWebGL","description":"This function will draw the display object to the texture.","parameters":[{"name":"displayObject","type":"DisplayObject","description":"The display object to render this texture on","default":"","optional":"","nullable":""},{"name":"matrix","type":"Matrix","description":"Optional matrix to apply to the display object before rendering.","default":"","optional":true,"nullable":""},{"name":"clear","type":"Boolean","description":"If true the texture will be cleared before the displayObject is drawn","default":"","optional":true,"nullable":""}]},{"name":"_renderCanvas","description":"This function will draw the display object to the texture.","parameters":[{"name":"displayObject","type":"DisplayObject","description":"The display object to render this texture on","default":"","optional":"","nullable":""},{"name":"matrix","type":"Matrix","description":"Optional matrix to apply to the display object before rendering.","default":"","optional":true,"nullable":""},{"name":"clear","type":"Boolean","description":"If true the texture will be cleared before the displayObject is drawn","default":"","optional":true,"nullable":""}]},{"name":"getImage","description":"Will return a HTML Image of the texture","parameters":[],"returns":{"type":"Image","description":""}},{"name":"getBase64","description":"Will return a base64 encoded string of this texture. It works by calling RenderTexture.getCanvas and then running toDataURL on that.","parameters":[],"returns":{"type":"String","description":"A base64 encoded string of the texture."}},{"name":"getCanvas","description":"Creates a Canvas element, renders this RenderTexture to it and then returns it.","parameters":[],"returns":{"type":"HTMLCanvasElement","description":"A Canvas element with the texture rendered on."}},{"name":"onBaseTextureLoaded","description":"Called when the base texture is loaded","parameters":[]},{"name":"destroy","description":"Destroys this texture","parameters":[{"name":"destroyBase","type":"Boolean","description":"Whether to destroy the base texture as well","default":"","optional":"","nullable":""}]},{"name":"setFrame","description":"Specifies the region of the baseTexture that this texture will use.","parameters":[{"name":"frame","type":"Rectangle","description":"The frame of the texture to set it to","default":"","optional":"","nullable":""}]},{"name":"_updateUvs","description":"Updates the internal WebGL UV cache.","parameters":[]},{"name":"_updateUvsInverted","description":"Updates the internal WebGL UV cache.","parameters":[]}],"members":[{"name":"characterWidth","access":"","virtual":false,"description":"The width of each character in the font set.","type":{"names":["number"]},"default":""},{"name":"characterHeight","access":"","virtual":false,"description":"The height of each character in the font set.","type":{"names":["number"]},"default":""},{"name":"characterSpacingX","access":"","virtual":false,"description":"If the characters in the font set have horizontal spacing between them set the required amount here.","type":{"names":["number"]},"default":""},{"name":"characterSpacingY","access":"","virtual":false,"description":"If the characters in the font set have vertical spacing between them set the required amount here.","type":{"names":["number"]},"default":""},{"name":"characterPerRow","access":"","virtual":false,"description":"The number of characters per row in the font set.","type":{"names":["number"]},"default":""},{"name":"offsetX","access":"","virtual":false,"description":"If the font set doesn't start at the top left of the given image, specify the X coordinate offset here.","type":{"names":["number"]},"default":""},{"name":"offsetY","access":"","virtual":false,"description":"If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here.","type":{"names":["number"]},"default":""},{"name":"align","access":"","virtual":false,"description":"Alignment of the text when multiLine = true or a fixedWidth is set. Set to RetroFont.ALIGN_LEFT (default), RetroFont.ALIGN_RIGHT or RetroFont.ALIGN_CENTER.","type":{"names":["string"]},"default":""},{"name":"multiLine","access":"","virtual":false,"description":"If set to true all carriage-returns in text will form new lines (see align). If false the font will only contain one single line of text (the default)","type":{"names":["boolean"]},"default":""},{"name":"autoUpperCase","access":"","virtual":false,"description":"Automatically convert any text to upper case. Lots of old bitmap fonts only contain upper-case characters, so the default is true.","type":{"names":["boolean"]},"default":true},{"name":"customSpacingX","access":"","virtual":false,"description":"Adds horizontal spacing between each character of the font, in pixels.","type":{"names":["number"]},"default":""},{"name":"customSpacingY","access":"","virtual":false,"description":"Adds vertical spacing between each line of multi-line text, set in pixels.","type":{"names":["number"]},"default":""},{"name":"fixedWidth","access":"","virtual":false,"description":"If you need this RetroFont image to have a fixed width you can set the width in this value.\rIf text is wider than the width specified it will be cropped off.","type":{"names":["number"]},"default":""},{"name":"fontSet","access":"","virtual":false,"description":"A reference to the image stored in the Game.Cache that contains the font.","type":{"names":["Image"]},"default":""},{"name":"_text","access":"private","virtual":false,"description":"The text of the font image.","type":{"names":["string"]},"default":""},{"name":"grabData","access":"private","virtual":false,"description":"An array of rects for faster character pasting.","type":{"names":["array"]},"default":""},{"name":"frameData","access":"","virtual":false,"description":"The FrameData representing this Retro Font.","type":{"names":["Phaser.FrameData"]},"default":""},{"name":"stamp","access":"","virtual":false,"description":"The image that is stamped to the RenderTexture for each character in the font.","type":{"names":["Phaser.Image"]},"default":""},{"name":"type","access":"","virtual":false,"description":"Base Phaser object type.","type":{"names":["number"]},"default":""},{"name":"ALIGN_LEFT","access":"","virtual":false,"description":"Align each line of multi-line text to the left.","type":{"names":["string"]},"default":""},{"name":"ALIGN_RIGHT","access":"","virtual":false,"description":"Align each line of multi-line text to the right.","type":{"names":["string"]},"default":""},{"name":"ALIGN_CENTER","access":"","virtual":false,"description":"Align each line of multi-line text in the center.","type":{"names":["string"]},"default":""},{"name":"TEXT_SET1","access":"","virtual":false,"description":"Text Set 1 =  !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~","type":{"names":["string"]},"default":""},{"name":"TEXT_SET2","access":"","virtual":false,"description":"Text Set 2 =  !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ","type":{"names":["string"]},"default":""},{"name":"TEXT_SET3","access":"","virtual":false,"description":"Text Set 3 = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789","type":{"names":["string"]},"default":""},{"name":"TEXT_SET4","access":"","virtual":false,"description":"Text Set 4 = ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789","type":{"names":["string"]},"default":""},{"name":"TEXT_SET5","access":"","virtual":false,"description":"Text Set 5 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789","type":{"names":["string"]},"default":""},{"name":"TEXT_SET6","access":"","virtual":false,"description":"Text Set 6 = ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.'","type":{"names":["string"]},"default":""},{"name":"TEXT_SET7","access":"","virtual":false,"description":"Text Set 7 = AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39","type":{"names":["string"]},"default":""},{"name":"TEXT_SET8","access":"","virtual":false,"description":"Text Set 8 = 0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ","type":{"names":["string"]},"default":""},{"name":"TEXT_SET9","access":"","virtual":false,"description":"Text Set 9 = ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!","type":{"names":["string"]},"default":""},{"name":"TEXT_SET10","access":"","virtual":false,"description":"Text Set 10 = ABCDEFGHIJKLMNOPQRSTUVWXYZ","type":{"names":["string"]},"default":""},{"name":"TEXT_SET11","access":"","virtual":false,"description":"Text Set 11 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789","type":{"names":["string"]},"default":""},{"name":"text","access":"","virtual":false,"description":"Set this value to update the text in this sprite. Carriage returns are automatically stripped out if multiLine is false. Text is converted to upper case if autoUpperCase is true.","type":{"names":["string"]},"default":""},{"name":"smoothed","access":"","virtual":false,"description":"Sets if the stamp is smoothed or not.","type":{"names":["boolean"]},"default":""},{"name":"game","access":"","virtual":false,"description":"A reference to the currently running game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"key","access":"","virtual":false,"description":"The key of the RenderTexture in the Cache, if stored there.","type":{"names":["string"]},"default":""},{"name":"_tempMatrix","access":"private","virtual":false,"description":"The matrix that is applied when display objects are rendered to this RenderTexture.","type":{"names":["Phaser.Matrix"]},"default":""},{"name":"baseTexture","access":"","virtual":false,"description":"The base texture object that this texture uses","type":{"names":["BaseTexture"]},"default":""},{"name":"renderer","access":"","virtual":false,"description":"The renderer this RenderTexture uses. A RenderTexture can only belong to one renderer at the moment if its webGL.","type":{"names":["CanvasRenderer","WebGLRenderer"]},"default":""},{"name":"valid","access":"","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"noFrame","access":"","virtual":false,"description":"Does this Texture have any frame data assigned to it?","type":{"names":["Boolean"]},"default":""},{"name":"frame","access":"","virtual":false,"description":"The frame specifies the region of the base texture that this texture uses","type":{"names":["Rectangle"]},"default":""},{"name":"trim","access":"","virtual":false,"description":"The texture trim data.","type":{"names":["Rectangle"]},"default":""},{"name":"isTiling","access":"","virtual":false,"description":"Is this a tiling texture? As used by the likes of a TilingSprite.","type":{"names":["Boolean"]},"default":""},{"name":"requiresUpdate","access":"","virtual":false,"description":"This will let a renderer know that a texture has been updated (used mainly for webGL uv updates)","type":{"names":["Boolean"]},"default":""},{"name":"requiresReTint","access":"","virtual":false,"description":"This will let a renderer know that a tinted parent has updated its texture.","type":{"names":["Boolean"]},"default":""},{"name":"_uvs","access":"private","virtual":false,"description":"The WebGL UV data cache.","type":{"names":["Object"]},"default":""},{"name":"width","access":"","virtual":false,"description":"The width of the Texture in pixels.","type":{"names":["Number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the Texture in pixels.","type":{"names":["Number"]},"default":""},{"name":"crop","access":"","virtual":false,"description":"This is the area of the BaseTexture image to actually copy to the Canvas / WebGL when rendering,\nirrespective of the actual frame size or placement (which can be influenced by trimmed texture atlases)","type":{"names":["Rectangle"]},"default":""},{"name":"rotated","access":"","virtual":false,"description":"A flag that controls if this frame is rotated or not.\nRotation allows you to use rotated frames in texture atlas packing, it has nothing to do with\nSprite rotation.","type":{"names":["Boolean"]},"default":""}]},{"name":"Phaser.Rope","description":"A Rope is a Sprite that has a repeating texture.\r\rThe texture will automatically wrap on the edges as it moves.\r\rPlease note that Ropes cannot have an input handler.","constructor":{"name":"Rope","description":"A Rope is a Sprite that has a repeating texture.\r\rThe texture will automatically wrap on the edges as it moves.\r\rPlease note that Ropes cannot have an input handler.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate (in world space) to position the Rope at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate (in world space) to position the Rope at.","default":"","optional":"","nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","PIXI.Texture"],"description":"This is the image or texture used by the Rope during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.","default":"","optional":"","nullable":""},{"name":"frame","type":["string","number"],"description":"If this Rope 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.","default":"","optional":"","nullable":""},{"name":"points","type":"Array","description":"An array of {Phaser.Point}.","default":"","optional":"","nullable":""}]},"functions":[{"name":"preUpdate","description":"Automatically called by World.preUpdate.","parameters":[]},{"name":"update","description":"Override and use this function in your own custom objects to handle any update requirements you may have.","parameters":[]},{"name":"reset","description":"Resets the Rope. This places the Rope at the given x/y world coordinates and then\rsets alive, exists, visible and renderable all to true. Also resets the outOfBounds state.\rIf the Rope has a physics body that too is reset.","parameters":[{"name":"x","type":"number","description":"The x coordinate (in world space) to position the Sprite at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate (in world space) to position the Sprite at.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Rope","description":"This instance."}},{"name":"addChild","description":"Adds a child to the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to add to the container","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"addChildAt","description":"Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child to add","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The index to place the child in","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"swapChildren","description":"Swaps the position of 2 Display Objects within this container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""},{"name":"child2","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}]},{"name":"getChildIndex","description":"Returns the index position of a child DisplayObject instance","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject instance to identify","default":"","optional":"","nullable":""}],"returns":{"type":"Number","description":"The index position of the child display object to identify"}},{"name":"setChildIndex","description":"Changes the position of an existing child in the display object container","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child DisplayObject instance for which you want to change the index number","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The resulting index number for the child display object","default":"","optional":"","nullable":""}]},{"name":"getChildAt","description":"Returns the child at the specified index","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child at the given index, if any."}},{"name":"removeChild","description":"Removes a child from the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to remove","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildAt","description":"Removes a child from the specified index position.","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildren","description":"Removes all children from this container that are within the begin and end indexes.","parameters":[{"name":"beginIndex","type":"Number","description":"The beginning position. Default value is 0.","default":"","optional":"","nullable":""},{"name":"endIndex","type":"Number","description":"The ending position. Default value is size of the container.","default":"","optional":"","nullable":""}]},{"name":"getBounds","description":"Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.","parameters":[{"name":"targetCoordinateSpace","type":["PIXIDisplayObject","PIXIMatrix"],"description":"Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object.","default":"","optional":true,"nullable":""}],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"getLocalBounds","description":"Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.","parameters":[],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"contains","description":"Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}],"returns":{"type":"Boolean","description":""}},{"name":"_renderWebGL","description":"Renders the object using the WebGL renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""}]},{"name":"_renderCanvas","description":"Renders the object using the Canvas renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""}]},{"name":"postUpdate","description":"Internal method called by the World postUpdate cycle.","parameters":[]},{"name":"play","description":"Plays an Animation.\r\rThe animation should have previously been created via `animations.add`.\r\rIf the animation is already playing calling this again won't do anything.\rIf you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.","parameters":[{"name":"name","type":"string","description":"The name of the animation to be played, e.g. \"fire\", \"walk\", \"jump\". Must have been previously created via 'AnimationManager.add'.","default":"","optional":"","nullable":""},{"name":"frameRate","type":"number","description":"The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used.","default":"","optional":true,"nullable":""},{"name":"loop","type":"boolean","description":"Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.","default":"","optional":true,"nullable":""},{"name":"killOnComplete","type":"boolean","description":"If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Animation","description":"A reference to playing Animation."}},{"name":"alignIn","description":"Aligns this Game Object within another Game Object, or Rectangle, known as the\r'container', to one of 9 possible positions.\r\rThe container must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Game Objects within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Sprite to another Game Object does **not** make it a child of\rthe container. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, \r`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, \r`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.\r\rThe Game Objects are placed in such a way that their _bounds_ align with the\rcontainer, taking into consideration rotation, scale and the anchor property.\rThis allows you to neatly align Game Objects, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Game Object. For example:\r\r`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the containers bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"container","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Object","description":"This Game Object."}},{"name":"alignTo","description":"Aligns this Game Object to the side of another Game Object, or Rectangle, known as the\r'parent', in one of 11 possible positions.\r\rThe parent must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Game Objects within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Sprite to another Game Object does **not** make it a child of\rthe parent. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, \r`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, \r`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` \rand `Phaser.BOTTOM_RIGHT`.\r\rThe Game Objects are placed in such a way that their _bounds_ align with the\rparent, taking into consideration rotation, scale and the anchor property.\rThis allows you to neatly align Game Objects, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Game Object. For example:\r\r`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the parents bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"parent","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Object","description":"This Game Object."}},{"name":"bringToTop","description":"Brings this Game Object to the top of its parents display list.\rVisually this means it will render over the top of any old child in the same Group.\r\rIf this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"sendToBack","description":"Sends this Game Object to the bottom of its parents display list.\rVisually this means it will render below all other children in the same Group.\r\rIf this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"moveUp","description":"Moves this Game Object up one place in its parents display list.\rThis call has no effect if the Game Object is already at the top of the display list.\r\rIf this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"moveDown","description":"Moves this Game Object down one place in its parents display list.\rThis call has no effect if the Game Object is already at the bottom of the display list.\r\rIf this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"crop","description":"Crop allows you to crop the texture being used to display this Game Object.\rSetting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.\r\rCropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method,\ror by modifying `cropRect` property directly and then calling `updateCrop`.\r\rThe rectangle object given to this method can be either a `Phaser.Rectangle` or any other object \rso long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.\r\rA reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, \rin which case the values are duplicated to a local object.","parameters":[{"name":"rect","type":"Phaser.Rectangle","description":"The Rectangle used during cropping. Pass null or no parameters to clear a previously set crop rectangle.","default":"","optional":"","nullable":""},{"name":"copy","type":"boolean","description":"If false `cropRect` will be stored as a reference to the given rect. If true it will copy the rect values into a local Phaser Rectangle object stored in cropRect.","default":"","optional":true,"nullable":""}]},{"name":"updateCrop","description":"If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property,\ror the rectangle it references, then you need to update the crop frame by calling this method.","parameters":[]},{"name":"destroy","description":"Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present\rand nulls its reference to `game`, freeing it up for garbage collection.\r\rIf this Game Object has the Events component it will also dispatch the `onDestroy` event.\r\rYou can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've\rmore than one Game Object sharing the same BaseTexture.","parameters":[{"name":"destroyChildren","type":"boolean","description":"Should every child of this object have its destroy method called as well?","default":true,"optional":true,"nullable":""},{"name":"destroyTexture","type":"boolean","description":"Destroy the BaseTexture this Game Object is using? Note that if another Game Object is sharing the same BaseTexture it will invalidate it.","default":"","optional":true,"nullable":""}]},{"name":"revive","description":"Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.\r\rA resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.\r\rIt will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.","parameters":[{"name":"health","type":"number","description":"The health to give the Game Object. Only set if the GameObject has the Health component.","default":100,"optional":true,"nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"kill","description":"Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.\r\rIt will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.\r\rNote that killing a Game Object is a way for you to quickly recycle it in an object pool,\rit doesn't destroy the object or free it up from memory.\r\rIf you don't need this Game Object any more you should call `destroy` instead.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"loadTexture","description":"Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.\r\rIf your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.\r\rYou should only use `loadTexture` if you want to replace the base texture entirely.\r\rCalling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.\r\rYou can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. \rDoing this then sets the key to be the `frame` argument (the frame is set to zero). \r\rThis allows you to create sprites using `load.image` during development, and then change them \rto use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' \rand swapping it to be the key of the atlas data.\r\rNote: You cannot use a RenderTexture as a texture for a TileSprite.","parameters":[{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":"","nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""},{"name":"stopAnimation","type":"boolean","description":"If an animation is already playing on this Sprite you can choose to stop it or let it carry on playing.","default":true,"optional":true,"nullable":""}]},{"name":"setFrame","description":"Sets the texture frame the Game Object uses for rendering.\r\rThis is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.","parameters":[{"name":"frame","type":"Phaser.Frame","description":"The Frame to be used by the texture.","default":"","optional":"","nullable":""}]},{"name":"resizeFrame","description":"Resizes the Frame dimensions that the Game Object uses for rendering.\r\rYou shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData\rit can be useful to adjust the dimensions directly in this way.","parameters":[{"name":"parent","type":"object","description":"The parent texture object that caused the resize, i.e. a Phaser.Video object.","default":"","optional":"","nullable":""},{"name":"width","type":"integer","description":"The new width of the texture.","default":"","optional":"","nullable":""},{"name":"height","type":"integer","description":"The new height of the texture.","default":"","optional":"","nullable":""}]},{"name":"resetFrame","description":"Resets the texture frame dimensions that the Game Object uses for rendering.","parameters":[]},{"name":"overlap","description":"Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object, \rwhich can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.\r\rThis check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.\r\rTherefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency.\rIt should be fine for low-volume testing where physics isn't required.","parameters":[{"name":"displayObject","type":["Phaser.Sprite","Phaser.Image","Phaser.TileSprite","Phaser.Button","PIXI.DisplayObject"],"description":"The display object to check against.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the bounds of this Game Object intersects at any point with the bounds of the given display object."}},{"name":"checkTransform","description":"Adjust scaling limits, if set, to this Game Object.","parameters":[{"name":"wt","type":"PIXI.Matrix","description":"The updated worldTransform matrix.","default":"","optional":"","nullable":""}]},{"name":"setScaleMinMax","description":"Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.\r\rFor example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored \rand the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.\r\rBy setting these values you can carefully control how Game Objects deal with responsive scaling.\r\rIf only one parameter is given then that value will be used for both scaleMin and scaleMax:\r`setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1\r\rIf only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y:\r`setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2\r\rIf you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly, \ror pass `null` for the `maxX` and `maxY` parameters.\r\rCall `setScaleMinMax(null)` to clear all previously set values.","parameters":[{"name":"minX","type":["number","null"],"description":"The minimum horizontal scale value this Game Object can scale down to.","default":"","optional":"","nullable":""},{"name":"minY","type":["number","null"],"description":"The minimum vertical scale value this Game Object can scale down to.","default":"","optional":"","nullable":""},{"name":"maxX","type":["number","null"],"description":"The maximum horizontal scale value this Game Object can scale up to.","default":"","optional":"","nullable":""},{"name":"maxY","type":["number","null"],"description":"The maximum vertical scale value this Game Object can scale up to.","default":"","optional":"","nullable":""}]}],"members":[{"name":"type","access":"","virtual":false,"description":"The const type of this object.","type":{"names":["number"]},"default":""},{"name":"dirty","access":"","virtual":false,"description":"Whether the strip is dirty or not","type":{"names":["Boolean"]},"default":""},{"name":"canvasPadding","access":"","virtual":false,"description":"Triangles in canvas mode are automatically antialiased, use this value to force triangles to overlap a bit with each other.","type":{"names":["Number"]},"default":""},{"name":"updateAnimation","access":"","virtual":false,"description":"A Rope will call its updateAnimation function on each update loop if it has one. Set to a function if you'd like the rope to animate during the update phase. Set to false or null to remove it.","type":{"names":["function"]},"default":""},{"name":"segments","access":"","virtual":false,"description":"The segments that make up the rope body as an array of Phaser.Rectangles","type":"","default":""},{"name":"children","access":"","virtual":false,"description":"[read-only] The array of children of this container.","type":{"names":["Array.<DisplayObject>"]},"default":""},{"name":"ignoreChildInput","access":"","virtual":false,"description":"If `ignoreChildInput`  is `false` it will allow this objects _children_ to be considered as valid for Input events.\n\nIf this property is `true` then the children will _not_ be considered as valid for Input events.\n\nNote that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.","type":{"names":["Boolean"]},"default":""},{"name":"width","access":"","virtual":false,"description":"The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"position","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject, relative to its parent container.\n\nThe value of this property does not reflect any positioning happening further up the display list.\nTo obtain that value please see the `worldPosition` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"scale","access":"","virtual":false,"description":"The scale of this DisplayObject. A scale of 1:1 represents the DisplayObject\nat its default size. A value of 0.5 would scale this DisplayObject by half, and so on.\n\nThe value of this property does not reflect any scaling happening further up the display list.\nTo obtain that value please see the `worldScale` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"pivot","access":"","virtual":false,"description":"The pivot point of this DisplayObject that it rotates around. The values are expressed\nin pixel values.","type":{"names":["PIXIPoint"]},"default":""},{"name":"rotation","access":"","virtual":false,"description":"The rotation of this DisplayObject. The value is given, and expressed, in radians, and is based on\na right-handed orientation.\n\nThe value of this property does not reflect any rotation happening further up the display list.\nTo obtain that value please see the `worldRotation` property.","type":{"names":["Number"]},"default":""},{"name":"alpha","access":"","virtual":false,"description":"The alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nPlease note that an object with an alpha value of 0 is skipped during the render pass.\n\nThe value of this property does not reflect any alpha values set further up the display list.\nTo obtain that value please see the `worldAlpha` property.","type":{"names":["Number"]},"default":""},{"name":"visible","access":"","virtual":false,"description":"The visibility of this DisplayObject. A value of `false` makes the object invisible.\nA value of `true` makes it visible. Please note that an object with a visible value of\n`false` is skipped during the render pass. Equally a DisplayObject with visible false will\nnot render any of its children.\n\nThe value of this property does not reflect any visible values set further up the display list.\nTo obtain that value please see the `worldVisible` property.","type":{"names":["Boolean"]},"default":""},{"name":"hitArea","access":"","virtual":false,"description":"This is the defined area that will pick up mouse / touch events. It is null by default.\nSetting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)","type":{"names":["Rectangle","Circle","Ellipse","Polygon"]},"default":""},{"name":"renderable","access":"","virtual":false,"description":"Should this DisplayObject be rendered by the renderer? An object with a renderable value of\n`false` is skipped during the render pass.","type":{"names":["Boolean"]},"default":""},{"name":"parent","access":"","virtual":false,"description":"The parent DisplayObjectContainer that this DisplayObject is a child of.\nAll DisplayObjects must belong to a parent in order to be rendered.\nThe root parent is the Stage object. This property is set automatically when the\nDisplayObject is added to, or removed from, a DisplayObjectContainer.","type":{"names":["PIXIDisplayObjectContainer"]},"default":""},{"name":"worldAlpha","access":"","virtual":false,"description":"The multiplied alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nThis value is the calculated total, based on the alpha values of all parents of this DisplayObjects \nin the display list.\n\nTo obtain, and set, the local alpha value, see the `alpha` property.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"worldTransform","access":"","virtual":false,"description":"The current transform of this DisplayObject.\n\nThis property contains the calculated total, based on the transforms of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIMatrix"]},"default":""},{"name":"worldPosition","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject within the world.\n\nThis property contains the calculated total, based on the positions of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldScale","access":"","virtual":false,"description":"The global scale of this DisplayObject.\n\nThis property contains the calculated total, based on the scales of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldRotation","access":"","virtual":false,"description":"The rotation, in radians, of this DisplayObject.\n\nThis property contains the calculated total, based on the rotations of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"filterArea","access":"","virtual":false,"description":"The rectangular area used by filters when rendering a shader for this DisplayObject.","type":{"names":["Rectangle"]},"default":""},{"name":"_sr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_cr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_bounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_currentBounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_mask","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_cacheAsBitmap","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"_cacheIsDirty","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"x","access":"","virtual":false,"description":"The horizontal position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The vertical position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"worldVisible","access":"","virtual":false,"description":"Indicates if this DisplayObject is visible, based on it, and all of its parents, `visible` property values.","type":{"names":["Boolean"]},"default":""},{"name":"mask","access":"","virtual":false,"description":"Sets a mask for this DisplayObject. A mask is an instance of a Graphics object.\nWhen applied it limits the visible area of this DisplayObject to the shape of the mask.\nUnder a Canvas renderer it uses shape clipping. Under a WebGL renderer it uses a Stencil Buffer.\nTo remove a mask, set this property to `null`.","type":{"names":["PIXIGraphics"]},"default":""},{"name":"filters","access":"","virtual":false,"description":"Sets the filters for this DisplayObject. This is a WebGL only feature, and is ignored by the Canvas\nRenderer. A filter is a shader applied to this DisplayObject. You can modify the placement of the filter\nusing `DisplayObject.filterArea`.\n\nTo remove filters, set this property to `null`.\n\nNote: You cannot have a filter set, and a MULTIPLY Blend Mode active, at the same time. Setting a \nfilter will reset this DisplayObjects blend mode to NORMAL.","type":{"names":["Array"]},"default":""},{"name":"cacheAsBitmap","access":"","virtual":false,"description":"Sets if this DisplayObject should be cached as a bitmap.\n\nWhen invoked it will take a snapshot of the DisplayObject, as it is at that moment, and store it \nin a RenderTexture. This is then used whenever this DisplayObject is rendered. It can provide a\nperformance benefit for complex, but static, DisplayObjects. I.e. those with lots of children.\n\nCached Bitmaps do not track their parents. If you update a property of this DisplayObject, it will not\nre-generate the cached bitmap automatically. To do that you need to call `DisplayObject.updateCache`.\n\nTo remove a cached bitmap, set this property to `null`.","type":{"names":["Boolean"]},"default":""},{"name":"game","access":"","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"name","access":"","virtual":false,"description":"A user defined name given to this Game Object.\rThis value isn't ever used internally by Phaser, it is meant as a game level property.","type":{"names":["string"]},"default":""},{"name":"data","access":"","virtual":false,"description":"An empty Object that belongs to this Game Object.\rThis value isn't ever used internally by Phaser, but may be used by your own code, or\rby Phaser Plugins, to store data that needs to be associated with the Game Object,\rwithout polluting the Game Object directly.","type":{"names":["Object"]},"default":"{}"},{"name":"components","access":"protected","virtual":false,"description":"The components this Game Object has installed.","type":{"names":["object"]},"default":""},{"name":"z","access":"","virtual":false,"description":"The z depth of this Game Object within its parent Group.\rNo two objects in a Group can have the same z value.\rThis value is adjusted automatically whenever the Group hierarchy changes.\rIf you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.","type":{"names":["number"]},"default":""},{"name":"events","access":"","virtual":false,"description":"All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this\rGame Object, or any of its components.","type":{"names":["Phaser.Events"]},"default":""},{"name":"animations","access":"","virtual":false,"description":"If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance.\rThrough it you can create, play, pause and stop animations.","type":{"names":["Phaser.AnimationManager"]},"default":""},{"name":"key","access":"","virtual":false,"description":"The key of the image or texture used by this Game Object during rendering.\rIf it is a string it's the string used to retrieve the texture from the Phaser Image Cache.\rIt can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.\rIf a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache.\rIf a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.","type":{"names":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"]},"default":""},{"name":"world","access":"","virtual":false,"description":"The world coordinates of this Game Object in pixels.\rDepending on where in the display list this Game Object is placed this value can differ from `position`, \rwhich contains the x/y coordinates relative to the Game Objects parent.","type":{"names":["Phaser.Point"]},"default":""},{"name":"debug","access":"","virtual":false,"description":"A debug flag designed for use with `Game.enableStep`.","type":{"names":["boolean"]},"default":""},{"name":"previousPosition","access":"","virtual":false,"description":"The position the Game Object was located in the previous frame.","type":{"names":["Phaser.Point"]},"default":""},{"name":"previousRotation","access":"","virtual":false,"description":"The rotation the Game Object was in set to in the previous frame. Value is in radians.","type":{"names":["number"]},"default":""},{"name":"renderOrderID","access":"","virtual":false,"description":"The render order ID is used internally by the renderer and Input Manager and should not be modified.\rThis property is mostly used internally by the renderers, but is exposed for the use of plugins.","type":{"names":["number"]},"default":""},{"name":"fresh","access":"","virtual":false,"description":"A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update.\rThis property is mostly used internally by the physics systems, but is exposed for the use of plugins.","type":{"names":["boolean"]},"default":""},{"name":"pendingDestroy","access":"","virtual":false,"description":"A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update.\rYou can set it directly to allow you to flag an object to be destroyed on its next update.\r\rThis is extremely useful if you wish to destroy an object from within one of its own callbacks \rsuch as with Buttons or other Input events.","type":{"names":["boolean"]},"default":""},{"name":"_exists","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["boolean"]},"default":""},{"name":"exists","access":"","virtual":false,"description":"Controls if this Game Object is processed by the core game loop.\rIf this Game Object has a physics body it also controls if its physics body is updated or not.\rWhen `exists` is set to `false` it will remove its physics body from the physics world if it has one.\rIt also toggles the `visible` property to false as well.\r\rSetting `exists` to true will add its physics body back in to the physics world, if it has one.\rIt will also set the `visible` property to `true`.","type":{"names":["boolean"]},"default":""},{"name":"angle","access":"","virtual":false,"description":"The angle property is the rotation of the Game Object in *degrees* from its original orientation.\r\rValues from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.\r\rValues outside this range are added to or subtracted from 360 to obtain a value within the range. \rFor example, the statement player.angle = 450 is the same as player.angle = 90.\r\rIf you wish to work in radians instead of degrees you can use the property `rotation` instead. \rWorking in radians is slightly faster as it doesn't have to perform any calculations.","type":{"names":["number"]},"default":""},{"name":"autoCull","access":"","virtual":false,"description":"A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame.\rIf it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`.\rThis keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.\r\rThis is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,\ror you have tested performance and find it acceptable.","type":{"names":["boolean"]},"default":""},{"name":"inCamera","access":"","virtual":false,"description":"Checks if the Game Objects bounds intersect with the Game Camera bounds.\rReturns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.","type":{"names":["boolean"]},"default":""},{"name":"offsetX","access":"","virtual":false,"description":"The amount the Game Object is visually offset from its x coordinate.\rThis is the same as `width * anchor.x`.\rIt will only be > 0 if anchor.x is not equal to zero.","type":{"names":["number"]},"default":""},{"name":"offsetY","access":"","virtual":false,"description":"The amount the Game Object is visually offset from its y coordinate.\rThis is the same as `height * anchor.y`.\rIt will only be > 0 if anchor.y is not equal to zero.","type":{"names":["number"]},"default":""},{"name":"centerX","access":"","virtual":false,"description":"The center x coordinate of the Game Object.\rThis is the same as `(x - offsetX) + (width / 2)`.","type":{"names":["number"]},"default":""},{"name":"centerY","access":"","virtual":false,"description":"The center y coordinate of the Game Object.\rThis is the same as `(y - offsetY) + (height / 2)`.","type":{"names":["number"]},"default":""},{"name":"left","access":"","virtual":false,"description":"The left coordinate of the Game Object.\rThis is the same as `x - offsetX`.","type":{"names":["number"]},"default":""},{"name":"right","access":"","virtual":false,"description":"The right coordinate of the Game Object.\rThis is the same as `x + width - offsetX`.","type":{"names":["number"]},"default":""},{"name":"top","access":"","virtual":false,"description":"The y coordinate of the Game Object.\rThis is the same as `y - offsetY`.","type":{"names":["number"]},"default":""},{"name":"bottom","access":"","virtual":false,"description":"The sum of the y and height properties.\rThis is the same as `y + height - offsetY`.","type":{"names":["number"]},"default":""},{"name":"cropRect","access":"","virtual":false,"description":"The Rectangle used to crop the texture this Game Object uses.\rSet this property via `crop`. \rIf you modify this property directly you must call `updateCrop` in order to have the change take effect.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"_crop","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"deltaX","access":"","virtual":false,"description":"Returns the delta x value. The difference between world.x now and in the previous frame.\r\rThe value will be positive if the Game Object has moved to the right or negative if to the left.","type":{"names":["number"]},"default":""},{"name":"deltaY","access":"","virtual":false,"description":"Returns the delta y value. The difference between world.y now and in the previous frame.\r\rThe value will be positive if the Game Object has moved down or negative if up.","type":{"names":["number"]},"default":""},{"name":"deltaZ","access":"","virtual":false,"description":"Returns the delta z value. The difference between rotation now and in the previous frame. The delta value.","type":{"names":["number"]},"default":""},{"name":"destroyPhase","access":"","virtual":false,"description":"As a Game Object runs through its destroy method this flag is set to true, \rand can be checked in any sub-systems or plugins it is being destroyed from.","type":{"names":["boolean"]},"default":""},{"name":"_fixedToCamera","access":"private","virtual":false,"description":"","type":{"names":["boolean"]},"default":""},{"name":"fixedToCamera","access":"","virtual":false,"description":"A Game Object that is \"fixed\" to the camera is rendered at a given x/y offsets from the top left of the camera. The offsets \rare stored in the `cameraOffset` property, which is initialized with the current object coordinates. \r\rThe values are adjusted at the rendering stage, overriding the Game Objects actual world position.\r\rThe end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world\rthe camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times \rregardless where in the world the camera is.\r\rNote that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.\r\rBe careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.","type":{"names":["boolean"]},"default":""},{"name":"cameraOffset","access":"","virtual":false,"description":"The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.\r\rThe values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.","type":{"names":["Phaser.Point"]},"default":""},{"name":"checkWorldBounds","access":"","virtual":false,"description":"If this is set to `true` the Game Object checks if it is within the World bounds each frame. \r\rWhen it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.\r\rIf it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.\r\rIt also optionally kills the Game Object if `outOfBoundsKill` is `true`.\r\rWhen `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.\r\rThis is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,\ror you have tested performance and find it acceptable.","type":{"names":["boolean"]},"default":""},{"name":"outOfBoundsKill","access":"","virtual":false,"description":"If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.","type":{"names":["boolean"]},"default":""},{"name":"outOfCameraBoundsKill","access":"","virtual":false,"description":"If this and the `autoCull` property are both set to `true`, then the `kill` method\ris called as soon as the Game Object leaves the camera bounds.","type":{"names":["boolean"]},"default":""},{"name":"_outOfBoundsFired","access":"private","virtual":false,"description":"Internal state var.","type":{"names":["boolean"]},"default":""},{"name":"inWorld","access":"","virtual":false,"description":"Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.","type":{"names":["boolean"]},"default":""},{"name":"alive","access":"","virtual":false,"description":"A useful flag to control if the Game Object is alive or dead.\r\rThis is set automatically by the Health components `damage` method should the object run out of health.\rOr you can toggle it via your game code.\r\rThis property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates.\rHowever you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.","type":{"names":["boolean"]},"default":true},{"name":"lifespan","access":"","virtual":false,"description":"The lifespan allows you to give a Game Object a lifespan in milliseconds.\r\rOnce the Game Object is 'born' you can set this to a positive value.\r\rIt is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame.\rWhen it reaches zero it will call the `kill` method.\r\rVery handy for particles, bullets, collectibles, or any other short-lived entity.","type":{"names":["number"]},"default":""},{"name":"customRender","access":"private","virtual":false,"description":"Does this texture require a custom render call? (as set by BitmapData, Video, etc)","type":{"names":["boolean"]},"default":""},{"name":"_frame","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"frame","access":"","virtual":false,"description":"Gets or sets the current frame index of the texture being used to render this Game Object.\r\rTo change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use,\rfor example: `player.frame = 4`.\r\rIf the frame index given doesn't exist it will revert to the first frame found in the texture.\r\rIf you are using a texture atlas then you should use the `frameName` property instead.\r\rIf you wish to fully replace the texture being used see `loadTexture`.","type":{"names":["integer"]},"default":""},{"name":"frameName","access":"","virtual":false,"description":"Gets or sets the current frame name of the texture being used to render this Game Object.\r\rTo change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use, \rfor example: `player.frameName = \"idle\"`.\r\rIf the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.\r\rIf you are using a sprite sheet then you should use the `frame` property instead.\r\rIf you wish to fully replace the texture being used see `loadTexture`.","type":{"names":["string"]},"default":""},{"name":"body","access":"","virtual":false,"description":"`body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated \rproperties and methods via it.\r\rBy default Game Objects won't add themselves to any physics system and their `body` property will be `null`.\r\rTo enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object\rand `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.\r\rYou can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.\r\rImportant: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5, \rso the physics body is centered on the Game Object.\r\rIf you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.","type":{"names":["Phaser.Physics.Arcade.Body","Phaser.Physics.P2.Body","Phaser.Physics.Ninja.Body","null"]},"default":""},{"name":"transformCallback","access":"","virtual":false,"description":"The callback that will apply any scale limiting to the worldTransform.","type":{"names":["function"]},"default":""},{"name":"transformCallbackContext","access":"","virtual":false,"description":"The context under which `transformCallback` is called.","type":{"names":["object"]},"default":""},{"name":"scaleMin","access":"","virtual":false,"description":"The minimum scale this Game Object will scale down to.\r\rIt allows you to prevent a parent from scaling this Game Object lower than the given value.\r\rSet it to `null` to remove the limit.","type":{"names":["Phaser.Point"]},"default":""},{"name":"scaleMax","access":"","virtual":false,"description":"The maximum scale this Game Object will scale up to. \r\rIt allows you to prevent a parent from scaling this Game Object higher than the given value.\r\rSet it to `null` to remove the limit.","type":{"names":["Phaser.Point"]},"default":""},{"name":"smoothed","access":"","virtual":false,"description":"Enable or disable texture smoothing for this Game Object.\r\rIt only takes effect if the Game Object is using an image based texture.\r\rSmoothing is enabled by default.","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.Sprite","description":"Sprites are the lifeblood of your game, used for nearly everything visual.\r\rAt its most basic a Sprite consists of a set of coordinates and a texture that is rendered to the canvas.\rThey also contain additional properties allowing for physics motion (via Sprite.body), input handling (via Sprite.input),\revents (via Sprite.events), animation (via Sprite.animations), camera culling and more. Please see the Examples for use cases.","constructor":{"name":"Sprite","description":"Sprites are the lifeblood of your game, used for nearly everything visual.\r\rAt its most basic a Sprite consists of a set of coordinates and a texture that is rendered to the canvas.\rThey also contain additional properties allowing for physics motion (via Sprite.body), input handling (via Sprite.input),\revents (via Sprite.events), animation (via Sprite.animations), camera culling and more. Please see the Examples for use cases.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate (in world space) to position the Sprite at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate (in world space) to position the Sprite at.","default":"","optional":"","nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.","default":"","optional":"","nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":"","nullable":""}]},"functions":[{"name":"preUpdate","description":"Automatically called by World.preUpdate.","parameters":[],"returns":{"type":"boolean","description":"True if the Sprite was rendered, otherwise false."}},{"name":"setTexture","description":"Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous\ntexture this Sprite was using.","parameters":[{"name":"texture","type":"PIXI.Texture","description":"The PIXI texture that is displayed by the sprite","default":"","optional":"","nullable":""},{"name":"destroy","type":"Boolean","description":"Call Texture.destroy on the current texture before replacing it with the new one?","default":"","optional":true,"nullable":""}]},{"name":"onTextureUpdate","description":"When the texture is updated, this event will fire to update the scale and frame","parameters":[{"name":"event","type":"","description":"-","default":"","optional":"","nullable":""}]},{"name":"getBounds","description":"Returns the bounds of the Sprite as a rectangle.\nThe bounds calculation takes the worldTransform into account.\n\nIt is important to note that the transform is not updated when you call this method.\nSo if this Sprite is the child of a Display Object which has had its transform\nupdated since the last render pass, those changes will not yet have been applied\nto this Sprites worldTransform. If you need to ensure that all parent transforms\nare factored into this getBounds operation then you should call `updateTransform`\non the root most object in this Sprites display list first.","parameters":[{"name":"matrix","type":"Matrix","description":"the transformation matrix of the sprite","default":"","optional":"","nullable":""}],"returns":{"type":"Rectangle","description":"the framing rectangle"}},{"name":"getLocalBounds","description":"Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.","parameters":[],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"_renderWebGL","description":"Renders the object using the WebGL renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""},{"name":"matrix","type":"Matrix","description":"- Optional matrix. If provided the Display Object will be rendered using this matrix, otherwise it will use its worldTransform.","default":"","optional":true,"nullable":""}]},{"name":"_renderCanvas","description":"Renders the object using the Canvas renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""},{"name":"matrix","type":"Matrix","description":"- Optional matrix. If provided the Display Object will be rendered using this matrix, otherwise it will use its worldTransform.","default":"","optional":true,"nullable":""}]},{"name":"addChild","description":"Adds a child to the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to add to the container","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"addChildAt","description":"Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child to add","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The index to place the child in","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"swapChildren","description":"Swaps the position of 2 Display Objects within this container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""},{"name":"child2","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}]},{"name":"getChildIndex","description":"Returns the index position of a child DisplayObject instance","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject instance to identify","default":"","optional":"","nullable":""}],"returns":{"type":"Number","description":"The index position of the child display object to identify"}},{"name":"setChildIndex","description":"Changes the position of an existing child in the display object container","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child DisplayObject instance for which you want to change the index number","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The resulting index number for the child display object","default":"","optional":"","nullable":""}]},{"name":"getChildAt","description":"Returns the child at the specified index","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child at the given index, if any."}},{"name":"removeChild","description":"Removes a child from the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to remove","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildAt","description":"Removes a child from the specified index position.","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildren","description":"Removes all children from this container that are within the begin and end indexes.","parameters":[{"name":"beginIndex","type":"Number","description":"The beginning position. Default value is 0.","default":"","optional":"","nullable":""},{"name":"endIndex","type":"Number","description":"The ending position. Default value is size of the container.","default":"","optional":"","nullable":""}]},{"name":"contains","description":"Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}],"returns":{"type":"Boolean","description":""}},{"name":"update","description":"Override this method in your own custom objects to handle any update requirements.\rIt is called immediately after `preUpdate` and before `postUpdate`.\rRemember if this Game Object has any children you should call update on those too.","parameters":[]},{"name":"postUpdate","description":"Internal method called by the World postUpdate cycle.","parameters":[]},{"name":"play","description":"Plays an Animation.\r\rThe animation should have previously been created via `animations.add`.\r\rIf the animation is already playing calling this again won't do anything.\rIf you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.","parameters":[{"name":"name","type":"string","description":"The name of the animation to be played, e.g. \"fire\", \"walk\", \"jump\". Must have been previously created via 'AnimationManager.add'.","default":"","optional":"","nullable":""},{"name":"frameRate","type":"number","description":"The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used.","default":"","optional":true,"nullable":""},{"name":"loop","type":"boolean","description":"Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.","default":"","optional":true,"nullable":""},{"name":"killOnComplete","type":"boolean","description":"If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Animation","description":"A reference to playing Animation."}},{"name":"alignIn","description":"Aligns this Game Object within another Game Object, or Rectangle, known as the\r'container', to one of 9 possible positions.\r\rThe container must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Game Objects within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Sprite to another Game Object does **not** make it a child of\rthe container. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, \r`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, \r`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.\r\rThe Game Objects are placed in such a way that their _bounds_ align with the\rcontainer, taking into consideration rotation, scale and the anchor property.\rThis allows you to neatly align Game Objects, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Game Object. For example:\r\r`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the containers bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"container","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Object","description":"This Game Object."}},{"name":"alignTo","description":"Aligns this Game Object to the side of another Game Object, or Rectangle, known as the\r'parent', in one of 11 possible positions.\r\rThe parent must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Game Objects within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Sprite to another Game Object does **not** make it a child of\rthe parent. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, \r`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, \r`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` \rand `Phaser.BOTTOM_RIGHT`.\r\rThe Game Objects are placed in such a way that their _bounds_ align with the\rparent, taking into consideration rotation, scale and the anchor property.\rThis allows you to neatly align Game Objects, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Game Object. For example:\r\r`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the parents bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"parent","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Object","description":"This Game Object."}},{"name":"bringToTop","description":"Brings this Game Object to the top of its parents display list.\rVisually this means it will render over the top of any old child in the same Group.\r\rIf this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"sendToBack","description":"Sends this Game Object to the bottom of its parents display list.\rVisually this means it will render below all other children in the same Group.\r\rIf this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"moveUp","description":"Moves this Game Object up one place in its parents display list.\rThis call has no effect if the Game Object is already at the top of the display list.\r\rIf this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"moveDown","description":"Moves this Game Object down one place in its parents display list.\rThis call has no effect if the Game Object is already at the bottom of the display list.\r\rIf this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"crop","description":"Crop allows you to crop the texture being used to display this Game Object.\rSetting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.\r\rCropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method,\ror by modifying `cropRect` property directly and then calling `updateCrop`.\r\rThe rectangle object given to this method can be either a `Phaser.Rectangle` or any other object \rso long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.\r\rA reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, \rin which case the values are duplicated to a local object.","parameters":[{"name":"rect","type":"Phaser.Rectangle","description":"The Rectangle used during cropping. Pass null or no parameters to clear a previously set crop rectangle.","default":"","optional":"","nullable":""},{"name":"copy","type":"boolean","description":"If false `cropRect` will be stored as a reference to the given rect. If true it will copy the rect values into a local Phaser Rectangle object stored in cropRect.","default":"","optional":true,"nullable":""}]},{"name":"updateCrop","description":"If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property,\ror the rectangle it references, then you need to update the crop frame by calling this method.","parameters":[]},{"name":"destroy","description":"Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present\rand nulls its reference to `game`, freeing it up for garbage collection.\r\rIf this Game Object has the Events component it will also dispatch the `onDestroy` event.\r\rYou can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've\rmore than one Game Object sharing the same BaseTexture.","parameters":[{"name":"destroyChildren","type":"boolean","description":"Should every child of this object have its destroy method called as well?","default":true,"optional":true,"nullable":""},{"name":"destroyTexture","type":"boolean","description":"Destroy the BaseTexture this Game Object is using? Note that if another Game Object is sharing the same BaseTexture it will invalidate it.","default":"","optional":true,"nullable":""}]},{"name":"revive","description":"Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.\r\rA resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.\r\rIt will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.","parameters":[{"name":"health","type":"number","description":"The health to give the Game Object. Only set if the GameObject has the Health component.","default":100,"optional":true,"nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"kill","description":"Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.\r\rIt will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.\r\rNote that killing a Game Object is a way for you to quickly recycle it in an object pool,\rit doesn't destroy the object or free it up from memory.\r\rIf you don't need this Game Object any more you should call `destroy` instead.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"loadTexture","description":"Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.\r\rIf your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.\r\rYou should only use `loadTexture` if you want to replace the base texture entirely.\r\rCalling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.\r\rYou can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. \rDoing this then sets the key to be the `frame` argument (the frame is set to zero). \r\rThis allows you to create sprites using `load.image` during development, and then change them \rto use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' \rand swapping it to be the key of the atlas data.\r\rNote: You cannot use a RenderTexture as a texture for a TileSprite.","parameters":[{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":"","nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""},{"name":"stopAnimation","type":"boolean","description":"If an animation is already playing on this Sprite you can choose to stop it or let it carry on playing.","default":true,"optional":true,"nullable":""}]},{"name":"setFrame","description":"Sets the texture frame the Game Object uses for rendering.\r\rThis is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.","parameters":[{"name":"frame","type":"Phaser.Frame","description":"The Frame to be used by the texture.","default":"","optional":"","nullable":""}]},{"name":"resizeFrame","description":"Resizes the Frame dimensions that the Game Object uses for rendering.\r\rYou shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData\rit can be useful to adjust the dimensions directly in this way.","parameters":[{"name":"parent","type":"object","description":"The parent texture object that caused the resize, i.e. a Phaser.Video object.","default":"","optional":"","nullable":""},{"name":"width","type":"integer","description":"The new width of the texture.","default":"","optional":"","nullable":""},{"name":"height","type":"integer","description":"The new height of the texture.","default":"","optional":"","nullable":""}]},{"name":"resetFrame","description":"Resets the texture frame dimensions that the Game Object uses for rendering.","parameters":[]},{"name":"overlap","description":"Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object, \rwhich can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.\r\rThis check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.\r\rTherefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency.\rIt should be fine for low-volume testing where physics isn't required.","parameters":[{"name":"displayObject","type":["Phaser.Sprite","Phaser.Image","Phaser.TileSprite","Phaser.Button","PIXI.DisplayObject"],"description":"The display object to check against.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the bounds of this Game Object intersects at any point with the bounds of the given display object."}},{"name":"reset","description":"Resets the Game Object.\r\rThis moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, \r`visible` and `renderable` to true.\r\rIf this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.\r\rIf this Game Object has a Physics Body it will reset the Body.","parameters":[{"name":"x","type":"number","description":"The x coordinate (in world space) to position the Game Object at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate (in world space) to position the Game Object at.","default":"","optional":"","nullable":""},{"name":"health","type":"number","description":"The health to give the Game Object if it has the Health component.","default":1,"optional":true,"nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"checkTransform","description":"Adjust scaling limits, if set, to this Game Object.","parameters":[{"name":"wt","type":"PIXI.Matrix","description":"The updated worldTransform matrix.","default":"","optional":"","nullable":""}]},{"name":"setScaleMinMax","description":"Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.\r\rFor example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored \rand the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.\r\rBy setting these values you can carefully control how Game Objects deal with responsive scaling.\r\rIf only one parameter is given then that value will be used for both scaleMin and scaleMax:\r`setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1\r\rIf only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y:\r`setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2\r\rIf you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly, \ror pass `null` for the `maxX` and `maxY` parameters.\r\rCall `setScaleMinMax(null)` to clear all previously set values.","parameters":[{"name":"minX","type":["number","null"],"description":"The minimum horizontal scale value this Game Object can scale down to.","default":"","optional":"","nullable":""},{"name":"minY","type":["number","null"],"description":"The minimum vertical scale value this Game Object can scale down to.","default":"","optional":"","nullable":""},{"name":"maxX","type":["number","null"],"description":"The maximum horizontal scale value this Game Object can scale up to.","default":"","optional":"","nullable":""},{"name":"maxY","type":["number","null"],"description":"The maximum vertical scale value this Game Object can scale up to.","default":"","optional":"","nullable":""}]}],"members":[{"name":"type","access":"","virtual":false,"description":"The const type of this object.","type":{"names":["number"]},"default":""},{"name":"physicsType","access":"","virtual":false,"description":"The const physics body type of this object.","type":{"names":["number"]},"default":""},{"name":"anchor","access":"","virtual":false,"description":"The anchor sets the origin point of the texture.\nThe default is 0,0 this means the texture's origin is the top left\nSetting than anchor to 0.5,0.5 means the textures origin is centered\nSetting the anchor to 1,1 would mean the textures origin points will be the bottom right corner","type":{"names":["Point"]},"default":""},{"name":"texture","access":"","virtual":false,"description":"The texture that the sprite is using","type":{"names":["PIXI.Texture"]},"default":""},{"name":"_width","access":"private","virtual":false,"description":"The width of the sprite (this is initially set by the texture)","type":{"names":["Number"]},"default":""},{"name":"_height","access":"private","virtual":false,"description":"The height of the sprite (this is initially set by the texture)","type":{"names":["Number"]},"default":""},{"name":"tint","access":"","virtual":false,"description":"The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.","type":{"names":["Number"]},"default":"0xFFFFFF"},{"name":"cachedTint","access":"private","virtual":false,"description":"The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.","type":{"names":["Number"]},"default":"-1"},{"name":"tintedTexture","access":"","virtual":false,"description":"A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)","type":{"names":["Canvas"]},"default":"null"},{"name":"blendMode","access":"","virtual":false,"description":"The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.\n\nWarning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.","type":{"names":["Number"]},"default":"PIXI.blendModes.NORMAL;"},{"name":"shader","access":"","virtual":false,"description":"The shader that will be used to render this Sprite.\nSet to null to remove a current shader.","type":{"names":["PhaserFilter"]},"default":"null"},{"name":"exists","access":"","virtual":false,"description":"Controls if this Sprite is processed by the core Phaser game loops and Group loops.","type":{"names":["Boolean"]},"default":"true"},{"name":"width","access":"","virtual":false,"description":"The width of the sprite, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the sprite, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"children","access":"","virtual":false,"description":"[read-only] The array of children of this container.","type":{"names":["Array.<DisplayObject>"]},"default":""},{"name":"ignoreChildInput","access":"","virtual":false,"description":"If `ignoreChildInput`  is `false` it will allow this objects _children_ to be considered as valid for Input events.\n\nIf this property is `true` then the children will _not_ be considered as valid for Input events.\n\nNote that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.","type":{"names":["Boolean"]},"default":""},{"name":"position","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject, relative to its parent container.\n\nThe value of this property does not reflect any positioning happening further up the display list.\nTo obtain that value please see the `worldPosition` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"scale","access":"","virtual":false,"description":"The scale of this DisplayObject. A scale of 1:1 represents the DisplayObject\nat its default size. A value of 0.5 would scale this DisplayObject by half, and so on.\n\nThe value of this property does not reflect any scaling happening further up the display list.\nTo obtain that value please see the `worldScale` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"pivot","access":"","virtual":false,"description":"The pivot point of this DisplayObject that it rotates around. The values are expressed\nin pixel values.","type":{"names":["PIXIPoint"]},"default":""},{"name":"rotation","access":"","virtual":false,"description":"The rotation of this DisplayObject. The value is given, and expressed, in radians, and is based on\na right-handed orientation.\n\nThe value of this property does not reflect any rotation happening further up the display list.\nTo obtain that value please see the `worldRotation` property.","type":{"names":["Number"]},"default":""},{"name":"alpha","access":"","virtual":false,"description":"The alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nPlease note that an object with an alpha value of 0 is skipped during the render pass.\n\nThe value of this property does not reflect any alpha values set further up the display list.\nTo obtain that value please see the `worldAlpha` property.","type":{"names":["Number"]},"default":""},{"name":"visible","access":"","virtual":false,"description":"The visibility of this DisplayObject. A value of `false` makes the object invisible.\nA value of `true` makes it visible. Please note that an object with a visible value of\n`false` is skipped during the render pass. Equally a DisplayObject with visible false will\nnot render any of its children.\n\nThe value of this property does not reflect any visible values set further up the display list.\nTo obtain that value please see the `worldVisible` property.","type":{"names":["Boolean"]},"default":""},{"name":"hitArea","access":"","virtual":false,"description":"This is the defined area that will pick up mouse / touch events. It is null by default.\nSetting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)","type":{"names":["Rectangle","Circle","Ellipse","Polygon"]},"default":""},{"name":"renderable","access":"","virtual":false,"description":"Should this DisplayObject be rendered by the renderer? An object with a renderable value of\n`false` is skipped during the render pass.","type":{"names":["Boolean"]},"default":""},{"name":"parent","access":"","virtual":false,"description":"The parent DisplayObjectContainer that this DisplayObject is a child of.\nAll DisplayObjects must belong to a parent in order to be rendered.\nThe root parent is the Stage object. This property is set automatically when the\nDisplayObject is added to, or removed from, a DisplayObjectContainer.","type":{"names":["PIXIDisplayObjectContainer"]},"default":""},{"name":"worldAlpha","access":"","virtual":false,"description":"The multiplied alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nThis value is the calculated total, based on the alpha values of all parents of this DisplayObjects \nin the display list.\n\nTo obtain, and set, the local alpha value, see the `alpha` property.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"worldTransform","access":"","virtual":false,"description":"The current transform of this DisplayObject.\n\nThis property contains the calculated total, based on the transforms of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIMatrix"]},"default":""},{"name":"worldPosition","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject within the world.\n\nThis property contains the calculated total, based on the positions of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldScale","access":"","virtual":false,"description":"The global scale of this DisplayObject.\n\nThis property contains the calculated total, based on the scales of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldRotation","access":"","virtual":false,"description":"The rotation, in radians, of this DisplayObject.\n\nThis property contains the calculated total, based on the rotations of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"filterArea","access":"","virtual":false,"description":"The rectangular area used by filters when rendering a shader for this DisplayObject.","type":{"names":["Rectangle"]},"default":""},{"name":"_sr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_cr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_bounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_currentBounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_mask","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_cacheAsBitmap","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"_cacheIsDirty","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"x","access":"","virtual":false,"description":"The horizontal position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The vertical position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"worldVisible","access":"","virtual":false,"description":"Indicates if this DisplayObject is visible, based on it, and all of its parents, `visible` property values.","type":{"names":["Boolean"]},"default":""},{"name":"mask","access":"","virtual":false,"description":"Sets a mask for this DisplayObject. A mask is an instance of a Graphics object.\nWhen applied it limits the visible area of this DisplayObject to the shape of the mask.\nUnder a Canvas renderer it uses shape clipping. Under a WebGL renderer it uses a Stencil Buffer.\nTo remove a mask, set this property to `null`.","type":{"names":["PIXIGraphics"]},"default":""},{"name":"filters","access":"","virtual":false,"description":"Sets the filters for this DisplayObject. This is a WebGL only feature, and is ignored by the Canvas\nRenderer. A filter is a shader applied to this DisplayObject. You can modify the placement of the filter\nusing `DisplayObject.filterArea`.\n\nTo remove filters, set this property to `null`.\n\nNote: You cannot have a filter set, and a MULTIPLY Blend Mode active, at the same time. Setting a \nfilter will reset this DisplayObjects blend mode to NORMAL.","type":{"names":["Array"]},"default":""},{"name":"cacheAsBitmap","access":"","virtual":false,"description":"Sets if this DisplayObject should be cached as a bitmap.\n\nWhen invoked it will take a snapshot of the DisplayObject, as it is at that moment, and store it \nin a RenderTexture. This is then used whenever this DisplayObject is rendered. It can provide a\nperformance benefit for complex, but static, DisplayObjects. I.e. those with lots of children.\n\nCached Bitmaps do not track their parents. If you update a property of this DisplayObject, it will not\nre-generate the cached bitmap automatically. To do that you need to call `DisplayObject.updateCache`.\n\nTo remove a cached bitmap, set this property to `null`.","type":{"names":["Boolean"]},"default":""},{"name":"game","access":"","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"name","access":"","virtual":false,"description":"A user defined name given to this Game Object.\rThis value isn't ever used internally by Phaser, it is meant as a game level property.","type":{"names":["string"]},"default":""},{"name":"data","access":"","virtual":false,"description":"An empty Object that belongs to this Game Object.\rThis value isn't ever used internally by Phaser, but may be used by your own code, or\rby Phaser Plugins, to store data that needs to be associated with the Game Object,\rwithout polluting the Game Object directly.","type":{"names":["Object"]},"default":"{}"},{"name":"components","access":"protected","virtual":false,"description":"The components this Game Object has installed.","type":{"names":["object"]},"default":""},{"name":"z","access":"","virtual":false,"description":"The z depth of this Game Object within its parent Group.\rNo two objects in a Group can have the same z value.\rThis value is adjusted automatically whenever the Group hierarchy changes.\rIf you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.","type":{"names":["number"]},"default":""},{"name":"events","access":"","virtual":false,"description":"All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this\rGame Object, or any of its components.","type":{"names":["Phaser.Events"]},"default":""},{"name":"animations","access":"","virtual":false,"description":"If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance.\rThrough it you can create, play, pause and stop animations.","type":{"names":["Phaser.AnimationManager"]},"default":""},{"name":"key","access":"","virtual":false,"description":"The key of the image or texture used by this Game Object during rendering.\rIf it is a string it's the string used to retrieve the texture from the Phaser Image Cache.\rIt can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.\rIf a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache.\rIf a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.","type":{"names":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"]},"default":""},{"name":"world","access":"","virtual":false,"description":"The world coordinates of this Game Object in pixels.\rDepending on where in the display list this Game Object is placed this value can differ from `position`, \rwhich contains the x/y coordinates relative to the Game Objects parent.","type":{"names":["Phaser.Point"]},"default":""},{"name":"debug","access":"","virtual":false,"description":"A debug flag designed for use with `Game.enableStep`.","type":{"names":["boolean"]},"default":""},{"name":"previousPosition","access":"","virtual":false,"description":"The position the Game Object was located in the previous frame.","type":{"names":["Phaser.Point"]},"default":""},{"name":"previousRotation","access":"","virtual":false,"description":"The rotation the Game Object was in set to in the previous frame. Value is in radians.","type":{"names":["number"]},"default":""},{"name":"renderOrderID","access":"","virtual":false,"description":"The render order ID is used internally by the renderer and Input Manager and should not be modified.\rThis property is mostly used internally by the renderers, but is exposed for the use of plugins.","type":{"names":["number"]},"default":""},{"name":"fresh","access":"","virtual":false,"description":"A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update.\rThis property is mostly used internally by the physics systems, but is exposed for the use of plugins.","type":{"names":["boolean"]},"default":""},{"name":"pendingDestroy","access":"","virtual":false,"description":"A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update.\rYou can set it directly to allow you to flag an object to be destroyed on its next update.\r\rThis is extremely useful if you wish to destroy an object from within one of its own callbacks \rsuch as with Buttons or other Input events.","type":{"names":["boolean"]},"default":""},{"name":"_exists","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["boolean"]},"default":""},{"name":"angle","access":"","virtual":false,"description":"The angle property is the rotation of the Game Object in *degrees* from its original orientation.\r\rValues from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.\r\rValues outside this range are added to or subtracted from 360 to obtain a value within the range. \rFor example, the statement player.angle = 450 is the same as player.angle = 90.\r\rIf you wish to work in radians instead of degrees you can use the property `rotation` instead. \rWorking in radians is slightly faster as it doesn't have to perform any calculations.","type":{"names":["number"]},"default":""},{"name":"autoCull","access":"","virtual":false,"description":"A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame.\rIf it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`.\rThis keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.\r\rThis is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,\ror you have tested performance and find it acceptable.","type":{"names":["boolean"]},"default":""},{"name":"inCamera","access":"","virtual":false,"description":"Checks if the Game Objects bounds intersect with the Game Camera bounds.\rReturns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.","type":{"names":["boolean"]},"default":""},{"name":"offsetX","access":"","virtual":false,"description":"The amount the Game Object is visually offset from its x coordinate.\rThis is the same as `width * anchor.x`.\rIt will only be > 0 if anchor.x is not equal to zero.","type":{"names":["number"]},"default":""},{"name":"offsetY","access":"","virtual":false,"description":"The amount the Game Object is visually offset from its y coordinate.\rThis is the same as `height * anchor.y`.\rIt will only be > 0 if anchor.y is not equal to zero.","type":{"names":["number"]},"default":""},{"name":"centerX","access":"","virtual":false,"description":"The center x coordinate of the Game Object.\rThis is the same as `(x - offsetX) + (width / 2)`.","type":{"names":["number"]},"default":""},{"name":"centerY","access":"","virtual":false,"description":"The center y coordinate of the Game Object.\rThis is the same as `(y - offsetY) + (height / 2)`.","type":{"names":["number"]},"default":""},{"name":"left","access":"","virtual":false,"description":"The left coordinate of the Game Object.\rThis is the same as `x - offsetX`.","type":{"names":["number"]},"default":""},{"name":"right","access":"","virtual":false,"description":"The right coordinate of the Game Object.\rThis is the same as `x + width - offsetX`.","type":{"names":["number"]},"default":""},{"name":"top","access":"","virtual":false,"description":"The y coordinate of the Game Object.\rThis is the same as `y - offsetY`.","type":{"names":["number"]},"default":""},{"name":"bottom","access":"","virtual":false,"description":"The sum of the y and height properties.\rThis is the same as `y + height - offsetY`.","type":{"names":["number"]},"default":""},{"name":"cropRect","access":"","virtual":false,"description":"The Rectangle used to crop the texture this Game Object uses.\rSet this property via `crop`. \rIf you modify this property directly you must call `updateCrop` in order to have the change take effect.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"_crop","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"deltaX","access":"","virtual":false,"description":"Returns the delta x value. The difference between world.x now and in the previous frame.\r\rThe value will be positive if the Game Object has moved to the right or negative if to the left.","type":{"names":["number"]},"default":""},{"name":"deltaY","access":"","virtual":false,"description":"Returns the delta y value. The difference between world.y now and in the previous frame.\r\rThe value will be positive if the Game Object has moved down or negative if up.","type":{"names":["number"]},"default":""},{"name":"deltaZ","access":"","virtual":false,"description":"Returns the delta z value. The difference between rotation now and in the previous frame. The delta value.","type":{"names":["number"]},"default":""},{"name":"destroyPhase","access":"","virtual":false,"description":"As a Game Object runs through its destroy method this flag is set to true, \rand can be checked in any sub-systems or plugins it is being destroyed from.","type":{"names":["boolean"]},"default":""},{"name":"_fixedToCamera","access":"private","virtual":false,"description":"","type":{"names":["boolean"]},"default":""},{"name":"fixedToCamera","access":"","virtual":false,"description":"A Game Object that is \"fixed\" to the camera is rendered at a given x/y offsets from the top left of the camera. The offsets \rare stored in the `cameraOffset` property, which is initialized with the current object coordinates. \r\rThe values are adjusted at the rendering stage, overriding the Game Objects actual world position.\r\rThe end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world\rthe camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times \rregardless where in the world the camera is.\r\rNote that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.\r\rBe careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.","type":{"names":["boolean"]},"default":""},{"name":"cameraOffset","access":"","virtual":false,"description":"The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.\r\rThe values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.","type":{"names":["Phaser.Point"]},"default":""},{"name":"health","access":"","virtual":false,"description":"The Game Objects health value. This is a handy property for setting and manipulating health on a Game Object.\r\rIt can be used in combination with the `damage` method or modified directly.","type":{"names":["number"]},"default":1},{"name":"maxHealth","access":"","virtual":false,"description":"The Game Objects maximum health value. This works in combination with the `heal` method to ensure\rthe health value never exceeds the maximum.","type":{"names":["number"]},"default":100},{"name":"damage","access":"","virtual":false,"description":"Damages the Game Object. This removes the given amount of health from the `health` property.\r\rIf health is taken below or is equal to zero then the `kill` method is called.","type":"","default":""},{"name":"setHealth","access":"","virtual":false,"description":"Sets the health property of the Game Object to the given amount.\rWill never exceed the `maxHealth` value.","type":"","default":""},{"name":"heal","access":"","virtual":false,"description":"Heal the Game Object. This adds the given amount of health to the `health` property.","type":"","default":""},{"name":"input","access":"","virtual":false,"description":"The Input Handler for this Game Object.\r\rBy default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.\r\rAfter you have done this, this property will be a reference to the Phaser InputHandler.","type":{"names":["Phaser.InputHandler","null"]},"default":""},{"name":"inputEnabled","access":"","virtual":false,"description":"By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created\rfor this Game Object and it will then start to process click / touch events and more.\r\rYou can then access the Input Handler via `this.input`.\r\rNote that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.\r\rIf you set this property to false it will stop the Input Handler from processing any more input events.\r\rIf you want to _temporarily_ disable input for a Game Object, then it's better to set\r`input.enabled = false`, as it won't reset any of the Input Handlers internal properties.\rYou can then toggle this back on as needed.","type":{"names":["boolean"]},"default":""},{"name":"checkWorldBounds","access":"","virtual":false,"description":"If this is set to `true` the Game Object checks if it is within the World bounds each frame. \r\rWhen it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.\r\rIf it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.\r\rIt also optionally kills the Game Object if `outOfBoundsKill` is `true`.\r\rWhen `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.\r\rThis is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,\ror you have tested performance and find it acceptable.","type":{"names":["boolean"]},"default":""},{"name":"outOfBoundsKill","access":"","virtual":false,"description":"If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.","type":{"names":["boolean"]},"default":""},{"name":"outOfCameraBoundsKill","access":"","virtual":false,"description":"If this and the `autoCull` property are both set to `true`, then the `kill` method\ris called as soon as the Game Object leaves the camera bounds.","type":{"names":["boolean"]},"default":""},{"name":"_outOfBoundsFired","access":"private","virtual":false,"description":"Internal state var.","type":{"names":["boolean"]},"default":""},{"name":"inWorld","access":"","virtual":false,"description":"Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.","type":{"names":["boolean"]},"default":""},{"name":"alive","access":"","virtual":false,"description":"A useful flag to control if the Game Object is alive or dead.\r\rThis is set automatically by the Health components `damage` method should the object run out of health.\rOr you can toggle it via your game code.\r\rThis property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates.\rHowever you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.","type":{"names":["boolean"]},"default":true},{"name":"lifespan","access":"","virtual":false,"description":"The lifespan allows you to give a Game Object a lifespan in milliseconds.\r\rOnce the Game Object is 'born' you can set this to a positive value.\r\rIt is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame.\rWhen it reaches zero it will call the `kill` method.\r\rVery handy for particles, bullets, collectibles, or any other short-lived entity.","type":{"names":["number"]},"default":""},{"name":"customRender","access":"private","virtual":false,"description":"Does this texture require a custom render call? (as set by BitmapData, Video, etc)","type":{"names":["boolean"]},"default":""},{"name":"_frame","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"frame","access":"","virtual":false,"description":"Gets or sets the current frame index of the texture being used to render this Game Object.\r\rTo change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use,\rfor example: `player.frame = 4`.\r\rIf the frame index given doesn't exist it will revert to the first frame found in the texture.\r\rIf you are using a texture atlas then you should use the `frameName` property instead.\r\rIf you wish to fully replace the texture being used see `loadTexture`.","type":{"names":["integer"]},"default":""},{"name":"frameName","access":"","virtual":false,"description":"Gets or sets the current frame name of the texture being used to render this Game Object.\r\rTo change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use, \rfor example: `player.frameName = \"idle\"`.\r\rIf the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.\r\rIf you are using a sprite sheet then you should use the `frame` property instead.\r\rIf you wish to fully replace the texture being used see `loadTexture`.","type":{"names":["string"]},"default":""},{"name":"body","access":"","virtual":false,"description":"`body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated \rproperties and methods via it.\r\rBy default Game Objects won't add themselves to any physics system and their `body` property will be `null`.\r\rTo enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object\rand `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.\r\rYou can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.\r\rImportant: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5, \rso the physics body is centered on the Game Object.\r\rIf you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.","type":{"names":["Phaser.Physics.Arcade.Body","Phaser.Physics.P2.Body","Phaser.Physics.Ninja.Body","null"]},"default":""},{"name":"transformCallback","access":"","virtual":false,"description":"The callback that will apply any scale limiting to the worldTransform.","type":{"names":["function"]},"default":""},{"name":"transformCallbackContext","access":"","virtual":false,"description":"The context under which `transformCallback` is called.","type":{"names":["object"]},"default":""},{"name":"scaleMin","access":"","virtual":false,"description":"The minimum scale this Game Object will scale down to.\r\rIt allows you to prevent a parent from scaling this Game Object lower than the given value.\r\rSet it to `null` to remove the limit.","type":{"names":["Phaser.Point"]},"default":""},{"name":"scaleMax","access":"","virtual":false,"description":"The maximum scale this Game Object will scale up to. \r\rIt allows you to prevent a parent from scaling this Game Object higher than the given value.\r\rSet it to `null` to remove the limit.","type":{"names":["Phaser.Point"]},"default":""},{"name":"smoothed","access":"","virtual":false,"description":"Enable or disable texture smoothing for this Game Object.\r\rIt only takes effect if the Game Object is using an image based texture.\r\rSmoothing is enabled by default.","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.SpriteBatch","description":"The SpriteBatch class is a really fast version of the DisplayObjectContainer built purely for speed, so use when you need a lot of sprites or particles.\rIt's worth mentioning that by default sprite batches are used through-out the renderer, so you only really need to use a SpriteBatch if you have over\r1000 sprites that all share the same texture (or texture atlas). It's also useful if running in Canvas mode and you have a lot of un-rotated or un-scaled\rSprites as it skips all of the Canvas setTransform calls, which helps performance, especially on mobile devices.\r\rPlease note that any Sprite that is part of a SpriteBatch will not have its bounds updated, so will fail checks such as outOfBounds.","constructor":{"name":"SpriteBatch","description":"The SpriteBatch class is a really fast version of the DisplayObjectContainer built purely for speed, so use when you need a lot of sprites or particles.\rIt's worth mentioning that by default sprite batches are used through-out the renderer, so you only really need to use a SpriteBatch if you have over\r1000 sprites that all share the same texture (or texture atlas). It's also useful if running in Canvas mode and you have a lot of un-rotated or un-scaled\rSprites as it skips all of the Canvas setTransform calls, which helps performance, especially on mobile devices.\r\rPlease note that any Sprite that is part of a SpriteBatch will not have its bounds updated, so will fail checks such as outOfBounds.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"parent","type":["Phaser.Group","Phaser.Sprite","null"],"description":"The parent Group, DisplayObject or DisplayObjectContainer that this Group will be added to. If `undefined` or `null` it will use game.world.","default":"","optional":"","nullable":""},{"name":"name","type":"string","description":"A name for this Group. Not used internally but useful for debugging.","default":"group","optional":true,"nullable":""},{"name":"addToStage","type":"boolean","description":"If set to true this Group will be added directly to the Game.Stage instead of Game.World.","default":"","optional":true,"nullable":""}]},"functions":[{"name":"_renderWebGL","description":"Renders the Sprite Batch using the WebGL renderer.","parameters":[{"name":"renderSession","type":"RenderSession","description":"","default":"","optional":"","nullable":""}]},{"name":"_renderCanvas","description":"Renders the Sprite Batch using the Canvas renderer.","parameters":[{"name":"renderSession","type":"RenderSession","description":"","default":"","optional":"","nullable":""}]},{"name":"add","description":"Adds an existing object as the top child in this group.\r\rThe child is automatically added to the top of the group, and is displayed above every previous child.\r\rOr if the _optional_ index is specified, the child is added at the location specified by the index value, \rthis allows you to control child ordering.\r\rIf the child was already in this Group, it is simply returned, and nothing else happens to it.\r\rIf `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.\r\rUse {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.","parameters":[{"name":"child","type":"DisplayObject","description":"The display object to add as a child.","default":"","optional":"","nullable":""},{"name":"silent","type":"boolean","description":"If true the child will not dispatch the `onAddedToGroup` event.","default":"","optional":true,"nullable":""},{"name":"index","type":"integer","description":"The index within the group to insert the child to. Where 0 is the bottom of the Group.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The child that was added to the group."}},{"name":"addAt","description":"Adds an existing object to this group.\r\rThe child is added to the group at the location specified by the index value, this allows you to control child ordering.\r\rIf `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.","parameters":[{"name":"child","type":"DisplayObject","description":"The display object to add as a child.","default":"","optional":"","nullable":""},{"name":"index","type":"integer","description":"The index within the group to insert the child to.","default":"","optional":true,"nullable":""},{"name":"silent","type":"boolean","description":"If true the child will not dispatch the `onAddedToGroup` event.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The child that was added to the group."}},{"name":"addToHash","description":"Adds a child of this Group into the hash array.\rThis call will return false if the child is not a child of this Group, or is already in the hash.","parameters":[{"name":"child","type":"DisplayObject","description":"The display object to add to this Groups hash. Must be a member of this Group already and not present in the hash.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the child was successfully added to the hash, otherwise false."}},{"name":"removeFromHash","description":"Removes a child of this Group from the hash array.\rThis call will return false if the child is not in the hash.","parameters":[{"name":"child","type":"DisplayObject","description":"The display object to remove from this Groups hash. Must be a member of this Group and in the hash.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the child was successfully removed from the hash, otherwise false."}},{"name":"addMultiple","description":"Adds an array of existing Display Objects to this Group.\r\rThe Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.\r\rAs well as an array you can also pass another Group as the first argument. In this case all of the children from that\rGroup will be removed from it and added into this Group.\r\rIf `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.","parameters":[{"name":"children","type":["Array.<DisplayObject>","Phaser.Group"],"description":"An array of display objects or a Phaser.Group. If a Group is given then *all* children will be moved from it.","default":"","optional":"","nullable":""},{"name":"silent","type":"boolean","description":"If true the children will not dispatch the `onAddedToGroup` event.","default":"","optional":true,"nullable":""}],"returns":{"type":["Array.<DisplayObject>","Phaser.Group"],"description":"The array of children or Group of children that were added to this Group."}},{"name":"getAt","description":"Returns the child found at the given index within this group.","parameters":[{"name":"index","type":"integer","description":"The index to return the child from.","default":"","optional":"","nullable":""}],"returns":{"type":["DisplayObject","integer"],"description":"The child that was found at the given index, or -1 for an invalid index."}},{"name":"create","description":"Creates a new Phaser.Sprite object and adds it to the top of this group.\r\rUse {@link Phaser.Group#classType classType} to change the type of object created.\r\rThe child is automatically added to the top of the group, and is displayed above every previous child.\r\rOr if the _optional_ index is specified, the child is added at the location specified by the index value, \rthis allows you to control child ordering.\r\rIf `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.","parameters":[{"name":"x","type":"number","description":"The x coordinate to display the newly created Sprite at. The value is in relation to the group.x point.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate to display the newly created Sprite at. The value is in relation to the group.y point.","default":"","optional":"","nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""},{"name":"exists","type":"boolean","description":"The default exists state of the Sprite.","default":true,"optional":true,"nullable":""},{"name":"index","type":"integer","description":"The index within the group to insert the child to. Where 0 is the bottom of the Group.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The child that was created: will be a {@link Phaser.Sprite} unless {@link #classType} has been changed."}},{"name":"createMultiple","description":"Creates multiple Phaser.Sprite objects and adds them to the top of this Group.\r\rThis method is useful if you need to quickly generate a pool of sprites, such as bullets.\r\rUse {@link Phaser.Group#classType classType} to change the type of object created.\r\rYou can provide an array as the `key` and / or `frame` arguments. When you do this\rit will create `quantity` Sprites for every key (and frame) in the arrays.\r\rFor example:\r\r`createMultiple(25, ['ball', 'carrot'])`\r\rIn the above code there are 2 keys (ball and carrot) which means that 50 sprites will be\rcreated in total, 25 of each. You can also have the `frame` as an array:\r\r`createMultiple(5, 'bricks', [0, 1, 2, 3])`\r\rIn the above there is one key (bricks), which is a sprite sheet. The frames array tells\rthis method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because\rthe quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with\rframe 1, and so on.\r\rIf you set both the key and frame arguments to be arrays then understand it will create\ra total quantity of sprites equal to the size of both arrays times each other. I.e.:\r\r`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`\r\rThe above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2.\rIt will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2.\rIn total it will have created 120 sprites.\r\rBy default the Sprites will have their `exists` property set to `false`, and they will be \rpositioned at 0x0, relative to the `Group.x / y` values.\r\rIf `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.","parameters":[{"name":"quantity","type":"integer","description":"The number of Sprites to create.","default":"","optional":"","nullable":""},{"name":"key","type":["string","array"],"description":"The Cache key of the image that the Sprites will use. Or an Array of keys. See the description for details on how the quantity applies when arrays are used.","default":"","optional":"","nullable":""},{"name":"frame","type":["integer","string","array"],"description":"If the Sprite image contains multiple frames you can specify which one to use here. Or an Array of frames. See the description for details on how the quantity applies when arrays are used.","default":"","optional":true,"nullable":""},{"name":"exists","type":"boolean","description":"The default exists state of the Sprite.","default":"","optional":true,"nullable":""}],"returns":{"type":"array","description":"An array containing all of the Sprites that were created."}},{"name":"updateZ","description":"Internal method that re-applies all of the children's Z values.\r\rThis must be called whenever children ordering is altered so that their `z` indices are correctly updated.","parameters":[]},{"name":"align","description":"This method iterates through all children in the Group (regardless if they are visible or exist)\rand then changes their position so they are arranged in a Grid formation. Children must have\rthe `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have\rthis.\r\rThe grid dimensions are determined by the first four arguments. The `width` and `height` arguments\rrelate to the width and height of the grid respectively.\r\rFor example if the Group had 100 children in it:\r\r`Group.align(10, 10, 32, 32)`\r\rThis will align all of the children into a grid formation of 10x10, using 32 pixels per\rgrid cell. If you want a wider grid, you could do:\r\r`Group.align(25, 4, 32, 32)`\r\rThis will align the children into a grid of 25x4, again using 32 pixels per grid cell.\r\rYou can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method\rto keep on aligning children until there are no children left. For example if this Group had\r48 children in it, the following:\r\r`Group.align(-1, 8, 32, 32)`\r\r... will align the children so that there are 8 children vertically (the second argument), \rand each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)\r\rYou can also do:\r\r`Group.align(10, -1, 32, 32)`\r\rIn this case it will create a grid 10 wide, and as tall as it needs to be in order to fit\rall of the children in.\r\rThe `position` property allows you to control where in each grid cell the child is positioned.\rThis is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, \r`Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, \r`Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.\r\rThe final argument; `offset` lets you start the alignment from a specific child index.","parameters":[{"name":"width","type":"integer","description":"The width of the grid in items (not pixels). Set to -1 for a dynamic width. If -1 then you must set an explicit height value.","default":"","optional":"","nullable":""},{"name":"height","type":"integer","description":"The height of the grid in items (not pixels). Set to -1 for a dynamic height. If -1 then you must set an explicit width value.","default":"","optional":"","nullable":""},{"name":"cellWidth","type":"integer","description":"The width of each grid cell, in pixels.","default":"","optional":"","nullable":""},{"name":"cellHeight","type":"integer","description":"The height of each grid cell, in pixels.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offset","type":"integer","description":"Optional index to start the alignment from. Defaults to zero, the first child in the Group, but can be set to any valid child index value.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the Group children were aligned, otherwise false."}},{"name":"resetCursor","description":"Sets the group cursor to the first child in the group.\r\rIf the optional index parameter is given it sets the cursor to the object at that index instead.","parameters":[{"name":"index","type":"integer","description":"Set the cursor to point to a specific index.","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"The child the cursor now points to."}},{"name":"next","description":"Advances the group cursor to the next (higher) object in the group.\r\rIf the cursor is at the end of the group (top child) it is moved the start of the group (bottom child).","parameters":[],"returns":{"type":"any","description":"The child the cursor now points to."}},{"name":"previous","description":"Moves the group cursor to the previous (lower) child in the group.\r\rIf the cursor is at the start of the group (bottom child) it is moved to the end (top child).","parameters":[],"returns":{"type":"any","description":"The child the cursor now points to."}},{"name":"swap","description":"Swaps the position of two children in this group.\r\rBoth children must be in this group, a child cannot be swapped with itself, and unparented children cannot be swapped.","parameters":[{"name":"child1","type":"any","description":"The first child to swap.","default":"","optional":"","nullable":""},{"name":"child2","type":"any","description":"The second child to swap.","default":"","optional":"","nullable":""}]},{"name":"bringToTop","description":"Brings the given child to the top of this group so it renders above all other children.","parameters":[{"name":"child","type":"any","description":"The child to bring to the top of this group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The child that was moved."}},{"name":"sendToBack","description":"Sends the given child to the bottom of this group so it renders below all other children.","parameters":[{"name":"child","type":"any","description":"The child to send to the bottom of this group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The child that was moved."}},{"name":"moveUp","description":"Moves the given child up one place in this group unless it's already at the top.","parameters":[{"name":"child","type":"any","description":"The child to move up in the group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The child that was moved."}},{"name":"moveDown","description":"Moves the given child down one place in this group unless it's already at the bottom.","parameters":[{"name":"child","type":"any","description":"The child to move down in the group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The child that was moved."}},{"name":"xy","description":"Positions the child found at the given index within this group to the given x and y coordinates.","parameters":[{"name":"index","type":"integer","description":"The index of the child in the group to set the position of.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The new x position of the child.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The new y position of the child.","default":"","optional":"","nullable":""}]},{"name":"reverse","description":"Reverses all children in this group.\r\rThis operation applies only to immediate children and does not propagate to subgroups.","parameters":[]},{"name":"getIndex","description":"Get the index position of the given child in this group, which should match the child's `z` property.","parameters":[{"name":"child","type":"any","description":"The child to get the index for.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The index of the child or -1 if it's not a member of this group."}},{"name":"getByName","description":"Searches the Group for the first instance of a child with the `name`\rproperty matching the given argument. Should more than one child have\rthe same name only the first instance is returned.","parameters":[{"name":"name","type":"string","description":"The name to search for.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The first child with a matching name, or null if none were found."}},{"name":"replace","description":"Replaces a child of this Group with the given newChild. The newChild cannot be a member of this Group.\r\rIf `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.","parameters":[{"name":"oldChild","type":"any","description":"The child in this group that will be replaced.","default":"","optional":"","nullable":""},{"name":"newChild","type":"any","description":"The child to be inserted into this group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"Returns the oldChild that was replaced within this group."}},{"name":"hasProperty","description":"Checks if the child has the given property.\r\rWill scan up to 4 levels deep only.","parameters":[{"name":"child","type":"any","description":"The child to check for the existence of the property on.","default":"","optional":"","nullable":""},{"name":"key","type":"Array.<string>","description":"An array of strings that make up the property.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the child has the property, otherwise false."}},{"name":"setProperty","description":"Sets a property to the given value on the child. The operation parameter controls how the value is set.\r\rThe operations are:\r- 0: set the existing value to the given value; if force is `true` a new property will be created if needed\r- 1: will add the given value to the value already present.\r- 2: will subtract the given value from the value already present.\r- 3: will multiply the value already present by the given value.\r- 4: will divide the value already present by the given value.","parameters":[{"name":"child","type":"any","description":"The child to set the property value on.","default":"","optional":"","nullable":""},{"name":"key","type":"array","description":"An array of strings that make up the property that will be set.","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be set.","default":"","optional":"","nullable":""},{"name":"operation","type":"integer","description":"Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the property was set, false if not."}},{"name":"checkProperty","description":"Checks a property for the given value on the child.","parameters":[{"name":"child","type":"any","description":"The child to check the property value on.","default":"","optional":"","nullable":""},{"name":"key","type":"array","description":"An array of strings that make up the property that will be set.","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be checked.","default":"","optional":"","nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the property was was equal to value, false if not."}},{"name":"set","description":"Quickly set a property on a single child of this group to a new value.\r\rThe operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.","parameters":[{"name":"child","type":"Phaser.Sprite","description":"The child to set the property on.","default":"","optional":"","nullable":""},{"name":"key","type":"string","description":"The property, as a string, to be set. For example: 'body.velocity.x'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be set.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If set then the child will only be updated if alive=true.","default":"","optional":true,"nullable":""},{"name":"checkVisible","type":"boolean","description":"If set then the child will only be updated if visible=true.","default":"","optional":true,"nullable":""},{"name":"operation","type":"integer","description":"Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the property was set, false if not."}},{"name":"setAll","description":"Quickly set the same property across all children of this group to a new value.\r\rThis call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children.\rIf you need that ability please see `Group.setAllChildren`.\r\rThe operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.","parameters":[{"name":"key","type":"string","description":"The property, as a string, to be set. For example: 'body.velocity.x'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be set.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If set then only children with alive=true will be updated. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"checkVisible","type":"boolean","description":"If set then only children with visible=true will be updated. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"operation","type":"integer","description":"Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.","default":"","optional":true,"nullable":""}]},{"name":"setAllChildren","description":"Quickly set the same property across all children of this group, and any child Groups, to a new value.\r\rIf this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom.\rUnlike with `setAll` the property is NOT set on child Groups itself.\r\rThe operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.","parameters":[{"name":"key","type":"string","description":"The property, as a string, to be set. For example: 'body.velocity.x'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be set.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If set then only children with alive=true will be updated. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"checkVisible","type":"boolean","description":"If set then only children with visible=true will be updated. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"operation","type":"integer","description":"Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.","default":"","optional":true,"nullable":""}]},{"name":"checkAll","description":"Quickly check that the same property across all children of this group is equal to the given value.\r\rThis call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.","parameters":[{"name":"key","type":"string","description":"The property, as a string, to be set. For example: 'body.velocity.x'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be checked.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If set then only children with alive=true will be checked. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"checkVisible","type":"boolean","description":"If set then only children with visible=true will be checked. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned.","default":"","optional":true,"nullable":""}]},{"name":"addAll","description":"Adds the amount to the given property on all children in this group.\r\r`Group.addAll('x', 10)` will add 10 to the child.x value for each child.","parameters":[{"name":"property","type":"string","description":"The property to increment, for example 'body.velocity.x' or 'angle'.","default":"","optional":"","nullable":""},{"name":"amount","type":"number","description":"The amount to increment the property by. If child.x = 10 then addAll('x', 40) would make child.x = 50.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If true the property will only be changed if the child is alive.","default":"","optional":"","nullable":""},{"name":"checkVisible","type":"boolean","description":"If true the property will only be changed if the child is visible.","default":"","optional":"","nullable":""}]},{"name":"subAll","description":"Subtracts the amount from the given property on all children in this group.\r\r`Group.subAll('x', 10)` will minus 10 from the child.x value for each child.","parameters":[{"name":"property","type":"string","description":"The property to decrement, for example 'body.velocity.x' or 'angle'.","default":"","optional":"","nullable":""},{"name":"amount","type":"number","description":"The amount to subtract from the property. If child.x = 50 then subAll('x', 40) would make child.x = 10.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If true the property will only be changed if the child is alive.","default":"","optional":"","nullable":""},{"name":"checkVisible","type":"boolean","description":"If true the property will only be changed if the child is visible.","default":"","optional":"","nullable":""}]},{"name":"multiplyAll","description":"Multiplies the given property by the amount on all children in this group.\r\r`Group.multiplyAll('x', 2)` will x2 the child.x value for each child.","parameters":[{"name":"property","type":"string","description":"The property to multiply, for example 'body.velocity.x' or 'angle'.","default":"","optional":"","nullable":""},{"name":"amount","type":"number","description":"The amount to multiply the property by. If child.x = 10 then multiplyAll('x', 2) would make child.x = 20.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If true the property will only be changed if the child is alive.","default":"","optional":"","nullable":""},{"name":"checkVisible","type":"boolean","description":"If true the property will only be changed if the child is visible.","default":"","optional":"","nullable":""}]},{"name":"divideAll","description":"Divides the given property by the amount on all children in this group.\r\r`Group.divideAll('x', 2)` will half the child.x value for each child.","parameters":[{"name":"property","type":"string","description":"The property to divide, for example 'body.velocity.x' or 'angle'.","default":"","optional":"","nullable":""},{"name":"amount","type":"number","description":"The amount to divide the property by. If child.x = 100 then divideAll('x', 2) would make child.x = 50.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If true the property will only be changed if the child is alive.","default":"","optional":"","nullable":""},{"name":"checkVisible","type":"boolean","description":"If true the property will only be changed if the child is visible.","default":"","optional":"","nullable":""}]},{"name":"callAllExists","description":"Calls a function, specified by name, on all children in the group who exist (or do not exist).\r\rAfter the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.","parameters":[{"name":"callback","type":"string","description":"Name of the function on the children to call.","default":"","optional":"","nullable":""},{"name":"existsValue","type":"boolean","description":"Only children with exists=existsValue will be called.","default":"","optional":"","nullable":""},{"name":"parameter","type":"any","description":"Additional parameters that will be passed to the callback.","default":"","optional":"","nullable":""}]},{"name":"callbackFromArray","description":"Returns a reference to a function that exists on a child of the group based on the given callback array.","parameters":[{"name":"child","type":"object","description":"The object to inspect.","default":"","optional":"","nullable":""},{"name":"callback","type":"array","description":"The array of function names.","default":"","optional":"","nullable":""},{"name":"length","type":"integer","description":"The size of the array (pre-calculated in callAll).","default":"","optional":"","nullable":""}]},{"name":"callAll","description":"Calls a function, specified by name, on all on children.\r\rThe function is called for all children regardless if they are dead or alive (see callAllExists for different options).\rAfter the method parameter and context you can add as many extra parameters as you like, which will all be passed to the child.","parameters":[{"name":"method","type":"string","description":"Name of the function on the child to call. Deep property lookup is supported.","default":"","optional":"","nullable":""},{"name":"context","type":"string","description":"A string containing the context under which the method will be executed. Set to null to default to the child.","default":"","optional":true,"nullable":""},{"name":"args","type":"any","description":"Additional parameters that will be passed to the method.","default":"","optional":"","nullable":""}]},{"name":"preUpdate","description":"The core preUpdate - as called by World.","parameters":[]},{"name":"update","description":"The core update - as called by World.","parameters":[]},{"name":"postUpdate","description":"The core postUpdate - as called by World.","parameters":[]},{"name":"filter","description":"Find children matching a certain predicate.\r\rFor example:\r\r    var healthyList = Group.filter(function(child, index, children) {\r        return child.health > 10 ? true : false;\r    }, true);\r    healthyList.callAll('attack');\r\rNote: Currently this will skip any children which are Groups themselves.","parameters":[{"name":"predicate","type":"function","description":"The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, the index as the second, and the entire child array as the third","default":"","optional":"","nullable":""},{"name":"checkExists","type":"boolean","description":"If true, only existing can be selected; otherwise all children can be selected and will be passed to the predicate.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.ArraySet","description":"Returns an array list containing all the children that the predicate returned true for"}},{"name":"forEach","description":"Call a function on each child in this group.\r\rAdditional arguments for the callback can be specified after the `checkExists` parameter. For example,\r\r    Group.forEach(awardBonusGold, this, true, 100, 500)\r\rwould invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.\r\rNote: This check will skip any children which are Groups themselves.","parameters":[{"name":"callback","type":"function","description":"The function that will be called for each applicable child. The child will be passed as the first argument.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":"","nullable":""},{"name":"checkExists","type":"boolean","description":"If set only children matching for which `exists` is true will be passed to the callback, otherwise all children will be passed.","default":"","optional":true,"nullable":""},{"name":"args","type":"any","description":"Additional arguments to pass to the callback function, after the child item.","default":"(none)","optional":true,"nullable":""}]},{"name":"forEachExists","description":"Call a function on each existing child in this group.\r\rSee {@link Phaser.Group#forEach forEach} for details.","parameters":[{"name":"callback","type":"function","description":"The function that will be called for each applicable child. The child will be passed as the first argument.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":"","nullable":""},{"name":"args","type":"any","description":"Additional arguments to pass to the callback function, after the child item.","default":"(none)","optional":true,"nullable":""}]},{"name":"forEachAlive","description":"Call a function on each alive child in this group.\r\rSee {@link Phaser.Group#forEach forEach} for details.","parameters":[{"name":"callback","type":"function","description":"The function that will be called for each applicable child. The child will be passed as the first argument.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":"","nullable":""},{"name":"args","type":"any","description":"Additional arguments to pass to the callback function, after the child item.","default":"(none)","optional":true,"nullable":""}]},{"name":"forEachDead","description":"Call a function on each dead child in this group.\r\rSee {@link Phaser.Group#forEach forEach} for details.","parameters":[{"name":"callback","type":"function","description":"The function that will be called for each applicable child. The child will be passed as the first argument.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":"","nullable":""},{"name":"args","type":"any","description":"Additional arguments to pass to the callback function, after the child item.","default":"(none)","optional":true,"nullable":""}]},{"name":"sort","description":"Sort the children in the group according to a particular key and ordering.\r\rCall this function to sort the group according to a particular key value and order.\r\rFor example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.\r\rInternally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including\ralphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.","parameters":[{"name":"key","type":"string","description":"The name of the property to sort on. Defaults to the objects z-depth value.","default":"'z'","optional":true,"nullable":""},{"name":"order","type":"integer","description":"Order ascending ({@link Phaser.Group.SORT_ASCENDING SORT_ASCENDING}) or descending ({@link Phaser.Group.SORT_DESCENDING SORT_DESCENDING}).","default":"Phaser.Group.SORT_ASCENDING","optional":true,"nullable":""}]},{"name":"customSort","description":"Sort the children in the group according to custom sort function.\r\rThe `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b).\rIt should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.","parameters":[{"name":"sortHandler","type":"function","description":"The custom sort function.","default":"","optional":"","nullable":""},{"name":"context","type":"object","description":"The context in which the sortHandler is called.","default":"","optional":true,"nullable":""}]},{"name":"ascendingSortHandler","description":"An internal helper function for the sort process.","parameters":[{"name":"a","type":"object","description":"The first object being sorted.","default":"","optional":"","nullable":""},{"name":"b","type":"object","description":"The second object being sorted.","default":"","optional":"","nullable":""}]},{"name":"descendingSortHandler","description":"An internal helper function for the sort process.","parameters":[{"name":"a","type":"object","description":"The first object being sorted.","default":"","optional":"","nullable":""},{"name":"b","type":"object","description":"The second object being sorted.","default":"","optional":"","nullable":""}]},{"name":"iterate","description":"Iterates over the children of the group performing one of several actions for matched children.\r\rA child is considered a match when it has a property, named `key`, whose value is equal to `value`\raccording to a strict equality comparison.\r\rThe result depends on the `returnType`:\r\r- {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}:\r    The callback, if any, is applied to all matching children. The number of matched children is returned.\r- {@link Phaser.Group.RETURN_NONE RETURN_NONE}:\r    The callback, if any, is applied to all matching children. No value is returned.\r- {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}:\r    The callback, if any, is applied to the *first* matching child and the *first* matched child is returned.\r    If there is no matching child then null is returned.\r\rIf `args` is specified it must be an array. The matched child will be assigned to the first\relement and the entire array will be applied to the callback function.","parameters":[{"name":"key","type":"string","description":"The child property to check, i.e. 'exists', 'alive', 'health'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"A child matches if `child[key] === value` is true.","default":"","optional":"","nullable":""},{"name":"returnType","type":"integer","description":"How to iterate the children and what to return.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"Optional function that will be called on each matching child. The matched child is supplied as the first argument.","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":true,"nullable":""},{"name":"args","type":"Array.<any>","description":"The arguments supplied to to the callback; the first array index (argument) will be replaced with the matched child.","default":"(none)","optional":true,"nullable":""}],"returns":{"type":"any","description":"Returns either an integer (for RETURN_TOTAL), the first matched child (for RETURN_CHILD), or null."}},{"name":"getFirstExists","description":"Get the first display object that exists, or doesn't exist.\r\rYou can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.\r\rIt works by calling `Group.create` passing it the parameters given to this method, and returning the new child.\r\rIf a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child\rwill be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.","parameters":[{"name":"exists","type":"boolean","description":"If true, find the first existing child; otherwise find the first non-existing child.","default":true,"optional":true,"nullable":""},{"name":"createIfNull","type":"boolean","description":"If `true` and no alive children are found a new one is created.","default":"","optional":true,"nullable":""},{"name":"x","type":"number","description":"The x coordinate to reset the child to. The value is in relation to the group.x point.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to reset the child to. The value is in relation to the group.y point.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The first child, or `null` if none found and `createIfNull` was false."}},{"name":"getFirstAlive","description":"Get the first child that is alive (`child.alive === true`).\r\rThis is handy for choosing a squad leader, etc.\r\rYou can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.\r\rIt works by calling `Group.create` passing it the parameters given to this method, and returning the new child.\r\rIf a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child\rwill be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.","parameters":[{"name":"createIfNull","type":"boolean","description":"If `true` and no alive children are found a new one is created.","default":"","optional":true,"nullable":""},{"name":"x","type":"number","description":"The x coordinate to reset the child to. The value is in relation to the group.x point.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to reset the child to. The value is in relation to the group.y point.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The alive dead child, or `null` if none found and `createIfNull` was false."}},{"name":"getFirstDead","description":"Get the first child that is dead (`child.alive === false`).\r\rThis is handy for checking if everything has been wiped out and adding to the pool as needed.\r\rYou can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.\r\rIt works by calling `Group.create` passing it the parameters given to this method, and returning the new child.\r\rIf a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child\rwill be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.","parameters":[{"name":"createIfNull","type":"boolean","description":"If `true` and no dead children are found a new one is created.","default":"","optional":true,"nullable":""},{"name":"x","type":"number","description":"The x coordinate to reset the child to. The value is in relation to the group.x point.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to reset the child to. The value is in relation to the group.y point.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The first dead child, or `null` if none found and `createIfNull` was false."}},{"name":"resetChild","description":"Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.\r\rIf the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.\r\rThe two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.","parameters":[{"name":"child","type":"DisplayObject","description":"The child to reset and/or load the texture on.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate to reset the child to. The value is in relation to the group.x point.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to reset the child to. The value is in relation to the group.y point.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The child that was reset: usually a {@link Phaser.Sprite}."}},{"name":"getTop","description":"Return the child at the top of this group.\r\rThe top child is the child displayed (rendered) above every other child.","parameters":[],"returns":{"type":"any","description":"The child at the top of the Group."}},{"name":"getBottom","description":"Returns the child at the bottom of this group.\r\rThe bottom child the child being displayed (rendered) below every other child.","parameters":[],"returns":{"type":"any","description":"The child at the bottom of the Group."}},{"name":"getClosestTo","description":"Get the closest child to given Object, with optional callback to filter children.\r\rThis can be a Sprite, Group, Image or any object with public x and y properties.\r\r'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.\r\rYou can use the optional `callback` argument to apply your own filter to the distance checks.\rIf the child is closer then the previous child, it will be sent to `callback` as the first argument,\rwith the distance as the second. The callback should return `true` if it passes your \rfiltering criteria, otherwise it should return `false`.","parameters":[{"name":"object","type":"any","description":"The object used to determine the distance. This can be a Sprite, Group, Image or any object with public x and y properties.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, with the distance as the second. It should return `true` if the child passes the matching criteria.","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"The child closest to given object, or `null` if no child was found."}},{"name":"getFurthestFrom","description":"Get the child furthest away from the given Object, with optional callback to filter children.\r\rThis can be a Sprite, Group, Image or any object with public x and y properties.\r\r'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.\r\rYou can use the optional `callback` argument to apply your own filter to the distance checks.\rIf the child is closer then the previous child, it will be sent to `callback` as the first argument,\rwith the distance as the second. The callback should return `true` if it passes your \rfiltering criteria, otherwise it should return `false`.","parameters":[{"name":"object","type":"any","description":"The object used to determine the distance. This can be a Sprite, Group, Image or any object with public x and y properties.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, with the distance as the second. It should return `true` if the child passes the matching criteria.","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"The child furthest from the given object, or `null` if no child was found."}},{"name":"countLiving","description":"Get the number of living children in this group.","parameters":[],"returns":{"type":"integer","description":"The number of children flagged as alive."}},{"name":"countDead","description":"Get the number of dead children in this group.","parameters":[],"returns":{"type":"integer","description":"The number of children flagged as dead."}},{"name":"getRandom","description":"Returns a random child from the group.","parameters":[{"name":"startIndex","type":"integer","description":"Offset from the front of the group (lowest child).","default":"","optional":true,"nullable":""},{"name":"length","type":"integer","description":"Restriction on the number of values you want to randomly select from.","default":"(to top)","optional":true,"nullable":""}],"returns":{"type":"any","description":"A random child of this Group."}},{"name":"getRandomExists","description":"Returns a random child from the Group that has `exists` set to `true`.\r\rOptionally you can specify a start and end index. For example if this Group had 100 children,\rand you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only\rthe first 50 children in the Group.","parameters":[{"name":"startIndex","type":"integer","description":"The first child index to start the search from.","default":"","optional":true,"nullable":""},{"name":"endIndex","type":"integer","description":"The last child index to search up to.","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"A random child of this Group that exists."}},{"name":"getAll","description":"Returns all children in this Group.\r\rYou can optionally specify a matching criteria using the `property` and `value` arguments.\r\rFor example: `getAll('exists', true)` would return only children that have their exists property set.\r\rOptionally you can specify a start and end index. For example if this Group had 100 children,\rand you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only\rthe first 50 children in the Group.","parameters":[{"name":"property","type":"string","description":"An optional property to test against the value argument.","default":"","optional":true,"nullable":""},{"name":"value","type":"any","description":"If property is set then Child.property must strictly equal this value to be included in the results.","default":"","optional":true,"nullable":""},{"name":"startIndex","type":"integer","description":"The first child index to start the search from.","default":"","optional":true,"nullable":""},{"name":"endIndex","type":"integer","description":"The last child index to search up until.","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"A random existing child of this Group."}},{"name":"remove","description":"Removes the given child from this group.\r\rThis will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.\r\rIf the group cursor was referring to the removed child it is updated to refer to the next child.","parameters":[{"name":"child","type":"any","description":"The child to remove.","default":"","optional":"","nullable":""},{"name":"destroy","type":"boolean","description":"If true `destroy` will be invoked on the removed child.","default":"","optional":true,"nullable":""},{"name":"silent","type":"boolean","description":"If true the the child will not dispatch the `onRemovedFromGroup` event.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"true if the child was removed from this group, otherwise false."}},{"name":"moveAll","description":"Moves all children from this Group to the Group given.","parameters":[{"name":"group","type":"Phaser.Group","description":"The new Group to which the children will be moved to.","default":"","optional":"","nullable":""},{"name":"silent","type":"boolean","description":"If true the children will not dispatch the `onAddedToGroup` event for the new Group.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Group","description":"The Group to which all the children were moved."}},{"name":"removeAll","description":"Removes all children from this Group, but does not remove the group from its parent.\r\rThe children can be optionally destroyed as they are removed.\r\rYou can also optionally also destroy the BaseTexture the Child is using. Be careful if you've\rmore than one Game Object sharing the same BaseTexture.","parameters":[{"name":"destroy","type":"boolean","description":"If true `destroy` will be invoked on each removed child.","default":"","optional":true,"nullable":""},{"name":"silent","type":"boolean","description":"If true the children will not dispatch their `onRemovedFromGroup` events.","default":"","optional":true,"nullable":""},{"name":"destroyTexture","type":"boolean","description":"If true, and if the `destroy` argument is also true, the BaseTexture belonging to the Child is also destroyed. Note that if another Game Object is sharing the same BaseTexture it will invalidate it.","default":"","optional":true,"nullable":""}]},{"name":"removeBetween","description":"Removes all children from this group whose index falls beteen the given startIndex and endIndex values.","parameters":[{"name":"startIndex","type":"integer","description":"The index to start removing children from.","default":"","optional":"","nullable":""},{"name":"endIndex","type":"integer","description":"The index to stop removing children at. Must be higher than startIndex. If undefined this method will remove all children between startIndex and the end of the group.","default":"","optional":true,"nullable":""},{"name":"destroy","type":"boolean","description":"If true `destroy` will be invoked on each removed child.","default":"","optional":true,"nullable":""},{"name":"silent","type":"boolean","description":"If true the children will not dispatch their `onRemovedFromGroup` events.","default":"","optional":true,"nullable":""}]},{"name":"destroy","description":"Destroys this group.\r\rRemoves all children, then removes this group from its parent and nulls references.","parameters":[{"name":"destroyChildren","type":"boolean","description":"If true `destroy` will be invoked on each removed child.","default":true,"optional":true,"nullable":""},{"name":"soft","type":"boolean","description":"A 'soft destroy' (set to true) doesn't remove this group from its parent or null the game reference. Set to false and it does.","default":"","optional":true,"nullable":""}]},{"name":"alignIn","description":"Aligns this Group within another Game Object, or Rectangle, known as the\r'container', to one of 9 possible positions.\r\rThe container must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Groups within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Group to another Game Object does **not** make it a child of\rthe container. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, \r`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, \r`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.\r\rGroups are placed in such a way that their _bounds_ align with the\rcontainer, taking into consideration rotation and scale of its children.\rThis allows you to neatly align Groups, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Group. For example:\r\r`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `group` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the containers bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"container","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Group to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Group","description":"This Group."}},{"name":"alignTo","description":"Aligns this Group to the side of another Game Object, or Rectangle, known as the\r'parent', in one of 11 possible positions.\r\rThe parent must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Groups within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Group to another Game Object does **not** make it a child of\rthe parent. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, \r`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, \r`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` \rand `Phaser.BOTTOM_RIGHT`.\r\rGroups are placed in such a way that their _bounds_ align with the\rparent, taking into consideration rotation and scale of the children.\rThis allows you to neatly align Groups, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Group. For example:\r\r`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `group` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the parents bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"parent","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Group to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Group","description":"This Group."}},{"name":"addChild","description":"Adds a child to the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to add to the container","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"addChildAt","description":"Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child to add","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The index to place the child in","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"swapChildren","description":"Swaps the position of 2 Display Objects within this container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""},{"name":"child2","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}]},{"name":"getChildIndex","description":"Returns the index position of a child DisplayObject instance","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject instance to identify","default":"","optional":"","nullable":""}],"returns":{"type":"Number","description":"The index position of the child display object to identify"}},{"name":"setChildIndex","description":"Changes the position of an existing child in the display object container","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child DisplayObject instance for which you want to change the index number","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The resulting index number for the child display object","default":"","optional":"","nullable":""}]},{"name":"getChildAt","description":"Returns the child at the specified index","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child at the given index, if any."}},{"name":"removeChild","description":"Removes a child from the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to remove","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildAt","description":"Removes a child from the specified index position.","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildren","description":"Removes all children from this container that are within the begin and end indexes.","parameters":[{"name":"beginIndex","type":"Number","description":"The beginning position. Default value is 0.","default":"","optional":"","nullable":""},{"name":"endIndex","type":"Number","description":"The ending position. Default value is size of the container.","default":"","optional":"","nullable":""}]},{"name":"getBounds","description":"Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.","parameters":[{"name":"targetCoordinateSpace","type":["PIXIDisplayObject","PIXIMatrix"],"description":"Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object.","default":"","optional":true,"nullable":""}],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"getLocalBounds","description":"Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.","parameters":[],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"contains","description":"Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}],"returns":{"type":"Boolean","description":""}}],"members":[{"name":"type","access":"protected","virtual":false,"description":"Internal Phaser Type value.","type":{"names":["number"]},"default":""},{"name":"fastSpriteBatch","access":"private","virtual":false,"description":"WebGL Batch Shader.","type":{"names":["Object"]},"default":""},{"name":"ready","access":"private","virtual":false,"description":"Internal flag.","type":{"names":["boolean"]},"default":""},{"name":"game","access":"protected","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"name","access":"","virtual":false,"description":"A name for this group. Not used internally but useful for debugging.","type":{"names":["string"]},"default":""},{"name":"z","access":"","virtual":false,"description":"The z-depth value of this object within its parent container/Group - the World is a Group as well.\rThis value must be unique for each child in a Group.","type":{"names":["integer"]},"default":""},{"name":"physicsType","access":"","virtual":false,"description":"The const physics body type of this object.","type":{"names":["number"]},"default":""},{"name":"alive","access":"","virtual":false,"description":"The alive property is useful for Groups that are children of other Groups and need to be included/excluded in checks like forEachAlive.","type":{"names":["boolean"]},"default":true},{"name":"exists","access":"","virtual":false,"description":"If exists is false the group will be excluded from collision checks and filters such as {@link forEachExists}. The group will not call `preUpdate` and `postUpdate` on its children and the children will not receive physics updates or camera/world boundary checks. The group will still be {@link Phaser.Group#visible visible} and will still call `update` on its children.","type":{"names":["boolean"]},"default":true},{"name":"ignoreDestroy","access":"","virtual":false,"description":"A group with `ignoreDestroy` set to `true` ignores all calls to its `destroy` method.","type":{"names":["boolean"]},"default":""},{"name":"pendingDestroy","access":"","virtual":false,"description":"A Group is that has `pendingDestroy` set to `true` is flagged to have its destroy method\rcalled on the next logic update.\rYou can set it directly to flag the Group to be destroyed on its next update.\r\rThis is extremely useful if you wish to destroy a Group from within one of its own callbacks\ror a callback of one of its children.","type":{"names":["boolean"]},"default":""},{"name":"classType","access":"","virtual":false,"description":"The type of objects that will be created when using {@link Phaser.Group#create create} or {@link Phaser.Group#createMultiple createMultiple}.\r\rAny object may be used but it should extend either Sprite or Image and accept the same constructor arguments:\rwhen a new object is created it is passed the following parameters to its constructor: `(game, x, y, key, frame)`.","type":{"names":["object"]},"default":"{@link Phaser.Sprite}"},{"name":"cursor","access":"","virtual":false,"description":"The current display object that the group cursor is pointing to, if any. (Can be set manually.)\r\rThe cursor is a way to iterate through the children in a Group using {@link Phaser.Group#next next} and {@link Phaser.Group#previous previous}.","type":{"names":["DisplayObject"]},"default":""},{"name":"inputEnableChildren","access":"","virtual":false,"description":"A Group with `inputEnableChildren` set to `true` will automatically call `inputEnabled = true` \ron any children _added_ to, or _created by_, this Group.\r\rIf there are children already in the Group at the time you set this property, they are not changed.","type":{"names":["boolean"]},"default":""},{"name":"onChildInputDown","access":"","virtual":false,"description":"This Signal is dispatched whenever a child of this Group emits an onInputDown signal as a result\rof having been interacted with by a Pointer. You can bind functions to this Signal instead of to\revery child Sprite.\r\rThis Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and\ra reference to the Pointer that caused it.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onChildInputUp","access":"","virtual":false,"description":"This Signal is dispatched whenever a child of this Group emits an onInputUp signal as a result\rof having been interacted with by a Pointer. You can bind functions to this Signal instead of to\revery child Sprite.\r\rThis Signal is sent 3 arguments: A reference to the Sprite that triggered the signal, \ra reference to the Pointer that caused it, and a boolean value `isOver` that tells you if the Pointer\ris still over the Sprite or not.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onChildInputOver","access":"","virtual":false,"description":"This Signal is dispatched whenever a child of this Group emits an onInputOver signal as a result\rof having been interacted with by a Pointer. You can bind functions to this Signal instead of to\revery child Sprite.\r\rThis Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and\ra reference to the Pointer that caused it.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onChildInputOut","access":"","virtual":false,"description":"This Signal is dispatched whenever a child of this Group emits an onInputOut signal as a result\rof having been interacted with by a Pointer. You can bind functions to this Signal instead of to\revery child Sprite.\r\rThis Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and\ra reference to the Pointer that caused it.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"enableBody","access":"","virtual":false,"description":"If true all Sprites created by, or added to this group, will have a physics body enabled on them.\r\rIf there are children already in the Group at the time you set this property, they are not changed.\r\rThe default body type is controlled with {@link Phaser.Group#physicsBodyType physicsBodyType}.","type":{"names":["boolean"]},"default":""},{"name":"enableBodyDebug","access":"","virtual":false,"description":"If true when a physics body is created (via {@link Phaser.Group#enableBody enableBody}) it will create a physics debug object as well.\r\rThis only works for P2 bodies.","type":{"names":["boolean"]},"default":""},{"name":"physicsBodyType","access":"","virtual":false,"description":"If {@link Phaser.Group#enableBody enableBody} is true this is the type of physics body that is created on new Sprites.\r\rThe valid values are {@link Phaser.Physics.ARCADE}, {@link Phaser.Physics.P2JS}, {@link Phaser.Physics.NINJA}, etc.","type":{"names":["integer"]},"default":""},{"name":"physicsSortDirection","access":"","virtual":false,"description":"If this Group contains Arcade Physics Sprites you can set a custom sort direction via this property.\r\rIt should be set to one of the Phaser.Physics.Arcade sort direction constants: \r\rPhaser.Physics.Arcade.SORT_NONE\rPhaser.Physics.Arcade.LEFT_RIGHT\rPhaser.Physics.Arcade.RIGHT_LEFT\rPhaser.Physics.Arcade.TOP_BOTTOM\rPhaser.Physics.Arcade.BOTTOM_TOP\r\rIf set to `null` the Group will use whatever Phaser.Physics.Arcade.sortDirection is set to. This is the default behavior.","type":{"names":["integer"]},"default":""},{"name":"onDestroy","access":"","virtual":false,"description":"This signal is dispatched when the group is destroyed.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"cursorIndex","access":"","virtual":false,"description":"The current index of the Group cursor. Advance it with Group.next.","type":{"names":["integer"]},"default":""},{"name":"fixedToCamera","access":"","virtual":false,"description":"A Group that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Group.cameraOffset.\r\rNote that the cameraOffset values are in addition to any parent in the display list.\rSo if this Group was in a Group that has x: 200, then this will be added to the cameraOffset.x","type":{"names":["boolean"]},"default":""},{"name":"cameraOffset","access":"","virtual":false,"description":"If this object is {@link Phaser.Group#fixedToCamera fixedToCamera} then this stores the x/y position offset relative to the top-left of the camera view.\rIf the parent of this Group is also `fixedToCamera` then the offset here is in addition to that and should typically be disabled.","type":{"names":["Phaser.Point"]},"default":""},{"name":"hash","access":"","virtual":false,"description":"The hash array is an array belonging to this Group into which you can add any of its children via Group.addToHash and Group.removeFromHash.\r\rOnly children of this Group can be added to and removed from the hash.\r\rThis hash is used automatically by Phaser Arcade Physics in order to perform non z-index based destructive sorting.\rHowever if you don't use Arcade Physics, or this isn't a physics enabled Group, then you can use the hash to perform your own\rsorting and filtering of Group children without touching their z-index (and therefore display draw order)","type":{"names":["array"]},"default":""},{"name":"_sortProperty","access":"private","virtual":false,"description":"The property on which children are sorted.","type":{"names":["string"]},"default":""},{"name":"total","access":"","virtual":false,"description":"Total number of existing children in the group.","type":{"names":["integer"]},"default":""},{"name":"length","access":"","virtual":false,"description":"Total number of children in this group, regardless of exists/alive status.","type":{"names":["integer"]},"default":""},{"name":"angle","access":"","virtual":false,"description":"The angle of rotation of the group container, in degrees.\r\rThis adjusts the group itself by modifying its local rotation transform.\r\rThis has no impact on the rotation/angle properties of the children, but it will update their worldTransform\rand on-screen orientation and position.","type":{"names":["number"]},"default":""},{"name":"centerX","access":"","virtual":false,"description":"The center x coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"centerY","access":"","virtual":false,"description":"The center y coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"left","access":"","virtual":false,"description":"The left coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"right","access":"","virtual":false,"description":"The right coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"top","access":"","virtual":false,"description":"The top coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"bottom","access":"","virtual":false,"description":"The bottom coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"x","access":"","virtual":false,"description":"The x coordinate of the group container.\r\rYou can adjust the group container itself by modifying its coordinates.\rThis will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.","type":{"names":["number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The y coordinate of the group container.\r\rYou can adjust the group container itself by modifying its coordinates.\rThis will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.","type":{"names":["number"]},"default":""},{"name":"rotation","access":"","virtual":false,"description":"The angle of rotation of the group container, in radians.\r\rThis will adjust the group container itself by modifying its rotation.\rThis will have no impact on the rotation value of its children, but it will update their worldTransform and on-screen position.","type":{"names":["number"]},"default":""},{"name":"visible","access":"","virtual":false,"description":"The visible state of the group. Non-visible Groups and all of their children are not rendered.","type":{"names":["boolean"]},"default":""},{"name":"alpha","access":"","virtual":false,"description":"The alpha value of the group container.","type":{"names":["number"]},"default":""},{"name":"children","access":"","virtual":false,"description":"[read-only] The array of children of this container.","type":{"names":["Array.<DisplayObject>"]},"default":""},{"name":"ignoreChildInput","access":"","virtual":false,"description":"If `ignoreChildInput`  is `false` it will allow this objects _children_ to be considered as valid for Input events.\n\nIf this property is `true` then the children will _not_ be considered as valid for Input events.\n\nNote that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.","type":{"names":["Boolean"]},"default":""},{"name":"width","access":"","virtual":false,"description":"The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"position","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject, relative to its parent container.\n\nThe value of this property does not reflect any positioning happening further up the display list.\nTo obtain that value please see the `worldPosition` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"scale","access":"","virtual":false,"description":"The scale of this DisplayObject. A scale of 1:1 represents the DisplayObject\nat its default size. A value of 0.5 would scale this DisplayObject by half, and so on.\n\nThe value of this property does not reflect any scaling happening further up the display list.\nTo obtain that value please see the `worldScale` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"pivot","access":"","virtual":false,"description":"The pivot point of this DisplayObject that it rotates around. The values are expressed\nin pixel values.","type":{"names":["PIXIPoint"]},"default":""},{"name":"hitArea","access":"","virtual":false,"description":"This is the defined area that will pick up mouse / touch events. It is null by default.\nSetting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)","type":{"names":["Rectangle","Circle","Ellipse","Polygon"]},"default":""},{"name":"renderable","access":"","virtual":false,"description":"Should this DisplayObject be rendered by the renderer? An object with a renderable value of\n`false` is skipped during the render pass.","type":{"names":["Boolean"]},"default":""},{"name":"parent","access":"","virtual":false,"description":"The parent DisplayObjectContainer that this DisplayObject is a child of.\nAll DisplayObjects must belong to a parent in order to be rendered.\nThe root parent is the Stage object. This property is set automatically when the\nDisplayObject is added to, or removed from, a DisplayObjectContainer.","type":{"names":["PIXIDisplayObjectContainer"]},"default":""},{"name":"worldAlpha","access":"","virtual":false,"description":"The multiplied alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nThis value is the calculated total, based on the alpha values of all parents of this DisplayObjects \nin the display list.\n\nTo obtain, and set, the local alpha value, see the `alpha` property.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"worldTransform","access":"","virtual":false,"description":"The current transform of this DisplayObject.\n\nThis property contains the calculated total, based on the transforms of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIMatrix"]},"default":""},{"name":"worldPosition","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject within the world.\n\nThis property contains the calculated total, based on the positions of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldScale","access":"","virtual":false,"description":"The global scale of this DisplayObject.\n\nThis property contains the calculated total, based on the scales of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldRotation","access":"","virtual":false,"description":"The rotation, in radians, of this DisplayObject.\n\nThis property contains the calculated total, based on the rotations of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"filterArea","access":"","virtual":false,"description":"The rectangular area used by filters when rendering a shader for this DisplayObject.","type":{"names":["Rectangle"]},"default":""},{"name":"_sr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_cr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_bounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_currentBounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_mask","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_cacheAsBitmap","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"_cacheIsDirty","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"worldVisible","access":"","virtual":false,"description":"Indicates if this DisplayObject is visible, based on it, and all of its parents, `visible` property values.","type":{"names":["Boolean"]},"default":""},{"name":"mask","access":"","virtual":false,"description":"Sets a mask for this DisplayObject. A mask is an instance of a Graphics object.\nWhen applied it limits the visible area of this DisplayObject to the shape of the mask.\nUnder a Canvas renderer it uses shape clipping. Under a WebGL renderer it uses a Stencil Buffer.\nTo remove a mask, set this property to `null`.","type":{"names":["PIXIGraphics"]},"default":""},{"name":"filters","access":"","virtual":false,"description":"Sets the filters for this DisplayObject. This is a WebGL only feature, and is ignored by the Canvas\nRenderer. A filter is a shader applied to this DisplayObject. You can modify the placement of the filter\nusing `DisplayObject.filterArea`.\n\nTo remove filters, set this property to `null`.\n\nNote: You cannot have a filter set, and a MULTIPLY Blend Mode active, at the same time. Setting a \nfilter will reset this DisplayObjects blend mode to NORMAL.","type":{"names":["Array"]},"default":""},{"name":"cacheAsBitmap","access":"","virtual":false,"description":"Sets if this DisplayObject should be cached as a bitmap.\n\nWhen invoked it will take a snapshot of the DisplayObject, as it is at that moment, and store it \nin a RenderTexture. This is then used whenever this DisplayObject is rendered. It can provide a\nperformance benefit for complex, but static, DisplayObjects. I.e. those with lots of children.\n\nCached Bitmaps do not track their parents. If you update a property of this DisplayObject, it will not\nre-generate the cached bitmap automatically. To do that you need to call `DisplayObject.updateCache`.\n\nTo remove a cached bitmap, set this property to `null`.","type":{"names":["Boolean"]},"default":""}]},{"name":"Phaser.Text","description":"Create a new game object for displaying Text.\r\rThis uses a local hidden Canvas object and renders the type into it. It then makes a texture from this for rendering to the view.\rBecause of this you can only display fonts that are currently loaded and available to the browser: fonts must be pre-loaded.\r\rSee {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts across mobile browsers.","constructor":{"name":"Text","description":"Create a new game object for displaying Text.\r\rThis uses a local hidden Canvas object and renders the type into it. It then makes a texture from this for rendering to the view.\rBecause of this you can only display fonts that are currently loaded and available to the browser: fonts must be pre-loaded.\r\rSee {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts across mobile browsers.","parameters":[{"name":"game","type":"Phaser.Game","description":"Current game instance.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"X position of the new text object.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the new text object.","default":"","optional":"","nullable":""},{"name":"text","type":"string","description":"The actual text that will be written.","default":"","optional":"","nullable":""},{"name":"style","type":"object","description":"The style properties to be set on the Text.","default":"","optional":true,"nullable":""},{"name":"style.font","type":"string","description":"The style and size of the font.","default":"'bold 20pt Arial'","optional":true,"nullable":""},{"name":"style.fontStyle","type":"string","description":"The style of the font (eg. 'italic'): overrides the value in `style.font`.","default":"(from font)","optional":true,"nullable":""},{"name":"style.fontVariant","type":"string","description":"The variant of the font (eg. 'small-caps'): overrides the value in `style.font`.","default":"(from font)","optional":true,"nullable":""},{"name":"style.fontWeight","type":"string","description":"The weight of the font (eg. 'bold'): overrides the value in `style.font`.","default":"(from font)","optional":true,"nullable":""},{"name":"style.fontSize","type":["string","number"],"description":"The size of the font (eg. 32 or '32px'): overrides the value in `style.font`.","default":"(from font)","optional":true,"nullable":""},{"name":"style.backgroundColor","type":"string","description":"A canvas fillstyle that will be used as the background for the whole Text object. Set to `null` to disable.","default":"","optional":true,"nullable":""},{"name":"style.fill","type":"string","description":"A canvas fillstyle that will be used on the text eg 'red', '#00FF00'.","default":"'black'","optional":true,"nullable":""},{"name":"style.align","type":"string","description":"Horizontal alignment of each line in multiline text. Can be: 'left', 'center' or 'right'. Does not affect single lines of text (see `textBounds` and `boundsAlignH` for that).","default":"'left'","optional":true,"nullable":""},{"name":"style.boundsAlignH","type":"string","description":"Horizontal alignment of the text within the `textBounds`. Can be: 'left', 'center' or 'right'.","default":"'left'","optional":true,"nullable":""},{"name":"style.boundsAlignV","type":"string","description":"Vertical alignment of the text within the `textBounds`. Can be: 'top', 'middle' or 'bottom'.","default":"'top'","optional":true,"nullable":""},{"name":"style.stroke","type":"string","description":"A canvas stroke style that will be used on the text stroke eg 'blue', '#FCFF00'.","default":"'black'","optional":true,"nullable":""},{"name":"style.strokeThickness","type":"number","description":"A number that represents the thickness of the stroke. Default is 0 (no stroke).","default":"","optional":true,"nullable":""},{"name":"style.wordWrap","type":"boolean","description":"Indicates if word wrap should be used.","default":"","optional":true,"nullable":""},{"name":"style.wordWrapWidth","type":"number","description":"The width in pixels at which text will wrap.","default":100,"optional":true,"nullable":""},{"name":"style.maxLines","type":"number","description":"The maximum number of lines to be shown for wrapped text.","default":"","optional":true,"nullable":""},{"name":"style.tabs","type":"number","description":"The size (in pixels) of the tabs, for when text includes tab characters. 0 disables. Can be an array of varying tab sizes, one per tab stop.","default":"","optional":true,"nullable":""}]},"functions":[{"name":"preUpdate","description":"Automatically called by World.preUpdate.","parameters":[]},{"name":"update","description":"Override this function to handle any special update requirements.","parameters":[]},{"name":"destroy","description":"Destroy this Text object, removing it from the group it belongs to.","parameters":[{"name":"destroyChildren","type":"boolean","description":"Should every child of this object have its destroy method called?","default":true,"optional":true,"nullable":""}]},{"name":"setShadow","description":"Sets a drop shadow effect on the Text. You can specify the horizontal and vertical distance of the drop shadow with the `x` and `y` parameters.\rThe color controls the shade of the shadow (default is black) and can be either an `rgba` or `hex` value.\rThe blur is the strength of the shadow. A value of zero means a hard shadow, a value of 10 means a very soft shadow.\rTo remove a shadow already in place you can call this method with no parameters set.","parameters":[{"name":"x","type":"number","description":"The shadowOffsetX value in pixels. This is how far offset horizontally the shadow effect will be.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The shadowOffsetY value in pixels. This is how far offset vertically the shadow effect will be.","default":"","optional":true,"nullable":""},{"name":"color","type":"string","description":"The color of the shadow, as given in CSS rgba or hex format. Set the alpha component to 0 to disable the shadow.","default":"'rgba(0,0,0,1)'","optional":true,"nullable":""},{"name":"blur","type":"number","description":"The shadowBlur value. Make the shadow softer by applying a Gaussian blur to it. A number from 0 (no blur) up to approx. 10 (depending on scene).","default":"","optional":true,"nullable":""},{"name":"shadowStroke","type":"boolean","description":"Apply the drop shadow to the Text stroke (if set).","default":true,"optional":true,"nullable":""},{"name":"shadowFill","type":"boolean","description":"Apply the drop shadow to the Text fill (if set).","default":true,"optional":true,"nullable":""}],"returns":{"type":"Phaser.Text","description":"This Text instance."}},{"name":"setStyle","description":"Set the style of the text by passing a single style object to it.","parameters":[{"name":"style","type":"object","description":"The style properties to be set on the Text.","default":"","optional":true,"nullable":""},{"name":"style.font","type":"string","description":"The style and size of the font.","default":"'bold 20pt Arial'","optional":true,"nullable":""},{"name":"style.fontStyle","type":"string","description":"The style of the font (eg. 'italic'): overrides the value in `style.font`.","default":"(from font)","optional":true,"nullable":""},{"name":"style.fontVariant","type":"string","description":"The variant of the font (eg. 'small-caps'): overrides the value in `style.font`.","default":"(from font)","optional":true,"nullable":""},{"name":"style.fontWeight","type":"string","description":"The weight of the font (eg. 'bold'): overrides the value in `style.font`.","default":"(from font)","optional":true,"nullable":""},{"name":"style.fontSize","type":["string","number"],"description":"The size of the font (eg. 32 or '32px'): overrides the value in `style.font`.","default":"(from font)","optional":true,"nullable":""},{"name":"style.backgroundColor","type":"string","description":"A canvas fillstyle that will be used as the background for the whole Text object. Set to `null` to disable.","default":"","optional":true,"nullable":""},{"name":"style.fill","type":"string","description":"A canvas fillstyle that will be used on the text eg 'red', '#00FF00'.","default":"'black'","optional":true,"nullable":""},{"name":"style.align","type":"string","description":"Horizontal alignment of each line in multiline text. Can be: 'left', 'center' or 'right'. Does not affect single lines of text (see `textBounds` and `boundsAlignH` for that).","default":"'left'","optional":true,"nullable":""},{"name":"style.boundsAlignH","type":"string","description":"Horizontal alignment of the text within the `textBounds`. Can be: 'left', 'center' or 'right'.","default":"'left'","optional":true,"nullable":""},{"name":"style.boundsAlignV","type":"string","description":"Vertical alignment of the text within the `textBounds`. Can be: 'top', 'middle' or 'bottom'.","default":"'top'","optional":true,"nullable":""},{"name":"style.stroke","type":"string","description":"A canvas stroke style that will be used on the text stroke eg 'blue', '#FCFF00'.","default":"'black'","optional":true,"nullable":""},{"name":"style.strokeThickness","type":"number","description":"A number that represents the thickness of the stroke. Default is 0 (no stroke).","default":"","optional":true,"nullable":""},{"name":"style.wordWrap","type":"boolean","description":"Indicates if word wrap should be used.","default":"","optional":true,"nullable":""},{"name":"style.wordWrapWidth","type":"number","description":"The width in pixels at which text will wrap.","default":100,"optional":true,"nullable":""},{"name":"style.maxLines","type":"number","description":"The maximum number of lines to be shown for wrapped text.","default":"","optional":true,"nullable":""},{"name":"style.tabs","type":["number","array"],"description":"The size (in pixels) of the tabs, for when text includes tab characters. 0 disables. Can be an array of varying tab sizes, one per tab stop.","default":"","optional":true,"nullable":""},{"name":"update","type":"boolean","description":"Immediately update the Text object after setting the new style? Or wait for the next frame.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Text","description":"This Text instance."}},{"name":"updateText","description":"Renders text to the internal canvas.","parameters":[]},{"name":"renderTabLine","description":"Renders a line of text that contains tab characters if Text.tab > 0.\rCalled automatically by updateText.","parameters":[{"name":"line","type":"string","description":"The line of text to render.","default":"","optional":"","nullable":""},{"name":"x","type":"integer","description":"The x position to start rendering from.","default":"","optional":"","nullable":""},{"name":"y","type":"integer","description":"The y position to start rendering from.","default":"","optional":"","nullable":""},{"name":"fill","type":"boolean","description":"If true uses fillText, if false uses strokeText.","default":"","optional":"","nullable":""}]},{"name":"updateShadow","description":"Sets the Shadow on the Text.context based on the Style settings, or disables it if not enabled.\rThis is called automatically by Text.updateText.","parameters":[{"name":"state","type":"boolean","description":"If true the shadow will be set to the Style values, otherwise it will be set to zero.","default":"","optional":"","nullable":""}]},{"name":"measureLine","description":"Measures a line of text character by character taking into the account the specified character styles.","parameters":[{"name":"line","type":"string","description":"The line of text to measure.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"length of the line."}},{"name":"updateLine","description":"Updates a line of text, applying fill and stroke per-character colors or style and weight per-character font if applicable.","parameters":[]},{"name":"clearColors","description":"Clears any text fill or stroke colors that were set by `addColor` or `addStrokeColor`.","parameters":[],"returns":{"type":"Phaser.Text","description":"This Text instance."}},{"name":"clearFontValues","description":"Clears any text styles or weights font that were set by `addFontStyle` or `addFontWeight`.","parameters":[],"returns":{"type":"Phaser.Text","description":"This Text instance."}},{"name":"addColor","description":"Set specific colors for certain characters within the Text.\r\rIt works by taking a color value, which is a typical HTML string such as `#ff0000` or `rgb(255,0,0)` and a position.\rThe position value is the index of the character in the Text string to start applying this color to.\rOnce set the color remains in use until either another color or the end of the string is encountered.\rFor example if the Text was `Photon Storm` and you did `Text.addColor('#ffff00', 6)` it would color in the word `Storm` in yellow.\r\rIf you wish to change the stroke color see addStrokeColor instead.","parameters":[{"name":"color","type":"string","description":"A canvas fillstyle that will be used on the text eg `red`, `#00FF00`, `rgba()`.","default":"","optional":"","nullable":""},{"name":"position","type":"number","description":"The index of the character in the string to start applying this color value from.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Text","description":"This Text instance."}},{"name":"addStrokeColor","description":"Set specific stroke colors for certain characters within the Text.\r\rIt works by taking a color value, which is a typical HTML string such as `#ff0000` or `rgb(255,0,0)` and a position.\rThe position value is the index of the character in the Text string to start applying this color to.\rOnce set the color remains in use until either another color or the end of the string is encountered.\rFor example if the Text was `Photon Storm` and you did `Text.addColor('#ffff00', 6)` it would color in the word `Storm` in yellow.\r\rThis has no effect if stroke is disabled or has a thickness of 0.\r\rIf you wish to change the text fill color see addColor instead.","parameters":[{"name":"color","type":"string","description":"A canvas fillstyle that will be used on the text stroke eg `red`, `#00FF00`, `rgba()`.","default":"","optional":"","nullable":""},{"name":"position","type":"number","description":"The index of the character in the string to start applying this color value from.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Text","description":"This Text instance."}},{"name":"addFontStyle","description":"Set specific font styles for certain characters within the Text.\r\rIt works by taking a font style value, which is a typical string such as `normal`, `italic` or `oblique`.\rThe position value is the index of the character in the Text string to start applying this font style to.\rOnce set the font style remains in use until either another font style or the end of the string is encountered.\rFor example if the Text was `Photon Storm` and you did `Text.addFontStyle('italic', 6)` it would font style in the word `Storm` in italic.\r\rIf you wish to change the text font weight see addFontWeight instead.","parameters":[{"name":"style","type":"string","description":"A canvas font-style that will be used on the text style eg `normal`, `italic`, `oblique`.","default":"","optional":"","nullable":""},{"name":"position","type":"number","description":"The index of the character in the string to start applying this font style value from.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Text","description":"This Text instance."}},{"name":"addFontWeight","description":"Set specific font weights for certain characters within the Text.\r\rIt works by taking a font weight value, which is a typical string such as `normal`, `bold`, `bolder`, etc.\rThe position value is the index of the character in the Text string to start applying this font weight to.\rOnce set the font weight remains in use until either another font weight or the end of the string is encountered.\rFor example if the Text was `Photon Storm` and you did `Text.addFontWeight('bold', 6)` it would font weight in the word `Storm` in bold.\r\rIf you wish to change the text font style see addFontStyle instead.","parameters":[{"name":"style","type":"string","description":"A canvas font-weight that will be used on the text weight eg `normal`, `bold`, `bolder`, `lighter`, etc.","default":"","optional":"","nullable":""},{"name":"position","type":"number","description":"The index of the character in the string to start applying this font weight value from.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Text","description":"This Text instance."}},{"name":"precalculateWordWrap","description":"Runs the given text through the Text.runWordWrap function and returns\rthe results as an array, where each element of the array corresponds to a wrapped\rline of text.\r\rUseful if you wish to control pagination on long pieces of content.","parameters":[{"name":"text","type":"string","description":"The text for which the wrapping will be calculated.","default":"","optional":"","nullable":""}],"returns":{"type":"array","description":"An array of strings with the pieces of wrapped text."}},{"name":"runWordWrap","description":"Greedy wrapping algorithm that will wrap words as the line grows longer than its horizontal bounds.","parameters":[{"name":"text","type":"string","description":"The text to perform word wrap detection against.","default":"","optional":"","nullable":""}]},{"name":"advancedWordWrap","description":"Advanced wrapping algorithm that will wrap words as the line grows longer than its horizontal bounds.\rWhite space is condensed (e.g., consecutive spaces are replaced with one).\rLines are trimmed of white space before processing.\rThrows an error if the user was smart enough to specify a wordWrapWidth less than a single character.","parameters":[{"name":"text","type":"string","description":"The text to perform word wrap detection against.","default":"","optional":"","nullable":""}]},{"name":"basicWordWrap","description":"Greedy wrapping algorithm that will wrap words as the line grows longer than its horizontal bounds.","parameters":[{"name":"text","type":"string","description":"The text to perform word wrap detection against.","default":"","optional":"","nullable":""}]},{"name":"updateFont","description":"Updates the internal `style.font` if it now differs according to generation from components.","parameters":[{"name":"components","type":"object","description":"Font components.","default":"","optional":"","nullable":""}]},{"name":"fontToComponents","description":"Converting a short CSS-font string into the relevant components.","parameters":[{"name":"font","type":"string","description":"a CSS font string","default":"","optional":"","nullable":""}]},{"name":"componentsToFont","description":"Converts individual font components (see `fontToComponents`) to a short CSS font string.","parameters":[{"name":"components","type":"object","description":"Font components.","default":"","optional":"","nullable":""}]},{"name":"setText","description":"The text to be displayed by this Text object.\rUse a \\n to insert a carriage return and split the text.\rThe text will be rendered with any style currently set.\r\rUse the optional `immediate` argument if you need the Text display to update immediately.\r\rIf not it will re-create the texture of this Text object during the next time the render\rloop is called.","parameters":[{"name":"text","type":"string","description":"The text to be displayed. Set to an empty string to clear text that is already present.","default":"","optional":true,"nullable":""},{"name":"immediate","type":"boolean","description":"Update the texture used by this Text object immediately (true) or automatically during the next render loop (false).","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Text","description":"This Text instance."}},{"name":"parseList","description":"Converts the given array into a tab delimited string and then updates this Text object.\rThis is mostly used when you want to display external data using tab stops.\r\rThe array can be either single or multi dimensional depending on the result you need:\r\r`[ 'a', 'b', 'c' ]` would convert in to `\"a\\tb\\tc\"`.\r\rWhere as:\r\r`[\r     [ 'a', 'b', 'c' ],\r     [ 'd', 'e', 'f']\r]`\r\rwould convert in to: `\"a\\tb\\tc\\nd\\te\\tf\"`","parameters":[{"name":"list","type":"array","description":"The array of data to convert into a string.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Text","description":"This Text instance."}},{"name":"setTextBounds","description":"The Text Bounds is a rectangular region that you control the dimensions of into which the Text object itself is positioned,\rregardless of the number of lines in the text, the font size or any other attribute.\r\rAlignment is controlled via the properties `boundsAlignH` and `boundsAlignV` within the Text.style object, or can be directly\rset through the setters `Text.boundsAlignH` and `Text.boundsAlignV`. Bounds alignment is independent of text alignment.\r\rFor example: If your game is 800x600 in size and you set the text bounds to be 0,0,800,600 then by setting boundsAlignH to\r'center' and boundsAlignV to 'bottom' the text will render in the center and at the bottom of your game window, regardless of\rhow many lines of text there may be. Even if you adjust the text content or change the style it will remain at the bottom center\rof the text bounds.\r\rThis is especially powerful when you need to align text against specific coordinates in your game, but the actual text dimensions\rmay vary based on font (say for multi-lingual games).\r\rIf `Text.wordWrapWidth` is greater than the width of the text bounds it is clamped to match the bounds width.\r\rCall this method with no arguments given to reset an existing textBounds.\r\rIt works by calculating the final position based on the Text.canvas size, which is modified as the text is updated. Some fonts\rhave additional padding around them which you can mitigate by tweaking the Text.padding property. It then adjusts the `pivot`\rproperty based on the given bounds and canvas size. This means if you need to set the pivot property directly in your game then\ryou either cannot use `setTextBounds` or you must place the Text object inside another DisplayObject on which you set the pivot.","parameters":[{"name":"x","type":"number","description":"The x coordinate of the Text Bounds region.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate of the Text Bounds region.","default":"","optional":true,"nullable":""},{"name":"width","type":"number","description":"The width of the Text Bounds region.","default":"","optional":true,"nullable":""},{"name":"height","type":"number","description":"The height of the Text Bounds region.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Text","description":"This Text instance."}},{"name":"updateTexture","description":"Updates the texture based on the canvas dimensions.","parameters":[]},{"name":"_renderWebGL","description":"Renders the object using the WebGL renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"The Render Session to render the Text on.","default":"","optional":"","nullable":""}]},{"name":"_renderCanvas","description":"Renders the object using the Canvas renderer.","parameters":[{"name":"renderSession","type":"RenderSession","description":"The Render Session to render the Text on.","default":"","optional":"","nullable":""}]},{"name":"determineFontProperties","description":"Calculates the ascent, descent and fontSize of a given font style.","parameters":[{"name":"fontStyle","type":"object","description":"","default":"","optional":"","nullable":""}]},{"name":"getBounds","description":"Returns the bounds of the Text as a rectangle.\rThe bounds calculation takes the worldTransform into account.","parameters":[{"name":"matrix","type":"Phaser.Matrix","description":"The transformation matrix of the Text.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Rectangle","description":"The framing rectangle"}},{"name":"setCharacterLimit","description":"Sets the character limit of the text, with a suffix.\rIf the text is longer than this limit, it is truncated and the suffix is appended.","parameters":[{"name":"characterLimit","type":"number","description":"The x coordinate of the Text Bounds region.","default":"","optional":true,"nullable":""},{"name":"suffix","type":"string","description":"The suffix to append to the truncated text.","default":"","optional":true,"nullable":""}]},{"name":"setTexture","description":"Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous\ntexture this Sprite was using.","parameters":[{"name":"texture","type":"PIXI.Texture","description":"The PIXI texture that is displayed by the sprite","default":"","optional":"","nullable":""},{"name":"destroy","type":"Boolean","description":"Call Texture.destroy on the current texture before replacing it with the new one?","default":"","optional":true,"nullable":""}]},{"name":"onTextureUpdate","description":"When the texture is updated, this event will fire to update the scale and frame","parameters":[{"name":"event","type":"","description":"-","default":"","optional":"","nullable":""}]},{"name":"getLocalBounds","description":"Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.","parameters":[],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"addChild","description":"Adds a child to the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to add to the container","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"addChildAt","description":"Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child to add","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The index to place the child in","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"swapChildren","description":"Swaps the position of 2 Display Objects within this container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""},{"name":"child2","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}]},{"name":"getChildIndex","description":"Returns the index position of a child DisplayObject instance","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject instance to identify","default":"","optional":"","nullable":""}],"returns":{"type":"Number","description":"The index position of the child display object to identify"}},{"name":"setChildIndex","description":"Changes the position of an existing child in the display object container","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child DisplayObject instance for which you want to change the index number","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The resulting index number for the child display object","default":"","optional":"","nullable":""}]},{"name":"getChildAt","description":"Returns the child at the specified index","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child at the given index, if any."}},{"name":"removeChild","description":"Removes a child from the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to remove","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildAt","description":"Removes a child from the specified index position.","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildren","description":"Removes all children from this container that are within the begin and end indexes.","parameters":[{"name":"beginIndex","type":"Number","description":"The beginning position. Default value is 0.","default":"","optional":"","nullable":""},{"name":"endIndex","type":"Number","description":"The ending position. Default value is size of the container.","default":"","optional":"","nullable":""}]},{"name":"contains","description":"Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}],"returns":{"type":"Boolean","description":""}},{"name":"postUpdate","description":"Internal method called by the World postUpdate cycle.","parameters":[]},{"name":"play","description":"Plays an Animation.\r\rThe animation should have previously been created via `animations.add`.\r\rIf the animation is already playing calling this again won't do anything.\rIf you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.","parameters":[{"name":"name","type":"string","description":"The name of the animation to be played, e.g. \"fire\", \"walk\", \"jump\". Must have been previously created via 'AnimationManager.add'.","default":"","optional":"","nullable":""},{"name":"frameRate","type":"number","description":"The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used.","default":"","optional":true,"nullable":""},{"name":"loop","type":"boolean","description":"Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.","default":"","optional":true,"nullable":""},{"name":"killOnComplete","type":"boolean","description":"If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Animation","description":"A reference to playing Animation."}},{"name":"alignIn","description":"Aligns this Game Object within another Game Object, or Rectangle, known as the\r'container', to one of 9 possible positions.\r\rThe container must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Game Objects within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Sprite to another Game Object does **not** make it a child of\rthe container. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, \r`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, \r`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.\r\rThe Game Objects are placed in such a way that their _bounds_ align with the\rcontainer, taking into consideration rotation, scale and the anchor property.\rThis allows you to neatly align Game Objects, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Game Object. For example:\r\r`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the containers bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"container","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Object","description":"This Game Object."}},{"name":"alignTo","description":"Aligns this Game Object to the side of another Game Object, or Rectangle, known as the\r'parent', in one of 11 possible positions.\r\rThe parent must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Game Objects within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Sprite to another Game Object does **not** make it a child of\rthe parent. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, \r`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, \r`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` \rand `Phaser.BOTTOM_RIGHT`.\r\rThe Game Objects are placed in such a way that their _bounds_ align with the\rparent, taking into consideration rotation, scale and the anchor property.\rThis allows you to neatly align Game Objects, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Game Object. For example:\r\r`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the parents bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"parent","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Object","description":"This Game Object."}},{"name":"bringToTop","description":"Brings this Game Object to the top of its parents display list.\rVisually this means it will render over the top of any old child in the same Group.\r\rIf this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"sendToBack","description":"Sends this Game Object to the bottom of its parents display list.\rVisually this means it will render below all other children in the same Group.\r\rIf this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"moveUp","description":"Moves this Game Object up one place in its parents display list.\rThis call has no effect if the Game Object is already at the top of the display list.\r\rIf this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"moveDown","description":"Moves this Game Object down one place in its parents display list.\rThis call has no effect if the Game Object is already at the bottom of the display list.\r\rIf this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"crop","description":"Crop allows you to crop the texture being used to display this Game Object.\rSetting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.\r\rCropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method,\ror by modifying `cropRect` property directly and then calling `updateCrop`.\r\rThe rectangle object given to this method can be either a `Phaser.Rectangle` or any other object \rso long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.\r\rA reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, \rin which case the values are duplicated to a local object.","parameters":[{"name":"rect","type":"Phaser.Rectangle","description":"The Rectangle used during cropping. Pass null or no parameters to clear a previously set crop rectangle.","default":"","optional":"","nullable":""},{"name":"copy","type":"boolean","description":"If false `cropRect` will be stored as a reference to the given rect. If true it will copy the rect values into a local Phaser Rectangle object stored in cropRect.","default":"","optional":true,"nullable":""}]},{"name":"updateCrop","description":"If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property,\ror the rectangle it references, then you need to update the crop frame by calling this method.","parameters":[]},{"name":"revive","description":"Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.\r\rA resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.\r\rIt will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.","parameters":[{"name":"health","type":"number","description":"The health to give the Game Object. Only set if the GameObject has the Health component.","default":100,"optional":true,"nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"kill","description":"Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.\r\rIt will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.\r\rNote that killing a Game Object is a way for you to quickly recycle it in an object pool,\rit doesn't destroy the object or free it up from memory.\r\rIf you don't need this Game Object any more you should call `destroy` instead.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"loadTexture","description":"Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.\r\rIf your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.\r\rYou should only use `loadTexture` if you want to replace the base texture entirely.\r\rCalling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.\r\rYou can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. \rDoing this then sets the key to be the `frame` argument (the frame is set to zero). \r\rThis allows you to create sprites using `load.image` during development, and then change them \rto use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' \rand swapping it to be the key of the atlas data.\r\rNote: You cannot use a RenderTexture as a texture for a TileSprite.","parameters":[{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":"","nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""},{"name":"stopAnimation","type":"boolean","description":"If an animation is already playing on this Sprite you can choose to stop it or let it carry on playing.","default":true,"optional":true,"nullable":""}]},{"name":"setFrame","description":"Sets the texture frame the Game Object uses for rendering.\r\rThis is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.","parameters":[{"name":"frame","type":"Phaser.Frame","description":"The Frame to be used by the texture.","default":"","optional":"","nullable":""}]},{"name":"resizeFrame","description":"Resizes the Frame dimensions that the Game Object uses for rendering.\r\rYou shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData\rit can be useful to adjust the dimensions directly in this way.","parameters":[{"name":"parent","type":"object","description":"The parent texture object that caused the resize, i.e. a Phaser.Video object.","default":"","optional":"","nullable":""},{"name":"width","type":"integer","description":"The new width of the texture.","default":"","optional":"","nullable":""},{"name":"height","type":"integer","description":"The new height of the texture.","default":"","optional":"","nullable":""}]},{"name":"resetFrame","description":"Resets the texture frame dimensions that the Game Object uses for rendering.","parameters":[]},{"name":"overlap","description":"Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object, \rwhich can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.\r\rThis check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.\r\rTherefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency.\rIt should be fine for low-volume testing where physics isn't required.","parameters":[{"name":"displayObject","type":["Phaser.Sprite","Phaser.Image","Phaser.TileSprite","Phaser.Button","PIXI.DisplayObject"],"description":"The display object to check against.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the bounds of this Game Object intersects at any point with the bounds of the given display object."}},{"name":"reset","description":"Resets the Game Object.\r\rThis moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, \r`visible` and `renderable` to true.\r\rIf this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.\r\rIf this Game Object has a Physics Body it will reset the Body.","parameters":[{"name":"x","type":"number","description":"The x coordinate (in world space) to position the Game Object at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate (in world space) to position the Game Object at.","default":"","optional":"","nullable":""},{"name":"health","type":"number","description":"The health to give the Game Object if it has the Health component.","default":1,"optional":true,"nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"checkTransform","description":"Adjust scaling limits, if set, to this Game Object.","parameters":[{"name":"wt","type":"PIXI.Matrix","description":"The updated worldTransform matrix.","default":"","optional":"","nullable":""}]},{"name":"setScaleMinMax","description":"Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.\r\rFor example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored \rand the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.\r\rBy setting these values you can carefully control how Game Objects deal with responsive scaling.\r\rIf only one parameter is given then that value will be used for both scaleMin and scaleMax:\r`setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1\r\rIf only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y:\r`setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2\r\rIf you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly, \ror pass `null` for the `maxX` and `maxY` parameters.\r\rCall `setScaleMinMax(null)` to clear all previously set values.","parameters":[{"name":"minX","type":["number","null"],"description":"The minimum horizontal scale value this Game Object can scale down to.","default":"","optional":"","nullable":""},{"name":"minY","type":["number","null"],"description":"The minimum vertical scale value this Game Object can scale down to.","default":"","optional":"","nullable":""},{"name":"maxX","type":["number","null"],"description":"The maximum horizontal scale value this Game Object can scale up to.","default":"","optional":"","nullable":""},{"name":"maxY","type":["number","null"],"description":"The maximum vertical scale value this Game Object can scale up to.","default":"","optional":"","nullable":""}]}],"members":[{"name":"type","access":"","virtual":false,"description":"The const type of this object.","type":{"names":["number"]},"default":""},{"name":"physicsType","access":"","virtual":false,"description":"The const physics body type of this object.","type":{"names":["number"]},"default":""},{"name":"padding","access":"","virtual":false,"description":"Specify a padding value which is added to the line width and height when calculating the Text size.\rALlows you to add extra spacing if Phaser is unable to accurately determine the true font dimensions.","type":{"names":["Phaser.Point"]},"default":""},{"name":"textBounds","access":"","virtual":false,"description":"The textBounds property allows you to specify a rectangular region upon which text alignment is based.\rSee `Text.setTextBounds` for more details.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"canvas","access":"","virtual":false,"description":"The canvas element that the text is rendered.","type":{"names":["HTMLCanvasElement"]},"default":""},{"name":"context","access":"","virtual":false,"description":"The context of the canvas element that the text is rendered to.","type":{"names":["HTMLCanvasElement"]},"default":""},{"name":"colors","access":"","virtual":false,"description":"An array of the color values as specified by {@link Phaser.Text#addColor addColor}.","type":{"names":["array"]},"default":""},{"name":"strokeColors","access":"","virtual":false,"description":"An array of the stroke color values as specified by {@link Phaser.Text#addStrokeColor addStrokeColor}.","type":{"names":["array"]},"default":""},{"name":"fontStyles","access":"","virtual":false,"description":"An array of the font styles values as specified by {@link Phaser.Text#addFontStyle addFontStyle}.","type":{"names":["array"]},"default":""},{"name":"fontWeights","access":"","virtual":false,"description":"An array of the font weights values as specified by {@link Phaser.Text#addFontWeight addFontWeight}.","type":{"names":["array"]},"default":""},{"name":"autoRound","access":"","virtual":false,"description":"Should the linePositionX and Y values be automatically rounded before rendering the Text?\rYou may wish to enable this if you want to remove the effect of sub-pixel aliasing from text.","type":{"names":["boolean"]},"default":""},{"name":"useAdvancedWrap","access":"","virtual":false,"description":"Will this Text object use Basic or Advanced Word Wrapping?\r\rAdvanced wrapping breaks long words if they are the first of a line, and repeats the process as necessary.\rWhite space is condensed (e.g., consecutive spaces are replaced with one).\rLines are trimmed of white space before processing.\r\rIt throws an error if wordWrapWidth is less than a single character.","type":{"names":["boolean"]},"default":""},{"name":"splitRegExp","access":"","virtual":false,"description":"The Regular Expression that is used to split the text up into lines, in\rmulti-line text. By default this is `/(?:\\r\\n|\\r|\\n)/`.\rYou can change this RegExp to be anything else that you may need.","type":{"names":["Object"]},"default":""},{"name":"characterLimitSize","access":"","virtual":false,"description":"The maximum number of characters that can be set.","type":{"names":["number"]},"default":""},{"name":"characterLimitSuffix","access":"","virtual":false,"description":"The suffix that is applied to truncated text that is longer than the\rcharacterLimitSize.","type":{"names":["string"]},"default":""},{"name":"_res","access":"private","virtual":false,"description":"Internal canvas resolution var.","type":{"names":["number"]},"default":""},{"name":"_text","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["string"]},"default":""},{"name":"_fontComponents","access":"private","virtual":false,"description":"The font, broken down into components, set in `setStyle`.","type":{"names":["object"]},"default":""},{"name":"_lineSpacing","access":"private","virtual":false,"description":"Additional spacing (in pixels) between each line of text if multi-line.","type":"","default":""},{"name":"_charCount","access":"private","virtual":false,"description":"Internal character counter used by the text coloring.","type":{"names":["number"]},"default":""},{"name":"_width","access":"private","virtual":false,"description":"Internal width var.","type":{"names":["number"]},"default":""},{"name":"_height","access":"private","virtual":false,"description":"Internal height var.","type":{"names":["number"]},"default":""},{"name":"text","access":"","virtual":false,"description":"The text to be displayed by this Text object.\rUse a \\n to insert a carriage return and split the text.\rThe text will be rendered with any style currently set.","type":{"names":["string"]},"default":""},{"name":"cssFont","access":"","virtual":false,"description":"Change the font used.\r\rThis is equivalent of the `font` property specified to {@link Phaser.Text#setStyle setStyle}, except\rthat unlike using `setStyle` this will not change any current font fill/color settings.\r\rThe CSS font string can also be individually altered with the `font`, `fontSize`, `fontWeight`, `fontStyle`, and `fontVariant` properties.","type":{"names":["string"]},"default":""},{"name":"font","access":"","virtual":false,"description":"Change the font family that the text will be rendered in, such as 'Arial'.\r\rMultiple CSS font families and generic fallbacks can be specified as long as\r{@link http://www.w3.org/TR/CSS2/fonts.html#propdef-font-family CSS font-family rules} are followed.\r\rTo change the entire font string use {@link Phaser.Text#cssFont cssFont} instead: eg. `text.cssFont = 'bold 20pt Arial'`.","type":{"names":["string"]},"default":""},{"name":"fontSize","access":"","virtual":false,"description":"The size of the font.\r\rIf the font size is specified in pixels (eg. `32` or `'32px`') then a number (ie. `32`) representing\rthe font size in pixels is returned; otherwise the value with CSS unit is returned as a string (eg. `'12pt'`).","type":{"names":["number","string"]},"default":""},{"name":"fontWeight","access":"","virtual":false,"description":"The weight of the font: 'normal', 'bold', or {@link http://www.w3.org/TR/CSS2/fonts.html#propdef-font-weight a valid CSS font weight}.","type":{"names":["string"]},"default":""},{"name":"fontStyle","access":"","virtual":false,"description":"The style of the font: 'normal', 'italic', 'oblique'","type":{"names":["string"]},"default":""},{"name":"fontVariant","access":"","virtual":false,"description":"The variant the font: 'normal', 'small-caps'","type":{"names":["string"]},"default":""},{"name":"fill","access":"","virtual":false,"description":"A canvas fillstyle that will be used on the text eg 'red', '#00FF00'.","type":{"names":["object"]},"default":""},{"name":"align","access":"","virtual":false,"description":"Controls the horizontal alignment for multiline text.\rCan be: 'left', 'center' or 'right'.\rDoes not affect single lines of text. For that please see `setTextBounds`.","type":{"names":["string"]},"default":""},{"name":"resolution","access":"","virtual":false,"description":"The resolution of the canvas the text is rendered to.\rThis defaults to match the resolution of the renderer, but can be changed on a per Text object basis.","type":{"names":["integer"]},"default":""},{"name":"tabs","access":"","virtual":false,"description":"The size (in pixels) of the tabs, for when text includes tab characters. 0 disables. \rCan be an integer or an array of varying tab sizes, one tab per element.\rFor example if you set tabs to 100 then when Text encounters a tab it will jump ahead 100 pixels.\rIf you set tabs to be `[100,200]` then it will set the first tab at 100px and the second at 200px.","type":{"names":["integer","array"]},"default":""},{"name":"boundsAlignH","access":"","virtual":false,"description":"Horizontal alignment of the text within the `textBounds`. Can be: 'left', 'center' or 'right'.","type":{"names":["string"]},"default":""},{"name":"boundsAlignV","access":"","virtual":false,"description":"Vertical alignment of the text within the `textBounds`. Can be: 'top', 'middle' or 'bottom'.","type":{"names":["string"]},"default":""},{"name":"stroke","access":"","virtual":false,"description":"A canvas fillstyle that will be used on the text stroke eg 'blue', '#FCFF00'.","type":{"names":["string"]},"default":""},{"name":"strokeThickness","access":"","virtual":false,"description":"A number that represents the thickness of the stroke. Default is 0 (no stroke)","type":{"names":["number"]},"default":""},{"name":"wordWrap","access":"","virtual":false,"description":"Indicates if word wrap should be used.","type":{"names":["boolean"]},"default":""},{"name":"wordWrapWidth","access":"","virtual":false,"description":"The width at which text will wrap.","type":{"names":["number"]},"default":""},{"name":"lineSpacing","access":"","virtual":false,"description":"Additional spacing (in pixels) between each line of text if multi-line.","type":{"names":["number"]},"default":""},{"name":"shadowOffsetX","access":"","virtual":false,"description":"The shadowOffsetX value in pixels. This is how far offset horizontally the shadow effect will be.","type":{"names":["number"]},"default":""},{"name":"shadowOffsetY","access":"","virtual":false,"description":"The shadowOffsetY value in pixels. This is how far offset vertically the shadow effect will be.","type":{"names":["number"]},"default":""},{"name":"shadowColor","access":"","virtual":false,"description":"The color of the shadow, as given in CSS rgba format. Set the alpha component to 0 to disable the shadow.","type":{"names":["string"]},"default":""},{"name":"shadowBlur","access":"","virtual":false,"description":"The shadowBlur value. Make the shadow softer by applying a Gaussian blur to it. A number from 0 (no blur) up to approx. 10 (depending on scene).","type":{"names":["number"]},"default":""},{"name":"shadowStroke","access":"","virtual":false,"description":"Sets if the drop shadow is applied to the Text stroke.","type":{"names":["boolean"]},"default":""},{"name":"shadowFill","access":"","virtual":false,"description":"Sets if the drop shadow is applied to the Text fill.","type":{"names":["boolean"]},"default":""},{"name":"width","access":"","virtual":false,"description":"The width of the Text object in pixels. This is width of the Texture frame / the Text.resolution. The width of the Text. Setting this will modify the scale to achieve the value requested.","type":{"names":["number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the Text object in pixels. This is height of the Texture frame / the Text.resolution. The height of the Text. Setting this will modify the scale to achieve the value requested.","type":{"names":["number"]},"default":""},{"name":"anchor","access":"","virtual":false,"description":"The anchor sets the origin point of the texture.\nThe default is 0,0 this means the texture's origin is the top left\nSetting than anchor to 0.5,0.5 means the textures origin is centered\nSetting the anchor to 1,1 would mean the textures origin points will be the bottom right corner","type":{"names":["Point"]},"default":""},{"name":"texture","access":"","virtual":false,"description":"The texture that the sprite is using","type":{"names":["PIXI.Texture"]},"default":""},{"name":"tint","access":"","virtual":false,"description":"The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.","type":{"names":["Number"]},"default":"0xFFFFFF"},{"name":"cachedTint","access":"private","virtual":false,"description":"The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.","type":{"names":["Number"]},"default":"-1"},{"name":"tintedTexture","access":"","virtual":false,"description":"A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)","type":{"names":["Canvas"]},"default":"null"},{"name":"blendMode","access":"","virtual":false,"description":"The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.\n\nWarning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.","type":{"names":["Number"]},"default":"PIXI.blendModes.NORMAL;"},{"name":"shader","access":"","virtual":false,"description":"The shader that will be used to render this Sprite.\nSet to null to remove a current shader.","type":{"names":["PhaserFilter"]},"default":"null"},{"name":"exists","access":"","virtual":false,"description":"Controls if this Sprite is processed by the core Phaser game loops and Group loops.","type":{"names":["Boolean"]},"default":"true"},{"name":"children","access":"","virtual":false,"description":"[read-only] The array of children of this container.","type":{"names":["Array.<DisplayObject>"]},"default":""},{"name":"ignoreChildInput","access":"","virtual":false,"description":"If `ignoreChildInput`  is `false` it will allow this objects _children_ to be considered as valid for Input events.\n\nIf this property is `true` then the children will _not_ be considered as valid for Input events.\n\nNote that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.","type":{"names":["Boolean"]},"default":""},{"name":"position","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject, relative to its parent container.\n\nThe value of this property does not reflect any positioning happening further up the display list.\nTo obtain that value please see the `worldPosition` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"scale","access":"","virtual":false,"description":"The scale of this DisplayObject. A scale of 1:1 represents the DisplayObject\nat its default size. A value of 0.5 would scale this DisplayObject by half, and so on.\n\nThe value of this property does not reflect any scaling happening further up the display list.\nTo obtain that value please see the `worldScale` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"pivot","access":"","virtual":false,"description":"The pivot point of this DisplayObject that it rotates around. The values are expressed\nin pixel values.","type":{"names":["PIXIPoint"]},"default":""},{"name":"rotation","access":"","virtual":false,"description":"The rotation of this DisplayObject. The value is given, and expressed, in radians, and is based on\na right-handed orientation.\n\nThe value of this property does not reflect any rotation happening further up the display list.\nTo obtain that value please see the `worldRotation` property.","type":{"names":["Number"]},"default":""},{"name":"alpha","access":"","virtual":false,"description":"The alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nPlease note that an object with an alpha value of 0 is skipped during the render pass.\n\nThe value of this property does not reflect any alpha values set further up the display list.\nTo obtain that value please see the `worldAlpha` property.","type":{"names":["Number"]},"default":""},{"name":"visible","access":"","virtual":false,"description":"The visibility of this DisplayObject. A value of `false` makes the object invisible.\nA value of `true` makes it visible. Please note that an object with a visible value of\n`false` is skipped during the render pass. Equally a DisplayObject with visible false will\nnot render any of its children.\n\nThe value of this property does not reflect any visible values set further up the display list.\nTo obtain that value please see the `worldVisible` property.","type":{"names":["Boolean"]},"default":""},{"name":"hitArea","access":"","virtual":false,"description":"This is the defined area that will pick up mouse / touch events. It is null by default.\nSetting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)","type":{"names":["Rectangle","Circle","Ellipse","Polygon"]},"default":""},{"name":"renderable","access":"","virtual":false,"description":"Should this DisplayObject be rendered by the renderer? An object with a renderable value of\n`false` is skipped during the render pass.","type":{"names":["Boolean"]},"default":""},{"name":"parent","access":"","virtual":false,"description":"The parent DisplayObjectContainer that this DisplayObject is a child of.\nAll DisplayObjects must belong to a parent in order to be rendered.\nThe root parent is the Stage object. This property is set automatically when the\nDisplayObject is added to, or removed from, a DisplayObjectContainer.","type":{"names":["PIXIDisplayObjectContainer"]},"default":""},{"name":"worldAlpha","access":"","virtual":false,"description":"The multiplied alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nThis value is the calculated total, based on the alpha values of all parents of this DisplayObjects \nin the display list.\n\nTo obtain, and set, the local alpha value, see the `alpha` property.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"worldTransform","access":"","virtual":false,"description":"The current transform of this DisplayObject.\n\nThis property contains the calculated total, based on the transforms of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIMatrix"]},"default":""},{"name":"worldPosition","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject within the world.\n\nThis property contains the calculated total, based on the positions of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldScale","access":"","virtual":false,"description":"The global scale of this DisplayObject.\n\nThis property contains the calculated total, based on the scales of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldRotation","access":"","virtual":false,"description":"The rotation, in radians, of this DisplayObject.\n\nThis property contains the calculated total, based on the rotations of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"filterArea","access":"","virtual":false,"description":"The rectangular area used by filters when rendering a shader for this DisplayObject.","type":{"names":["Rectangle"]},"default":""},{"name":"_sr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_cr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_bounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_currentBounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_mask","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_cacheAsBitmap","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"_cacheIsDirty","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"x","access":"","virtual":false,"description":"The horizontal position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The vertical position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"worldVisible","access":"","virtual":false,"description":"Indicates if this DisplayObject is visible, based on it, and all of its parents, `visible` property values.","type":{"names":["Boolean"]},"default":""},{"name":"mask","access":"","virtual":false,"description":"Sets a mask for this DisplayObject. A mask is an instance of a Graphics object.\nWhen applied it limits the visible area of this DisplayObject to the shape of the mask.\nUnder a Canvas renderer it uses shape clipping. Under a WebGL renderer it uses a Stencil Buffer.\nTo remove a mask, set this property to `null`.","type":{"names":["PIXIGraphics"]},"default":""},{"name":"filters","access":"","virtual":false,"description":"Sets the filters for this DisplayObject. This is a WebGL only feature, and is ignored by the Canvas\nRenderer. A filter is a shader applied to this DisplayObject. You can modify the placement of the filter\nusing `DisplayObject.filterArea`.\n\nTo remove filters, set this property to `null`.\n\nNote: You cannot have a filter set, and a MULTIPLY Blend Mode active, at the same time. Setting a \nfilter will reset this DisplayObjects blend mode to NORMAL.","type":{"names":["Array"]},"default":""},{"name":"cacheAsBitmap","access":"","virtual":false,"description":"Sets if this DisplayObject should be cached as a bitmap.\n\nWhen invoked it will take a snapshot of the DisplayObject, as it is at that moment, and store it \nin a RenderTexture. This is then used whenever this DisplayObject is rendered. It can provide a\nperformance benefit for complex, but static, DisplayObjects. I.e. those with lots of children.\n\nCached Bitmaps do not track their parents. If you update a property of this DisplayObject, it will not\nre-generate the cached bitmap automatically. To do that you need to call `DisplayObject.updateCache`.\n\nTo remove a cached bitmap, set this property to `null`.","type":{"names":["Boolean"]},"default":""},{"name":"game","access":"","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"name","access":"","virtual":false,"description":"A user defined name given to this Game Object.\rThis value isn't ever used internally by Phaser, it is meant as a game level property.","type":{"names":["string"]},"default":""},{"name":"data","access":"","virtual":false,"description":"An empty Object that belongs to this Game Object.\rThis value isn't ever used internally by Phaser, but may be used by your own code, or\rby Phaser Plugins, to store data that needs to be associated with the Game Object,\rwithout polluting the Game Object directly.","type":{"names":["Object"]},"default":"{}"},{"name":"components","access":"protected","virtual":false,"description":"The components this Game Object has installed.","type":{"names":["object"]},"default":""},{"name":"z","access":"","virtual":false,"description":"The z depth of this Game Object within its parent Group.\rNo two objects in a Group can have the same z value.\rThis value is adjusted automatically whenever the Group hierarchy changes.\rIf you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.","type":{"names":["number"]},"default":""},{"name":"events","access":"","virtual":false,"description":"All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this\rGame Object, or any of its components.","type":{"names":["Phaser.Events"]},"default":""},{"name":"animations","access":"","virtual":false,"description":"If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance.\rThrough it you can create, play, pause and stop animations.","type":{"names":["Phaser.AnimationManager"]},"default":""},{"name":"key","access":"","virtual":false,"description":"The key of the image or texture used by this Game Object during rendering.\rIf it is a string it's the string used to retrieve the texture from the Phaser Image Cache.\rIt can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.\rIf a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache.\rIf a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.","type":{"names":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"]},"default":""},{"name":"world","access":"","virtual":false,"description":"The world coordinates of this Game Object in pixels.\rDepending on where in the display list this Game Object is placed this value can differ from `position`, \rwhich contains the x/y coordinates relative to the Game Objects parent.","type":{"names":["Phaser.Point"]},"default":""},{"name":"debug","access":"","virtual":false,"description":"A debug flag designed for use with `Game.enableStep`.","type":{"names":["boolean"]},"default":""},{"name":"previousPosition","access":"","virtual":false,"description":"The position the Game Object was located in the previous frame.","type":{"names":["Phaser.Point"]},"default":""},{"name":"previousRotation","access":"","virtual":false,"description":"The rotation the Game Object was in set to in the previous frame. Value is in radians.","type":{"names":["number"]},"default":""},{"name":"renderOrderID","access":"","virtual":false,"description":"The render order ID is used internally by the renderer and Input Manager and should not be modified.\rThis property is mostly used internally by the renderers, but is exposed for the use of plugins.","type":{"names":["number"]},"default":""},{"name":"fresh","access":"","virtual":false,"description":"A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update.\rThis property is mostly used internally by the physics systems, but is exposed for the use of plugins.","type":{"names":["boolean"]},"default":""},{"name":"pendingDestroy","access":"","virtual":false,"description":"A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update.\rYou can set it directly to allow you to flag an object to be destroyed on its next update.\r\rThis is extremely useful if you wish to destroy an object from within one of its own callbacks \rsuch as with Buttons or other Input events.","type":{"names":["boolean"]},"default":""},{"name":"_exists","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["boolean"]},"default":""},{"name":"angle","access":"","virtual":false,"description":"The angle property is the rotation of the Game Object in *degrees* from its original orientation.\r\rValues from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.\r\rValues outside this range are added to or subtracted from 360 to obtain a value within the range. \rFor example, the statement player.angle = 450 is the same as player.angle = 90.\r\rIf you wish to work in radians instead of degrees you can use the property `rotation` instead. \rWorking in radians is slightly faster as it doesn't have to perform any calculations.","type":{"names":["number"]},"default":""},{"name":"autoCull","access":"","virtual":false,"description":"A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame.\rIf it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`.\rThis keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.\r\rThis is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,\ror you have tested performance and find it acceptable.","type":{"names":["boolean"]},"default":""},{"name":"inCamera","access":"","virtual":false,"description":"Checks if the Game Objects bounds intersect with the Game Camera bounds.\rReturns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.","type":{"names":["boolean"]},"default":""},{"name":"offsetX","access":"","virtual":false,"description":"The amount the Game Object is visually offset from its x coordinate.\rThis is the same as `width * anchor.x`.\rIt will only be > 0 if anchor.x is not equal to zero.","type":{"names":["number"]},"default":""},{"name":"offsetY","access":"","virtual":false,"description":"The amount the Game Object is visually offset from its y coordinate.\rThis is the same as `height * anchor.y`.\rIt will only be > 0 if anchor.y is not equal to zero.","type":{"names":["number"]},"default":""},{"name":"centerX","access":"","virtual":false,"description":"The center x coordinate of the Game Object.\rThis is the same as `(x - offsetX) + (width / 2)`.","type":{"names":["number"]},"default":""},{"name":"centerY","access":"","virtual":false,"description":"The center y coordinate of the Game Object.\rThis is the same as `(y - offsetY) + (height / 2)`.","type":{"names":["number"]},"default":""},{"name":"left","access":"","virtual":false,"description":"The left coordinate of the Game Object.\rThis is the same as `x - offsetX`.","type":{"names":["number"]},"default":""},{"name":"right","access":"","virtual":false,"description":"The right coordinate of the Game Object.\rThis is the same as `x + width - offsetX`.","type":{"names":["number"]},"default":""},{"name":"top","access":"","virtual":false,"description":"The y coordinate of the Game Object.\rThis is the same as `y - offsetY`.","type":{"names":["number"]},"default":""},{"name":"bottom","access":"","virtual":false,"description":"The sum of the y and height properties.\rThis is the same as `y + height - offsetY`.","type":{"names":["number"]},"default":""},{"name":"cropRect","access":"","virtual":false,"description":"The Rectangle used to crop the texture this Game Object uses.\rSet this property via `crop`. \rIf you modify this property directly you must call `updateCrop` in order to have the change take effect.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"_crop","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"deltaX","access":"","virtual":false,"description":"Returns the delta x value. The difference between world.x now and in the previous frame.\r\rThe value will be positive if the Game Object has moved to the right or negative if to the left.","type":{"names":["number"]},"default":""},{"name":"deltaY","access":"","virtual":false,"description":"Returns the delta y value. The difference between world.y now and in the previous frame.\r\rThe value will be positive if the Game Object has moved down or negative if up.","type":{"names":["number"]},"default":""},{"name":"deltaZ","access":"","virtual":false,"description":"Returns the delta z value. The difference between rotation now and in the previous frame. The delta value.","type":{"names":["number"]},"default":""},{"name":"destroyPhase","access":"","virtual":false,"description":"As a Game Object runs through its destroy method this flag is set to true, \rand can be checked in any sub-systems or plugins it is being destroyed from.","type":{"names":["boolean"]},"default":""},{"name":"_fixedToCamera","access":"private","virtual":false,"description":"","type":{"names":["boolean"]},"default":""},{"name":"fixedToCamera","access":"","virtual":false,"description":"A Game Object that is \"fixed\" to the camera is rendered at a given x/y offsets from the top left of the camera. The offsets \rare stored in the `cameraOffset` property, which is initialized with the current object coordinates. \r\rThe values are adjusted at the rendering stage, overriding the Game Objects actual world position.\r\rThe end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world\rthe camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times \rregardless where in the world the camera is.\r\rNote that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.\r\rBe careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.","type":{"names":["boolean"]},"default":""},{"name":"cameraOffset","access":"","virtual":false,"description":"The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.\r\rThe values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.","type":{"names":["Phaser.Point"]},"default":""},{"name":"health","access":"","virtual":false,"description":"The Game Objects health value. This is a handy property for setting and manipulating health on a Game Object.\r\rIt can be used in combination with the `damage` method or modified directly.","type":{"names":["number"]},"default":1},{"name":"maxHealth","access":"","virtual":false,"description":"The Game Objects maximum health value. This works in combination with the `heal` method to ensure\rthe health value never exceeds the maximum.","type":{"names":["number"]},"default":100},{"name":"damage","access":"","virtual":false,"description":"Damages the Game Object. This removes the given amount of health from the `health` property.\r\rIf health is taken below or is equal to zero then the `kill` method is called.","type":"","default":""},{"name":"setHealth","access":"","virtual":false,"description":"Sets the health property of the Game Object to the given amount.\rWill never exceed the `maxHealth` value.","type":"","default":""},{"name":"heal","access":"","virtual":false,"description":"Heal the Game Object. This adds the given amount of health to the `health` property.","type":"","default":""},{"name":"input","access":"","virtual":false,"description":"The Input Handler for this Game Object.\r\rBy default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.\r\rAfter you have done this, this property will be a reference to the Phaser InputHandler.","type":{"names":["Phaser.InputHandler","null"]},"default":""},{"name":"inputEnabled","access":"","virtual":false,"description":"By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created\rfor this Game Object and it will then start to process click / touch events and more.\r\rYou can then access the Input Handler via `this.input`.\r\rNote that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.\r\rIf you set this property to false it will stop the Input Handler from processing any more input events.\r\rIf you want to _temporarily_ disable input for a Game Object, then it's better to set\r`input.enabled = false`, as it won't reset any of the Input Handlers internal properties.\rYou can then toggle this back on as needed.","type":{"names":["boolean"]},"default":""},{"name":"checkWorldBounds","access":"","virtual":false,"description":"If this is set to `true` the Game Object checks if it is within the World bounds each frame. \r\rWhen it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.\r\rIf it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.\r\rIt also optionally kills the Game Object if `outOfBoundsKill` is `true`.\r\rWhen `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.\r\rThis is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,\ror you have tested performance and find it acceptable.","type":{"names":["boolean"]},"default":""},{"name":"outOfBoundsKill","access":"","virtual":false,"description":"If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.","type":{"names":["boolean"]},"default":""},{"name":"outOfCameraBoundsKill","access":"","virtual":false,"description":"If this and the `autoCull` property are both set to `true`, then the `kill` method\ris called as soon as the Game Object leaves the camera bounds.","type":{"names":["boolean"]},"default":""},{"name":"_outOfBoundsFired","access":"private","virtual":false,"description":"Internal state var.","type":{"names":["boolean"]},"default":""},{"name":"inWorld","access":"","virtual":false,"description":"Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.","type":{"names":["boolean"]},"default":""},{"name":"alive","access":"","virtual":false,"description":"A useful flag to control if the Game Object is alive or dead.\r\rThis is set automatically by the Health components `damage` method should the object run out of health.\rOr you can toggle it via your game code.\r\rThis property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates.\rHowever you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.","type":{"names":["boolean"]},"default":true},{"name":"lifespan","access":"","virtual":false,"description":"The lifespan allows you to give a Game Object a lifespan in milliseconds.\r\rOnce the Game Object is 'born' you can set this to a positive value.\r\rIt is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame.\rWhen it reaches zero it will call the `kill` method.\r\rVery handy for particles, bullets, collectibles, or any other short-lived entity.","type":{"names":["number"]},"default":""},{"name":"customRender","access":"private","virtual":false,"description":"Does this texture require a custom render call? (as set by BitmapData, Video, etc)","type":{"names":["boolean"]},"default":""},{"name":"_frame","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"frame","access":"","virtual":false,"description":"Gets or sets the current frame index of the texture being used to render this Game Object.\r\rTo change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use,\rfor example: `player.frame = 4`.\r\rIf the frame index given doesn't exist it will revert to the first frame found in the texture.\r\rIf you are using a texture atlas then you should use the `frameName` property instead.\r\rIf you wish to fully replace the texture being used see `loadTexture`.","type":{"names":["integer"]},"default":""},{"name":"frameName","access":"","virtual":false,"description":"Gets or sets the current frame name of the texture being used to render this Game Object.\r\rTo change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use, \rfor example: `player.frameName = \"idle\"`.\r\rIf the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.\r\rIf you are using a sprite sheet then you should use the `frame` property instead.\r\rIf you wish to fully replace the texture being used see `loadTexture`.","type":{"names":["string"]},"default":""},{"name":"body","access":"","virtual":false,"description":"`body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated \rproperties and methods via it.\r\rBy default Game Objects won't add themselves to any physics system and their `body` property will be `null`.\r\rTo enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object\rand `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.\r\rYou can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.\r\rImportant: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5, \rso the physics body is centered on the Game Object.\r\rIf you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.","type":{"names":["Phaser.Physics.Arcade.Body","Phaser.Physics.P2.Body","Phaser.Physics.Ninja.Body","null"]},"default":""},{"name":"transformCallback","access":"","virtual":false,"description":"The callback that will apply any scale limiting to the worldTransform.","type":{"names":["function"]},"default":""},{"name":"transformCallbackContext","access":"","virtual":false,"description":"The context under which `transformCallback` is called.","type":{"names":["object"]},"default":""},{"name":"scaleMin","access":"","virtual":false,"description":"The minimum scale this Game Object will scale down to.\r\rIt allows you to prevent a parent from scaling this Game Object lower than the given value.\r\rSet it to `null` to remove the limit.","type":{"names":["Phaser.Point"]},"default":""},{"name":"scaleMax","access":"","virtual":false,"description":"The maximum scale this Game Object will scale up to. \r\rIt allows you to prevent a parent from scaling this Game Object higher than the given value.\r\rSet it to `null` to remove the limit.","type":{"names":["Phaser.Point"]},"default":""},{"name":"smoothed","access":"","virtual":false,"description":"Enable or disable texture smoothing for this Game Object.\r\rIt only takes effect if the Game Object is using an image based texture.\r\rSmoothing is enabled by default.","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.TileSprite","description":"A TileSprite is a Sprite that has a repeating texture. The texture can be scrolled and scaled independently of the TileSprite itself.\rTextures will automatically wrap and are designed so that you can create game backdrops using seamless textures as a source.\r\rTileSprites have no input handler or physics bodies by default, both need enabling in the same way as for normal Sprites.\r\rYou shouldn't ever create a TileSprite any larger than your actual screen size. If you want to create a large repeating background\rthat scrolls across the whole map of your game, then you create a TileSprite that fits the screen size and then use the `tilePosition`\rproperty to scroll the texture as the player moves. If you create a TileSprite that is thousands of pixels in size then it will \rconsume huge amounts of memory and cause performance issues. Remember: use `tilePosition` to scroll your texture and `tileScale` to\radjust the scale of the texture - don't resize the sprite itself or make it larger than it needs.\r\rAn important note about texture dimensions:\r\rWhen running under Canvas a TileSprite can use any texture size without issue. When running under WebGL the texture should ideally be\ra power of two in size (i.e. 4, 8, 16, 32, 64, 128, 256, 512, etc pixels width by height). If the texture isn't a power of two\rit will be rendered to a blank canvas that is the correct size, which means you may have 'blank' areas appearing to the right and\rbottom of your frame. To avoid this ensure your textures are perfect powers of two.\r\rTileSprites support animations in the same way that Sprites do. You add and play animations using the AnimationManager. However\rif your game is running under WebGL please note that each frame of the animation must be a power of two in size, or it will receive\radditional padding to enforce it to be so.","constructor":{"name":"TileSprite","description":"A TileSprite is a Sprite that has a repeating texture. The texture can be scrolled and scaled independently of the TileSprite itself.\rTextures will automatically wrap and are designed so that you can create game backdrops using seamless textures as a source.\r\rTileSprites have no input handler or physics bodies by default, both need enabling in the same way as for normal Sprites.\r\rYou shouldn't ever create a TileSprite any larger than your actual screen size. If you want to create a large repeating background\rthat scrolls across the whole map of your game, then you create a TileSprite that fits the screen size and then use the `tilePosition`\rproperty to scroll the texture as the player moves. If you create a TileSprite that is thousands of pixels in size then it will \rconsume huge amounts of memory and cause performance issues. Remember: use `tilePosition` to scroll your texture and `tileScale` to\radjust the scale of the texture - don't resize the sprite itself or make it larger than it needs.\r\rAn important note about texture dimensions:\r\rWhen running under Canvas a TileSprite can use any texture size without issue. When running under WebGL the texture should ideally be\ra power of two in size (i.e. 4, 8, 16, 32, 64, 128, 256, 512, etc pixels width by height). If the texture isn't a power of two\rit will be rendered to a blank canvas that is the correct size, which means you may have 'blank' areas appearing to the right and\rbottom of your frame. To avoid this ensure your textures are perfect powers of two.\r\rTileSprites support animations in the same way that Sprites do. You add and play animations using the AnimationManager. However\rif your game is running under WebGL please note that each frame of the animation must be a power of two in size, or it will receive\radditional padding to enforce it to be so.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate (in world space) to position the TileSprite at.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate (in world space) to position the TileSprite at.","default":"","optional":true,"nullable":""},{"name":"width","type":"number","description":"The width of the TileSprite.","default":256,"optional":true,"nullable":""},{"name":"height","type":"number","description":"The height of the TileSprite.","default":256,"optional":true,"nullable":""},{"name":"key","type":["string","Phaser.BitmapData","PIXI.Texture"],"description":"This is the image or texture used by the TileSprite during rendering. It can be a string which is a reference to the Phaser Image Cache entry, or an instance of a PIXI.Texture or BitmapData.","default":"","optional":"","nullable":""},{"name":"frame","type":["string","number"],"description":"If this TileSprite 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.","default":"","optional":"","nullable":""}]},"functions":[{"name":"preUpdate","description":"Automatically called by World.preUpdate.","parameters":[],"returns":{"type":"boolean","description":""}},{"name":"autoScroll","description":"Sets this TileSprite to automatically scroll in the given direction until stopped via TileSprite.stopScroll().\rThe scroll speed is specified in pixels per second.\rA negative x value will scroll to the left. A positive x value will scroll to the right.\rA negative y value will scroll up. A positive y value will scroll down.","parameters":[{"name":"x","type":"number","description":"Horizontal scroll speed in pixels per second.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Vertical scroll speed in pixels per second.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.TileSprite","description":"This instance."}},{"name":"stopScroll","description":"Stops an automatically scrolling TileSprite.","parameters":[],"returns":{"type":"Phaser.TileSprite","description":"This instance."}},{"name":"destroy","description":"Destroys the TileSprite. This removes it from its parent group, destroys the event and animation handlers if present\rand nulls its reference to game, freeing it up for garbage collection.","parameters":[{"name":"destroyChildren","type":"boolean","description":"Should every child of this object have its destroy method called?","default":true,"optional":true,"nullable":""}]},{"name":"reset","description":"Resets the TileSprite. This places the TileSprite at the given x/y world coordinates, resets the tilePosition and then\rsets alive, exists, visible and renderable all to true. Also resets the outOfBounds state.\rIf the TileSprite has a physics body that too is reset.","parameters":[{"name":"x","type":"number","description":"The x coordinate (in world space) to position the Sprite at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate (in world space) to position the Sprite at.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.TileSprite","description":"This instance."}},{"name":"setTexture","description":"Changes the texture being rendered by this TileSprite.\rCauses a texture refresh to take place on the next render.","parameters":[{"name":"texture","type":"PIXI.Texture","description":"The texture to apply to this TileSprite.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.TileSprite","description":"This instance."}},{"name":"_renderWebGL","description":"Renders the TileSprite using the WebGL Renderer.","parameters":[{"name":"renderSession","type":"object","description":"","default":"","optional":"","nullable":""}]},{"name":"_renderCanvas","description":"Renders the TileSprite using the Canvas Renderer.","parameters":[{"name":"renderSession","type":"object","description":"","default":"","optional":"","nullable":""}]},{"name":"onTextureUpdate","description":"Override the Sprite method.","parameters":[]},{"name":"generateTilingTexture","description":"Internal method that generates a new tiling texture.","parameters":[{"name":"forcePowerOfTwo","type":"boolean","description":"Whether we want to force the texture to be a power of two","default":"","optional":"","nullable":""}]},{"name":"getBounds","description":"Returns the framing rectangle of the Tile Sprite.","parameters":[],"returns":{"type":"Phaser.Rectangle","description":"The bounds of the Tile Sprite."}},{"name":"getLocalBounds","description":"Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.","parameters":[],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"addChild","description":"Adds a child to the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to add to the container","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"addChildAt","description":"Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child to add","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The index to place the child in","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"swapChildren","description":"Swaps the position of 2 Display Objects within this container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""},{"name":"child2","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}]},{"name":"getChildIndex","description":"Returns the index position of a child DisplayObject instance","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject instance to identify","default":"","optional":"","nullable":""}],"returns":{"type":"Number","description":"The index position of the child display object to identify"}},{"name":"setChildIndex","description":"Changes the position of an existing child in the display object container","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child DisplayObject instance for which you want to change the index number","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The resulting index number for the child display object","default":"","optional":"","nullable":""}]},{"name":"getChildAt","description":"Returns the child at the specified index","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child at the given index, if any."}},{"name":"removeChild","description":"Removes a child from the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to remove","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildAt","description":"Removes a child from the specified index position.","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildren","description":"Removes all children from this container that are within the begin and end indexes.","parameters":[{"name":"beginIndex","type":"Number","description":"The beginning position. Default value is 0.","default":"","optional":"","nullable":""},{"name":"endIndex","type":"Number","description":"The ending position. Default value is size of the container.","default":"","optional":"","nullable":""}]},{"name":"contains","description":"Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}],"returns":{"type":"Boolean","description":""}},{"name":"update","description":"Override this method in your own custom objects to handle any update requirements.\rIt is called immediately after `preUpdate` and before `postUpdate`.\rRemember if this Game Object has any children you should call update on those too.","parameters":[]},{"name":"postUpdate","description":"Internal method called by the World postUpdate cycle.","parameters":[]},{"name":"play","description":"Plays an Animation.\r\rThe animation should have previously been created via `animations.add`.\r\rIf the animation is already playing calling this again won't do anything.\rIf you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.","parameters":[{"name":"name","type":"string","description":"The name of the animation to be played, e.g. \"fire\", \"walk\", \"jump\". Must have been previously created via 'AnimationManager.add'.","default":"","optional":"","nullable":""},{"name":"frameRate","type":"number","description":"The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used.","default":"","optional":true,"nullable":""},{"name":"loop","type":"boolean","description":"Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.","default":"","optional":true,"nullable":""},{"name":"killOnComplete","type":"boolean","description":"If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Animation","description":"A reference to playing Animation."}},{"name":"alignIn","description":"Aligns this Game Object within another Game Object, or Rectangle, known as the\r'container', to one of 9 possible positions.\r\rThe container must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Game Objects within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Sprite to another Game Object does **not** make it a child of\rthe container. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, \r`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, \r`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.\r\rThe Game Objects are placed in such a way that their _bounds_ align with the\rcontainer, taking into consideration rotation, scale and the anchor property.\rThis allows you to neatly align Game Objects, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Game Object. For example:\r\r`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the containers bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"container","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Object","description":"This Game Object."}},{"name":"alignTo","description":"Aligns this Game Object to the side of another Game Object, or Rectangle, known as the\r'parent', in one of 11 possible positions.\r\rThe parent must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Game Objects within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Sprite to another Game Object does **not** make it a child of\rthe parent. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, \r`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, \r`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` \rand `Phaser.BOTTOM_RIGHT`.\r\rThe Game Objects are placed in such a way that their _bounds_ align with the\rparent, taking into consideration rotation, scale and the anchor property.\rThis allows you to neatly align Game Objects, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Game Object. For example:\r\r`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the parents bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"parent","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Object","description":"This Game Object."}},{"name":"bringToTop","description":"Brings this Game Object to the top of its parents display list.\rVisually this means it will render over the top of any old child in the same Group.\r\rIf this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"sendToBack","description":"Sends this Game Object to the bottom of its parents display list.\rVisually this means it will render below all other children in the same Group.\r\rIf this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"moveUp","description":"Moves this Game Object up one place in its parents display list.\rThis call has no effect if the Game Object is already at the top of the display list.\r\rIf this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"moveDown","description":"Moves this Game Object down one place in its parents display list.\rThis call has no effect if the Game Object is already at the bottom of the display list.\r\rIf this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"revive","description":"Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.\r\rA resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.\r\rIt will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.","parameters":[{"name":"health","type":"number","description":"The health to give the Game Object. Only set if the GameObject has the Health component.","default":100,"optional":true,"nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"kill","description":"Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.\r\rIt will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.\r\rNote that killing a Game Object is a way for you to quickly recycle it in an object pool,\rit doesn't destroy the object or free it up from memory.\r\rIf you don't need this Game Object any more you should call `destroy` instead.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"loadTexture","description":"Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.\r\rIf your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.\r\rYou should only use `loadTexture` if you want to replace the base texture entirely.\r\rCalling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.\r\rYou can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. \rDoing this then sets the key to be the `frame` argument (the frame is set to zero). \r\rThis allows you to create sprites using `load.image` during development, and then change them \rto use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' \rand swapping it to be the key of the atlas data.\r\rNote: You cannot use a RenderTexture as a texture for a TileSprite.","parameters":[{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":"","nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""},{"name":"stopAnimation","type":"boolean","description":"If an animation is already playing on this Sprite you can choose to stop it or let it carry on playing.","default":true,"optional":true,"nullable":""}]},{"name":"setFrame","description":"Sets the texture frame the Game Object uses for rendering.\r\rThis is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.","parameters":[{"name":"frame","type":"Phaser.Frame","description":"The Frame to be used by the texture.","default":"","optional":"","nullable":""}]},{"name":"resizeFrame","description":"Resizes the Frame dimensions that the Game Object uses for rendering.\r\rYou shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData\rit can be useful to adjust the dimensions directly in this way.","parameters":[{"name":"parent","type":"object","description":"The parent texture object that caused the resize, i.e. a Phaser.Video object.","default":"","optional":"","nullable":""},{"name":"width","type":"integer","description":"The new width of the texture.","default":"","optional":"","nullable":""},{"name":"height","type":"integer","description":"The new height of the texture.","default":"","optional":"","nullable":""}]},{"name":"resetFrame","description":"Resets the texture frame dimensions that the Game Object uses for rendering.","parameters":[]},{"name":"overlap","description":"Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object, \rwhich can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.\r\rThis check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.\r\rTherefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency.\rIt should be fine for low-volume testing where physics isn't required.","parameters":[{"name":"displayObject","type":["Phaser.Sprite","Phaser.Image","Phaser.TileSprite","Phaser.Button","PIXI.DisplayObject"],"description":"The display object to check against.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the bounds of this Game Object intersects at any point with the bounds of the given display object."}}],"members":[{"name":"type","access":"","virtual":false,"description":"The const type of this object.","type":{"names":["number"]},"default":""},{"name":"physicsType","access":"","virtual":false,"description":"The const physics body type of this object.","type":{"names":["number"]},"default":""},{"name":"_scroll","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["Phaser.Point"]},"default":""},{"name":"tileScale","access":"","virtual":false,"description":"The scale applied to the image being tiled.","type":{"names":["Phaser.Point"]},"default":""},{"name":"tileScaleOffset","access":"","virtual":false,"description":"The scale offset applied to the image being tiled.","type":{"names":["Phaser.Point"]},"default":""},{"name":"tilePosition","access":"","virtual":false,"description":"The offset position of the image being tiled.","type":{"names":["Phaser.Point"]},"default":""},{"name":"textureDebug","access":"","virtual":false,"description":"If enabled a green rectangle will be drawn behind the generated tiling texture,\rallowing you to visually debug the texture being used.","type":{"names":["boolean"]},"default":""},{"name":"canvasBuffer","access":"","virtual":false,"description":"The CanvasBuffer object that the tiled texture is drawn to.","type":{"names":["PIXI.CanvasBuffer"]},"default":""},{"name":"tilingTexture","access":"","virtual":false,"description":"An internal Texture object that holds the tiling texture that was generated from TilingSprite.texture.","type":{"names":["PIXI.Texture"]},"default":""},{"name":"tilePattern","access":"","virtual":false,"description":"The Context fill pattern that is used to draw the TilingSprite in Canvas mode only (will be null in WebGL).","type":{"names":["object"]},"default":""},{"name":"refreshTexture","access":"","virtual":false,"description":"If true the TileSprite will run `generateTexture` on its **next** render pass.\rThis is set by the likes of Phaser.LoadTexture.setFrame.","type":{"names":["boolean"]},"default":""},{"name":"anchor","access":"","virtual":false,"description":"The anchor sets the origin point of the texture.\nThe default is 0,0 this means the texture's origin is the top left\nSetting than anchor to 0.5,0.5 means the textures origin is centered\nSetting the anchor to 1,1 would mean the textures origin points will be the bottom right corner","type":{"names":["Point"]},"default":""},{"name":"texture","access":"","virtual":false,"description":"The texture that the sprite is using","type":{"names":["PIXI.Texture"]},"default":""},{"name":"_width","access":"private","virtual":false,"description":"The width of the sprite (this is initially set by the texture)","type":{"names":["Number"]},"default":""},{"name":"_height","access":"private","virtual":false,"description":"The height of the sprite (this is initially set by the texture)","type":{"names":["Number"]},"default":""},{"name":"tint","access":"","virtual":false,"description":"The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.","type":{"names":["Number"]},"default":"0xFFFFFF"},{"name":"cachedTint","access":"private","virtual":false,"description":"The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.","type":{"names":["Number"]},"default":"-1"},{"name":"tintedTexture","access":"","virtual":false,"description":"A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)","type":{"names":["Canvas"]},"default":"null"},{"name":"blendMode","access":"","virtual":false,"description":"The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.\n\nWarning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.","type":{"names":["Number"]},"default":"PIXI.blendModes.NORMAL;"},{"name":"shader","access":"","virtual":false,"description":"The shader that will be used to render this Sprite.\nSet to null to remove a current shader.","type":{"names":["PhaserFilter"]},"default":"null"},{"name":"exists","access":"","virtual":false,"description":"Controls if this Sprite is processed by the core Phaser game loops and Group loops.","type":{"names":["Boolean"]},"default":"true"},{"name":"width","access":"","virtual":false,"description":"The width of the sprite, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the sprite, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"children","access":"","virtual":false,"description":"[read-only] The array of children of this container.","type":{"names":["Array.<DisplayObject>"]},"default":""},{"name":"ignoreChildInput","access":"","virtual":false,"description":"If `ignoreChildInput`  is `false` it will allow this objects _children_ to be considered as valid for Input events.\n\nIf this property is `true` then the children will _not_ be considered as valid for Input events.\n\nNote that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.","type":{"names":["Boolean"]},"default":""},{"name":"position","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject, relative to its parent container.\n\nThe value of this property does not reflect any positioning happening further up the display list.\nTo obtain that value please see the `worldPosition` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"scale","access":"","virtual":false,"description":"The scale of this DisplayObject. A scale of 1:1 represents the DisplayObject\nat its default size. A value of 0.5 would scale this DisplayObject by half, and so on.\n\nThe value of this property does not reflect any scaling happening further up the display list.\nTo obtain that value please see the `worldScale` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"pivot","access":"","virtual":false,"description":"The pivot point of this DisplayObject that it rotates around. The values are expressed\nin pixel values.","type":{"names":["PIXIPoint"]},"default":""},{"name":"rotation","access":"","virtual":false,"description":"The rotation of this DisplayObject. The value is given, and expressed, in radians, and is based on\na right-handed orientation.\n\nThe value of this property does not reflect any rotation happening further up the display list.\nTo obtain that value please see the `worldRotation` property.","type":{"names":["Number"]},"default":""},{"name":"alpha","access":"","virtual":false,"description":"The alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nPlease note that an object with an alpha value of 0 is skipped during the render pass.\n\nThe value of this property does not reflect any alpha values set further up the display list.\nTo obtain that value please see the `worldAlpha` property.","type":{"names":["Number"]},"default":""},{"name":"visible","access":"","virtual":false,"description":"The visibility of this DisplayObject. A value of `false` makes the object invisible.\nA value of `true` makes it visible. Please note that an object with a visible value of\n`false` is skipped during the render pass. Equally a DisplayObject with visible false will\nnot render any of its children.\n\nThe value of this property does not reflect any visible values set further up the display list.\nTo obtain that value please see the `worldVisible` property.","type":{"names":["Boolean"]},"default":""},{"name":"hitArea","access":"","virtual":false,"description":"This is the defined area that will pick up mouse / touch events. It is null by default.\nSetting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)","type":{"names":["Rectangle","Circle","Ellipse","Polygon"]},"default":""},{"name":"renderable","access":"","virtual":false,"description":"Should this DisplayObject be rendered by the renderer? An object with a renderable value of\n`false` is skipped during the render pass.","type":{"names":["Boolean"]},"default":""},{"name":"parent","access":"","virtual":false,"description":"The parent DisplayObjectContainer that this DisplayObject is a child of.\nAll DisplayObjects must belong to a parent in order to be rendered.\nThe root parent is the Stage object. This property is set automatically when the\nDisplayObject is added to, or removed from, a DisplayObjectContainer.","type":{"names":["PIXIDisplayObjectContainer"]},"default":""},{"name":"worldAlpha","access":"","virtual":false,"description":"The multiplied alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nThis value is the calculated total, based on the alpha values of all parents of this DisplayObjects \nin the display list.\n\nTo obtain, and set, the local alpha value, see the `alpha` property.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"worldTransform","access":"","virtual":false,"description":"The current transform of this DisplayObject.\n\nThis property contains the calculated total, based on the transforms of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIMatrix"]},"default":""},{"name":"worldPosition","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject within the world.\n\nThis property contains the calculated total, based on the positions of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldScale","access":"","virtual":false,"description":"The global scale of this DisplayObject.\n\nThis property contains the calculated total, based on the scales of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldRotation","access":"","virtual":false,"description":"The rotation, in radians, of this DisplayObject.\n\nThis property contains the calculated total, based on the rotations of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"filterArea","access":"","virtual":false,"description":"The rectangular area used by filters when rendering a shader for this DisplayObject.","type":{"names":["Rectangle"]},"default":""},{"name":"_sr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_cr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_bounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_currentBounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_mask","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_cacheAsBitmap","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"_cacheIsDirty","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"x","access":"","virtual":false,"description":"The horizontal position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The vertical position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"worldVisible","access":"","virtual":false,"description":"Indicates if this DisplayObject is visible, based on it, and all of its parents, `visible` property values.","type":{"names":["Boolean"]},"default":""},{"name":"mask","access":"","virtual":false,"description":"Sets a mask for this DisplayObject. A mask is an instance of a Graphics object.\nWhen applied it limits the visible area of this DisplayObject to the shape of the mask.\nUnder a Canvas renderer it uses shape clipping. Under a WebGL renderer it uses a Stencil Buffer.\nTo remove a mask, set this property to `null`.","type":{"names":["PIXIGraphics"]},"default":""},{"name":"filters","access":"","virtual":false,"description":"Sets the filters for this DisplayObject. This is a WebGL only feature, and is ignored by the Canvas\nRenderer. A filter is a shader applied to this DisplayObject. You can modify the placement of the filter\nusing `DisplayObject.filterArea`.\n\nTo remove filters, set this property to `null`.\n\nNote: You cannot have a filter set, and a MULTIPLY Blend Mode active, at the same time. Setting a \nfilter will reset this DisplayObjects blend mode to NORMAL.","type":{"names":["Array"]},"default":""},{"name":"cacheAsBitmap","access":"","virtual":false,"description":"Sets if this DisplayObject should be cached as a bitmap.\n\nWhen invoked it will take a snapshot of the DisplayObject, as it is at that moment, and store it \nin a RenderTexture. This is then used whenever this DisplayObject is rendered. It can provide a\nperformance benefit for complex, but static, DisplayObjects. I.e. those with lots of children.\n\nCached Bitmaps do not track their parents. If you update a property of this DisplayObject, it will not\nre-generate the cached bitmap automatically. To do that you need to call `DisplayObject.updateCache`.\n\nTo remove a cached bitmap, set this property to `null`.","type":{"names":["Boolean"]},"default":""},{"name":"game","access":"","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"name","access":"","virtual":false,"description":"A user defined name given to this Game Object.\rThis value isn't ever used internally by Phaser, it is meant as a game level property.","type":{"names":["string"]},"default":""},{"name":"data","access":"","virtual":false,"description":"An empty Object that belongs to this Game Object.\rThis value isn't ever used internally by Phaser, but may be used by your own code, or\rby Phaser Plugins, to store data that needs to be associated with the Game Object,\rwithout polluting the Game Object directly.","type":{"names":["Object"]},"default":"{}"},{"name":"components","access":"protected","virtual":false,"description":"The components this Game Object has installed.","type":{"names":["object"]},"default":""},{"name":"z","access":"","virtual":false,"description":"The z depth of this Game Object within its parent Group.\rNo two objects in a Group can have the same z value.\rThis value is adjusted automatically whenever the Group hierarchy changes.\rIf you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.","type":{"names":["number"]},"default":""},{"name":"events","access":"","virtual":false,"description":"All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this\rGame Object, or any of its components.","type":{"names":["Phaser.Events"]},"default":""},{"name":"animations","access":"","virtual":false,"description":"If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance.\rThrough it you can create, play, pause and stop animations.","type":{"names":["Phaser.AnimationManager"]},"default":""},{"name":"key","access":"","virtual":false,"description":"The key of the image or texture used by this Game Object during rendering.\rIf it is a string it's the string used to retrieve the texture from the Phaser Image Cache.\rIt can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.\rIf a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache.\rIf a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.","type":{"names":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"]},"default":""},{"name":"world","access":"","virtual":false,"description":"The world coordinates of this Game Object in pixels.\rDepending on where in the display list this Game Object is placed this value can differ from `position`, \rwhich contains the x/y coordinates relative to the Game Objects parent.","type":{"names":["Phaser.Point"]},"default":""},{"name":"debug","access":"","virtual":false,"description":"A debug flag designed for use with `Game.enableStep`.","type":{"names":["boolean"]},"default":""},{"name":"previousPosition","access":"","virtual":false,"description":"The position the Game Object was located in the previous frame.","type":{"names":["Phaser.Point"]},"default":""},{"name":"previousRotation","access":"","virtual":false,"description":"The rotation the Game Object was in set to in the previous frame. Value is in radians.","type":{"names":["number"]},"default":""},{"name":"renderOrderID","access":"","virtual":false,"description":"The render order ID is used internally by the renderer and Input Manager and should not be modified.\rThis property is mostly used internally by the renderers, but is exposed for the use of plugins.","type":{"names":["number"]},"default":""},{"name":"fresh","access":"","virtual":false,"description":"A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update.\rThis property is mostly used internally by the physics systems, but is exposed for the use of plugins.","type":{"names":["boolean"]},"default":""},{"name":"pendingDestroy","access":"","virtual":false,"description":"A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update.\rYou can set it directly to allow you to flag an object to be destroyed on its next update.\r\rThis is extremely useful if you wish to destroy an object from within one of its own callbacks \rsuch as with Buttons or other Input events.","type":{"names":["boolean"]},"default":""},{"name":"_exists","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["boolean"]},"default":""},{"name":"angle","access":"","virtual":false,"description":"The angle property is the rotation of the Game Object in *degrees* from its original orientation.\r\rValues from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.\r\rValues outside this range are added to or subtracted from 360 to obtain a value within the range. \rFor example, the statement player.angle = 450 is the same as player.angle = 90.\r\rIf you wish to work in radians instead of degrees you can use the property `rotation` instead. \rWorking in radians is slightly faster as it doesn't have to perform any calculations.","type":{"names":["number"]},"default":""},{"name":"autoCull","access":"","virtual":false,"description":"A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame.\rIf it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`.\rThis keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.\r\rThis is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,\ror you have tested performance and find it acceptable.","type":{"names":["boolean"]},"default":""},{"name":"inCamera","access":"","virtual":false,"description":"Checks if the Game Objects bounds intersect with the Game Camera bounds.\rReturns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.","type":{"names":["boolean"]},"default":""},{"name":"offsetX","access":"","virtual":false,"description":"The amount the Game Object is visually offset from its x coordinate.\rThis is the same as `width * anchor.x`.\rIt will only be > 0 if anchor.x is not equal to zero.","type":{"names":["number"]},"default":""},{"name":"offsetY","access":"","virtual":false,"description":"The amount the Game Object is visually offset from its y coordinate.\rThis is the same as `height * anchor.y`.\rIt will only be > 0 if anchor.y is not equal to zero.","type":{"names":["number"]},"default":""},{"name":"centerX","access":"","virtual":false,"description":"The center x coordinate of the Game Object.\rThis is the same as `(x - offsetX) + (width / 2)`.","type":{"names":["number"]},"default":""},{"name":"centerY","access":"","virtual":false,"description":"The center y coordinate of the Game Object.\rThis is the same as `(y - offsetY) + (height / 2)`.","type":{"names":["number"]},"default":""},{"name":"left","access":"","virtual":false,"description":"The left coordinate of the Game Object.\rThis is the same as `x - offsetX`.","type":{"names":["number"]},"default":""},{"name":"right","access":"","virtual":false,"description":"The right coordinate of the Game Object.\rThis is the same as `x + width - offsetX`.","type":{"names":["number"]},"default":""},{"name":"top","access":"","virtual":false,"description":"The y coordinate of the Game Object.\rThis is the same as `y - offsetY`.","type":{"names":["number"]},"default":""},{"name":"bottom","access":"","virtual":false,"description":"The sum of the y and height properties.\rThis is the same as `y + height - offsetY`.","type":{"names":["number"]},"default":""},{"name":"destroyPhase","access":"","virtual":false,"description":"As a Game Object runs through its destroy method this flag is set to true, \rand can be checked in any sub-systems or plugins it is being destroyed from.","type":{"names":["boolean"]},"default":""},{"name":"_fixedToCamera","access":"private","virtual":false,"description":"","type":{"names":["boolean"]},"default":""},{"name":"fixedToCamera","access":"","virtual":false,"description":"A Game Object that is \"fixed\" to the camera is rendered at a given x/y offsets from the top left of the camera. The offsets \rare stored in the `cameraOffset` property, which is initialized with the current object coordinates. \r\rThe values are adjusted at the rendering stage, overriding the Game Objects actual world position.\r\rThe end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world\rthe camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times \rregardless where in the world the camera is.\r\rNote that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.\r\rBe careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.","type":{"names":["boolean"]},"default":""},{"name":"cameraOffset","access":"","virtual":false,"description":"The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.\r\rThe values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.","type":{"names":["Phaser.Point"]},"default":""},{"name":"health","access":"","virtual":false,"description":"The Game Objects health value. This is a handy property for setting and manipulating health on a Game Object.\r\rIt can be used in combination with the `damage` method or modified directly.","type":{"names":["number"]},"default":1},{"name":"maxHealth","access":"","virtual":false,"description":"The Game Objects maximum health value. This works in combination with the `heal` method to ensure\rthe health value never exceeds the maximum.","type":{"names":["number"]},"default":100},{"name":"damage","access":"","virtual":false,"description":"Damages the Game Object. This removes the given amount of health from the `health` property.\r\rIf health is taken below or is equal to zero then the `kill` method is called.","type":"","default":""},{"name":"setHealth","access":"","virtual":false,"description":"Sets the health property of the Game Object to the given amount.\rWill never exceed the `maxHealth` value.","type":"","default":""},{"name":"heal","access":"","virtual":false,"description":"Heal the Game Object. This adds the given amount of health to the `health` property.","type":"","default":""},{"name":"input","access":"","virtual":false,"description":"The Input Handler for this Game Object.\r\rBy default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.\r\rAfter you have done this, this property will be a reference to the Phaser InputHandler.","type":{"names":["Phaser.InputHandler","null"]},"default":""},{"name":"inputEnabled","access":"","virtual":false,"description":"By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created\rfor this Game Object and it will then start to process click / touch events and more.\r\rYou can then access the Input Handler via `this.input`.\r\rNote that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.\r\rIf you set this property to false it will stop the Input Handler from processing any more input events.\r\rIf you want to _temporarily_ disable input for a Game Object, then it's better to set\r`input.enabled = false`, as it won't reset any of the Input Handlers internal properties.\rYou can then toggle this back on as needed.","type":{"names":["boolean"]},"default":""},{"name":"checkWorldBounds","access":"","virtual":false,"description":"If this is set to `true` the Game Object checks if it is within the World bounds each frame. \r\rWhen it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.\r\rIf it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.\r\rIt also optionally kills the Game Object if `outOfBoundsKill` is `true`.\r\rWhen `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.\r\rThis is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,\ror you have tested performance and find it acceptable.","type":{"names":["boolean"]},"default":""},{"name":"outOfBoundsKill","access":"","virtual":false,"description":"If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.","type":{"names":["boolean"]},"default":""},{"name":"outOfCameraBoundsKill","access":"","virtual":false,"description":"If this and the `autoCull` property are both set to `true`, then the `kill` method\ris called as soon as the Game Object leaves the camera bounds.","type":{"names":["boolean"]},"default":""},{"name":"_outOfBoundsFired","access":"private","virtual":false,"description":"Internal state var.","type":{"names":["boolean"]},"default":""},{"name":"inWorld","access":"","virtual":false,"description":"Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.","type":{"names":["boolean"]},"default":""},{"name":"alive","access":"","virtual":false,"description":"A useful flag to control if the Game Object is alive or dead.\r\rThis is set automatically by the Health components `damage` method should the object run out of health.\rOr you can toggle it via your game code.\r\rThis property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates.\rHowever you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.","type":{"names":["boolean"]},"default":true},{"name":"lifespan","access":"","virtual":false,"description":"The lifespan allows you to give a Game Object a lifespan in milliseconds.\r\rOnce the Game Object is 'born' you can set this to a positive value.\r\rIt is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame.\rWhen it reaches zero it will call the `kill` method.\r\rVery handy for particles, bullets, collectibles, or any other short-lived entity.","type":{"names":["number"]},"default":""},{"name":"customRender","access":"private","virtual":false,"description":"Does this texture require a custom render call? (as set by BitmapData, Video, etc)","type":{"names":["boolean"]},"default":""},{"name":"_frame","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"frame","access":"","virtual":false,"description":"Gets or sets the current frame index of the texture being used to render this Game Object.\r\rTo change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use,\rfor example: `player.frame = 4`.\r\rIf the frame index given doesn't exist it will revert to the first frame found in the texture.\r\rIf you are using a texture atlas then you should use the `frameName` property instead.\r\rIf you wish to fully replace the texture being used see `loadTexture`.","type":{"names":["integer"]},"default":""},{"name":"frameName","access":"","virtual":false,"description":"Gets or sets the current frame name of the texture being used to render this Game Object.\r\rTo change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use, \rfor example: `player.frameName = \"idle\"`.\r\rIf the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.\r\rIf you are using a sprite sheet then you should use the `frame` property instead.\r\rIf you wish to fully replace the texture being used see `loadTexture`.","type":{"names":["string"]},"default":""},{"name":"body","access":"","virtual":false,"description":"`body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated \rproperties and methods via it.\r\rBy default Game Objects won't add themselves to any physics system and their `body` property will be `null`.\r\rTo enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object\rand `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.\r\rYou can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.\r\rImportant: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5, \rso the physics body is centered on the Game Object.\r\rIf you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.","type":{"names":["Phaser.Physics.Arcade.Body","Phaser.Physics.P2.Body","Phaser.Physics.Ninja.Body","null"]},"default":""},{"name":"smoothed","access":"","virtual":false,"description":"Enable or disable texture smoothing for this Game Object.\r\rIt only takes effect if the Game Object is using an image based texture.\r\rSmoothing is enabled by default.","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.Video","description":"A Video object that takes a previously loaded Video from the Phaser Cache and handles playback of it.\r\rAlternatively it takes a getUserMedia feed from an active webcam and streams the contents of that to\rthe Video instead (see `startMediaStream` method)\r\rThe video can then be applied to a Sprite as a texture. If multiple Sprites share the same Video texture and playback\rchanges (i.e. you pause the video, or seek to a new time) then this change will be seen across all Sprites simultaneously.\r\rDue to a bug in IE11 you cannot play a video texture to a Sprite in WebGL. For IE11 force Canvas mode.\r\rIf you need each Sprite to be able to play a video fully independently then you will need one Video object per Sprite.\rPlease understand the obvious performance implications of doing this, and the memory required to hold videos in RAM.\r\rOn some mobile browsers such as iOS Safari, you cannot play a video until the user has explicitly touched the screen.\rThis works in the same way as audio unlocking. Phaser will handle the touch unlocking for you, however unlike with audio\rit's worth noting that every single Video needs to be touch unlocked, not just the first one. You can use the `changeSource`\rmethod to try and work around this limitation, but see the method help for details.\r\rSmall screen devices, especially iPod and iPhone will launch the video in its own native video player,\routside of the Safari browser. There is no way to avoid this, it's a device imposed limitation.\r\rNote: On iOS if you need to detect when the user presses the 'Done' button (before the video ends)\rthen you need to add your own event listener","constructor":{"name":"Video","description":"A Video object that takes a previously loaded Video from the Phaser Cache and handles playback of it.\r\rAlternatively it takes a getUserMedia feed from an active webcam and streams the contents of that to\rthe Video instead (see `startMediaStream` method)\r\rThe video can then be applied to a Sprite as a texture. If multiple Sprites share the same Video texture and playback\rchanges (i.e. you pause the video, or seek to a new time) then this change will be seen across all Sprites simultaneously.\r\rDue to a bug in IE11 you cannot play a video texture to a Sprite in WebGL. For IE11 force Canvas mode.\r\rIf you need each Sprite to be able to play a video fully independently then you will need one Video object per Sprite.\rPlease understand the obvious performance implications of doing this, and the memory required to hold videos in RAM.\r\rOn some mobile browsers such as iOS Safari, you cannot play a video until the user has explicitly touched the screen.\rThis works in the same way as audio unlocking. Phaser will handle the touch unlocking for you, however unlike with audio\rit's worth noting that every single Video needs to be touch unlocked, not just the first one. You can use the `changeSource`\rmethod to try and work around this limitation, but see the method help for details.\r\rSmall screen devices, especially iPod and iPhone will launch the video in its own native video player,\routside of the Safari browser. There is no way to avoid this, it's a device imposed limitation.\r\rNote: On iOS if you need to detect when the user presses the 'Done' button (before the video ends)\rthen you need to add your own event listener","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"key","type":["string","null"],"description":"The key of the video file in the Phaser.Cache that this Video object will play. Set to `null` or leave undefined if you wish to use a webcam as the source. See `startMediaStream` to start webcam capture.","default":"","optional":true,"nullable":""},{"name":"url","type":["string","null"],"description":"If the video hasn't been loaded then you can provide a full URL to the file here (make sure to set key to null)","default":"","optional":true,"nullable":""}]},"functions":[{"name":"connectToMediaStream","description":"Connects to an external media stream for the webcam, rather than using a local one.","parameters":[{"name":"video","type":"HTMLVideoElement","description":"The HTML Video Element that the stream uses.","default":"","optional":"","nullable":""},{"name":"stream","type":"MediaStream","description":"The Video Stream data.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Video","description":"This Video object for method chaining."}},{"name":"startMediaStream","description":"Instead of playing a video file this method allows you to stream video data from an attached webcam.\r\rAs soon as this method is called the user will be prompted by their browser to \"Allow\" access to the webcam.\rIf they allow it the webcam feed is directed to this Video. Call `Video.play` to start the stream.\r\rIf they block the webcam the onError signal will be dispatched containing the NavigatorUserMediaError\ror MediaStreamError event.\r\rYou can optionally set a width and height for the stream. If set the input will be cropped to these dimensions.\rIf not given then as soon as the stream has enough data the video dimensions will be changed to match the webcam device.\rYou can listen for this with the onChangeSource signal.","parameters":[{"name":"captureAudio","type":"boolean","description":"Controls if audio should be captured along with video in the video stream.","default":"","optional":true,"nullable":""},{"name":"width","type":"integer","description":"The width is used to create the video stream. If not provided the video width will be set to the width of the webcam input source.","default":"","optional":true,"nullable":""},{"name":"height","type":"integer","description":"The height is used to create the video stream. If not provided the video height will be set to the height of the webcam input source.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Video","description":"This Video object for method chaining or false if the device doesn't support getUserMedia."}},{"name":"getUserMediaTimeout","description":"","parameters":[]},{"name":"getUserMediaError","description":"","parameters":[]},{"name":"getUserMediaSuccess","description":"","parameters":[]},{"name":"createVideoFromBlob","description":"Creates a new Video element from the given Blob. The Blob must contain the video data in the correct encoded format.\rThis method is typically called by the Phaser.Loader and Phaser.Cache for you, but is exposed publicly for convenience.","parameters":[{"name":"blob","type":"Blob","description":"The Blob containing the video data.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Video","description":"This Video object for method chaining."}},{"name":"createVideoFromURL","description":"Creates a new Video element from the given URL.","parameters":[{"name":"url","type":"string","description":"The URL of the video.","default":"","optional":"","nullable":""},{"name":"autoplay","type":"boolean","description":"Automatically start the video?","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Video","description":"This Video object for method chaining."}},{"name":"updateTexture","description":"Called automatically if the video source changes and updates the internal texture dimensions.\rThen dispatches the onChangeSource signal.","parameters":[{"name":"event","type":"object","description":"The event which triggered the texture update.","default":"","optional":true,"nullable":""},{"name":"width","type":"integer","description":"The new width of the video. If undefined `video.videoWidth` is used.","default":"","optional":true,"nullable":""},{"name":"height","type":"integer","description":"The new height of the video. If undefined `video.videoHeight` is used.","default":"","optional":true,"nullable":""}]},{"name":"complete","description":"Called when the video completes playback (reaches and ended state).\rDispatches the Video.onComplete signal.","parameters":[]},{"name":"play","description":"Starts this video playing.\r\rIf the video is already playing, or has been queued to play with `changeSource` then this method just returns.","parameters":[{"name":"loop","type":"boolean","description":"Should the video loop automatically when it reaches the end? Please note that at present some browsers (i.e. Chrome) do not support *seamless* video looping.","default":"","optional":true,"nullable":""},{"name":"playbackRate","type":"number","description":"The playback rate of the video. 1 is normal speed, 2 is x2 speed, and so on. You cannot set a negative playback rate.","default":1,"optional":true,"nullable":""}],"returns":{"type":"Phaser.Video","description":"This Video object for method chaining."}},{"name":"playHandler","description":"Called when the video starts to play. Updates the texture.","parameters":[]},{"name":"stop","description":"Stops the video playing.\r\rThis removes all locally set signals.\r\rIf you only wish to pause playback of the video, to resume at a later time, use `Video.paused = true` instead.\rIf the video hasn't finished downloading calling `Video.stop` will not abort the download. To do that you need to\rcall `Video.destroy` instead.\r\rIf you are using a video stream from a webcam then calling Stop will disconnect the MediaStream session and disable the webcam.","parameters":[],"returns":{"type":"Phaser.Video","description":"This Video object for method chaining."}},{"name":"add","description":"Updates the given Display Objects so they use this Video as their texture.\rThis will replace any texture they will currently have set.","parameters":[{"name":"object","type":["Phaser.Sprite","Array.<Phaser.Sprite>","Phaser.Image","Array.<Phaser.Image>"],"description":"Either a single Sprite/Image or an Array of Sprites/Images.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Video","description":"This Video object for method chaining."}},{"name":"addToWorld","description":"Creates a new Phaser.Image object, assigns this Video to be its texture, adds it to the world then returns it.","parameters":[{"name":"x","type":"number","description":"The x coordinate to place the Image at.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to place the Image at.","default":"","optional":true,"nullable":""},{"name":"anchorX","type":"number","description":"Set the x anchor point of the Image. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right.","default":"","optional":true,"nullable":""},{"name":"anchorY","type":"number","description":"Set the y anchor point of the Image. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right.","default":"","optional":true,"nullable":""},{"name":"scaleX","type":"number","description":"The horizontal scale factor of the Image. A value of 1 means no scaling. 2 would be twice the size, and so on.","default":1,"optional":true,"nullable":""},{"name":"scaleY","type":"number","description":"The vertical scale factor of the Image. A value of 1 means no scaling. 2 would be twice the size, and so on.","default":1,"optional":true,"nullable":""}],"returns":{"type":"Phaser.Image","description":"The newly added Image object."}},{"name":"render","description":"If the game is running in WebGL this will push the texture up to the GPU if it's dirty.\rThis is called automatically if the Video is being used by a Sprite, otherwise you need to remember to call it in your render function.\rIf you wish to suppress this functionality set Video.disableTextureUpload to `true`.","parameters":[]},{"name":"setMute","description":"Internal handler called automatically by the Video.mute setter.","parameters":[]},{"name":"unsetMute","description":"Internal handler called automatically by the Video.mute setter.","parameters":[]},{"name":"setPause","description":"Internal handler called automatically by the Video.paused setter.","parameters":[]},{"name":"setResume","description":"Internal handler called automatically by the Video.paused setter.","parameters":[]},{"name":"changeSource","description":"On some mobile browsers you cannot play a video until the user has explicitly touched the video to allow it.\rPhaser handles this via the `setTouchLock` method. However if you have 3 different videos, maybe an \"Intro\", \"Start\" and \"Game Over\"\rsplit into three different Video objects, then you will need the user to touch-unlock every single one of them.\r\rYou can avoid this by using just one Video object and simply changing the video source. Once a Video element is unlocked it remains\runlocked, even if the source changes. So you can use this to your benefit to avoid forcing the user to 'touch' the video yet again.\r\rAs you'd expect there are limitations. So far we've found that the videos need to be in the same encoding format and bitrate.\rThis method will automatically handle a change in video dimensions, but if you try swapping to a different bitrate we've found it\rcannot render the new video on iOS (desktop browsers cope better).\r\rWhen the video source is changed the video file is requested over the network. Listen for the `onChangeSource` signal to know\rwhen the new video has downloaded enough content to be able to be played. Previous settings such as the volume and loop state\rare adopted automatically by the new video.","parameters":[{"name":"src","type":"string","description":"The new URL to change the video.src to.","default":"","optional":"","nullable":""},{"name":"autoplay","type":"boolean","description":"Should the video play automatically after the source has been updated?","default":true,"optional":true,"nullable":""}],"returns":{"type":"Phaser.Video","description":"This Video object for method chaining."}},{"name":"checkVideoProgress","description":"Internal callback that monitors the download progress of a video after changing its source.","parameters":[]},{"name":"setTouchLock","description":"Sets the Input Manager touch callback to be Video.unlock.\rRequired for mobile video unlocking. Mostly just used internally.","parameters":[]},{"name":"unlock","description":"Enables the video on mobile devices, usually after the first touch.\rIf the SoundManager hasn't been unlocked then this will automatically unlock that as well.\rOnly one video can be pending unlock at any one time.","parameters":[]},{"name":"grab","description":"Grabs the current frame from the Video or Video Stream and renders it to the Video.snapshot BitmapData.\r\rYou can optionally set if the BitmapData should be cleared or not, the alpha and the blend mode of the draw.\r\rIf you need more advanced control over the grabbing them call `Video.snapshot.copy` directly with the same parameters as BitmapData.copy.","parameters":[{"name":"clear","type":"boolean","description":"Should the BitmapData be cleared before the Video is grabbed? Unless you are using alpha or a blend mode you can usually leave this set to false.","default":"","optional":true,"nullable":""},{"name":"alpha","type":"number","description":"The alpha that will be set on the video before drawing. A value between 0 (fully transparent) and 1, opaque.","default":1,"optional":true,"nullable":""},{"name":"blendMode","type":"string","description":"The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"A reference to the Video.snapshot BitmapData object for further method chaining."}},{"name":"removeVideoElement","description":"Removes the Video element from the DOM by calling parentNode.removeChild on itself.\rAlso removes the autoplay and src attributes and nulls the reference.","parameters":[]},{"name":"destroy","description":"Destroys the Video object. This calls `Video.stop` and then `Video.removeVideoElement`.\rIf any Sprites are using this Video as their texture it is up to you to manage those.","parameters":[]}],"members":[{"name":"game","access":"","virtual":false,"description":"A reference to the currently running game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"key","access":"","virtual":false,"description":"The key of the Video in the Cache, if stored there. Will be `null` if this Video is using the webcam instead.","type":{"names":["string"]},"default":"null"},{"name":"width","access":"","virtual":false,"description":"The width of the video in pixels.","type":{"names":["number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the video in pixels.","type":{"names":["number"]},"default":""},{"name":"type","access":"","virtual":false,"description":"The const type of this object.","type":{"names":["number"]},"default":""},{"name":"disableTextureUpload","access":"","virtual":false,"description":"If true this video will never send its image data to the GPU when its dirty flag is true. This only applies in WebGL.","type":{"names":["boolean"]},"default":""},{"name":"touchLocked","access":"","virtual":false,"description":"true if this video is currently locked awaiting a touch event. This happens on some mobile devices, such as iOS.","type":{"names":["boolean"]},"default":""},{"name":"onPlay","access":"","virtual":false,"description":"This signal is dispatched when the Video starts to play. It sends 3 parameters: a reference to the Video object, if the video is set to loop or not and the playback rate.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onChangeSource","access":"","virtual":false,"description":"This signal is dispatched if the Video source is changed. It sends 3 parameters: a reference to the Video object and the new width and height of the new video source.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onComplete","access":"","virtual":false,"description":"This signal is dispatched when the Video completes playback, i.e. enters an 'ended' state. On iOS specifically it also fires if the user hits the 'Done' button at any point during playback. Videos set to loop will never dispatch this signal.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onAccess","access":"","virtual":false,"description":"This signal is dispatched if the user allows access to their webcam.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onError","access":"","virtual":false,"description":"This signal is dispatched if an error occurs either getting permission to use the webcam (for a Video Stream) or when trying to play back a video file.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onTimeout","access":"","virtual":false,"description":"This signal is dispatched if when asking for permission to use the webcam no response is given within a the Video.timeout limit.\rThis may be because the user has picked `Not now` in the permissions window, or there is a delay in establishing the LocalMediaStream.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"timeout","access":"","virtual":false,"description":"The amount of ms allowed to elapsed before the Video.onTimeout signal is dispatched while waiting for webcam access.","type":{"names":["integer"]},"default":15000},{"name":"_timeOutID","access":"private","virtual":false,"description":"setTimeout ID.","type":{"names":["integer"]},"default":""},{"name":"video","access":"","virtual":false,"description":"The HTML Video Element that is added to the document.","type":{"names":["HTMLVideoElement"]},"default":""},{"name":"videoStream","access":"","virtual":false,"description":"The Video Stream data. Only set if this Video is streaming from the webcam via `startMediaStream`.","type":{"names":["MediaStream"]},"default":""},{"name":"isStreaming","access":"","virtual":false,"description":"Is there a streaming video source? I.e. from a webcam.","type":{"names":["boolean"]},"default":""},{"name":"retryLimit","access":"","virtual":false,"description":"When starting playback of a video Phaser will monitor its readyState using a setTimeout call.\rThe setTimeout happens once every `Video.retryInterval` ms. It will carry on monitoring the video\rstate in this manner until the `retryLimit` is reached and then abort.","type":{"names":["integer"]},"default":20},{"name":"retry","access":"","virtual":false,"description":"The current retry attempt.","type":{"names":["integer"]},"default":""},{"name":"retryInterval","access":"","virtual":false,"description":"The number of ms between each retry at monitoring the status of a downloading video.","type":{"names":["integer"]},"default":500},{"name":"_retryID","access":"private","virtual":false,"description":"The callback ID of the retry setTimeout.","type":{"names":["integer"]},"default":""},{"name":"_codeMuted","access":"private","virtual":false,"description":"Internal mute tracking var.","type":{"names":["boolean"]},"default":""},{"name":"_muted","access":"private","virtual":false,"description":"Internal mute tracking var.","type":{"names":["boolean"]},"default":""},{"name":"_codePaused","access":"private","virtual":false,"description":"Internal paused tracking var.","type":{"names":["boolean"]},"default":""},{"name":"_paused","access":"private","virtual":false,"description":"Internal paused tracking var.","type":{"names":["boolean"]},"default":""},{"name":"_pending","access":"private","virtual":false,"description":"Internal var tracking play pending.","type":{"names":["boolean"]},"default":""},{"name":"_pendingChangeSource","access":"private","virtual":false,"description":"Internal var tracking play pending.","type":{"names":["boolean"]},"default":""},{"name":"_autoplay","access":"private","virtual":false,"description":"Internal var tracking autoplay when changing source.","type":{"names":["boolean"]},"default":""},{"name":"_endCallback","access":"private","virtual":false,"description":"The addEventListener ended function.","type":{"names":["function"]},"default":""},{"name":"_playCallback","access":"private","virtual":false,"description":"The addEventListener playing function.","type":{"names":["function"]},"default":""},{"name":"texture","access":"","virtual":false,"description":"The PIXI.Texture.","type":{"names":["PIXI.Texture"]},"default":""},{"name":"textureFrame","access":"","virtual":false,"description":"The Frame this video uses for rendering.","type":{"names":["Phaser.Frame"]},"default":""},{"name":"snapshot","access":"","virtual":false,"description":"A snapshot grabbed from the video. This is initially black. Populate it by calling Video.grab().\rWhen called the BitmapData is updated with a grab taken from the current video playing or active video stream.\rIf Phaser has been compiled without BitmapData support this property will always be `null`.","type":{"names":["Phaser.BitmapData"]},"default":""},{"name":"currentTime","access":"","virtual":false,"description":"The current time of the video in seconds. If set the video will attempt to seek to that point in time.","type":{"names":["number"]},"default":""},{"name":"duration","access":"","virtual":false,"description":"The duration of the video in seconds.","type":{"names":["number"]},"default":""},{"name":"progress","access":"","virtual":false,"description":"The progress of this video. This is a value between 0 and 1, where 0 is the start and 1 is the end of the video.","type":{"names":["number"]},"default":""},{"name":"mute","access":"","virtual":false,"description":"Gets or sets the muted state of the Video.","type":{"names":["boolean"]},"default":""},{"name":"paused","access":"","virtual":false,"description":"Gets or sets the paused state of the Video.\rIf the video is still touch locked (such as on iOS devices) this call has no effect.","type":{"names":["boolean"]},"default":""},{"name":"volume","access":"","virtual":false,"description":"Gets or sets the volume of the Video, a value between 0 and 1. The value given is clamped to the range 0 to 1.","type":{"names":["number"]},"default":""},{"name":"playbackRate","access":"","virtual":false,"description":"Gets or sets the playback rate of the Video. This is the speed at which the video is playing.","type":{"names":["number"]},"default":""},{"name":"loop","access":"","virtual":false,"description":"Gets or sets if the Video is set to loop.\rPlease note that at present some browsers (i.e. Chrome) do not support *seamless* video looping.\rIf the video isn't yet set this will always return false.","type":{"names":["boolean"]},"default":""},{"name":"playing","access":"","virtual":false,"description":"True if the video is currently playing (and not paused or ended), otherwise false.","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.Circle","description":"Creates a new Circle object with the center coordinate specified by the x and y parameters and the diameter specified by the diameter parameter.\rIf you call this function without parameters, a circle with x, y, diameter and radius properties set to 0 is created.","constructor":{"name":"Circle","description":"Creates a new Circle object with the center coordinate specified by the x and y parameters and the diameter specified by the diameter parameter.\rIf you call this function without parameters, a circle with x, y, diameter and radius properties set to 0 is created.","parameters":[{"name":"x","type":"number","description":"The x coordinate of the center of the circle.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate of the center of the circle.","default":"","optional":true,"nullable":""},{"name":"diameter","type":"number","description":"The diameter of the circle.","default":"","optional":true,"nullable":""}]},"functions":[{"name":"circumference","description":"The circumference of the circle.","parameters":[],"returns":{"type":"number","description":"The circumference of the circle."}},{"name":"random","description":"Returns a uniformly distributed random point from anywhere within this Circle.","parameters":[{"name":"out","type":["Phaser.Point","object"],"description":"A Phaser.Point, or any object with public x/y properties, that the values will be set in.\r    If no object is provided a new Phaser.Point object will be created. In high performance areas avoid this by re-using an existing object.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"An object containing the random point in its `x` and `y` properties."}},{"name":"getBounds","description":"Returns the framing rectangle of the circle as a Phaser.Rectangle object.","parameters":[],"returns":{"type":"Phaser.Rectangle","description":"The bounds of the Circle."}},{"name":"setTo","description":"Sets the members of Circle to the specified values.","parameters":[{"name":"x","type":"number","description":"The x coordinate of the center of the circle.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate of the center of the circle.","default":"","optional":"","nullable":""},{"name":"diameter","type":"number","description":"The diameter of the circle.","default":"","optional":"","nullable":""}],"returns":{"type":"Circle","description":"This circle object."}},{"name":"copyFrom","description":"Copies the x, y and diameter properties from any given object to this Circle.","parameters":[{"name":"source","type":"any","description":"The object to copy from.","default":"","optional":"","nullable":""}],"returns":{"type":"Circle","description":"This Circle object."}},{"name":"copyTo","description":"Copies the x, y and diameter properties from this Circle to any given object.","parameters":[{"name":"dest","type":"any","description":"The object to copy to.","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"This dest object."}},{"name":"distance","description":"Returns the distance from the center of the Circle object to the given object\r(can be Circle, Point or anything with x/y properties)","parameters":[{"name":"dest","type":"object","description":"The target object. Must have visible x and y properties that represent the center of the object.","default":"","optional":"","nullable":""},{"name":"round","type":"boolean","description":"Round the distance to the nearest integer.","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The distance between this Point object and the destination Point object."}},{"name":"clone","description":"Returns a new Circle object with the same values for the x, y, width, and height properties as this Circle object.","parameters":[{"name":"output","type":"Phaser.Circle","description":"Optional Circle object. If given the values will be set into the object, otherwise a brand new Circle object will be created and returned.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Circle","description":"The cloned Circle object."}},{"name":"contains","description":"Return true if the given x/y coordinates are within this Circle object.","parameters":[{"name":"x","type":"number","description":"The X value of the coordinate to test.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The Y value of the coordinate to test.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the coordinates are within this circle, otherwise false."}},{"name":"circumferencePoint","description":"Returns a Point object containing the coordinates of a point on the circumference of the Circle based on the given angle.","parameters":[{"name":"angle","type":"number","description":"The angle in radians (unless asDegrees is true) to return the point from.","default":"","optional":"","nullable":""},{"name":"asDegrees","type":"boolean","description":"Is the given angle in radians (false) or degrees (true)?","default":"","optional":true,"nullable":""},{"name":"out","type":"Phaser.Point","description":"An optional Point object to put the result in to. If none specified a new Point object will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The Point object holding the result."}},{"name":"offset","description":"Adjusts the location of the Circle object, as determined by its center coordinate, by the specified amounts.","parameters":[{"name":"dx","type":"number","description":"Moves the x value of the Circle object by this amount.","default":"","optional":"","nullable":""},{"name":"dy","type":"number","description":"Moves the y value of the Circle object by this amount.","default":"","optional":"","nullable":""}],"returns":{"type":"Circle","description":"This Circle object."}},{"name":"offsetPoint","description":"Adjusts the location of the Circle object using a Point object as a parameter. This method is similar to the Circle.offset() method, except that it takes a Point object as a parameter.","parameters":[{"name":"point","type":"Point","description":"A Point object to use to offset this Circle object (or any valid object with exposed x and y properties).","default":"","optional":"","nullable":""}],"returns":{"type":"Circle","description":"This Circle object."}},{"name":"toString","description":"Returns a string representation of this object.","parameters":[],"returns":{"type":"string","description":"a string representation of the instance."}},{"name":"contains","description":"Return true if the given x/y coordinates are within the Circle object.","parameters":[{"name":"a","type":"Phaser.Circle","description":"The Circle to be checked.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The X value of the coordinate to test.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The Y value of the coordinate to test.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the coordinates are within this circle, otherwise false."}},{"name":"equals","description":"Determines whether the two Circle objects match. This method compares the x, y and diameter properties.","parameters":[{"name":"a","type":"Phaser.Circle","description":"The first Circle object.","default":"","optional":"","nullable":""},{"name":"b","type":"Phaser.Circle","description":"The second Circle object.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"A value of true if the object has exactly the same values for the x, y and diameter properties as this Circle object; otherwise false."}},{"name":"intersects","description":"Determines whether the two Circle objects intersect.\rThis method checks the radius distances between the two Circle objects to see if they intersect.","parameters":[{"name":"a","type":"Phaser.Circle","description":"The first Circle object.","default":"","optional":"","nullable":""},{"name":"b","type":"Phaser.Circle","description":"The second Circle object.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"A value of true if the specified object intersects with this Circle object; otherwise false."}},{"name":"circumferencePoint","description":"Returns a Point object containing the coordinates of a point on the circumference of the Circle based on the given angle.","parameters":[{"name":"a","type":"Phaser.Circle","description":"The first Circle object.","default":"","optional":"","nullable":""},{"name":"angle","type":"number","description":"The angle in radians (unless asDegrees is true) to return the point from.","default":"","optional":"","nullable":""},{"name":"asDegrees","type":"boolean","description":"Is the given angle in radians (false) or degrees (true)?","default":"","optional":true,"nullable":""},{"name":"out","type":"Phaser.Point","description":"An optional Point object to put the result in to. If none specified a new Point object will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The Point object holding the result."}},{"name":"intersectsRectangle","description":"Checks if the given Circle and Rectangle objects intersect.","parameters":[{"name":"c","type":"Phaser.Circle","description":"The Circle object to test.","default":"","optional":"","nullable":""},{"name":"r","type":"Phaser.Rectangle","description":"The Rectangle object to test.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the two objects intersect, otherwise false."}}],"members":[{"name":"x","access":"","virtual":false,"description":"The x coordinate of the center of the circle.","type":{"names":["number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The y coordinate of the center of the circle.","type":{"names":["number"]},"default":""},{"name":"_diameter","access":"private","virtual":false,"description":"The diameter of the circle.","type":{"names":["number"]},"default":""},{"name":"_radius","access":"private","virtual":false,"description":"The radius of the circle.","type":{"names":["number"]},"default":""},{"name":"type","access":"","virtual":false,"description":"The const type of this object.","type":{"names":["number"]},"default":""},{"name":"diameter","access":"","virtual":false,"description":"The largest distance between any two points on the circle. The same as the radius * 2. Gets or sets the diameter of the circle.","type":{"names":["number"]},"default":""},{"name":"radius","access":"","virtual":false,"description":"The length of a line extending from the center of the circle to any point on the circle itself. The same as half the diameter. Gets or sets the radius of the circle.","type":{"names":["number"]},"default":""},{"name":"left","access":"","virtual":false,"description":"The x coordinate of the leftmost point of the circle. Changing the left property of a Circle object has no effect on the x and y properties. However it does affect the diameter, whereas changing the x value does not affect the diameter property.","type":"","default":""},{"name":"right","access":"","virtual":false,"description":"The x coordinate of the rightmost point of the circle. Changing the right property of a Circle object has no effect on the x and y properties. However it does affect the diameter, whereas changing the x value does not affect the diameter property. Gets or sets the value of the rightmost point of the circle.","type":{"names":["number"]},"default":""},{"name":"top","access":"","virtual":false,"description":"The sum of the y minus the radius property. Changing the top property of a Circle object has no effect on the x and y properties, but does change the diameter. Gets or sets the top of the circle.","type":{"names":["number"]},"default":""},{"name":"bottom","access":"","virtual":false,"description":"The sum of the y and radius properties. Changing the bottom property of a Circle object has no effect on the x and y properties, but does change the diameter. Gets or sets the bottom of the circle.","type":{"names":["number"]},"default":""},{"name":"area","access":"","virtual":false,"description":"The area of this Circle.","type":{"names":["number"]},"default":""},{"name":"empty","access":"","virtual":false,"description":"Determines whether or not this Circle object is empty. Will return a value of true if the Circle objects diameter is less than or equal to 0; otherwise false.\rIf set to true it will reset all of the Circle objects properties to 0. A Circle object is empty if its diameter is less than or equal to 0. Gets or sets the empty state of the circle.","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.Ellipse","description":"Creates a Ellipse object. A curve on a plane surrounding two focal points.","constructor":{"name":"Ellipse","description":"Creates a Ellipse object. A curve on a plane surrounding two focal points.","parameters":[{"name":"x","type":"number","description":"The X coordinate of the upper-left corner of the framing rectangle of this ellipse.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The Y coordinate of the upper-left corner of the framing rectangle of this ellipse.","default":"","optional":true,"nullable":""},{"name":"width","type":"number","description":"The overall width of this ellipse.","default":"","optional":true,"nullable":""},{"name":"height","type":"number","description":"The overall height of this ellipse.","default":"","optional":true,"nullable":""}]},"functions":[{"name":"setTo","description":"Sets the members of the Ellipse to the specified values.","parameters":[{"name":"x","type":"number","description":"The X coordinate of the upper-left corner of the framing rectangle of this ellipse.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The Y coordinate of the upper-left corner of the framing rectangle of this ellipse.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The overall width of this ellipse.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The overall height of this ellipse.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Ellipse","description":"This Ellipse object."}},{"name":"getBounds","description":"Returns the framing rectangle of the ellipse as a Phaser.Rectangle object.","parameters":[],"returns":{"type":"Phaser.Rectangle","description":"The bounds of the Ellipse."}},{"name":"copyFrom","description":"Copies the x, y, width and height properties from any given object to this Ellipse.","parameters":[{"name":"source","type":"any","description":"The object to copy from.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Ellipse","description":"This Ellipse object."}},{"name":"copyTo","description":"Copies the x, y, width and height properties from this Ellipse to any given object.","parameters":[{"name":"dest","type":"any","description":"The object to copy to.","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"This dest object."}},{"name":"clone","description":"Returns a new Ellipse object with the same values for the x, y, width, and height properties as this Ellipse object.","parameters":[{"name":"output","type":"Phaser.Ellipse","description":"Optional Ellipse object. If given the values will be set into the object, otherwise a brand new Ellipse object will be created and returned.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Ellipse","description":"The cloned Ellipse object."}},{"name":"contains","description":"Return true if the given x/y coordinates are within this Ellipse object.","parameters":[{"name":"x","type":"number","description":"The X value of the coordinate to test.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The Y value of the coordinate to test.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the coordinates are within this ellipse, otherwise false."}},{"name":"random","description":"Returns a uniformly distributed random point from anywhere within this Ellipse.","parameters":[{"name":"out","type":["Phaser.Point","object"],"description":"A Phaser.Point, or any object with public x/y properties, that the values will be set in.\r    If no object is provided a new Phaser.Point object will be created. In high performance areas avoid this by re-using an existing object.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"An object containing the random point in its `x` and `y` properties."}},{"name":"toString","description":"Returns a string representation of this object.","parameters":[],"returns":{"type":"string","description":"A string representation of the instance."}},{"name":"contains","description":"Return true if the given x/y coordinates are within the Ellipse object.","parameters":[{"name":"a","type":"Phaser.Ellipse","description":"The Ellipse to be checked.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The X value of the coordinate to test.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The Y value of the coordinate to test.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the coordinates are within this ellipse, otherwise false."}}],"members":[{"name":"x","access":"","virtual":false,"description":"The X coordinate of the upper-left corner of the framing rectangle of this ellipse.","type":{"names":["number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The Y coordinate of the upper-left corner of the framing rectangle of this ellipse.","type":{"names":["number"]},"default":""},{"name":"width","access":"","virtual":false,"description":"The overall width of this ellipse.","type":{"names":["number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The overall height of this ellipse.","type":{"names":["number"]},"default":""},{"name":"type","access":"","virtual":false,"description":"The const type of this object.","type":{"names":["number"]},"default":""},{"name":"left","access":"","virtual":false,"description":"The left coordinate of the Ellipse. The same as the X coordinate.","type":"","default":""},{"name":"right","access":"","virtual":false,"description":"The x coordinate of the rightmost point of the Ellipse. Changing the right property of an Ellipse object has no effect on the x property, but does adjust the width. Gets or sets the value of the rightmost point of the ellipse.","type":{"names":["number"]},"default":""},{"name":"top","access":"","virtual":false,"description":"The top of the Ellipse. The same as its y property. Gets or sets the top of the ellipse.","type":{"names":["number"]},"default":""},{"name":"bottom","access":"","virtual":false,"description":"The sum of the y and height properties. Changing the bottom property of an Ellipse doesn't adjust the y property, but does change the height. Gets or sets the bottom of the ellipse.","type":{"names":["number"]},"default":""},{"name":"empty","access":"","virtual":false,"description":"Determines whether or not this Ellipse object is empty. Will return a value of true if the Ellipse objects dimensions are less than or equal to 0; otherwise false.\rIf set to true it will reset all of the Ellipse objects properties to 0. An Ellipse object is empty if its width or height is less than or equal to 0. Gets or sets the empty state of the ellipse.","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.Hermite","description":"A data representation of a Hermite Curve (see http://en.wikipedia.org/wiki/Cubic_Hermite_spline)\r\rA Hermite curve has a start and end point and tangent vectors for both of them.\rThe curve will always pass through the two control points and the shape of it is controlled\rby the length and direction of the tangent vectors.  At the control points the curve will\rbe facing exactly in the vector direction.\r\rAs these curves change speed (speed = distance between points separated by an equal change in\r't' value - see Hermite.getPoint) this class attempts to reduce the variation by pre-calculating\rthe `accuracy` number of points on the curve. The straight-line distances to these points are stored\rin the private 'points' array, and this information is used by Hermite.findT() to convert a pixel\rdistance along the curve into a 'time' value.\r\rHigher `accuracy` values will result in more even movement, but require more memory for the points\rlist. 5 works, but 10 seems to be an ideal value for the length of curves found in most games on\ra desktop screen. If you use very long curves (more than 400 pixels) you may need to increase\rthis value further.","constructor":{"name":"Hermite","description":"A data representation of a Hermite Curve (see http://en.wikipedia.org/wiki/Cubic_Hermite_spline)\r\rA Hermite curve has a start and end point and tangent vectors for both of them.\rThe curve will always pass through the two control points and the shape of it is controlled\rby the length and direction of the tangent vectors.  At the control points the curve will\rbe facing exactly in the vector direction.\r\rAs these curves change speed (speed = distance between points separated by an equal change in\r't' value - see Hermite.getPoint) this class attempts to reduce the variation by pre-calculating\rthe `accuracy` number of points on the curve. The straight-line distances to these points are stored\rin the private 'points' array, and this information is used by Hermite.findT() to convert a pixel\rdistance along the curve into a 'time' value.\r\rHigher `accuracy` values will result in more even movement, but require more memory for the points\rlist. 5 works, but 10 seems to be an ideal value for the length of curves found in most games on\ra desktop screen. If you use very long curves (more than 400 pixels) you may need to increase\rthis value further.","parameters":[{"name":"p1x","type":"number","description":"The x coordinate of the start of the curve.","default":"","optional":"","nullable":""},{"name":"p1y","type":"number","description":"The y coordinate of the start of the curve.","default":"","optional":"","nullable":""},{"name":"p2x","type":"number","description":"The x coordinate of the end of the curve.","default":"","optional":"","nullable":""},{"name":"p2y","type":"number","description":"The y coordinate of the end of the curve.","default":"","optional":"","nullable":""},{"name":"v1x","type":"number","description":"The x component of the tangent vector for the start of the curve.","default":"","optional":"","nullable":""},{"name":"v1y","type":"number","description":"The y component of the tangent vector for the start of the curve.","default":"","optional":"","nullable":""},{"name":"v2x","type":"number","description":"The x component of the tangent vector for the end of the curve.","default":"","optional":"","nullable":""},{"name":"v2y","type":"number","description":"The y component of the tangent vector for the end of the curve.","default":"","optional":"","nullable":""},{"name":"accuracy","type":"number","description":"The amount of points to pre-calculate on the curve.","default":10,"optional":true,"nullable":""}]},"functions":[{"name":"recalculate","description":"Performs the curve calculations.\r\rThis is called automatically if you change any of the curves public properties, such as `Hermite.p1x` or `Hermite.v2y`.\r\rIf you adjust any of the internal private values, then call this to update the points.","parameters":[],"returns":{"type":"Phaser.Hermite","description":"This object."}},{"name":"calculateEvenPoints","description":"Calculate a number of points along the curve, based on `Hermite.accuracy`, and stores them in the private `_points` array.","parameters":[],"returns":{"type":"number","description":"The total length of the curve approximated as straight line distances between the points."}},{"name":"findT","description":"Convert a distance along this curve into a `time` value which will be between 0 and 1.\r\rFor example if this curve has a length of 100 pixels then `findT(50)` would return `0.5`.","parameters":[{"name":"distance","type":"integer","description":"The distance into the curve in pixels. Should be a positive integer.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The time (`t`) value, a float between 0 and 1."}},{"name":"getX","description":"Get the X component of a point on the curve based on the `t` (time) value, which must be between 0 and 1.","parameters":[{"name":"t","type":"number","description":"The time value along the curve from which to extract a point. This is a value between 0 and 1, where 0 represents the start of the curve and 1 the end.","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The X component of a point on the curve based on the `t` (time) value."}},{"name":"getY","description":"Get the Y component of a point on the curve based on the `t` (time) value, which must be between 0 and 1.","parameters":[{"name":"t","type":"number","description":"The time value along the curve from which to extract a point. This is a value between 0 and 1, where 0 represents the start of the curve and 1 the end.","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The Y component of a point on the curve based on the `t` (time) value."}},{"name":"getPoint","description":"Get a point on the curve using the `t` (time) value, which must be between 0 and 1.","parameters":[{"name":"t","type":"number","description":"The time value along the curve from which to extract a point. This is a value between 0 and 1, where 0 represents the start of the curve and 1 the end.","default":"","optional":true,"nullable":""},{"name":"point","type":["Phaser.Point","Object"],"description":"An optional Phaser.Point, or Object containing public `x` and `y` properties. If given the resulting values will be stored in the Objects `x` and `y` properties. If omitted a new Phaser.Point object is created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"An Object with the x, y coordinate of the curve at the specified `t` value set in its `x` and `y` properties."}},{"name":"getPointWithDistance","description":"Get a point on the curve using the distance, in pixels, along the curve.","parameters":[{"name":"distance","type":"integer","description":"The distance along the curve to get the point from, given in pixels.","default":"","optional":true,"nullable":""},{"name":"point","type":["Phaser.Point","Object"],"description":"An optional Phaser.Point, or Object containing public `x` and `y` properties. If given the resulting values will be stored in the Objects `x` and `y` properties. If omitted a new Phaser.Point object is created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The point on the line at the specified 'distance' along the curve."}},{"name":"getAngle","description":"Calculate and return the angle, in radians, of the curves tangent based on time.","parameters":[{"name":"t","type":"number","description":"The `t` (time) value at which to find the angle. Must be between 0 and 1.","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The angle of the line at the specified `t` time value along the curve. The value is in radians."}},{"name":"getAngleWithDistance","description":"Calculate and return the angle, in radians, of the curves tangent at the given pixel distance along the curves length.","parameters":[{"name":"distance","type":"number","description":"The distance along the curve to get the angle from, in pixels.","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The angle of the line at the specified distance along the curve. The value is in radians."}},{"name":"getEntryTangent","description":"Get the angle of the curves entry point.","parameters":[{"name":"point","type":["Phaser.Point","Object"],"description":"The Phaser.Point object, or an Object with public `x` and `y` properties, in which the tangent vector values will be stored.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Point","description":"A Point object containing the tangent vector of this Hermite curve."}}],"members":[{"name":"_accuracy","access":"private","virtual":false,"description":"The amount of points to pre-calculate on the curve.","type":{"names":["number"]},"default":""},{"name":"_p1x","access":"private","virtual":false,"description":"The x coordinate of the start of the curve.","type":{"names":["number"]},"default":""},{"name":"_p1y","access":"private","virtual":false,"description":"The y coordinate of the start of the curve.","type":{"names":["number"]},"default":""},{"name":"_p2x","access":"private","virtual":false,"description":"The x coordinate of the end of the curve.","type":{"names":["number"]},"default":""},{"name":"_p2y","access":"private","virtual":false,"description":"The y coordinate of the end of the curve.","type":{"names":["number"]},"default":""},{"name":"_v1x","access":"private","virtual":false,"description":"The x component of the tangent vector for the start of the curve.","type":{"names":["number"]},"default":""},{"name":"_v1y","access":"private","virtual":false,"description":"The y component of the tangent vector for the start of the curve.","type":{"names":["number"]},"default":""},{"name":"_v2x","access":"private","virtual":false,"description":"The x component of the tangent vector for the end of the curve.","type":{"names":["number"]},"default":""},{"name":"_v2y","access":"private","virtual":false,"description":"The y component of the tangent vector for the end of the curve.","type":{"names":["number"]},"default":""},{"name":"_points","access":"private","virtual":false,"description":"A local array of cached points.","type":{"names":["array"]},"default":""},{"name":"_temp1","access":"private","virtual":false,"description":"A local cached Point object.","type":{"names":["Phaser.Point"]},"default":""},{"name":"_temp2","access":"private","virtual":false,"description":"A local cached Point object.","type":{"names":["Phaser.Point"]},"default":""},{"name":"accuracy","access":"","virtual":false,"description":"The amount of points to pre-calculate on the curve.","type":{"names":["number"]},"default":""},{"name":"p1x","access":"","virtual":false,"description":"The x coordinate of the start of the curve. Setting this value will recalculate the curve.","type":{"names":["number"]},"default":""},{"name":"p1y","access":"","virtual":false,"description":"The y coordinate of the start of the curve. Setting this value will recalculate the curve.","type":{"names":["number"]},"default":""},{"name":"p2x","access":"","virtual":false,"description":"The x coordinate of the end of the curve. Setting this value will recalculate the curve.","type":{"names":["number"]},"default":""},{"name":"p2y","access":"","virtual":false,"description":"The y coordinate of the end of the curve. Setting this value will recalculate the curve.","type":{"names":["number"]},"default":""},{"name":"v1x","access":"","virtual":false,"description":"The x component of the tangent vector for the start of the curve. Setting this value will recalculate the curve.","type":{"names":["number"]},"default":""},{"name":"v1y","access":"","virtual":false,"description":"The y component of the tangent vector for the start of the curve. Setting this value will recalculate the curve.","type":{"names":["number"]},"default":""},{"name":"v2x","access":"","virtual":false,"description":"The x component of the tangent vector for the end of the curve. Setting this value will recalculate the curve.","type":{"names":["number"]},"default":""},{"name":"v2y","access":"","virtual":false,"description":"The y component of the tangent vector for the end of the curve. Setting this value will recalculate the curve.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.Line","description":"Creates a new Line object with a start and an end point.","constructor":{"name":"Line","description":"Creates a new Line object with a start and an end point.","parameters":[{"name":"x1","type":"number","description":"The x coordinate of the start of the line.","default":"","optional":true,"nullable":""},{"name":"y1","type":"number","description":"The y coordinate of the start of the line.","default":"","optional":true,"nullable":""},{"name":"x2","type":"number","description":"The x coordinate of the end of the line.","default":"","optional":true,"nullable":""},{"name":"y2","type":"number","description":"The y coordinate of the end of the line.","default":"","optional":true,"nullable":""}]},"functions":[{"name":"setTo","description":"Sets the components of the Line to the specified values.","parameters":[{"name":"x1","type":"number","description":"The x coordinate of the start of the line.","default":"","optional":true,"nullable":""},{"name":"y1","type":"number","description":"The y coordinate of the start of the line.","default":"","optional":true,"nullable":""},{"name":"x2","type":"number","description":"The x coordinate of the end of the line.","default":"","optional":true,"nullable":""},{"name":"y2","type":"number","description":"The y coordinate of the end of the line.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Line","description":"This line object"}},{"name":"fromSprite","description":"Sets the line to match the x/y coordinates of the two given sprites.\rCan optionally be calculated from their center coordinates.","parameters":[{"name":"startSprite","type":"Phaser.Sprite","description":"The coordinates of this Sprite will be set to the Line.start point.","default":"","optional":"","nullable":""},{"name":"endSprite","type":"Phaser.Sprite","description":"The coordinates of this Sprite will be set to the Line.start point.","default":"","optional":"","nullable":""},{"name":"useCenter","type":"boolean","description":"If true it will use startSprite.centerX, if false startSprite.x.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Line","description":"This line object"}},{"name":"fromAngle","description":"Sets this line to start at the given `x` and `y` coordinates and for the segment to extend at `angle` for the given `length`.","parameters":[{"name":"x","type":"number","description":"The x coordinate of the start of the line.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate of the start of the line.","default":"","optional":"","nullable":""},{"name":"angle","type":"number","description":"The angle of the line in radians.","default":"","optional":"","nullable":""},{"name":"length","type":"number","description":"The length of the line in pixels.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Line","description":"This line object"}},{"name":"rotate","description":"Rotates the line by the amount specified in `angle`.\r\rRotation takes place from the center of the line.\rIf you wish to rotate around a different point see Line.rotateAround.\r\rIf you wish to rotate the ends of the Line then see Line.start.rotate or Line.end.rotate.","parameters":[{"name":"angle","type":"number","description":"The angle in radians (unless asDegrees is true) to rotate the line by.","default":"","optional":"","nullable":""},{"name":"asDegrees","type":"boolean","description":"Is the given angle in radians (false) or degrees (true)?","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Line","description":"This line object"}},{"name":"rotateAround","description":"Rotates the line by the amount specified in `angle`.\r\rRotation takes place around the coordinates given.","parameters":[{"name":"x","type":"number","description":"The x coordinate to offset the rotation from.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate to offset the rotation from.","default":"","optional":"","nullable":""},{"name":"angle","type":"number","description":"The angle in radians (unless asDegrees is true) to rotate the line by.","default":"","optional":"","nullable":""},{"name":"asDegrees","type":"boolean","description":"Is the given angle in radians (false) or degrees (true)?","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Line","description":"This line object"}},{"name":"intersects","description":"Checks for intersection between this line and another Line.\rIf asSegment is true it will check for segment intersection. If asSegment is false it will check for line intersection.\rReturns the intersection segment of AB and EF as a Point, or null if there is no intersection.","parameters":[{"name":"line","type":"Phaser.Line","description":"The line to check against this one.","default":"","optional":"","nullable":""},{"name":"asSegment","type":"boolean","description":"If true it will check for segment intersection, otherwise full line intersection.","default":true,"optional":true,"nullable":""},{"name":"result","type":"Phaser.Point","description":"A Point object to store the result in, if not given a new one will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The intersection segment of the two lines as a Point, or null if there is no intersection."}},{"name":"reflect","description":"Returns the reflected angle between two lines.\rThis is the outgoing angle based on the angle of this line and the normalAngle of the given line.","parameters":[{"name":"line","type":"Phaser.Line","description":"The line to reflect off this line.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The reflected angle in radians."}},{"name":"midPoint","description":"Returns a Point object where the x and y values correspond to the center (or midpoint) of the Line segment.","parameters":[{"name":"out","type":"Phaser.Point","description":"A Phaser.Point object into which the result will be populated. If not given a new Point object is created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"A Phaser.Point object with the x and y values set to the center of the line segment."}},{"name":"centerOn","description":"Centers this Line on the given coordinates.\r\rThe line is centered by positioning the start and end points so that the lines midpoint matches\rthe coordinates given.","parameters":[{"name":"x","type":"number","description":"The x position to center the line on.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y position to center the line on.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Line","description":"This line object"}},{"name":"pointOnLine","description":"Tests if the given coordinates fall on this line. See pointOnSegment to test against just the line segment.","parameters":[{"name":"x","type":"number","description":"The line to check against this one.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The line to check against this one.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the point is on the line, false if not."}},{"name":"pointOnSegment","description":"Tests if the given coordinates fall on this line and within the segment. See pointOnLine to test against just the line.","parameters":[{"name":"x","type":"number","description":"The line to check against this one.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The line to check against this one.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the point is on the line and segment, false if not."}},{"name":"random","description":"Picks a random point from anywhere on the Line segment and returns it.","parameters":[{"name":"out","type":["Phaser.Point","object"],"description":"A Phaser.Point, or any object with public x/y properties, that the values will be set in.\r    If no object is provided a new Phaser.Point object will be created. In high performance areas avoid this by re-using an object.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"An object containing the random point in its `x` and `y` properties."}},{"name":"coordinatesOnLine","description":"Using Bresenham's line algorithm this will return an array of all coordinates on this line.\rThe start and end points are rounded before this runs as the algorithm works on integers.","parameters":[{"name":"stepRate","type":"number","description":"How many steps will we return? 1 = every coordinate on the line, 2 = every other coordinate, etc.","default":1,"optional":true,"nullable":""},{"name":"results","type":"array","description":"The array to store the results in. If not provided a new one will be generated.","default":"","optional":true,"nullable":""}],"returns":{"type":"array","description":"An array of coordinates."}},{"name":"clone","description":"Returns a new Line object with the same values for the start and end properties as this Line object.","parameters":[{"name":"output","type":"Phaser.Line","description":"Optional Line object. If given the values will be set into the object, otherwise a brand new Line object will be created and returned.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Line","description":"The cloned Line object."}},{"name":"intersectsPoints","description":"Checks for intersection between two lines as defined by the given start and end points.\rIf asSegment is true it will check for line segment intersection. If asSegment is false it will check for line intersection.\rReturns the intersection segment of AB and EF as a Point, or null if there is no intersection.\rAdapted from code by Keith Hair","parameters":[{"name":"a","type":"Phaser.Point","description":"The start of the first Line to be checked.","default":"","optional":"","nullable":""},{"name":"b","type":"Phaser.Point","description":"The end of the first line to be checked.","default":"","optional":"","nullable":""},{"name":"e","type":"Phaser.Point","description":"The start of the second Line to be checked.","default":"","optional":"","nullable":""},{"name":"f","type":"Phaser.Point","description":"The end of the second line to be checked.","default":"","optional":"","nullable":""},{"name":"asSegment","type":"boolean","description":"If true it will check for segment intersection, otherwise full line intersection.","default":true,"optional":true,"nullable":""},{"name":"result","type":["Phaser.Point","object"],"description":"A Point object to store the result in, if not given a new one will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The intersection segment of the two lines as a Point, or null if there is no intersection."}},{"name":"intersects","description":"Checks for intersection between two lines.\rIf asSegment is true it will check for segment intersection.\rIf asSegment is false it will check for line intersection.\rReturns the intersection segment of AB and EF as a Point, or null if there is no intersection.\rAdapted from code by Keith Hair","parameters":[{"name":"a","type":"Phaser.Line","description":"The first Line to be checked.","default":"","optional":"","nullable":""},{"name":"b","type":"Phaser.Line","description":"The second Line to be checked.","default":"","optional":"","nullable":""},{"name":"asSegment","type":"boolean","description":"If true it will check for segment intersection, otherwise full line intersection.","default":true,"optional":true,"nullable":""},{"name":"result","type":"Phaser.Point","description":"A Point object to store the result in, if not given a new one will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The intersection segment of the two lines as a Point, or null if there is no intersection."}},{"name":"intersectsRectangle","description":"Checks for intersection between the Line and a Rectangle shape, or a rectangle-like\robject, with public `x`, `y`, `right` and `bottom` properties, such as a Sprite or Body.\r\rAn intersection is considered valid if:\r\rThe line starts within or ends within the rectangle; or\rThe line segment intersects one of the 4 rectangle edges; and\rThe line has a non-zero length; and\rThe rectangle is not empty.\r\rFor the purposes of this function rectangles are considered 'solid'.","parameters":[{"name":"line","type":"Phaser.Line","description":"The line to check for intersection with.","default":"","optional":"","nullable":""},{"name":"rect","type":["Phaser.Rectangle","object"],"description":"The rectangle, or rectangle-like object, to check for intersection with.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the line intersects with the rectangle edges, or starts or ends within the rectangle."}},{"name":"reflect","description":"Returns the reflected angle between two lines.\rThis is the outgoing angle based on the angle of Line 1 and the normalAngle of Line 2.","parameters":[{"name":"a","type":"Phaser.Line","description":"The base line.","default":"","optional":"","nullable":""},{"name":"b","type":"Phaser.Line","description":"The line to be reflected from the base line.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The reflected angle in radians."}}],"members":[{"name":"start","access":"","virtual":false,"description":"The start point of the line.","type":{"names":["Phaser.Point"]},"default":""},{"name":"end","access":"","virtual":false,"description":"The end point of the line.","type":{"names":["Phaser.Point"]},"default":""},{"name":"type","access":"","virtual":false,"description":"The const type of this object.","type":{"names":["number"]},"default":""},{"name":"length","access":"","virtual":false,"description":"Gets the length of the line segment.","type":{"names":["number"]},"default":""},{"name":"angle","access":"","virtual":false,"description":"Gets the angle of the line in radians.","type":{"names":["number"]},"default":""},{"name":"slope","access":"","virtual":false,"description":"Gets the slope of the line (y/x).","type":{"names":["number"]},"default":""},{"name":"perpSlope","access":"","virtual":false,"description":"Gets the perpendicular slope of the line (x/y).","type":{"names":["number"]},"default":""},{"name":"x","access":"","virtual":false,"description":"Gets the x coordinate of the top left of the bounds around this line.","type":{"names":["number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"Gets the y coordinate of the top left of the bounds around this line.","type":{"names":["number"]},"default":""},{"name":"left","access":"","virtual":false,"description":"Gets the left-most point of this line.","type":{"names":["number"]},"default":""},{"name":"right","access":"","virtual":false,"description":"Gets the right-most point of this line.","type":{"names":["number"]},"default":""},{"name":"top","access":"","virtual":false,"description":"Gets the top-most point of this line.","type":{"names":["number"]},"default":""},{"name":"bottom","access":"","virtual":false,"description":"Gets the bottom-most point of this line.","type":{"names":["number"]},"default":""},{"name":"width","access":"","virtual":false,"description":"Gets the width of this bounds of this line.","type":{"names":["number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"Gets the height of this bounds of this line.","type":{"names":["number"]},"default":""},{"name":"normalX","access":"","virtual":false,"description":"Gets the x component of the left-hand normal of this line.","type":{"names":["number"]},"default":""},{"name":"normalY","access":"","virtual":false,"description":"Gets the y component of the left-hand normal of this line.","type":{"names":["number"]},"default":""},{"name":"normalAngle","access":"","virtual":false,"description":"Gets the angle in radians of the normal of this line (line.angle - 90 degrees.)","type":{"names":["number"]},"default":""}]},{"name":"Phaser.Matrix","description":"The Matrix is a 3x3 matrix mostly used for display transforms within the renderer.\r\rIt is represented like so:\r\r| a | b | tx |\r| c | d | ty |\r| 0 | 0 | 1 |","constructor":{"name":"Matrix","description":"The Matrix is a 3x3 matrix mostly used for display transforms within the renderer.\r\rIt is represented like so:\r\r| a | b | tx |\r| c | d | ty |\r| 0 | 0 | 1 |","parameters":[{"name":"a","type":"number","description":"Horizontal scaling","default":1,"optional":true,"nullable":""},{"name":"b","type":"number","description":"Horizontal skewing","default":"","optional":true,"nullable":""},{"name":"c","type":"number","description":"Vertical skewing","default":"","optional":true,"nullable":""},{"name":"d","type":"number","description":"Vertical scaling","default":1,"optional":true,"nullable":""},{"name":"tx","type":"number","description":"Horizontal translation","default":"","optional":true,"nullable":""},{"name":"ty","type":"number","description":"Vertical translation","default":"","optional":true,"nullable":""}]},"functions":[{"name":"fromArray","description":"Sets the values of this Matrix to the values in the given array.\r\rThe Array elements should be set as follows:\r\ra = array[0]\rb = array[1]\rc = array[3]\rd = array[4]\rtx = array[2]\rty = array[5]","parameters":[{"name":"array","type":"Array","description":"The array to copy from.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Matrix","description":"This Matrix object."}},{"name":"setTo","description":"Sets the values of this Matrix to the given values.","parameters":[{"name":"a","type":"number","description":"Horizontal scaling","default":"","optional":"","nullable":""},{"name":"b","type":"number","description":"Horizontal skewing","default":"","optional":"","nullable":""},{"name":"c","type":"number","description":"Vertical skewing","default":"","optional":"","nullable":""},{"name":"d","type":"number","description":"Vertical scaling","default":"","optional":"","nullable":""},{"name":"tx","type":"number","description":"Horizontal translation","default":"","optional":"","nullable":""},{"name":"ty","type":"number","description":"Vertical translation","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Matrix","description":"This Matrix object."}},{"name":"clone","description":"Creates a new Matrix object based on the values of this Matrix.\rIf you provide the output parameter the values of this Matrix will be copied over to it.\rIf the output parameter is blank a new Matrix object will be created.","parameters":[{"name":"output","type":"Phaser.Matrix","description":"If provided the values of this Matrix will be copied to it, otherwise a new Matrix object is created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Matrix","description":"A clone of this Matrix."}},{"name":"copyTo","description":"Copies the properties from this Matrix to the given Matrix.","parameters":[{"name":"matrix","type":"Phaser.Matrix","description":"The Matrix to copy from.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Matrix","description":"The destination Matrix object."}},{"name":"copyFrom","description":"Copies the properties from the given Matrix into this Matrix.","parameters":[{"name":"matrix","type":"Phaser.Matrix","description":"The Matrix to copy from.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Matrix","description":"This Matrix object."}},{"name":"toArray","description":"Creates a Float32 Array with values populated from this Matrix object.","parameters":[{"name":"transpose","type":"boolean","description":"Whether the values in the array are transposed or not.","default":"","optional":true,"nullable":""},{"name":"array","type":"Float32Array","description":"If provided the values will be set into this array, otherwise a new Float32Array is created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Float32Array","description":"The newly created array which contains the matrix."}},{"name":"apply","description":"Get a new position with the current transformation applied.\r\rCan be used to go from a childs coordinate space to the world coordinate space (e.g. rendering)","parameters":[{"name":"pos","type":"Phaser.Point","description":"The origin Point.","default":"","optional":"","nullable":""},{"name":"newPos","type":"Phaser.Point","description":"The point that the new position is assigned to. This can be same as input point.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The new point, transformed through this matrix."}},{"name":"applyInverse","description":"Get a new position with the inverse of the current transformation applied.\r\rCan be used to go from the world coordinate space to a childs coordinate space. (e.g. input)","parameters":[{"name":"pos","type":"Phaser.Point","description":"The origin Point.","default":"","optional":"","nullable":""},{"name":"newPos","type":"Phaser.Point","description":"The point that the new position is assigned to. This can be same as input point.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The new point, inverse transformed through this matrix."}},{"name":"translate","description":"Translates the matrix on the x and y.\rThis is the same as Matrix.tx += x.","parameters":[{"name":"x","type":"number","description":"The x value to translate on.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y value to translate on.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Matrix","description":"This Matrix object."}},{"name":"scale","description":"Applies a scale transformation to this matrix.","parameters":[{"name":"x","type":"number","description":"The amount to scale horizontally.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The amount to scale vertically.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Matrix","description":"This Matrix object."}},{"name":"rotate","description":"Applies a rotation transformation to this matrix.","parameters":[{"name":"angle","type":"number","description":"The angle to rotate by, given in radians.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Matrix","description":"This Matrix object."}},{"name":"append","description":"Appends the given Matrix to this Matrix.","parameters":[{"name":"matrix","type":"Phaser.Matrix","description":"The matrix to append to this one.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Matrix","description":"This Matrix object."}},{"name":"identity","description":"Resets this Matrix to an identity (default) matrix.","parameters":[],"returns":{"type":"Phaser.Matrix","description":"This Matrix object."}}],"members":[{"name":"a","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":"1"},{"name":"b","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":"0"},{"name":"c","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":"0"},{"name":"d","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":"1"},{"name":"tx","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":"0"},{"name":"ty","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":"0"},{"name":"type","access":"","virtual":false,"description":"The const type of this object.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.Point","description":"A Point object represents a location in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis.\rThe following code creates a point at (0,0):\r`var myPoint = new Phaser.Point();`\rYou can also use them as 2D Vectors and you'll find different vector related methods in this class.","constructor":{"name":"Point","description":"A Point object represents a location in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis.\rThe following code creates a point at (0,0):\r`var myPoint = new Phaser.Point();`\rYou can also use them as 2D Vectors and you'll find different vector related methods in this class.","parameters":[{"name":"x","type":"number","description":"The horizontal position of this Point.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The vertical position of this Point.","default":"","optional":true,"nullable":""}]},"functions":[{"name":"copyFrom","description":"Copies the x and y properties from any given object to this Point.","parameters":[{"name":"source","type":"any","description":"The object to copy from.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Point","description":"This Point object."}},{"name":"invert","description":"Inverts the x and y values of this Point","parameters":[],"returns":{"type":"Phaser.Point","description":"This Point object."}},{"name":"setTo","description":"Sets the `x` and `y` values of this Point object to the given values.\rIf you omit the `y` value then the `x` value will be applied to both, for example:\r`Point.setTo(2)` is the same as `Point.setTo(2, 2)`","parameters":[{"name":"x","type":"number","description":"The horizontal value of this point.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The vertical value of this point. If not given the x value will be used in its place.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"This Point object. Useful for chaining method calls."}},{"name":"set","description":"Sets the `x` and `y` values of this Point object to the given values.\rIf you omit the `y` value then the `x` value will be applied to both, for example:\r`Point.set(2)` is the same as `Point.set(2, 2)`","parameters":[{"name":"x","type":"number","description":"The horizontal value of this point.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The vertical value of this point. If not given the x value will be used in its place.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"This Point object. Useful for chaining method calls."}},{"name":"add","description":"Adds the given x and y values to this Point.","parameters":[{"name":"x","type":"number","description":"The value to add to Point.x.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The value to add to Point.y.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Point","description":"This Point object. Useful for chaining method calls."}},{"name":"subtract","description":"Subtracts the given x and y values from this Point.","parameters":[{"name":"x","type":"number","description":"The value to subtract from Point.x.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The value to subtract from Point.y.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Point","description":"This Point object. Useful for chaining method calls."}},{"name":"multiply","description":"Multiplies Point.x and Point.y by the given x and y values. Sometimes known as `Scale`.","parameters":[{"name":"x","type":"number","description":"The value to multiply Point.x by.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The value to multiply Point.x by.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Point","description":"This Point object. Useful for chaining method calls."}},{"name":"divide","description":"Divides Point.x and Point.y by the given x and y values.","parameters":[{"name":"x","type":"number","description":"The value to divide Point.x by.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The value to divide Point.x by.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Point","description":"This Point object. Useful for chaining method calls."}},{"name":"clampX","description":"Clamps the x value of this Point to be between the given min and max.","parameters":[{"name":"min","type":"number","description":"The minimum value to clamp this Point to.","default":"","optional":"","nullable":""},{"name":"max","type":"number","description":"The maximum value to clamp this Point to.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Point","description":"This Point object."}},{"name":"clampY","description":"Clamps the y value of this Point to be between the given min and max","parameters":[{"name":"min","type":"number","description":"The minimum value to clamp this Point to.","default":"","optional":"","nullable":""},{"name":"max","type":"number","description":"The maximum value to clamp this Point to.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Point","description":"This Point object."}},{"name":"clamp","description":"Clamps this Point object values to be between the given min and max.","parameters":[{"name":"min","type":"number","description":"The minimum value to clamp this Point to.","default":"","optional":"","nullable":""},{"name":"max","type":"number","description":"The maximum value to clamp this Point to.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Point","description":"This Point object."}},{"name":"clone","description":"Creates a copy of the given Point.","parameters":[{"name":"output","type":"Phaser.Point","description":"Optional Point object. If given the values will be set into this object, otherwise a brand new Point object will be created and returned.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The new Point object."}},{"name":"copyTo","description":"Copies the x and y properties from this Point to any given object.","parameters":[{"name":"dest","type":"any","description":"The object to copy to.","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"The dest object."}},{"name":"distance","description":"Returns the distance of this Point object to the given object (can be a Circle, Point or anything with x/y properties)","parameters":[{"name":"dest","type":"object","description":"The target object. Must have visible x and y properties that represent the center of the object.","default":"","optional":"","nullable":""},{"name":"round","type":"boolean","description":"Round the distance to the nearest integer (default false).","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The distance between this Point object and the destination Point object."}},{"name":"equals","description":"Determines whether the given objects x/y values are equal to this Point object.","parameters":[{"name":"a","type":["Phaser.Point","any"],"description":"The object to compare with this Point.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"A value of true if the x and y points are equal, otherwise false."}},{"name":"angle","description":"Returns the angle between this Point object and another object with public x and y properties.","parameters":[{"name":"a","type":["Phaser.Point","any"],"description":"The object to get the angle from this Point to.","default":"","optional":"","nullable":""},{"name":"asDegrees","type":"boolean","description":"Is the given angle in radians (false) or degrees (true)?","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The angle between the two objects."}},{"name":"rotate","description":"Rotates this Point around the x/y coordinates given to the desired angle.","parameters":[{"name":"x","type":"number","description":"The x coordinate of the anchor point.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate of the anchor point.","default":"","optional":"","nullable":""},{"name":"angle","type":"number","description":"The angle in radians (unless asDegrees is true) to rotate the Point to.","default":"","optional":"","nullable":""},{"name":"asDegrees","type":"boolean","description":"Is the given angle in radians (false) or degrees (true)?","default":"","optional":true,"nullable":""},{"name":"distance","type":"number","description":"An optional distance constraint between the Point and the anchor.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The modified point object."}},{"name":"getMagnitude","description":"Calculates the length of the Point object.","parameters":[],"returns":{"type":"number","description":"The length of the Point."}},{"name":"getMagnitudeSq","description":"Calculates the length squared of the Point object.","parameters":[],"returns":{"type":"number","description":"The length ^ 2 of the Point."}},{"name":"setMagnitude","description":"Alters the length of the Point without changing the direction.","parameters":[{"name":"magnitude","type":"number","description":"The desired magnitude of the resulting Point.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Point","description":"This Point object."}},{"name":"normalize","description":"Alters the Point object so that its length is 1, but it retains the same direction.","parameters":[],"returns":{"type":"Phaser.Point","description":"This Point object."}},{"name":"limit","description":"Alters the Point object so it's magnitude is at most the max value.","parameters":[{"name":"max","type":"number","description":"The maximum magnitude for the Point.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Point","description":"This Point object."}},{"name":"isZero","description":"Determine if this point is at 0,0.","parameters":[],"returns":{"type":"boolean","description":"True if this Point is 0,0, otherwise false."}},{"name":"dot","description":"The dot product of this and another Point object.","parameters":[{"name":"a","type":"Phaser.Point","description":"The Point object to get the dot product combined with this Point.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The result."}},{"name":"cross","description":"The cross product of this and another Point object.","parameters":[{"name":"a","type":"Phaser.Point","description":"The Point object to get the cross product combined with this Point.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The result."}},{"name":"perp","description":"Make this Point perpendicular (90 degrees rotation)","parameters":[],"returns":{"type":"Phaser.Point","description":"This Point object."}},{"name":"rperp","description":"Make this Point perpendicular (-90 degrees rotation)","parameters":[],"returns":{"type":"Phaser.Point","description":"This Point object."}},{"name":"normalRightHand","description":"Right-hand normalize (make unit length) this Point.","parameters":[],"returns":{"type":"Phaser.Point","description":"This Point object."}},{"name":"floor","description":"Math.floor() both the x and y properties of this Point.","parameters":[],"returns":{"type":"Phaser.Point","description":"This Point object."}},{"name":"ceil","description":"Math.ceil() both the x and y properties of this Point.","parameters":[],"returns":{"type":"Phaser.Point","description":"This Point object."}},{"name":"toString","description":"Returns a string representation of this object.","parameters":[],"returns":{"type":"string","description":"A string representation of the instance."}},{"name":"add","description":"Adds the coordinates of two points together to create a new point.","parameters":[{"name":"a","type":"Phaser.Point","description":"The first Point object.","default":"","optional":"","nullable":""},{"name":"b","type":"Phaser.Point","description":"The second Point object.","default":"","optional":"","nullable":""},{"name":"out","type":"Phaser.Point","description":"Optional Point to store the value in, if not supplied a new Point object will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The new Point object."}},{"name":"subtract","description":"Subtracts the coordinates of two points to create a new point.","parameters":[{"name":"a","type":"Phaser.Point","description":"The first Point object.","default":"","optional":"","nullable":""},{"name":"b","type":"Phaser.Point","description":"The second Point object.","default":"","optional":"","nullable":""},{"name":"out","type":"Phaser.Point","description":"Optional Point to store the value in, if not supplied a new Point object will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The new Point object."}},{"name":"multiply","description":"Multiplies the coordinates of two points to create a new point.","parameters":[{"name":"a","type":"Phaser.Point","description":"The first Point object.","default":"","optional":"","nullable":""},{"name":"b","type":"Phaser.Point","description":"The second Point object.","default":"","optional":"","nullable":""},{"name":"out","type":"Phaser.Point","description":"Optional Point to store the value in, if not supplied a new Point object will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The new Point object."}},{"name":"divide","description":"Divides the coordinates of two points to create a new point.","parameters":[{"name":"a","type":"Phaser.Point","description":"The first Point object.","default":"","optional":"","nullable":""},{"name":"b","type":"Phaser.Point","description":"The second Point object.","default":"","optional":"","nullable":""},{"name":"out","type":"Phaser.Point","description":"Optional Point to store the value in, if not supplied a new Point object will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The new Point object."}},{"name":"equals","description":"Determines whether the two given Point objects are equal. They are considered equal if they have the same x and y values.","parameters":[{"name":"a","type":"Phaser.Point","description":"The first Point object.","default":"","optional":"","nullable":""},{"name":"b","type":"Phaser.Point","description":"The second Point object.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"A value of true if the Points are equal, otherwise false."}},{"name":"angle","description":"Returns the angle between two Point objects.","parameters":[{"name":"a","type":"Phaser.Point","description":"The first Point object.","default":"","optional":"","nullable":""},{"name":"b","type":"Phaser.Point","description":"The second Point object.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The angle between the two Points."}},{"name":"negative","description":"Creates a negative Point.","parameters":[{"name":"a","type":"Phaser.Point","description":"The first Point object.","default":"","optional":"","nullable":""},{"name":"out","type":"Phaser.Point","description":"Optional Point to store the value in, if not supplied a new Point object will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The new Point object."}},{"name":"multiplyAdd","description":"Adds two 2D Points together and multiplies the result by the given scalar.","parameters":[{"name":"a","type":"Phaser.Point","description":"The first Point object.","default":"","optional":"","nullable":""},{"name":"b","type":"Phaser.Point","description":"The second Point object.","default":"","optional":"","nullable":""},{"name":"s","type":"number","description":"The scaling value.","default":"","optional":"","nullable":""},{"name":"out","type":"Phaser.Point","description":"Optional Point to store the value in, if not supplied a new Point object will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The new Point object."}},{"name":"interpolate","description":"Interpolates the two given Points, based on the `f` value (between 0 and 1) and returns a new Point.","parameters":[{"name":"a","type":"Phaser.Point","description":"The first Point object.","default":"","optional":"","nullable":""},{"name":"b","type":"Phaser.Point","description":"The second Point object.","default":"","optional":"","nullable":""},{"name":"f","type":"number","description":"The level of interpolation between the two points. Indicates where the new point will be, along the line between pt1 and pt2. If f=1, pt1 is returned; if f=0, pt2 is returned.","default":"","optional":"","nullable":""},{"name":"out","type":"Phaser.Point","description":"Optional Point to store the value in, if not supplied a new Point object will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The new Point object."}},{"name":"perp","description":"Return a perpendicular vector (90 degrees rotation)","parameters":[{"name":"a","type":"Phaser.Point","description":"The Point object.","default":"","optional":"","nullable":""},{"name":"out","type":"Phaser.Point","description":"Optional Point to store the value in, if not supplied a new Point object will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The new Point object."}},{"name":"rperp","description":"Return a perpendicular vector (-90 degrees rotation)","parameters":[{"name":"a","type":"Phaser.Point","description":"The Point object.","default":"","optional":"","nullable":""},{"name":"out","type":"Phaser.Point","description":"Optional Point to store the value in, if not supplied a new Point object will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The new Point object."}},{"name":"distance","description":"Returns the euclidian distance of this Point object to the given object (can be a Circle, Point or anything with x/y properties).","parameters":[{"name":"a","type":"object","description":"The target object. Must have visible x and y properties that represent the center of the object.","default":"","optional":"","nullable":""},{"name":"b","type":"object","description":"The target object. Must have visible x and y properties that represent the center of the object.","default":"","optional":"","nullable":""},{"name":"round","type":"boolean","description":"Round the distance to the nearest integer.","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The distance between this Point object and the destination Point object."}},{"name":"project","description":"Project two Points onto another Point.","parameters":[{"name":"a","type":"Phaser.Point","description":"The first Point object.","default":"","optional":"","nullable":""},{"name":"b","type":"Phaser.Point","description":"The second Point object.","default":"","optional":"","nullable":""},{"name":"out","type":"Phaser.Point","description":"Optional Point to store the value in, if not supplied a new Point object will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The new Point object."}},{"name":"projectUnit","description":"Project two Points onto a Point of unit length.","parameters":[{"name":"a","type":"Phaser.Point","description":"The first Point object.","default":"","optional":"","nullable":""},{"name":"b","type":"Phaser.Point","description":"The second Point object.","default":"","optional":"","nullable":""},{"name":"out","type":"Phaser.Point","description":"Optional Point to store the value in, if not supplied a new Point object will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The new Point object."}},{"name":"normalRightHand","description":"Right-hand normalize (make unit length) a Point.","parameters":[{"name":"a","type":"Phaser.Point","description":"The Point object.","default":"","optional":"","nullable":""},{"name":"out","type":"Phaser.Point","description":"Optional Point to store the value in, if not supplied a new Point object will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The new Point object."}},{"name":"normalize","description":"Normalize (make unit length) a Point.","parameters":[{"name":"a","type":"Phaser.Point","description":"The Point object.","default":"","optional":"","nullable":""},{"name":"out","type":"Phaser.Point","description":"Optional Point to store the value in, if not supplied a new Point object will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The new Point object."}},{"name":"rotate","description":"Rotates a Point object, or any object with exposed x/y properties, around the given coordinates by\rthe angle specified. If the angle between the point and coordinates was 45 deg and the angle argument\ris 45 deg then the resulting angle will be 90 deg, as the angle argument is added to the current angle.\r\rThe distance allows you to specify a distance constraint for the rotation between the point and the \rcoordinates. If none is given the distance between the two is calculated and used.","parameters":[{"name":"a","type":"Phaser.Point","description":"The Point object to rotate.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate of the anchor point","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate of the anchor point","default":"","optional":"","nullable":""},{"name":"angle","type":"number","description":"The angle in radians (unless asDegrees is true) to rotate the Point by.","default":"","optional":"","nullable":""},{"name":"asDegrees","type":"boolean","description":"Is the given angle in radians (false) or degrees (true)?","default":"","optional":true,"nullable":""},{"name":"distance","type":"number","description":"An optional distance constraint between the Point and the anchor.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The modified point object."}},{"name":"centroid","description":"Calculates centroid (or midpoint) from an array of points. If only one point is provided, that point is returned.","parameters":[{"name":"points","type":"Array.<Phaser.Point>","description":"The array of one or more points.","default":"","optional":"","nullable":""},{"name":"out","type":"Phaser.Point","description":"Optional Point to store the value in, if not supplied a new Point object will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The new Point object."}},{"name":"parse","description":"Parses an object for x and/or y properties and returns a new Phaser.Point with matching values.\rIf the object doesn't contain those properties a Point with x/y of zero will be returned.","parameters":[{"name":"obj","type":"object","description":"The object to parse.","default":"","optional":"","nullable":""},{"name":"xProp","type":"string","description":"The property used to set the Point.x value.","default":"'x'","optional":true,"nullable":""},{"name":"yProp","type":"string","description":"The property used to set the Point.y value.","default":"'y'","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The new Point object."}}],"members":[{"name":"x","access":"","virtual":false,"description":"The x value of the point.","type":{"names":["number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The y value of the point.","type":{"names":["number"]},"default":""},{"name":"type","access":"","virtual":false,"description":"The const type of this object.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.Polygon","description":"Creates a new Polygon.\r\rThe points can be set from a variety of formats:\r\r- An array of Point objects: `[new Phaser.Point(x1, y1), ...]`\r- An array of objects with public x/y properties: `[obj1, obj2, ...]`\r- An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]`\r- As separate Point arguments: `setTo(new Phaser.Point(x1, y1), ...)`\r- As separate objects with public x/y properties arguments: `setTo(obj1, obj2, ...)`\r- As separate arguments representing point coordinates: `setTo(x1,y1, x2,y2, ...)`","constructor":{"name":"Polygon","description":"Creates a new Polygon.\r\rThe points can be set from a variety of formats:\r\r- An array of Point objects: `[new Phaser.Point(x1, y1), ...]`\r- An array of objects with public x/y properties: `[obj1, obj2, ...]`\r- An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]`\r- As separate Point arguments: `setTo(new Phaser.Point(x1, y1), ...)`\r- As separate objects with public x/y properties arguments: `setTo(obj1, obj2, ...)`\r- As separate arguments representing point coordinates: `setTo(x1,y1, x2,y2, ...)`","parameters":[{"name":"points","type":["Array.<Phaser.Point>","Array.<number>","Phaser.Point","number"],"description":"The points to set.","default":"","optional":"","nullable":""}]},"functions":[{"name":"toNumberArray","description":"Export the points as an array of flat numbers, following the sequence [ x,y, x,y, x,y ]","parameters":[{"name":"output","type":"array","description":"The array to append the points to. If not specified a new array will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"array","description":"The flattened array."}},{"name":"flatten","description":"Flattens this Polygon so the points are a sequence of numbers.\rAny Point objects found are removed and replaced with two numbers.\rAlso sets the Polygon.flattened property to `true`.","parameters":[],"returns":{"type":"Phaser.Polygon","description":"This Polygon object"}},{"name":"clone","description":"Creates a copy of the given Polygon.\rThis is a deep clone, the resulting copy contains new Phaser.Point objects","parameters":[{"name":"output","type":"Phaser.Polygon","description":"The polygon to update. If not specified a new polygon will be created.","default":"(new Polygon)","optional":true,"nullable":""}],"returns":{"type":"Phaser.Polygon","description":"The cloned (`output`) polygon object."}},{"name":"contains","description":"Checks whether the x and y coordinates are contained within this polygon.","parameters":[{"name":"x","type":"number","description":"The X value of the coordinate to test.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The Y value of the coordinate to test.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the coordinates are within this polygon, otherwise false."}},{"name":"setTo","description":"Sets this Polygon to the given points.\r\rThe points can be set from a variety of formats:\r\r- An array of Point objects: `[new Phaser.Point(x1, y1), ...]`\r- An array of objects with public x/y properties: `[obj1, obj2, ...]`\r- An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]`\r- An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]`\r- As separate Point arguments: `setTo(new Phaser.Point(x1, y1), ...)`\r- As separate objects with public x/y properties arguments: `setTo(obj1, obj2, ...)`\r- As separate arguments representing point coordinates: `setTo(x1,y1, x2,y2, ...)`\r\r`setTo` may also be called without any arguments to remove all points.","parameters":[{"name":"points","type":["Array.<Phaser.Point>","Array.<number>","Phaser.Point","number"],"description":"The points to set.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Polygon","description":"This Polygon object"}},{"name":"calculateArea","description":"Calcuates the area of the Polygon. This is available in the property Polygon.area","parameters":[{"name":"y0","type":"number","description":"The lowest boundary","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The area of the Polygon."}}],"members":[{"name":"area","access":"","virtual":false,"description":"The area of this Polygon.","type":{"names":["number"]},"default":""},{"name":"_points","access":"private","virtual":false,"description":"An array of Points that make up this Polygon.","type":{"names":["array"]},"default":""},{"name":"closed","access":"","virtual":false,"description":"Is the Polygon closed or not?","type":{"names":["boolean"]},"default":""},{"name":"flattened","access":"","virtual":false,"description":"Has this Polygon been flattened by a call to `Polygon.flatten` ?","type":{"names":["boolean"]},"default":""},{"name":"type","access":"","virtual":false,"description":"The base object type.","type":{"names":["number"]},"default":""},{"name":"points","access":"","virtual":false,"description":"Sets and modifies the points of this polygon.\r\rSee {@link Phaser.Polygon#setTo setTo} for the different kinds of arrays formats that can be assigned. The array of vertex points.","type":{"names":["Array.<Phaser.Point>"]},"default":""}]},{"name":"Phaser.Rectangle","description":"Creates a new Rectangle object with the top-left corner specified by the x and y parameters and with the specified width and height parameters.\rIf you call this function without parameters, a Rectangle with x, y, width, and height properties set to 0 is created.","constructor":{"name":"Rectangle","description":"Creates a new Rectangle object with the top-left corner specified by the x and y parameters and with the specified width and height parameters.\rIf you call this function without parameters, a Rectangle with x, y, width, and height properties set to 0 is created.","parameters":[{"name":"x","type":"number","description":"The x coordinate of the top-left corner of the Rectangle.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate of the top-left corner of the Rectangle.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The width of the Rectangle. Should always be either zero or a positive value.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height of the Rectangle. Should always be either zero or a positive value.","default":"","optional":"","nullable":""}]},"functions":[{"name":"offset","description":"Adjusts the location of the Rectangle object, as determined by its top-left corner, by the specified amounts.","parameters":[{"name":"dx","type":"number","description":"Moves the x value of the Rectangle object by this amount.","default":"","optional":"","nullable":""},{"name":"dy","type":"number","description":"Moves the y value of the Rectangle object by this amount.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Rectangle","description":"This Rectangle object."}},{"name":"offsetPoint","description":"Adjusts the location of the Rectangle object using a Point object as a parameter. This method is similar to the Rectangle.offset() method, except that it takes a Point object as a parameter.","parameters":[{"name":"point","type":"Phaser.Point","description":"A Point object to use to offset this Rectangle object.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Rectangle","description":"This Rectangle object."}},{"name":"setTo","description":"Sets the members of Rectangle to the specified values.","parameters":[{"name":"x","type":"number","description":"The x coordinate of the top-left corner of the Rectangle.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate of the top-left corner of the Rectangle.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The width of the Rectangle. Should always be either zero or a positive value.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height of the Rectangle. Should always be either zero or a positive value.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Rectangle","description":"This Rectangle object"}},{"name":"scale","description":"Scales the width and height of this Rectangle by the given amounts.","parameters":[{"name":"x","type":"number","description":"The amount to scale the width of the Rectangle by. A value of 0.5 would reduce by half, a value of 2 would double the width, etc.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The amount to scale the height of the Rectangle by. A value of 0.5 would reduce by half, a value of 2 would double the height, etc.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Rectangle","description":"This Rectangle object"}},{"name":"centerOn","description":"Centers this Rectangle so that the center coordinates match the given x and y values.","parameters":[{"name":"x","type":"number","description":"The x coordinate to place the center of the Rectangle at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate to place the center of the Rectangle at.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Rectangle","description":"This Rectangle object"}},{"name":"floor","description":"Runs Math.floor() on both the x and y values of this Rectangle.","parameters":[]},{"name":"floorAll","description":"Runs Math.floor() on the x, y, width and height values of this Rectangle.","parameters":[]},{"name":"ceil","description":"Runs Math.ceil() on both the x and y values of this Rectangle.","parameters":[]},{"name":"ceilAll","description":"Runs Math.ceil() on the x, y, width and height values of this Rectangle.","parameters":[]},{"name":"copyFrom","description":"Copies the x, y, width and height properties from any given object to this Rectangle.","parameters":[{"name":"source","type":"any","description":"The object to copy from.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Rectangle","description":"This Rectangle object."}},{"name":"copyTo","description":"Copies the x, y, width and height properties from this Rectangle to any given object.","parameters":[{"name":"source","type":"any","description":"The object to copy to.","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"This object."}},{"name":"inflate","description":"Increases the size of the Rectangle object by the specified amounts. The center point of the Rectangle object stays the same, and its size increases to the left and right by the dx value, and to the top and the bottom by the dy value.","parameters":[{"name":"dx","type":"number","description":"The amount to be added to the left side of the Rectangle.","default":"","optional":"","nullable":""},{"name":"dy","type":"number","description":"The amount to be added to the bottom side of the Rectangle.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Rectangle","description":"This Rectangle object."}},{"name":"size","description":"The size of the Rectangle object, expressed as a Point object with the values of the width and height properties.","parameters":[{"name":"output","type":"Phaser.Point","description":"Optional Point object. If given the values will be set into the object, otherwise a brand new Point object will be created and returned.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The size of the Rectangle object."}},{"name":"resize","description":"Resize the Rectangle by providing a new width and height.\rThe x and y positions remain unchanged.","parameters":[{"name":"width","type":"number","description":"The width of the Rectangle. Should always be either zero or a positive value.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height of the Rectangle. Should always be either zero or a positive value.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Rectangle","description":"This Rectangle object"}},{"name":"clone","description":"Returns a new Rectangle object with the same values for the x, y, width, and height properties as the original Rectangle object.","parameters":[{"name":"output","type":"Phaser.Rectangle","description":"Optional Rectangle object. If given the values will be set into the object, otherwise a brand new Rectangle object will be created and returned.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Rectangle","description":""}},{"name":"contains","description":"Determines whether the specified coordinates are contained within the region defined by this Rectangle object.","parameters":[{"name":"x","type":"number","description":"The x coordinate of the point to test.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate of the point to test.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"A value of true if the Rectangle object contains the specified point; otherwise false."}},{"name":"containsRect","description":"Determines whether the first Rectangle object is fully contained within the second Rectangle object.\rA Rectangle object is said to contain another if the second Rectangle object falls entirely within the boundaries of the first.","parameters":[{"name":"b","type":"Phaser.Rectangle","description":"The second Rectangle object.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"A value of true if the Rectangle object contains the specified point; otherwise false."}},{"name":"equals","description":"Determines whether the two Rectangles are equal.\rThis method compares the x, y, width and height properties of each Rectangle.","parameters":[{"name":"b","type":"Phaser.Rectangle","description":"The second Rectangle object.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"A value of true if the two Rectangles have exactly the same values for the x, y, width and height properties; otherwise false."}},{"name":"intersection","description":"If the Rectangle object specified in the toIntersect parameter intersects with this Rectangle object, returns the area of intersection as a Rectangle object. If the Rectangles do not intersect, this method returns an empty Rectangle object with its properties set to 0.","parameters":[{"name":"b","type":"Phaser.Rectangle","description":"The second Rectangle object.","default":"","optional":"","nullable":""},{"name":"out","type":"Phaser.Rectangle","description":"Optional Rectangle object. If given the intersection values will be set into this object, otherwise a brand new Rectangle object will be created and returned.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Rectangle","description":"A Rectangle object that equals the area of intersection. If the Rectangles do not intersect, this method returns an empty Rectangle object; that is, a Rectangle with its x, y, width, and height properties set to 0."}},{"name":"intersects","description":"Determines whether this Rectangle and another given Rectangle intersect with each other.\rThis method checks the x, y, width, and height properties of the two Rectangles.","parameters":[{"name":"b","type":"Phaser.Rectangle","description":"The second Rectangle object.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"A value of true if the specified object intersects with this Rectangle object; otherwise false."}},{"name":"intersectsRaw","description":"Determines whether the coordinates given intersects (overlaps) with this Rectangle.","parameters":[{"name":"left","type":"number","description":"The x coordinate of the left of the area.","default":"","optional":"","nullable":""},{"name":"right","type":"number","description":"The right coordinate of the area.","default":"","optional":"","nullable":""},{"name":"top","type":"number","description":"The y coordinate of the area.","default":"","optional":"","nullable":""},{"name":"bottom","type":"number","description":"The bottom coordinate of the area.","default":"","optional":"","nullable":""},{"name":"tolerance","type":"number","description":"A tolerance value to allow for an intersection test with padding, default to 0","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"A value of true if the specified object intersects with the Rectangle; otherwise false."}},{"name":"union","description":"Adds two Rectangles together to create a new Rectangle object, by filling in the horizontal and vertical space between the two Rectangles.","parameters":[{"name":"b","type":"Phaser.Rectangle","description":"The second Rectangle object.","default":"","optional":"","nullable":""},{"name":"out","type":"Phaser.Rectangle","description":"Optional Rectangle object. If given the new values will be set into this object, otherwise a brand new Rectangle object will be created and returned.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Rectangle","description":"A Rectangle object that is the union of the two Rectangles."}},{"name":"random","description":"Returns a uniformly distributed random point from anywhere within this Rectangle.","parameters":[{"name":"out","type":["Phaser.Point","object"],"description":"A Phaser.Point, or any object with public x/y properties, that the values will be set in.\r    If no object is provided a new Phaser.Point object will be created. In high performance areas avoid this by re-using an existing object.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"An object containing the random point in its `x` and `y` properties."}},{"name":"getPoint","description":"Returns a point based on the given position constant, which can be one of:\r\r`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`,\r`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` \rand `Phaser.BOTTOM_RIGHT`.\r\rThis method returns the same values as calling Rectangle.bottomLeft, etc, but those\rcalls always create a new Point object, where-as this one allows you to use your own.","parameters":[{"name":"position","type":"integer","description":"One of the Phaser position constants, such as `Phaser.TOP_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"out","type":"Phaser.Point","description":"A Phaser.Point that the values will be set in.\r    If no object is provided a new Phaser.Point object will be created. In high performance areas avoid this by re-using an existing object.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"An object containing the point in its `x` and `y` properties."}},{"name":"toString","description":"Returns a string representation of this object.","parameters":[],"returns":{"type":"string","description":"A string representation of the instance."}},{"name":"inflate","description":"Increases the size of the Rectangle object by the specified amounts. The center point of the Rectangle object stays the same, and its size increases to the left and right by the dx value, and to the top and the bottom by the dy value.","parameters":[{"name":"a","type":"Phaser.Rectangle","description":"The Rectangle object.","default":"","optional":"","nullable":""},{"name":"dx","type":"number","description":"The amount to be added to the left side of the Rectangle.","default":"","optional":"","nullable":""},{"name":"dy","type":"number","description":"The amount to be added to the bottom side of the Rectangle.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Rectangle","description":"This Rectangle object."}},{"name":"inflatePoint","description":"Increases the size of the Rectangle object. This method is similar to the Rectangle.inflate() method except it takes a Point object as a parameter.","parameters":[{"name":"a","type":"Phaser.Rectangle","description":"The Rectangle object.","default":"","optional":"","nullable":""},{"name":"point","type":"Phaser.Point","description":"The x property of this Point object is used to increase the horizontal dimension of the Rectangle object. The y property is used to increase the vertical dimension of the Rectangle object.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Rectangle","description":"The Rectangle object."}},{"name":"size","description":"The size of the Rectangle object, expressed as a Point object with the values of the width and height properties.","parameters":[{"name":"a","type":"Phaser.Rectangle","description":"The Rectangle object.","default":"","optional":"","nullable":""},{"name":"output","type":"Phaser.Point","description":"Optional Point object. If given the values will be set into the object, otherwise a brand new Point object will be created and returned.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"The size of the Rectangle object"}},{"name":"clone","description":"Returns a new Rectangle object with the same values for the x, y, width, and height properties as the original Rectangle object.","parameters":[{"name":"a","type":"Phaser.Rectangle","description":"The Rectangle object.","default":"","optional":"","nullable":""},{"name":"output","type":"Phaser.Rectangle","description":"Optional Rectangle object. If given the values will be set into the object, otherwise a brand new Rectangle object will be created and returned.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Rectangle","description":""}},{"name":"contains","description":"Determines whether the specified coordinates are contained within the region defined by this Rectangle object.","parameters":[{"name":"a","type":"Phaser.Rectangle","description":"The Rectangle object.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate of the point to test.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate of the point to test.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"A value of true if the Rectangle object contains the specified point; otherwise false."}},{"name":"containsRaw","description":"Determines whether the specified coordinates are contained within the region defined by the given raw values.","parameters":[{"name":"rx","type":"number","description":"The x coordinate of the top left of the area.","default":"","optional":"","nullable":""},{"name":"ry","type":"number","description":"The y coordinate of the top left of the area.","default":"","optional":"","nullable":""},{"name":"rw","type":"number","description":"The width of the area.","default":"","optional":"","nullable":""},{"name":"rh","type":"number","description":"The height of the area.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate of the point to test.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate of the point to test.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"A value of true if the Rectangle object contains the specified point; otherwise false."}},{"name":"containsPoint","description":"Determines whether the specified point is contained within the rectangular region defined by this Rectangle object. This method is similar to the Rectangle.contains() method, except that it takes a Point object as a parameter.","parameters":[{"name":"a","type":"Phaser.Rectangle","description":"The Rectangle object.","default":"","optional":"","nullable":""},{"name":"point","type":"Phaser.Point","description":"The point object being checked. Can be Point or any object with .x and .y values.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"A value of true if the Rectangle object contains the specified point; otherwise false."}},{"name":"containsRect","description":"Determines whether the first Rectangle object is fully contained within the second Rectangle object.\rA Rectangle object is said to contain another if the second Rectangle object falls entirely within the boundaries of the first.","parameters":[{"name":"a","type":"Phaser.Rectangle","description":"The first Rectangle object.","default":"","optional":"","nullable":""},{"name":"b","type":"Phaser.Rectangle","description":"The second Rectangle object.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"A value of true if the Rectangle object contains the specified point; otherwise false."}},{"name":"equals","description":"Determines whether the two Rectangles are equal.\rThis method compares the x, y, width and height properties of each Rectangle.","parameters":[{"name":"a","type":"Phaser.Rectangle","description":"The first Rectangle object.","default":"","optional":"","nullable":""},{"name":"b","type":"Phaser.Rectangle","description":"The second Rectangle object.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"A value of true if the two Rectangles have exactly the same values for the x, y, width and height properties; otherwise false."}},{"name":"sameDimensions","description":"Determines if the two objects (either Rectangles or Rectangle-like) have the same width and height values under strict equality.","parameters":[{"name":"a","type":"Rectangle-like","description":"The first Rectangle object.","default":"","optional":"","nullable":""},{"name":"b","type":"Rectangle-like","description":"The second Rectangle object.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the object have equivalent values for the width and height properties."}},{"name":"intersection","description":"If the Rectangle object specified in the toIntersect parameter intersects with this Rectangle object, returns the area of intersection as a Rectangle object. If the Rectangles do not intersect, this method returns an empty Rectangle object with its properties set to 0.","parameters":[{"name":"a","type":"Phaser.Rectangle","description":"The first Rectangle object.","default":"","optional":"","nullable":""},{"name":"b","type":"Phaser.Rectangle","description":"The second Rectangle object.","default":"","optional":"","nullable":""},{"name":"output","type":"Phaser.Rectangle","description":"Optional Rectangle object. If given the intersection values will be set into this object, otherwise a brand new Rectangle object will be created and returned.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Rectangle","description":"A Rectangle object that equals the area of intersection. If the Rectangles do not intersect, this method returns an empty Rectangle object; that is, a Rectangle with its x, y, width, and height properties set to 0."}},{"name":"intersects","description":"Determines whether the two Rectangles intersect with each other.\rThis method checks the x, y, width, and height properties of the Rectangles.","parameters":[{"name":"a","type":"Phaser.Rectangle","description":"The first Rectangle object.","default":"","optional":"","nullable":""},{"name":"b","type":"Phaser.Rectangle","description":"The second Rectangle object.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"A value of true if the specified object intersects with this Rectangle object; otherwise false."}},{"name":"intersectsRaw","description":"Determines whether the object specified intersects (overlaps) with the given values.","parameters":[{"name":"left","type":"number","description":"The x coordinate of the left of the area.","default":"","optional":"","nullable":""},{"name":"right","type":"number","description":"The right coordinate of the area.","default":"","optional":"","nullable":""},{"name":"top","type":"number","description":"The y coordinate of the area.","default":"","optional":"","nullable":""},{"name":"bottom","type":"number","description":"The bottom coordinate of the area.","default":"","optional":"","nullable":""},{"name":"tolerance","type":"number","description":"A tolerance value to allow for an intersection test with padding, default to 0","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"A value of true if the specified object intersects with the Rectangle; otherwise false."}},{"name":"union","description":"Adds two Rectangles together to create a new Rectangle object, by filling in the horizontal and vertical space between the two Rectangles.","parameters":[{"name":"a","type":"Phaser.Rectangle","description":"The first Rectangle object.","default":"","optional":"","nullable":""},{"name":"b","type":"Phaser.Rectangle","description":"The second Rectangle object.","default":"","optional":"","nullable":""},{"name":"output","type":"Phaser.Rectangle","description":"Optional Rectangle object. If given the new values will be set into this object, otherwise a brand new Rectangle object will be created and returned.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Rectangle","description":"A Rectangle object that is the union of the two Rectangles."}},{"name":"aabb","description":"Calculates the Axis Aligned Bounding Box (or aabb) from an array of points.","parameters":[{"name":"points","type":"Array.<Phaser.Point>","description":"The array of one or more points.","default":"","optional":"","nullable":""},{"name":"out","type":"Phaser.Rectangle","description":"Optional Rectangle to store the value in, if not supplied a new Rectangle object will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Rectangle","description":"The new Rectangle object."}}],"members":[{"name":"x","access":"","virtual":false,"description":"The x coordinate of the top-left corner of the Rectangle.","type":{"names":["number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The y coordinate of the top-left corner of the Rectangle.","type":{"names":["number"]},"default":""},{"name":"width","access":"","virtual":false,"description":"The width of the Rectangle. This value should never be set to a negative.","type":{"names":["number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the Rectangle. This value should never be set to a negative.","type":{"names":["number"]},"default":""},{"name":"type","access":"","virtual":false,"description":"The const type of this object.","type":{"names":["number"]},"default":""},{"name":"halfWidth","access":"","virtual":false,"description":"Half of the width of the Rectangle.","type":{"names":["number"]},"default":""},{"name":"halfHeight","access":"","virtual":false,"description":"Half of the height of the Rectangle.","type":{"names":["number"]},"default":""},{"name":"bottom","access":"","virtual":false,"description":"The sum of the y and height properties. Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.","type":{"names":["number"]},"default":""},{"name":"bottomLeft","access":"","virtual":false,"description":"The location of the Rectangles bottom left corner as a Point object. Gets or sets the location of the Rectangles bottom left corner as a Point object.","type":{"names":["Phaser.Point"]},"default":""},{"name":"bottomRight","access":"","virtual":false,"description":"The location of the Rectangles bottom right corner as a Point object. Gets or sets the location of the Rectangles bottom right corner as a Point object.","type":{"names":["Phaser.Point"]},"default":""},{"name":"left","access":"","virtual":false,"description":"The x coordinate of the left of the Rectangle. Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property.","type":{"names":["number"]},"default":""},{"name":"right","access":"","virtual":false,"description":"The sum of the x and width properties. Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property.","type":{"names":["number"]},"default":""},{"name":"volume","access":"","virtual":false,"description":"The volume of the Rectangle derived from width * height.","type":{"names":["number"]},"default":""},{"name":"perimeter","access":"","virtual":false,"description":"The perimeter size of the Rectangle. This is the sum of all 4 sides.","type":{"names":["number"]},"default":""},{"name":"centerX","access":"","virtual":false,"description":"The x coordinate of the center of the Rectangle.","type":{"names":["number"]},"default":""},{"name":"centerY","access":"","virtual":false,"description":"The y coordinate of the center of the Rectangle.","type":{"names":["number"]},"default":""},{"name":"randomX","access":"","virtual":false,"description":"A random value between the left and right values (inclusive) of the Rectangle.","type":{"names":["number"]},"default":""},{"name":"randomY","access":"","virtual":false,"description":"A random value between the top and bottom values (inclusive) of the Rectangle.","type":{"names":["number"]},"default":""},{"name":"top","access":"","virtual":false,"description":"The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties.\rHowever it does affect the height property, whereas changing the y value does not affect the height property.","type":{"names":["number"]},"default":""},{"name":"topLeft","access":"","virtual":false,"description":"The location of the Rectangles top left corner as a Point object.","type":{"names":["Phaser.Point"]},"default":""},{"name":"topRight","access":"","virtual":false,"description":"The location of the Rectangles top right corner as a Point object. The location of the Rectangles top left corner as a Point object.","type":{"names":["Phaser.Point"]},"default":""},{"name":"empty","access":"","virtual":false,"description":"Determines whether or not this Rectangle object is empty. A Rectangle object is empty if its width or height is less than or equal to 0.\rIf set to true then all of the Rectangle properties are set to 0. Gets or sets the Rectangles empty state.","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.RoundedRectangle","description":"The Rounded Rectangle object is an area defined by its position and has nice rounded corners, \ras indicated by its top-left corner point (x, y) and by its width and its height.","constructor":{"name":"RoundedRectangle","description":"The Rounded Rectangle object is an area defined by its position and has nice rounded corners, \ras indicated by its top-left corner point (x, y) and by its width and its height.","parameters":[{"name":"x","type":"number","description":"The x coordinate of the top-left corner of the Rectangle.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate of the top-left corner of the Rectangle.","default":"","optional":true,"nullable":""},{"name":"width","type":"number","description":"The width of the Rectangle. Should always be either zero or a positive value.","default":"","optional":true,"nullable":""},{"name":"height","type":"number","description":"The height of the Rectangle. Should always be either zero or a positive value.","default":"","optional":true,"nullable":""},{"name":"radius","type":"number","description":"Controls the radius of the rounded corners.","default":20,"optional":true,"nullable":""}]},"functions":[{"name":"clone","description":"Returns a new RoundedRectangle object with the same values for the x, y, width, height and\rradius properties as this RoundedRectangle object.","parameters":[],"returns":{"type":"Phaser.RoundedRectangle","description":""}},{"name":"contains","description":"Determines whether the specified coordinates are contained within the region defined by this Rounded Rectangle object.","parameters":[{"name":"x","type":"number","description":"The x coordinate of the point to test.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate of the point to test.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"A value of true if the RoundedRectangle Rectangle object contains the specified point; otherwise false."}}],"members":[{"name":"x","access":"","virtual":false,"description":"The x coordinate of the top-left corner of the Rectangle.","type":{"names":["number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The y coordinate of the top-left corner of the Rectangle.","type":{"names":["number"]},"default":""},{"name":"width","access":"","virtual":false,"description":"The width of the Rectangle. This value should never be set to a negative.","type":{"names":["number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the Rectangle. This value should never be set to a negative.","type":{"names":["number"]},"default":""},{"name":"radius","access":"","virtual":false,"description":"The radius of the rounded corners.","type":{"names":["number"]},"default":""},{"name":"type","access":"","virtual":false,"description":"The const type of this object.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.DeviceButton","description":"DeviceButtons belong to both `Phaser.Pointer` and `Phaser.SinglePad` (Gamepad) instances.\r\rFor Pointers they represent the various buttons that can exist on mice and pens, such as the left button, right button,\rmiddle button and advanced buttons like back and forward.\r\rAccess them via `Pointer.leftbutton`, `Pointer.rightButton` and so on.\r\rOn Gamepads they represent all buttons on the pad: from shoulder buttons to action buttons.\r\rAt the time of writing this there are device limitations you should be aware of:\r\r- On Windows, if you install a mouse driver, and its utility software allows you to customize button actions \r  (e.g., IntelliPoint and SetPoint), the middle (wheel) button, the 4th button, and the 5th button might not be set, \r  even when they are pressed.\r- On Linux (GTK), the 4th button and the 5th button are not supported.\r- On Mac OS X 10.5 there is no platform API for implementing any advanced buttons.","constructor":{"name":"DeviceButton","description":"DeviceButtons belong to both `Phaser.Pointer` and `Phaser.SinglePad` (Gamepad) instances.\r\rFor Pointers they represent the various buttons that can exist on mice and pens, such as the left button, right button,\rmiddle button and advanced buttons like back and forward.\r\rAccess them via `Pointer.leftbutton`, `Pointer.rightButton` and so on.\r\rOn Gamepads they represent all buttons on the pad: from shoulder buttons to action buttons.\r\rAt the time of writing this there are device limitations you should be aware of:\r\r- On Windows, if you install a mouse driver, and its utility software allows you to customize button actions \r  (e.g., IntelliPoint and SetPoint), the middle (wheel) button, the 4th button, and the 5th button might not be set, \r  even when they are pressed.\r- On Linux (GTK), the 4th button and the 5th button are not supported.\r- On Mac OS X 10.5 there is no platform API for implementing any advanced buttons.","parameters":[{"name":"parent","type":["Phaser.Pointer","Phaser.SinglePad"],"description":"A reference to the parent of this button. Either a Pointer or a Gamepad.","default":"","optional":"","nullable":""},{"name":"buttonCode","type":"number","description":"The button code this DeviceButton is responsible for.","default":"","optional":"","nullable":""}]},"functions":[{"name":"start","description":"Called automatically by Phaser.Pointer and Phaser.SinglePad.\rHandles the button down state.","parameters":[{"name":"event","type":"object","description":"The DOM event that triggered the button change.","default":"","optional":true,"nullable":""},{"name":"value","type":"number","description":"The button value. Only get for Gamepads.","default":"","optional":true,"nullable":""}]},{"name":"stop","description":"Called automatically by Phaser.Pointer and Phaser.SinglePad.\rHandles the button up state.","parameters":[{"name":"event","type":"object","description":"The DOM event that triggered the button change.","default":"","optional":true,"nullable":""},{"name":"value","type":"number","description":"The button value. Only get for Gamepads.","default":"","optional":true,"nullable":""}]},{"name":"padFloat","description":"Called automatically by Phaser.SinglePad.","parameters":[{"name":"value","type":"number","description":"Button value","default":"","optional":"","nullable":""}]},{"name":"justPressed","description":"Returns the \"just pressed\" state of this button.\rJust pressed is considered true if the button was pressed down within the duration given (default 250ms).","parameters":[{"name":"duration","type":"number","description":"The duration in ms below which the button is considered as being just pressed.","default":250,"optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the button is just pressed otherwise false."}},{"name":"justReleased","description":"Returns the \"just released\" state of this button.\rJust released is considered as being true if the button was released within the duration given (default 250ms).","parameters":[{"name":"duration","type":"number","description":"The duration in ms below which the button is considered as being just released.","default":250,"optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the button is just released otherwise false."}},{"name":"reset","description":"Resets this DeviceButton, changing it to an isUp state and resetting the duration and repeats counters.","parameters":[]},{"name":"destroy","description":"Destroys this DeviceButton, this disposes of the onDown, onUp and onFloat signals \rand clears the parent and game references.","parameters":[]}],"members":[{"name":"parent","access":"","virtual":false,"description":"A reference to the Pointer or Gamepad that owns this button.","type":{"names":["Phaser.Pointer","Phaser.SinglePad"]},"default":""},{"name":"game","access":"","virtual":false,"description":"A reference to the currently running game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"event","access":"","virtual":false,"description":"The DOM event that caused the change in button state.","type":{"names":["object"]},"default":""},{"name":"isDown","access":"","virtual":false,"description":"The \"down\" state of the button.","type":{"names":["boolean"]},"default":""},{"name":"isUp","access":"","virtual":false,"description":"The \"up\" state of the button.","type":{"names":["boolean"]},"default":true},{"name":"timeDown","access":"","virtual":false,"description":"The timestamp when the button was last pressed down.","type":{"names":["number"]},"default":""},{"name":"timeUp","access":"","virtual":false,"description":"The timestamp when the button was last released.","type":{"names":["number"]},"default":""},{"name":"repeats","access":"","virtual":false,"description":"Gamepad only.\rIf a button is held down this holds down the number of times the button has 'repeated'.","type":{"names":["number"]},"default":""},{"name":"altKey","access":"","virtual":false,"description":"True if the alt key was held down when this button was last pressed or released.\rNot supported on Gamepads.","type":{"names":["boolean"]},"default":""},{"name":"shiftKey","access":"","virtual":false,"description":"True if the shift key was held down when this button was last pressed or released.\rNot supported on Gamepads.","type":{"names":["boolean"]},"default":""},{"name":"ctrlKey","access":"","virtual":false,"description":"True if the control key was held down when this button was last pressed or released.\rNot supported on Gamepads.","type":{"names":["boolean"]},"default":""},{"name":"value","access":"","virtual":false,"description":"Button value. Mainly useful for checking analog buttons (like shoulder triggers) on Gamepads.","type":{"names":["number"]},"default":""},{"name":"buttonCode","access":"","virtual":false,"description":"The buttoncode of this button if a Gamepad, or the DOM button event value if a Pointer.","type":{"names":["number"]},"default":""},{"name":"onDown","access":"","virtual":false,"description":"This Signal is dispatched every time this DeviceButton is pressed down.\rIt is only dispatched once (until the button is released again).\rWhen dispatched it sends 2 arguments: A reference to this DeviceButton and the value of the button.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onUp","access":"","virtual":false,"description":"This Signal is dispatched every time this DeviceButton is released from a down state.\rIt is only dispatched once (until the button is pressed again).\rWhen dispatched it sends 2 arguments: A reference to this DeviceButton and the value of the button.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onFloat","access":"","virtual":false,"description":"Gamepad only.\rThis Signal is dispatched every time this DeviceButton changes floating value (between, but not exactly, 0 and 1).\rWhen dispatched it sends 2 arguments: A reference to this DeviceButton and the value of the button.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"duration","access":"","virtual":false,"description":"How long the button has been held down for in milliseconds.\rIf not currently down it returns -1.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.Gamepad","description":"The Gamepad class handles gamepad input and dispatches gamepad events.\r\rRemember to call `gamepad.start()`.\r\rHTML5 GAMEPAD API SUPPORT IS AT AN EXPERIMENTAL STAGE!\rAt moment of writing this (end of 2013) only Chrome supports parts of it out of the box. Firefox supports it\rvia prefs flags (about:config, search gamepad). The browsers map the same controllers differently.\rThis class has constants for Windows 7 Chrome mapping of XBOX 360 controller.","constructor":{"name":"Gamepad","description":"The Gamepad class handles gamepad input and dispatches gamepad events.\r\rRemember to call `gamepad.start()`.\r\rHTML5 GAMEPAD API SUPPORT IS AT AN EXPERIMENTAL STAGE!\rAt moment of writing this (end of 2013) only Chrome supports parts of it out of the box. Firefox supports it\rvia prefs flags (about:config, search gamepad). The browsers map the same controllers differently.\rThis class has constants for Windows 7 Chrome mapping of XBOX 360 controller.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""}]},"functions":[{"name":"addCallbacks","description":"Add callbacks to the main Gamepad handler to handle connect/disconnect/button down/button up/axis change/float value buttons.","parameters":[{"name":"context","type":"object","description":"The context under which the callbacks are run.","default":"","optional":"","nullable":""},{"name":"callbacks","type":"object","description":"Object that takes six different callback methods:\ronConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCallback, onFloatCallback","default":"","optional":"","nullable":""}]},{"name":"start","description":"Starts the Gamepad event handling.\rThis MUST be called manually before Phaser will start polling the Gamepad API.","parameters":[]},{"name":"update","description":"Main gamepad update loop. Should not be called manually.","parameters":[]},{"name":"_pollGamepads","description":"Updating connected gamepads (for Google Chrome). Should not be called manually.","parameters":[]},{"name":"setDeadZones","description":"Sets the deadZone variable for all four gamepads","parameters":[]},{"name":"stop","description":"Stops the Gamepad event handling.","parameters":[]},{"name":"reset","description":"Reset all buttons/axes of all gamepads","parameters":[]},{"name":"justPressed","description":"Returns the \"just pressed\" state of a button from ANY gamepad connected. Just pressed is considered true if the button was pressed down within the duration given (default 250ms).","parameters":[{"name":"buttonCode","type":"number","description":"The buttonCode of the button to check for.","default":"","optional":"","nullable":""},{"name":"duration","type":"number","description":"The duration below which the button is considered as being just pressed.","default":250,"optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the button is just pressed otherwise false."}},{"name":"justPressed","description":"Returns the \"just released\" state of a button from ANY gamepad connected. Just released is considered as being true if the button was released within the duration given (default 250ms).","parameters":[{"name":"buttonCode","type":"number","description":"The buttonCode of the button to check for.","default":"","optional":"","nullable":""},{"name":"duration","type":"number","description":"The duration below which the button is considered as being just released.","default":250,"optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the button is just released otherwise false."}},{"name":"isDown","description":"Returns true if the button is currently pressed down, on ANY gamepad.","parameters":[{"name":"buttonCode","type":"number","description":"The buttonCode of the button to check for.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if a button is currently down."}},{"name":"destroy","description":"Destroys this object and the associated event listeners.","parameters":[]}],"members":[{"name":"game","access":"","virtual":false,"description":"Local reference to game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"_gamepadIndexMap","access":"private","virtual":false,"description":"Maps the browsers gamepad indices to our Phaser Gamepads","type":{"names":["object"]},"default":""},{"name":"_rawPads","access":"private","virtual":false,"description":"The raw state of the gamepads from the browser","type":{"names":["Array"]},"default":""},{"name":"_active","access":"private","virtual":false,"description":"Private flag for whether or not the API is polled","type":{"names":["boolean"]},"default":""},{"name":"enabled","access":"","virtual":false,"description":"Gamepad input will only be processed if enabled.","type":{"names":["boolean"]},"default":true},{"name":"_gamepadSupportAvailable","access":"private","virtual":false,"description":"Whether or not gamepads are supported in the current browser. Note that as of Dec. 2013 this check is actually not accurate at all due to poor implementation. Are gamepads supported in this browser or not?","type":{"names":["boolean"]},"default":""},{"name":"_prevRawGamepadTypes","access":"private","virtual":false,"description":"Used to check for differences between earlier polls and current state of gamepads.","type":{"names":["Array"]},"default":"[]"},{"name":"_prevTimestamps","access":"private","virtual":false,"description":"Used to check for differences between earlier polls and current state of gamepads.","type":{"names":["Array"]},"default":"[]"},{"name":"callbackContext","access":"","virtual":false,"description":"The context under which the callbacks are run.","type":{"names":["object"]},"default":""},{"name":"onConnectCallback","access":"","virtual":false,"description":"This callback is invoked every time any gamepad is connected","type":{"names":["function"]},"default":""},{"name":"onDisconnectCallback","access":"","virtual":false,"description":"This callback is invoked every time any gamepad is disconnected","type":{"names":["function"]},"default":""},{"name":"onDownCallback","access":"","virtual":false,"description":"This callback is invoked every time any gamepad button is pressed down.","type":{"names":["function"]},"default":""},{"name":"onUpCallback","access":"","virtual":false,"description":"This callback is invoked every time any gamepad button is released.","type":{"names":["function"]},"default":""},{"name":"onAxisCallback","access":"","virtual":false,"description":"This callback is invoked every time any gamepad axis is changed.","type":{"names":["function"]},"default":""},{"name":"onFloatCallback","access":"","virtual":false,"description":"This callback is invoked every time any gamepad button is changed to a value where value > 0 and value < 1.","type":{"names":["function"]},"default":""},{"name":"_ongamepadconnected","access":"private","virtual":false,"description":"Private callback for Firefox gamepad connection handling","type":{"names":["function"]},"default":""},{"name":"_gamepaddisconnected","access":"private","virtual":false,"description":"Private callback for Firefox gamepad connection handling","type":{"names":["function"]},"default":""},{"name":"_gamepads","access":"private","virtual":false,"description":"The four Phaser Gamepads.","type":{"names":["Array.<Phaser.SinglePad>"]},"default":""},{"name":"active","access":"","virtual":false,"description":"If the gamepad input is active or not - if not active it should not be updated from Input.js","type":{"names":["boolean"]},"default":""},{"name":"supported","access":"","virtual":false,"description":"Whether or not gamepads are supported in current browser.","type":{"names":["boolean"]},"default":""},{"name":"padsConnected","access":"","virtual":false,"description":"How many live gamepads are currently connected.","type":{"names":["number"]},"default":""},{"name":"pad1","access":"","virtual":false,"description":"Gamepad #1","type":{"names":["Phaser.SinglePad"]},"default":""},{"name":"pad2","access":"","virtual":false,"description":"Gamepad #2","type":{"names":["Phaser.SinglePad"]},"default":""},{"name":"pad3","access":"","virtual":false,"description":"Gamepad #3","type":{"names":["Phaser.SinglePad"]},"default":""},{"name":"pad4","access":"","virtual":false,"description":"Gamepad #4","type":{"names":["Phaser.SinglePad"]},"default":""}]},{"name":"Phaser.Input","description":"Phaser.Input is the Input Manager for all types of Input across Phaser, including mouse, keyboard, touch and MSPointer.\rThe Input manager is updated automatically by the core game loop.","constructor":{"name":"Input","description":"Phaser.Input is the Input Manager for all types of Input across Phaser, including mouse, keyboard, touch and MSPointer.\rThe Input manager is updated automatically by the core game loop.","parameters":[{"name":"game","type":"Phaser.Game","description":"Current game instance.","default":"","optional":"","nullable":""}]},"functions":[{"name":"boot","description":"Starts the Input Manager running.","parameters":[]},{"name":"destroy","description":"Stops all of the Input Managers from running.","parameters":[]},{"name":"setInteractiveCandidateHandler","description":"Adds a callback that is fired every time `Pointer.processInteractiveObjects` is called.\rThe purpose of `processInteractiveObjects` is to work out which Game Object the Pointer is going to\rinteract with. It works by polling all of the valid game objects, and then slowly discounting those\rthat don't meet the criteria (i.e. they aren't under the Pointer, are disabled, invisible, etc).\r\rEventually a short-list of 'candidates' is created. These are all of the Game Objects which are valid\rfor input and overlap with the Pointer. If you need fine-grained control over which of the items is\rselected then you can use this callback to do so.\r\rThe callback will be sent 3 parameters:\r\r1) A reference to the Phaser.Pointer object that is processing the Items.\r2) An array containing all potential interactive candidates. This is an array of `InputHandler` objects, not Sprites.\r3) The current 'favorite' candidate, based on its priorityID and position in the display list.\r\rYour callback MUST return one of the candidates sent to it.","parameters":[{"name":"callback","type":"function","description":"The callback that will be called each time `Pointer.processInteractiveObjects` is called. Set to `null` to disable.","default":"","optional":"","nullable":""},{"name":"context","type":"object","description":"The context in which the callback will be called.","default":"","optional":"","nullable":""}]},{"name":"addMoveCallback","description":"Adds a callback that is fired every time the activePointer receives a DOM move event such as a mousemove or touchmove.\r\rThe callback will be sent 4 parameters:\r\rA reference to the Phaser.Pointer object that moved,\rThe x position of the pointer,\rThe y position,\rA boolean indicating if the movement was the result of a 'click' event (such as a mouse click or touch down).\r\rIt will be called every time the activePointer moves, which in a multi-touch game can be a lot of times, so this is best\rto only use if you've limited input to a single pointer (i.e. mouse or touch).\r\rThe callback is added to the Phaser.Input.moveCallbacks array and should be removed with Phaser.Input.deleteMoveCallback.","parameters":[{"name":"callback","type":"function","description":"The callback that will be called each time the activePointer receives a DOM move event.","default":"","optional":"","nullable":""},{"name":"context","type":"object","description":"The context in which the callback will be called.","default":"","optional":"","nullable":""}]},{"name":"deleteMoveCallback","description":"Removes the callback from the Phaser.Input.moveCallbacks array.","parameters":[{"name":"callback","type":"function","description":"The callback to be removed.","default":"","optional":"","nullable":""},{"name":"context","type":"object","description":"The context in which the callback exists.","default":"","optional":"","nullable":""}]},{"name":"addPointer","description":"Add a new Pointer object to the Input Manager.\rBy default Input creates 3 pointer objects: `mousePointer` (not include in part of general pointer pool), `pointer1` and `pointer2`.\rThis method adds an additional pointer, up to a maximum of Phaser.Input.MAX_POINTERS (default of 10).","parameters":[],"returns":{"type":["Phaser.Pointer","null"],"description":"The new Pointer object that was created; null if a new pointer could not be added."}},{"name":"update","description":"Updates the Input Manager. Called by the core Game loop.","parameters":[]},{"name":"reset","description":"Reset all of the Pointers and Input states.\r\rThe optional `hard` parameter will reset any events or callbacks that may be bound.\rInput.reset is called automatically during a State change or if a game loses focus / visibility.\rTo control control the reset manually set {@link Phaser.InputManager.resetLocked} to `true`.","parameters":[{"name":"hard","type":"boolean","description":"A soft reset won't reset any events or callbacks that are bound. A hard reset will.","default":"","optional":true,"nullable":""}]},{"name":"resetSpeed","description":"Resets the speed and old position properties.","parameters":[{"name":"x","type":"number","description":"Sets the oldPosition.x value.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Sets the oldPosition.y value.","default":"","optional":"","nullable":""}]},{"name":"startPointer","description":"Find the first free Pointer object and start it, passing in the event data.\rThis is called automatically by Phaser.Touch and Phaser.MSPointer.","parameters":[{"name":"event","type":"any","description":"The event data from the Touch event.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Pointer","description":"The Pointer object that was started or null if no Pointer object is available."}},{"name":"updatePointer","description":"Updates the matching Pointer object, passing in the event data.\rThis is called automatically and should not normally need to be invoked.","parameters":[{"name":"event","type":"any","description":"The event data from the Touch event.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Pointer","description":"The Pointer object that was updated; null if no pointer was updated."}},{"name":"stopPointer","description":"Stops the matching Pointer object, passing in the event data.","parameters":[{"name":"event","type":"any","description":"The event data from the Touch event.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Pointer","description":"The Pointer object that was stopped or null if no Pointer object is available."}},{"name":"getPointer","description":"Get the first Pointer with the given active state.","parameters":[{"name":"isActive","type":"boolean","description":"The state the Pointer should be in - active or inactive?","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Pointer","description":"A Pointer object or null if no Pointer object matches the requested state."}},{"name":"getPointerFromIdentifier","description":"Get the Pointer object whos `identifier` property matches the given identifier value.\r\rThe identifier property is not set until the Pointer has been used at least once, as its populated by the DOM event.\rAlso it can change every time you press the pointer down, and is not fixed once set.\rNote: Not all browsers set the identifier property and it's not part of the W3C spec, so you may need getPointerFromId instead.","parameters":[{"name":"identifier","type":"number","description":"The Pointer.identifier value to search for.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Pointer","description":"A Pointer object or null if no Pointer object matches the requested identifier."}},{"name":"getPointerFromId","description":"Get the Pointer object whos `pointerId` property matches the given value.\r\rThe pointerId property is not set until the Pointer has been used at least once, as its populated by the DOM event.\rAlso it can change every time you press the pointer down if the browser recycles it.","parameters":[{"name":"pointerId","type":"number","description":"The `pointerId` (not 'id') value to search for.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Pointer","description":"A Pointer object or null if no Pointer object matches the requested identifier."}},{"name":"getLocalPosition","description":"This will return the local coordinates of the specified displayObject based on the given Pointer.","parameters":[{"name":"displayObject","type":["Phaser.Sprite","Phaser.Image"],"description":"The DisplayObject to get the local coordinates for.","default":"","optional":"","nullable":""},{"name":"pointer","type":"Phaser.Pointer","description":"The Pointer to use in the check against the displayObject.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Point","description":"A point containing the coordinates of the Pointer position relative to the DisplayObject."}},{"name":"hitTest","description":"Tests if the pointer hits the given object.","parameters":[{"name":"displayObject","type":"DisplayObject","description":"The displayObject to test for a hit.","default":"","optional":"","nullable":""},{"name":"pointer","type":"Phaser.Pointer","description":"The pointer to use for the test.","default":"","optional":"","nullable":""},{"name":"localPoint","type":"Phaser.Point","description":"The local translated point.","default":"","optional":"","nullable":""}]},{"name":"onClickTrampoline","description":"Used for click trampolines. See {@link Phaser.Pointer.addClickTrampoline}.","parameters":[]}],"members":[{"name":"game","access":"","virtual":false,"description":"A reference to the currently running game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"hitCanvas","access":"","virtual":false,"description":"The canvas to which single pixels are drawn in order to perform pixel-perfect hit detection.","type":{"names":["HTMLCanvasElement"]},"default":""},{"name":"hitContext","access":"","virtual":false,"description":"The context of the pixel perfect hit canvas.","type":{"names":["CanvasRenderingContext2D"]},"default":""},{"name":"moveCallbacks","access":"protected","virtual":false,"description":"An array of callbacks that will be fired every time the activePointer receives a move event from the DOM.\rTo add a callback to this array please use `Input.addMoveCallback`.","type":{"names":["array"]},"default":""},{"name":"customCandidateHandler","access":"private","virtual":false,"description":"See Input.setInteractiveCandidateHandler.","type":{"names":["function"]},"default":""},{"name":"customCandidateHandlerContext","access":"private","virtual":false,"description":"See Input.setInteractiveCandidateHandler.","type":{"names":["object"]},"default":""},{"name":"pollRate","access":"","virtual":false,"description":"How often should the input pointers be checked for updates? A value of 0 means every single frame (60fps); a value of 1 means every other frame (30fps) and so on.","type":{"names":["number"]},"default":""},{"name":"enabled","access":"","virtual":false,"description":"When enabled, input (eg. Keyboard, Mouse, Touch) will be processed - as long as the individual sources are enabled themselves.\r\rWhen not enabled, _all_ input sources are ignored. To disable just one type of input; for example, the Mouse, use `input.mouse.enabled = false`.","type":{"names":["boolean"]},"default":true},{"name":"multiInputOverride","access":"","virtual":false,"description":"Controls the expected behavior when using a mouse and touch together on a multi-input device.","type":{"names":["number"]},"default":""},{"name":"position","access":"","virtual":false,"description":"A point object representing the current position of the Pointer.","type":{"names":["Phaser.Point"]},"default":""},{"name":"speed","access":"","virtual":false,"description":"A point object representing the speed of the Pointer. Only really useful in single Pointer games; otherwise see the Pointer objects directly.","type":{"names":["Phaser.Point"]},"default":""},{"name":"circle","access":"","virtual":false,"description":"A Circle object centered on the x/y screen coordinates of the Input.\rDefault size of 44px (Apples recommended \"finger tip\" size) but can be changed to anything.","type":{"names":["Phaser.Circle"]},"default":""},{"name":"scale","access":"","virtual":false,"description":"The scale by which all input coordinates are multiplied; calculated by the ScaleManager. In an un-scaled game the values will be x = 1 and y = 1.","type":{"names":["Phaser.Point"]},"default":""},{"name":"maxPointers","access":"","virtual":false,"description":"The maximum number of Pointers allowed to be active at any one time. A value of -1 is only limited by the total number of pointers. For lots of games it's useful to set this to 1.","type":{"names":["integer"]},"default":"-1 (Limited by total pointers.)"},{"name":"tapRate","access":"","virtual":false,"description":"The number of milliseconds that the Pointer has to be pressed down and then released to be considered a tap or click.","type":{"names":["number"]},"default":200},{"name":"doubleTapRate","access":"","virtual":false,"description":"The number of milliseconds between taps of the same Pointer for it to be considered a double tap / click.","type":{"names":["number"]},"default":300},{"name":"holdRate","access":"","virtual":false,"description":"The number of milliseconds that the Pointer has to be pressed down for it to fire a onHold event.","type":{"names":["number"]},"default":2000},{"name":"justPressedRate","access":"","virtual":false,"description":"The number of milliseconds below which the Pointer is considered justPressed.","type":{"names":["number"]},"default":200},{"name":"justReleasedRate","access":"","virtual":false,"description":"The number of milliseconds below which the Pointer is considered justReleased .","type":{"names":["number"]},"default":200},{"name":"recordPointerHistory","access":"","virtual":false,"description":"Sets if the Pointer objects should record a history of x/y coordinates they have passed through.\rThe history is cleared each time the Pointer is pressed down.\rThe history is updated at the rate specified in Input.pollRate","type":{"names":["boolean"]},"default":""},{"name":"recordRate","access":"","virtual":false,"description":"The rate in milliseconds at which the Pointer objects should update their tracking history.","type":{"names":["number"]},"default":100},{"name":"recordLimit","access":"","virtual":false,"description":"The total number of entries that can be recorded into the Pointer objects tracking history.\rIf the Pointer is tracking one event every 100ms; then a trackLimit of 100 would store the last 10 seconds worth of history.","type":{"names":["number"]},"default":100},{"name":"pointer1","access":"","virtual":false,"description":"A Pointer object.","type":{"names":["Phaser.Pointer"]},"default":""},{"name":"pointer2","access":"","virtual":false,"description":"A Pointer object.","type":{"names":["Phaser.Pointer"]},"default":""},{"name":"pointer3","access":"","virtual":false,"description":"A Pointer object.","type":{"names":["Phaser.Pointer"]},"default":""},{"name":"pointer4","access":"","virtual":false,"description":"A Pointer object.","type":{"names":["Phaser.Pointer"]},"default":""},{"name":"pointer5","access":"","virtual":false,"description":"A Pointer object.","type":{"names":["Phaser.Pointer"]},"default":""},{"name":"pointer6","access":"","virtual":false,"description":"A Pointer object.","type":{"names":["Phaser.Pointer"]},"default":""},{"name":"pointer7","access":"","virtual":false,"description":"A Pointer object.","type":{"names":["Phaser.Pointer"]},"default":""},{"name":"pointer8","access":"","virtual":false,"description":"A Pointer object.","type":{"names":["Phaser.Pointer"]},"default":""},{"name":"pointer9","access":"","virtual":false,"description":"A Pointer object.","type":{"names":["Phaser.Pointer"]},"default":""},{"name":"pointer10","access":"","virtual":false,"description":"A Pointer object.","type":{"names":["Phaser.Pointer"]},"default":""},{"name":"pointers","access":"public","virtual":false,"description":"An array of non-mouse pointers that have been added to the game.\rThe properties `pointer1..N` are aliases for `pointers[0..N-1]`.","type":{"names":["Array.<Phaser.Pointer>"]},"default":""},{"name":"activePointer","access":"","virtual":false,"description":"The most recently active Pointer object.\r\rWhen you've limited max pointers to 1 this will accurately be either the first finger touched or mouse.","type":{"names":["Phaser.Pointer"]},"default":""},{"name":"mousePointer","access":"","virtual":false,"description":"The mouse has its own unique Phaser.Pointer object which you can use if making a desktop specific game.","type":{"names":["Pointer"]},"default":""},{"name":"mouse","access":"","virtual":false,"description":"The Mouse Input manager.\r\rYou should not usually access this manager directly, but instead use Input.mousePointer or Input.activePointer \rwhich normalizes all the input values for you, regardless of browser.","type":{"names":["Phaser.Mouse"]},"default":""},{"name":"keyboard","access":"","virtual":false,"description":"The Keyboard Input manager.","type":{"names":["Phaser.Keyboard"]},"default":""},{"name":"touch","access":"","virtual":false,"description":"The Touch Input manager.\r\rYou should not usually access this manager directly, but instead use Input.activePointer \rwhich normalizes all the input values for you, regardless of browser.","type":{"names":["Phaser.Touch"]},"default":""},{"name":"mspointer","access":"","virtual":false,"description":"The MSPointer Input manager.\r\rYou should not usually access this manager directly, but instead use Input.activePointer \rwhich normalizes all the input values for you, regardless of browser.","type":{"names":["Phaser.MSPointer"]},"default":""},{"name":"gamepad","access":"","virtual":false,"description":"The Gamepad Input manager.","type":{"names":["Phaser.Gamepad"]},"default":""},{"name":"resetLocked","access":"","virtual":false,"description":"If the Input Manager has been reset locked then all calls made to InputManager.reset, \rsuch as from a State change, are ignored.","type":{"names":["boolean"]},"default":""},{"name":"onDown","access":"","virtual":false,"description":"A Signal that is dispatched each time a pointer is pressed down.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onUp","access":"","virtual":false,"description":"A Signal that is dispatched each time a pointer is released.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onTap","access":"","virtual":false,"description":"A Signal that is dispatched each time a pointer is tapped.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onHold","access":"","virtual":false,"description":"A Signal that is dispatched each time a pointer is held down.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"minPriorityID","access":"","virtual":false,"description":"You can tell all Pointers to ignore any Game Object with a `priorityID` lower than this value.\rThis is useful when stacking UI layers. Set to zero to disable.","type":{"names":["number"]},"default":""},{"name":"interactiveItems","access":"","virtual":false,"description":"A list of interactive objects. The InputHandler components add and remove themselves from this list.","type":{"names":["Phaser.ArraySet"]},"default":""},{"name":"_localPoint","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["Phaser.Point"]},"default":""},{"name":"_pollCounter","access":"private","virtual":false,"description":"Internal var holding the current poll counter.","type":{"names":["number"]},"default":""},{"name":"_oldPosition","access":"private","virtual":false,"description":"A point object representing the previous position of the Pointer.","type":{"names":["Phaser.Point"]},"default":""},{"name":"_x","access":"private","virtual":false,"description":"x coordinate of the most recent Pointer event","type":{"names":["number"]},"default":""},{"name":"_y","access":"private","virtual":false,"description":"Y coordinate of the most recent Pointer event","type":{"names":["number"]},"default":""},{"name":"MOUSE_OVERRIDES_TOUCH","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"TOUCH_OVERRIDES_MOUSE","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"MOUSE_TOUCH_COMBINE","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"MAX_POINTERS","access":"","virtual":false,"description":"The maximum number of pointers that can be added. This excludes the mouse pointer.","type":{"names":["integer"]},"default":""},{"name":"countActivePointers","access":"private","virtual":false,"description":"Returns the total number of active pointers, not exceeding the specified limit","type":"","default":""},{"name":"x","access":"","virtual":false,"description":"The X coordinate of the most recently active pointer.\rThis value takes game scaling into account automatically. See Pointer.screenX/clientX for source values.","type":{"names":["number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The Y coordinate of the most recently active pointer.\rThis value takes game scaling into account automatically. See Pointer.screenY/clientY for source values.","type":{"names":["number"]},"default":""},{"name":"pollLocked","access":"","virtual":false,"description":"True if the Input is currently poll rate locked.","type":{"names":["boolean"]},"default":""},{"name":"totalInactivePointers","access":"","virtual":false,"description":"The total number of inactive Pointers.","type":{"names":["number"]},"default":""},{"name":"totalActivePointers","access":"","virtual":false,"description":"The total number of active Pointers, not counting the mouse pointer.","type":{"names":["integers"]},"default":""},{"name":"worldX","access":"","virtual":false,"description":"The world X coordinate of the most recently active pointer.","type":{"names":["number"]},"default":""},{"name":"worldY","access":"","virtual":false,"description":"The world Y coordinate of the most recently active pointer.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.InputHandler","description":"The Input Handler is bound to a specific Sprite and is responsible for managing all Input events on that Sprite.","constructor":{"name":"InputHandler","description":"The Input Handler is bound to a specific Sprite and is responsible for managing all Input events on that Sprite.","parameters":[{"name":"sprite","type":"Phaser.Sprite","description":"The Sprite object to which this Input Handler belongs.","default":"","optional":"","nullable":""}]},"functions":[{"name":"start","description":"Starts the Input Handler running. This is called automatically when you enable input on a Sprite, or can be called directly if you need to set a specific priority.","parameters":[{"name":"priority","type":"number","description":"Higher priority sprites take click priority over low-priority sprites when they are stacked on-top of each other.","default":"","optional":true,"nullable":""},{"name":"useHandCursor","type":"boolean","description":"If true the Sprite will show the hand cursor on mouse-over (doesn't apply to mobile browsers)","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Sprite","description":"The Sprite object to which the Input Handler is bound."}},{"name":"addedToGroup","description":"Handles when the parent Sprite is added to a new Group.","parameters":[]},{"name":"removedFromGroup","description":"Handles when the parent Sprite is removed from a Group.","parameters":[]},{"name":"reset","description":"Resets the Input Handler and disables it.","parameters":[]},{"name":"stop","description":"Stops the Input Handler from running.","parameters":[]},{"name":"destroy","description":"Clean up memory.","parameters":[]},{"name":"validForInput","description":"Checks if the object this InputHandler is bound to is valid for consideration in the Pointer move event.\rThis is called by Phaser.Pointer and shouldn't typically be called directly.","parameters":[{"name":"highestID","type":"number","description":"The highest ID currently processed by the Pointer.","default":"","optional":"","nullable":""},{"name":"highestRenderID","type":"number","description":"The highest Render Order ID currently processed by the Pointer.","default":"","optional":"","nullable":""},{"name":"includePixelPerfect","type":"boolean","description":"If this object has `pixelPerfectClick` or `pixelPerfectOver` set should it be considered as valid?","default":true,"optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the object this InputHandler is bound to should be considered as valid for input detection."}},{"name":"isPixelPerfect","description":"Is this object using pixel perfect checking?","parameters":[],"returns":{"type":"boolean","description":"True if the this InputHandler has either `pixelPerfectClick` or `pixelPerfectOver` set to `true`."}},{"name":"pointerX","description":"The x coordinate of the Input pointer, relative to the top-left of the parent Sprite.\rThis value is only set when the pointer is over this Sprite.","parameters":[{"name":"pointerId","type":"integer","description":"","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The x coordinate of the Input pointer."}},{"name":"pointerY","description":"The y coordinate of the Input pointer, relative to the top-left of the parent Sprite\rThis value is only set when the pointer is over this Sprite.","parameters":[{"name":"pointerId","type":"integer","description":"","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The y coordinate of the Input pointer."}},{"name":"pointerDown","description":"If the Pointer is down this returns true.\rThis *only* checks if the Pointer is down, not if it's down over any specific Sprite.","parameters":[{"name":"pointerId","type":"integer","description":"","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"- True if the given pointer is down, otherwise false."}},{"name":"pointerUp","description":"If the Pointer is up this returns true.\rThis *only* checks if the Pointer is up, not if it's up over any specific Sprite.","parameters":[{"name":"pointerId","type":"integer","description":"","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"- True if the given pointer is up, otherwise false."}},{"name":"pointerTimeDown","description":"A timestamp representing when the Pointer first touched the touchscreen.","parameters":[{"name":"pointerId","type":"integer","description":"","default":"(check all)","optional":true,"nullable":""}],"returns":{"type":"number","description":""}},{"name":"pointerTimeUp","description":"A timestamp representing when the Pointer left the touchscreen.","parameters":[{"name":"pointerId","type":"integer","description":"","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":""}},{"name":"pointerOver","description":"Is the Pointer over this Sprite?","parameters":[{"name":"pointerId","type":"integer","description":"The ID number of a Pointer to check. If you don't provide a number it will check all Pointers.","default":"(check all)","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"- True if the given pointer (if a index was given, or any pointer if not) is over this object."}},{"name":"pointerOut","description":"Is the Pointer outside of this Sprite?","parameters":[{"name":"pointerId","type":"integer","description":"The ID number of a Pointer to check. If you don't provide a number it will check all Pointers.","default":"(check all)","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the given pointer (if a index was given, or any pointer if not) is out of this object."}},{"name":"pointerTimeOver","description":"A timestamp representing when the Pointer first touched the touchscreen.","parameters":[{"name":"pointerId","type":"integer","description":"","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":""}},{"name":"pointerTimeOut","description":"A timestamp representing when the Pointer left the touchscreen.","parameters":[{"name":"pointerId","type":"integer","description":"","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":""}},{"name":"pointerDragged","description":"Is this sprite being dragged by the mouse or not?","parameters":[{"name":"pointerId","type":"integer","description":"","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the pointer is dragging an object, otherwise false."}},{"name":"checkPointerDown","description":"Checks if the given pointer is both down and over the Sprite this InputHandler belongs to.\rUse the `fastTest` flag is to quickly check just the bounding hit area even if `InputHandler.pixelPerfectOver` is `true`.","parameters":[{"name":"pointer","type":"Phaser.Pointer","description":"","default":"","optional":"","nullable":""},{"name":"fastTest","type":"boolean","description":"Force a simple hit area check even if `pixelPerfectOver` is true for this object?","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the pointer is down, otherwise false."}},{"name":"checkPointerOver","description":"Checks if the given pointer is over the Sprite this InputHandler belongs to.\rUse the `fastTest` flag is to quickly check just the bounding hit area even if `InputHandler.pixelPerfectOver` is `true`.","parameters":[{"name":"pointer","type":"Phaser.Pointer","description":"","default":"","optional":"","nullable":""},{"name":"fastTest","type":"boolean","description":"Force a simple hit area check even if `pixelPerfectOver` is true for this object?","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":""}},{"name":"checkPixel","description":"Runs a pixel perfect check against the given x/y coordinates of the Sprite this InputHandler is bound to.\rIt compares the alpha value of the pixel and if >= InputHandler.pixelPerfectAlpha it returns true.","parameters":[{"name":"x","type":"number","description":"The x coordinate to check.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate to check.","default":"","optional":"","nullable":""},{"name":"pointer","type":"Phaser.Pointer","description":"The pointer to get the x/y coordinate from if not passed as the first two parameters.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"true if there is the alpha of the pixel is >= InputHandler.pixelPerfectAlpha"}},{"name":"update","description":"Internal Update method. This is called automatically and handles the Pointer\rand drag update loops.","parameters":[{"name":"pointer","type":"Phaser.Pointer","description":"","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the pointer is still active, otherwise false."}},{"name":"_pointerOverHandler","description":"Internal method handling the pointer over event.","parameters":[{"name":"pointer","type":"Phaser.Pointer","description":"The pointer that triggered the event","default":"","optional":"","nullable":""},{"name":"silent","type":"boolean","description":"If silent is `true` then this method will not dispatch any Signals from the parent Sprite.","default":"","optional":true,"nullable":""}]},{"name":"_pointerOutHandler","description":"Internal method handling the pointer out event.","parameters":[{"name":"pointer","type":"Phaser.Pointer","description":"The pointer that triggered the event.","default":"","optional":"","nullable":""},{"name":"silent","type":"boolean","description":"If silent is `true` then this method will not dispatch any Signals from the parent Sprite.","default":"","optional":true,"nullable":""}]},{"name":"_touchedHandler","description":"Internal method handling the touched / clicked event.","parameters":[{"name":"pointer","type":"Phaser.Pointer","description":"The pointer that triggered the event.","default":"","optional":"","nullable":""}]},{"name":"dragTimeElapsed","description":"Internal method handling the drag threshold timer.","parameters":[{"name":"pointer","type":"Phaser.Pointer","description":"","default":"","optional":"","nullable":""}]},{"name":"_releasedHandler","description":"Internal method handling the pointer released event.","parameters":[{"name":"pointer","type":"Phaser.Pointer","description":"","default":"","optional":"","nullable":""}]},{"name":"updateDrag","description":"Called as a Pointer actively drags this Game Object.","parameters":[{"name":"pointer","type":"Phaser.Pointer","description":"The Pointer causing the drag update.","default":"","optional":"","nullable":""},{"name":"fromStart","type":"boolean","description":"True if this is the first update, immediately after the drag has started.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":""}},{"name":"justOver","description":"Returns true if the pointer has entered the Sprite within the specified delay time (defaults to 500ms, half a second)","parameters":[{"name":"pointerId","type":"integer","description":"","default":"","optional":true,"nullable":""},{"name":"delay","type":"number","description":"The time below which the pointer is considered as just over.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":""}},{"name":"justOut","description":"Returns true if the pointer has left the Sprite within the specified delay time (defaults to 500ms, half a second)","parameters":[{"name":"pointerId","type":"integer","description":"","default":"","optional":true,"nullable":""},{"name":"delay","type":"number","description":"The time below which the pointer is considered as just out.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":""}},{"name":"justPressed","description":"Returns true if the pointer has touched or clicked on the Sprite within the specified delay time (defaults to 500ms, half a second)","parameters":[{"name":"pointerId","type":"integer","description":"","default":"","optional":true,"nullable":""},{"name":"delay","type":"number","description":"The time below which the pointer is considered as just over.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":""}},{"name":"justReleased","description":"Returns true if the pointer was touching this Sprite, but has been released within the specified delay time (defaults to 500ms, half a second)","parameters":[{"name":"pointerId","type":"integer","description":"","default":"","optional":true,"nullable":""},{"name":"delay","type":"number","description":"The time below which the pointer is considered as just out.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":""}},{"name":"overDuration","description":"If the pointer is currently over this Sprite this returns how long it has been there for in milliseconds.","parameters":[{"name":"pointerId","type":"integer","description":"","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The number of milliseconds the pointer has been over the Sprite, or -1 if not over."}},{"name":"downDuration","description":"If the pointer is currently over this Sprite this returns how long it has been there for in milliseconds.","parameters":[{"name":"pointerId","type":"integer","description":"","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The number of milliseconds the pointer has been pressed down on the Sprite, or -1 if not over."}},{"name":"enableDrag","description":"Allow this Sprite to be dragged by any valid pointer.\r\rWhen the drag begins the Sprite.events.onDragStart event will be dispatched.\r\rWhen the drag completes by way of the user letting go of the pointer that was dragging the sprite, the Sprite.events.onDragStop event is dispatched.\r\rYou can control the thresholds over when a drag starts via the properties:\r\r`Pointer.dragDistanceThreshold` the distance, in pixels, that the pointer has to move\rbefore the drag will start.\r\r`Pointer.dragTimeThreshold` the time, in ms, that the pointer must be held down on\rthe Sprite before the drag will start.\r\rYou can set either (or both) of these properties after enabling a Sprite for drag.\r\rFor the duration of the drag the Sprite.events.onDragUpdate event is dispatched. This event is only dispatched when the pointer actually\rchanges position and moves. The event sends 5 parameters: `sprite`, `pointer`, `dragX`, `dragY` and `snapPoint`.","parameters":[{"name":"lockCenter","type":"boolean","description":"If false the Sprite will drag from where you click it minus the dragOffset. If true it will center itself to the tip of the mouse pointer.","default":"","optional":true,"nullable":""},{"name":"bringToTop","type":"boolean","description":"If true the Sprite will be bought to the top of the rendering list in its current Group.","default":"","optional":true,"nullable":""},{"name":"pixelPerfect","type":"boolean","description":"If true it will use a pixel perfect test to see if you clicked the Sprite. False uses the bounding box.","default":"","optional":true,"nullable":""},{"name":"alphaThreshold","type":"boolean","description":"If using pixel perfect collision this specifies the alpha level from 0 to 255 above which a collision is processed.","default":255,"optional":true,"nullable":""},{"name":"boundsRect","type":"Phaser.Rectangle","description":"If you want to restrict the drag of this sprite to a specific Rectangle, pass the Phaser.Rectangle here, otherwise it's free to drag anywhere.","default":"","optional":true,"nullable":""},{"name":"boundsSprite","type":"Phaser.Sprite","description":"If you want to restrict the drag of this sprite to within the bounding box of another sprite, pass it here.","default":"","optional":true,"nullable":""}]},{"name":"disableDrag","description":"Stops this sprite from being able to be dragged.\rIf it is currently the target of an active drag it will be stopped immediately; also disables any set callbacks.","parameters":[]},{"name":"startDrag","description":"Called by Pointer when drag starts on this Sprite. Should not usually be called directly.","parameters":[{"name":"pointer","type":"Phaser.Pointer","description":"","default":"","optional":"","nullable":""}]},{"name":"globalToLocalX","description":"Warning: EXPERIMENTAL","parameters":[{"name":"x","type":"number","description":"","default":"","optional":"","nullable":""}]},{"name":"globalToLocalY","description":"Warning: EXPERIMENTAL","parameters":[{"name":"y","type":"number","description":"","default":"","optional":"","nullable":""}]},{"name":"stopDrag","description":"Called by Pointer when drag is stopped on this Sprite. Should not usually be called directly.","parameters":[{"name":"pointer","type":"Phaser.Pointer","description":"","default":"","optional":"","nullable":""}]},{"name":"setDragLock","description":"Restricts this sprite to drag movement only on the given axis. Note: If both are set to false the sprite will never move!","parameters":[{"name":"allowHorizontal","type":"boolean","description":"To enable the sprite to be dragged horizontally set to true, otherwise false.","default":true,"optional":true,"nullable":""},{"name":"allowVertical","type":"boolean","description":"To enable the sprite to be dragged vertically set to true, otherwise false.","default":true,"optional":true,"nullable":""}]},{"name":"enableSnap","description":"Make this Sprite snap to the given grid either during drag or when it's released.\rFor example 16x16 as the snapX and snapY would make the sprite snap to every 16 pixels.","parameters":[{"name":"snapX","type":"number","description":"The width of the grid cell to snap to.","default":"","optional":"","nullable":""},{"name":"snapY","type":"number","description":"The height of the grid cell to snap to.","default":"","optional":"","nullable":""},{"name":"onDrag","type":"boolean","description":"If true the sprite will snap to the grid while being dragged.","default":true,"optional":true,"nullable":""},{"name":"onRelease","type":"boolean","description":"If true the sprite will snap to the grid when released.","default":"","optional":true,"nullable":""},{"name":"snapOffsetX","type":"number","description":"Used to offset the top-left starting point of the snap grid.","default":"","optional":true,"nullable":""},{"name":"snapOffsetY","type":"number","description":"Used to offset the top-left starting point of the snap grid.","default":"","optional":true,"nullable":""}]},{"name":"disableSnap","description":"Stops the sprite from snapping to a grid during drag or release.","parameters":[]},{"name":"checkBoundsRect","description":"Bounds Rect check for the sprite drag","parameters":[]},{"name":"checkBoundsSprite","description":"Parent Sprite Bounds check for the sprite drag.","parameters":[]}],"members":[{"name":"sprite","access":"","virtual":false,"description":"The Sprite object to which this Input Handler belongs.","type":{"names":["Phaser.Sprite"]},"default":""},{"name":"game","access":"","virtual":false,"description":"A reference to the currently running game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"enabled","access":"","virtual":false,"description":"If enabled the Input Handler will process input requests and monitor pointer activity.","type":{"names":["boolean"]},"default":""},{"name":"checked","access":"protected","virtual":false,"description":"A disposable flag used by the Pointer class when performing priority checks.","type":{"names":["boolean"]},"default":""},{"name":"priorityID","access":"","virtual":false,"description":"The priorityID is used to determine which game objects should get priority when input events occur. For example if you have\rseveral Sprites that overlap, by default the one at the top of the display list is given priority for input events. You can\rstop this from happening by controlling the priorityID value. The higher the value, the more important they are considered to the Input events.","type":{"names":["number"]},"default":""},{"name":"useHandCursor","access":"","virtual":false,"description":"On a desktop browser you can set the 'hand' cursor to appear when moving over the Sprite.","type":{"names":["boolean"]},"default":""},{"name":"_setHandCursor","access":"private","virtual":false,"description":"Did this Sprite trigger the hand cursor?","type":{"names":["boolean"]},"default":""},{"name":"isDragged","access":"","virtual":false,"description":"true if the Sprite is being currently dragged.","type":{"names":["boolean"]},"default":""},{"name":"allowHorizontalDrag","access":"","virtual":false,"description":"Controls if the Sprite is allowed to be dragged horizontally.","type":{"names":["boolean"]},"default":true},{"name":"allowVerticalDrag","access":"","virtual":false,"description":"Controls if the Sprite is allowed to be dragged vertically.","type":{"names":["boolean"]},"default":true},{"name":"bringToTop","access":"","virtual":false,"description":"If true when this Sprite is clicked or dragged it will automatically be bought to the top of the Group it is within.","type":{"names":["boolean"]},"default":""},{"name":"snapOffset","access":"","virtual":false,"description":"A Point object that contains by how far the Sprite snap is offset.","type":{"names":["Phaser.Point"]},"default":""},{"name":"snapOnDrag","access":"","virtual":false,"description":"When the Sprite is dragged this controls if the center of the Sprite will snap to the pointer on drag or not.","type":{"names":["boolean"]},"default":""},{"name":"snapOnRelease","access":"","virtual":false,"description":"When the Sprite is dragged this controls if the Sprite will be snapped on release.","type":{"names":["boolean"]},"default":""},{"name":"snapX","access":"","virtual":false,"description":"When a Sprite has snapping enabled this holds the width of the snap grid.","type":{"names":["number"]},"default":""},{"name":"snapY","access":"","virtual":false,"description":"When a Sprite has snapping enabled this holds the height of the snap grid.","type":{"names":["number"]},"default":""},{"name":"snapOffsetX","access":"","virtual":false,"description":"This defines the top-left X coordinate of the snap grid.","type":{"names":["number"]},"default":""},{"name":"snapOffsetY","access":"","virtual":false,"description":"This defines the top-left Y coordinate of the snap grid..","type":{"names":["number"]},"default":""},{"name":"pixelPerfectOver","access":"","virtual":false,"description":"Set to true to use pixel perfect hit detection when checking if the pointer is over this Sprite.\rThe x/y coordinates of the pointer are tested against the image in combination with the InputHandler.pixelPerfectAlpha value.\rThis feature only works for display objects with image based textures such as Sprites. It won't work on BitmapText or Rope.\rWarning: This is expensive, especially on mobile (where it's not even needed!) so only enable if required. Also see the less-expensive InputHandler.pixelPerfectClick. Use a pixel perfect check when testing for pointer over.","type":{"names":["boolean"]},"default":""},{"name":"pixelPerfectClick","access":"","virtual":false,"description":"Set to true to use pixel perfect hit detection when checking if the pointer is over this Sprite when it's clicked or touched.\rThe x/y coordinates of the pointer are tested against the image in combination with the InputHandler.pixelPerfectAlpha value.\rThis feature only works for display objects with image based textures such as Sprites. It won't work on BitmapText or Rope.\rWarning: This is expensive so only enable if you really need it. Use a pixel perfect check when testing for clicks or touches on the Sprite.","type":{"names":["boolean"]},"default":""},{"name":"pixelPerfectAlpha","access":"","virtual":false,"description":"The alpha tolerance threshold. If the alpha value of the pixel matches or is above this value, it's considered a hit.","type":{"names":["number"]},"default":255},{"name":"draggable","access":"","virtual":false,"description":"Is this sprite allowed to be dragged by the mouse? true = yes, false = no","type":{"names":["boolean"]},"default":""},{"name":"boundsRect","access":"","virtual":false,"description":"A region of the game world within which the sprite is restricted during drag.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"boundsSprite","access":"","virtual":false,"description":"A Sprite the bounds of which this sprite is restricted during drag.","type":{"names":["Phaser.Sprite"]},"default":""},{"name":"scaleLayer","access":"","virtual":false,"description":"EXPERIMENTAL: Please do not use this property unless you know what it does. Likely to change in the future.","type":{"names":["boolean"]},"default":""},{"name":"dragOffset","access":"","virtual":false,"description":"The offset from the Sprites position that dragging takes place from.","type":{"names":["Phaser.Point"]},"default":""},{"name":"dragFromCenter","access":"","virtual":false,"description":"Is the Sprite dragged from its center, or the point at which the Pointer was pressed down upon it?","type":{"names":["boolean"]},"default":""},{"name":"dragStopBlocksInputUp","access":"","virtual":false,"description":"If enabled, when the Sprite stops being dragged, it will only dispatch the `onDragStop` event, and not the `onInputUp` event. If set to `false` it will dispatch both events.","type":{"names":["boolean"]},"default":""},{"name":"dragStartPoint","access":"","virtual":false,"description":"The Point from which the most recent drag started from. Useful if you need to return an object to its starting position.","type":{"names":["Phaser.Point"]},"default":""},{"name":"dragDistanceThreshold","access":"","virtual":false,"description":"The distance, in pixels, the pointer has to move while being held down, before the Sprite thinks it is being dragged.","type":{"names":["integer"]},"default":""},{"name":"dragTimeThreshold","access":"","virtual":false,"description":"The amount of time, in ms, the pointer has to be held down over the Sprite before it thinks it is being dragged.","type":{"names":["integer"]},"default":""},{"name":"downPoint","access":"","virtual":false,"description":"A Point object containing the coordinates of the Pointer when it was first pressed down onto this Sprite.","type":{"names":["Phaser.Point"]},"default":""},{"name":"snapPoint","access":"","virtual":false,"description":"If the sprite is set to snap while dragging this holds the point of the most recent 'snap' event.","type":{"names":["Phaser.Point"]},"default":""},{"name":"_dragPoint","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["Phaser.Point"]},"default":""},{"name":"_dragPhase","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["boolean"]},"default":""},{"name":"_pendingDrag","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["boolean"]},"default":""},{"name":"_dragTimePass","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["boolean"]},"default":""},{"name":"_dragDistancePass","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["boolean"]},"default":""},{"name":"_wasEnabled","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["boolean"]},"default":""},{"name":"_tempPoint","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["Phaser.Point"]},"default":""},{"name":"_pointerData","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["array"]},"default":""}]},{"name":"Phaser.Key","description":"If you need more fine-grained control over the handling of specific keys you can create and use Phaser.Key objects.","constructor":{"name":"Key","description":"If you need more fine-grained control over the handling of specific keys you can create and use Phaser.Key objects.","parameters":[{"name":"game","type":"Phaser.Game","description":"Current game instance.","default":"","optional":"","nullable":""},{"name":"keycode","type":"integer","description":"The key code this Key is responsible for. See {@link Phaser.KeyCode}.","default":"","optional":"","nullable":""}]},"functions":[{"name":"update","description":"Called automatically by Phaser.Keyboard.","parameters":[]},{"name":"processKeyDown","description":"Called automatically by Phaser.Keyboard.","parameters":[{"name":"event","type":"KeyboardEvent","description":"The DOM event that triggered this.","default":"","optional":"","nullable":""}]},{"name":"processKeyUp","description":"Called automatically by Phaser.Keyboard.","parameters":[{"name":"event","type":"KeyboardEvent","description":"The DOM event that triggered this.","default":"","optional":"","nullable":""}]},{"name":"reset","description":"Resets the state of this Key.\r\rThis sets isDown to false, isUp to true, resets the time to be the current time, and _enables_ the key.\rIn addition, if it is a \"hard reset\", it clears clears any callbacks associated with the onDown and onUp events and removes the onHoldCallback.","parameters":[{"name":"hard","type":"boolean","description":"A soft reset won't reset any events or callbacks; a hard reset will.","default":true,"optional":true,"nullable":""}]},{"name":"downDuration","description":"Returns `true` if the Key was pressed down within the `duration` value given, or `false` if it either isn't down,\ror was pressed down longer ago than then given duration.","parameters":[{"name":"duration","type":"number","description":"The duration within which the key is considered as being just pressed. Given in ms.","default":50,"optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the key was pressed down within the given duration."}},{"name":"upDuration","description":"Returns `true` if the Key was pressed down within the `duration` value given, or `false` if it either isn't down,\ror was pressed down longer ago than then given duration.","parameters":[{"name":"duration","type":"number","description":"The duration within which the key is considered as being just released. Given in ms.","default":50,"optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the key was released within the given duration."}},{"name":"justPressed","description":"Returns `true` if the Key was just pressed down this update tick, or `false` if it either isn't down,\ror was pressed down on a previous update tick.","parameters":[],"returns":{"type":"boolean","description":"True if the key was just pressed down this update tick."}},{"name":"justReleased","description":"Returns `true` if the Key was just released this update tick, or `false` if it either isn't up,\ror was released on a previous update tick.","parameters":[],"returns":{"type":"boolean","description":"True if the key was just released this update tick."}}],"members":[{"name":"game","access":"","virtual":false,"description":"A reference to the currently running game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"_enabled","access":"private","virtual":false,"description":"The enabled state of the key - see `enabled`.","type":{"names":["boolean"]},"default":""},{"name":"event","access":"","virtual":false,"description":"Stores the most recent DOM event.","type":{"names":["object"]},"default":""},{"name":"isDown","access":"","virtual":false,"description":"The \"down\" state of the key. This will remain `true` for as long as the keyboard thinks this key is held down.","type":{"names":["boolean"]},"default":""},{"name":"isUp","access":"","virtual":false,"description":"The \"up\" state of the key. This will remain `true` for as long as the keyboard thinks this key is up.","type":{"names":["boolean"]},"default":true},{"name":"altKey","access":"","virtual":false,"description":"The down state of the ALT key, if pressed at the same time as this key.","type":{"names":["boolean"]},"default":""},{"name":"ctrlKey","access":"","virtual":false,"description":"The down state of the CTRL key, if pressed at the same time as this key.","type":{"names":["boolean"]},"default":""},{"name":"shiftKey","access":"","virtual":false,"description":"The down state of the SHIFT key, if pressed at the same time as this key.","type":{"names":["boolean"]},"default":""},{"name":"timeDown","access":"","virtual":false,"description":"The timestamp when the key was last pressed down. This is based on Game.time.now.","type":{"names":["number"]},"default":""},{"name":"duration","access":"","virtual":false,"description":"If the key is down this value holds the duration of that key press and is constantly updated.\rIf the key is up it holds the duration of the previous down session. The number of milliseconds this key has been held down for.","type":{"names":["number"]},"default":""},{"name":"timeUp","access":"","virtual":false,"description":"The timestamp when the key was last released. This is based on Game.time.now.","type":{"names":["number"]},"default":""},{"name":"durationUp","access":"","virtual":false,"description":"If the key is up this value holds the duration of that key release and is constantly updated.\rIf the key is down it holds the duration of the previous up session.","type":"","default":""},{"name":"repeats","access":"","virtual":false,"description":"If a key is held down this holds down the number of times the key has 'repeated'.","type":{"names":["number"]},"default":""},{"name":"keyCode","access":"","virtual":false,"description":"The keycode of this key.","type":{"names":["number"]},"default":""},{"name":"onDown","access":"","virtual":false,"description":"This Signal is dispatched every time this Key is pressed down. It is only dispatched once (until the key is released again).","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onHoldCallback","access":"","virtual":false,"description":"A callback that is called while this Key is held down. Warning: Depending on refresh rate that could be 60+ times per second.","type":{"names":["function"]},"default":""},{"name":"onHoldContext","access":"","virtual":false,"description":"The context under which the onHoldCallback will be called.","type":{"names":["object"]},"default":""},{"name":"onUp","access":"","virtual":false,"description":"This Signal is dispatched every time this Key is released. It is only dispatched once (until the key is pressed and released again).","type":{"names":["Phaser.Signal"]},"default":""},{"name":"_justDown","access":"private","virtual":false,"description":"True if the key has just been pressed (NOTE: requires to be reset, see justDown getter)","type":{"names":["boolean"]},"default":""},{"name":"_justUp","access":"private","virtual":false,"description":"True if the key has just been pressed (NOTE: requires to be reset, see justDown getter)","type":{"names":["boolean"]},"default":""},{"name":"justDown","access":"","virtual":false,"description":"The justDown value allows you to test if this Key has just been pressed down or not.\rWhen you check this value it will return `true` if the Key is down, otherwise `false`.\rYou can only call justDown once per key press. It will only return `true` once, until the Key is released and pressed down again.\rThis allows you to use it in situations where you want to check if this key is down without using a Signal, such as in a core game loop.","type":{"names":["boolean"]},"default":"false"},{"name":"justUp","access":"","virtual":false,"description":"The justUp value allows you to test if this Key has just been released or not.\rWhen you check this value it will return `true` if the Key is up, otherwise `false`.\rYou can only call justUp once per key release. It will only return `true` once, until the Key is pressed down and released again.\rThis allows you to use it in situations where you want to check if this key is up without using a Signal, such as in a core game loop.","type":{"names":["boolean"]},"default":"false"},{"name":"enabled","access":"","virtual":false,"description":"An enabled key processes its update and dispatches events.\rA key can be disabled momentarily at runtime instead of deleting it.","type":{"names":["boolean"]},"default":"true"}]},{"name":"Phaser.Keyboard","description":"The Keyboard class monitors keyboard input and dispatches keyboard events.\r\r_Note_: many keyboards are unable to process certain combinations of keys due to hardware limitations known as ghosting.\rSee http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/ for more details.\r\rAlso please be aware that certain browser extensions can disable or override Phaser keyboard handling.\rFor example the Chrome extension vimium is known to disable Phaser from using the D key. And there are others.\rSo please check your extensions before opening Phaser issues.","constructor":{"name":"Keyboard","description":"The Keyboard class monitors keyboard input and dispatches keyboard events.\r\r_Note_: many keyboards are unable to process certain combinations of keys due to hardware limitations known as ghosting.\rSee http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/ for more details.\r\rAlso please be aware that certain browser extensions can disable or override Phaser keyboard handling.\rFor example the Chrome extension vimium is known to disable Phaser from using the D key. And there are others.\rSo please check your extensions before opening Phaser issues.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""}]},"functions":[{"name":"addCallbacks","description":"Add callbacks to the Keyboard handler so that each time a key is pressed down or released the callbacks are activated.","parameters":[{"name":"context","type":"object","description":"The context under which the callbacks are run.","default":"","optional":"","nullable":""},{"name":"onDown","type":"function","description":"This callback is invoked every time a key is pressed down.","default":"","optional":true,"nullable":""},{"name":"onUp","type":"function","description":"This callback is invoked every time a key is released.","default":"","optional":true,"nullable":""},{"name":"onPress","type":"function","description":"This callback is invoked every time the onkeypress event is raised.","default":"","optional":true,"nullable":""}]},{"name":"addKey","description":"If you need more fine-grained control over a Key you can create a new Phaser.Key object via this method.\rThe Key object can then be polled, have events attached to it, etc.","parameters":[{"name":"keycode","type":"integer","description":"The {@link Phaser.KeyCode keycode} of the key.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Key","description":"The Key object which you can store locally and reference directly."}},{"name":"addKeys","description":"A practical way to create an object containing user selected hotkeys.\r\rFor example,\r\r    addKeys( { 'up': Phaser.KeyCode.W, 'down': Phaser.KeyCode.S, 'left': Phaser.KeyCode.A, 'right': Phaser.KeyCode.D } );\r\rwould return an object containing properties (`up`, `down`, `left` and `right`) referring to {@link Phaser.Key} object.","parameters":[{"name":"keys","type":"object","description":"A key mapping object, i.e. `{ 'up': Phaser.KeyCode.W, 'down': Phaser.KeyCode.S }` or `{ 'up': 52, 'down': 53 }`.","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"An object containing the properties mapped to {@link Phaser.Key} values."}},{"name":"removeKey","description":"Removes a Key object from the Keyboard manager.","parameters":[{"name":"keycode","type":"integer","description":"The {@link Phaser.KeyCode keycode} of the key to remove.","default":"","optional":"","nullable":""}]},{"name":"createCursorKeys","description":"Creates and returns an object containing 4 hotkeys for Up, Down, Left and Right.","parameters":[],"returns":{"type":"object","description":"An object containing properties: `up`, `down`, `left` and `right` of {@link Phaser.Key} objects."}},{"name":"start","description":"Starts the Keyboard event listeners running (keydown and keyup). They are attached to the window.\rThis is called automatically by Phaser.Input and should not normally be invoked directly.","parameters":[]},{"name":"stop","description":"Stops the Keyboard event listeners from running (keydown, keyup and keypress). They are removed from the window.","parameters":[]},{"name":"destroy","description":"Stops the Keyboard event listeners from running (keydown and keyup). They are removed from the window.\rAlso clears all key captures and currently created Key objects.","parameters":[]},{"name":"addKeyCapture","description":"By default when a key is pressed Phaser will not stop the event from propagating up to the browser.\rThere are some keys this can be annoying for, like the arrow keys or space bar, which make the browser window scroll.\r\rThe `addKeyCapture` method enables consuming keyboard event for specific keys so it doesn't bubble up to the the browser\rand cause the default browser behavior.\r\rPass in either a single keycode or an array/hash of keycodes.","parameters":[{"name":"keycode","type":["integer","Array.<integer>","object"],"description":"Either a single {@link Phaser.KeyCode keycode} or an array/hash of keycodes such as `[65, 67, 68]`.","default":"","optional":"","nullable":""}]},{"name":"removeKeyCapture","description":"Removes an existing key capture.","parameters":[{"name":"keycode","type":"integer","description":"The {@link Phaser.KeyCode keycode} to remove capturing of.","default":"","optional":"","nullable":""}]},{"name":"clearCaptures","description":"Clear all set key captures.","parameters":[]},{"name":"update","description":"Updates all currently defined keys.","parameters":[]},{"name":"processKeyDown","description":"Process the keydown event.","parameters":[{"name":"event","type":"KeyboardEvent","description":"","default":"","optional":"","nullable":""}]},{"name":"processKeyPress","description":"Process the keypress event.","parameters":[{"name":"event","type":"KeyboardEvent","description":"","default":"","optional":"","nullable":""}]},{"name":"processKeyUp","description":"Process the keyup event.","parameters":[{"name":"event","type":"KeyboardEvent","description":"","default":"","optional":"","nullable":""}]},{"name":"reset","description":"Resets all Keys.","parameters":[{"name":"hard","type":"boolean","description":"A soft reset won't reset any events or callbacks that are bound to the Keys. A hard reset will.","default":true,"optional":true,"nullable":""}]},{"name":"downDuration","description":"Returns `true` if the Key was pressed down within the `duration` value given, or `false` if it either isn't down,\ror was pressed down longer ago than then given duration.","parameters":[{"name":"keycode","type":"integer","description":"The {@link Phaser.KeyCode keycode} of the key to check: i.e. Phaser.KeyCode.UP or Phaser.KeyCode.SPACEBAR.","default":"","optional":"","nullable":""},{"name":"duration","type":"number","description":"The duration within which the key is considered as being just pressed. Given in ms.","default":50,"optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the key was pressed down within the given duration, false if not or null if the Key wasn't found."}},{"name":"upDuration","description":"Returns `true` if the Key was pressed down within the `duration` value given, or `false` if it either isn't down,\ror was pressed down longer ago than then given duration.","parameters":[{"name":"keycode","type":["Phaser.KeyCode","integer"],"description":"The keycode of the key to check, i.e. Phaser.KeyCode.UP or Phaser.KeyCode.SPACEBAR.","default":"","optional":"","nullable":""},{"name":"duration","type":"number","description":"The duration within which the key is considered as being just released. Given in ms.","default":50,"optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the key was released within the given duration, false if not or null if the Key wasn't found."}},{"name":"isDown","description":"Returns true of the key is currently pressed down. Note that it can only detect key presses on the web browser.","parameters":[{"name":"keycode","type":"integer","description":"The {@link Phaser.KeyCode keycode} of the key to check: i.e. Phaser.KeyCode.UP or Phaser.KeyCode.SPACEBAR.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the key is currently down, false if not or null if the Key wasn't found."}}],"members":[{"name":"game","access":"","virtual":false,"description":"Local reference to game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"enabled","access":"","virtual":false,"description":"Keyboard input will only be processed if enabled.","type":{"names":["boolean"]},"default":true},{"name":"event","access":"","virtual":false,"description":"The most recent DOM event from keydown or keyup. This is updated every time a new key is pressed or released.","type":{"names":["object"]},"default":""},{"name":"pressEvent","access":"","virtual":false,"description":"The most recent DOM event from keypress.","type":{"names":["object"]},"default":""},{"name":"callbackContext","access":"","virtual":false,"description":"The context under which the callbacks are run.","type":{"names":["object"]},"default":""},{"name":"onDownCallback","access":"","virtual":false,"description":"This callback is invoked every time a key is pressed down, including key repeats when a key is held down.","type":{"names":["function"]},"default":""},{"name":"onPressCallback","access":"","virtual":false,"description":"This callback is invoked every time a DOM onkeypress event is raised, which is only for printable keys.","type":{"names":["function"]},"default":""},{"name":"onUpCallback","access":"","virtual":false,"description":"This callback is invoked every time a key is released.","type":{"names":["function"]},"default":""},{"name":"_keys","access":"private","virtual":false,"description":"The array the Phaser.Key objects are stored in.","type":{"names":["array.<Phaser.Key>"]},"default":""},{"name":"_capture","access":"private","virtual":false,"description":"The array the key capture values are stored in.","type":{"names":["array"]},"default":""},{"name":"_onKeyDown","access":"private","virtual":false,"description":"","type":{"names":["function"]},"default":""},{"name":"_onKeyPress","access":"private","virtual":false,"description":"","type":{"names":["function"]},"default":""},{"name":"_onKeyUp","access":"private","virtual":false,"description":"","type":{"names":["function"]},"default":""},{"name":"_i","access":"private","virtual":false,"description":"Internal cache var","type":{"names":["number"]},"default":""},{"name":"_k","access":"private","virtual":false,"description":"Internal cache var","type":{"names":["number"]},"default":""},{"name":"lastChar","access":"","virtual":false,"description":"Returns the string value of the most recently pressed key.","type":{"names":["string"]},"default":""},{"name":"lastKey","access":"","virtual":false,"description":"Returns the most recently pressed Key. This is a Phaser.Key object and it changes every time a key is pressed.","type":{"names":["Phaser.Key"]},"default":""}]},{"name":"Phaser.KeyCode","description":"A key code represents a physical key on a keyboard.\r\rThe KeyCode class contains commonly supported keyboard key codes which can be used\ras keycode`-parameters in several {@link Phaser.Keyboard} and {@link Phaser.Key} methods.\r\r_Note_: These values should only be used indirectly, eg. as `Phaser.KeyCode.KEY`.\rFuture versions may replace the actual values, such that they remain compatible with `keycode`-parameters.\rThe current implementation maps to the {@link https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode KeyboardEvent.keyCode} property.\r\r_Note_: Use `Phaser.KeyCode.KEY` instead of `Phaser.Keyboard.KEY` to refer to a key code;\rthe latter approach is supported for compatibility.","constructor":{"name":"KeyCode","description":"A key code represents a physical key on a keyboard.\r\rThe KeyCode class contains commonly supported keyboard key codes which can be used\ras keycode`-parameters in several {@link Phaser.Keyboard} and {@link Phaser.Key} methods.\r\r_Note_: These values should only be used indirectly, eg. as `Phaser.KeyCode.KEY`.\rFuture versions may replace the actual values, such that they remain compatible with `keycode`-parameters.\rThe current implementation maps to the {@link https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode KeyboardEvent.keyCode} property.\r\r_Note_: Use `Phaser.KeyCode.KEY` instead of `Phaser.Keyboard.KEY` to refer to a key code;\rthe latter approach is supported for compatibility.","parameters":[]},"functions":[],"members":[{"name":"A","access":"","virtual":false,"description":"","type":"","default":""},{"name":"B","access":"","virtual":false,"description":"","type":"","default":""},{"name":"C","access":"","virtual":false,"description":"","type":"","default":""},{"name":"D","access":"","virtual":false,"description":"","type":"","default":""},{"name":"E","access":"","virtual":false,"description":"","type":"","default":""},{"name":"F","access":"","virtual":false,"description":"","type":"","default":""},{"name":"G","access":"","virtual":false,"description":"","type":"","default":""},{"name":"H","access":"","virtual":false,"description":"","type":"","default":""},{"name":"I","access":"","virtual":false,"description":"","type":"","default":""},{"name":"J","access":"","virtual":false,"description":"","type":"","default":""},{"name":"K","access":"","virtual":false,"description":"","type":"","default":""},{"name":"L","access":"","virtual":false,"description":"","type":"","default":""},{"name":"M","access":"","virtual":false,"description":"","type":"","default":""},{"name":"N","access":"","virtual":false,"description":"","type":"","default":""},{"name":"O","access":"","virtual":false,"description":"","type":"","default":""},{"name":"P","access":"","virtual":false,"description":"","type":"","default":""},{"name":"Q","access":"","virtual":false,"description":"","type":"","default":""},{"name":"R","access":"","virtual":false,"description":"","type":"","default":""},{"name":"S","access":"","virtual":false,"description":"","type":"","default":""},{"name":"T","access":"","virtual":false,"description":"","type":"","default":""},{"name":"U","access":"","virtual":false,"description":"","type":"","default":""},{"name":"V","access":"","virtual":false,"description":"","type":"","default":""},{"name":"W","access":"","virtual":false,"description":"","type":"","default":""},{"name":"X","access":"","virtual":false,"description":"","type":"","default":""},{"name":"Y","access":"","virtual":false,"description":"","type":"","default":""},{"name":"Z","access":"","virtual":false,"description":"","type":"","default":""},{"name":"ZERO","access":"","virtual":false,"description":"","type":"","default":""},{"name":"ONE","access":"","virtual":false,"description":"","type":"","default":""},{"name":"TWO","access":"","virtual":false,"description":"","type":"","default":""},{"name":"THREE","access":"","virtual":false,"description":"","type":"","default":""},{"name":"FOUR","access":"","virtual":false,"description":"","type":"","default":""},{"name":"FIVE","access":"","virtual":false,"description":"","type":"","default":""},{"name":"SIX","access":"","virtual":false,"description":"","type":"","default":""},{"name":"SEVEN","access":"","virtual":false,"description":"","type":"","default":""},{"name":"EIGHT","access":"","virtual":false,"description":"","type":"","default":""},{"name":"NINE","access":"","virtual":false,"description":"","type":"","default":""},{"name":"NUMPAD_0","access":"","virtual":false,"description":"","type":"","default":""},{"name":"NUMPAD_1","access":"","virtual":false,"description":"","type":"","default":""},{"name":"NUMPAD_2","access":"","virtual":false,"description":"","type":"","default":""},{"name":"NUMPAD_3","access":"","virtual":false,"description":"","type":"","default":""},{"name":"NUMPAD_4","access":"","virtual":false,"description":"","type":"","default":""},{"name":"NUMPAD_5","access":"","virtual":false,"description":"","type":"","default":""},{"name":"NUMPAD_6","access":"","virtual":false,"description":"","type":"","default":""},{"name":"NUMPAD_7","access":"","virtual":false,"description":"","type":"","default":""},{"name":"NUMPAD_8","access":"","virtual":false,"description":"","type":"","default":""},{"name":"NUMPAD_9","access":"","virtual":false,"description":"","type":"","default":""},{"name":"NUMPAD_MULTIPLY","access":"","virtual":false,"description":"","type":"","default":""},{"name":"NUMPAD_ADD","access":"","virtual":false,"description":"","type":"","default":""},{"name":"NUMPAD_ENTER","access":"","virtual":false,"description":"","type":"","default":""},{"name":"NUMPAD_SUBTRACT","access":"","virtual":false,"description":"","type":"","default":""},{"name":"NUMPAD_DECIMAL","access":"","virtual":false,"description":"","type":"","default":""},{"name":"NUMPAD_DIVIDE","access":"","virtual":false,"description":"","type":"","default":""},{"name":"F1","access":"","virtual":false,"description":"","type":"","default":""},{"name":"F2","access":"","virtual":false,"description":"","type":"","default":""},{"name":"F3","access":"","virtual":false,"description":"","type":"","default":""},{"name":"F4","access":"","virtual":false,"description":"","type":"","default":""},{"name":"F5","access":"","virtual":false,"description":"","type":"","default":""},{"name":"F6","access":"","virtual":false,"description":"","type":"","default":""},{"name":"F7","access":"","virtual":false,"description":"","type":"","default":""},{"name":"F8","access":"","virtual":false,"description":"","type":"","default":""},{"name":"F9","access":"","virtual":false,"description":"","type":"","default":""},{"name":"F10","access":"","virtual":false,"description":"","type":"","default":""},{"name":"F11","access":"","virtual":false,"description":"","type":"","default":""},{"name":"F12","access":"","virtual":false,"description":"","type":"","default":""},{"name":"F13","access":"","virtual":false,"description":"","type":"","default":""},{"name":"F14","access":"","virtual":false,"description":"","type":"","default":""},{"name":"F15","access":"","virtual":false,"description":"","type":"","default":""},{"name":"COLON","access":"","virtual":false,"description":"","type":"","default":""},{"name":"EQUALS","access":"","virtual":false,"description":"","type":"","default":""},{"name":"COMMA","access":"","virtual":false,"description":"","type":"","default":""},{"name":"UNDERSCORE","access":"","virtual":false,"description":"","type":"","default":""},{"name":"PERIOD","access":"","virtual":false,"description":"","type":"","default":""},{"name":"QUESTION_MARK","access":"","virtual":false,"description":"","type":"","default":""},{"name":"TILDE","access":"","virtual":false,"description":"","type":"","default":""},{"name":"OPEN_BRACKET","access":"","virtual":false,"description":"","type":"","default":""},{"name":"BACKWARD_SLASH","access":"","virtual":false,"description":"","type":"","default":""},{"name":"CLOSED_BRACKET","access":"","virtual":false,"description":"","type":"","default":""},{"name":"QUOTES","access":"","virtual":false,"description":"","type":"","default":""},{"name":"BACKSPACE","access":"","virtual":false,"description":"","type":"","default":""},{"name":"TAB","access":"","virtual":false,"description":"","type":"","default":""},{"name":"CLEAR","access":"","virtual":false,"description":"","type":"","default":""},{"name":"ENTER","access":"","virtual":false,"description":"","type":"","default":""},{"name":"SHIFT","access":"","virtual":false,"description":"","type":"","default":""},{"name":"CONTROL","access":"","virtual":false,"description":"","type":"","default":""},{"name":"ALT","access":"","virtual":false,"description":"","type":"","default":""},{"name":"CAPS_LOCK","access":"","virtual":false,"description":"","type":"","default":""},{"name":"ESC","access":"","virtual":false,"description":"","type":"","default":""},{"name":"SPACEBAR","access":"","virtual":false,"description":"","type":"","default":""},{"name":"PAGE_UP","access":"","virtual":false,"description":"","type":"","default":""},{"name":"PAGE_DOWN","access":"","virtual":false,"description":"","type":"","default":""},{"name":"END","access":"","virtual":false,"description":"","type":"","default":""},{"name":"HOME","access":"","virtual":false,"description":"","type":"","default":""},{"name":"LEFT","access":"","virtual":false,"description":"","type":"","default":""},{"name":"UP","access":"","virtual":false,"description":"","type":"","default":""},{"name":"RIGHT","access":"","virtual":false,"description":"","type":"","default":""},{"name":"DOWN","access":"","virtual":false,"description":"","type":"","default":""},{"name":"PLUS","access":"","virtual":false,"description":"","type":"","default":""},{"name":"MINUS","access":"","virtual":false,"description":"","type":"","default":""},{"name":"INSERT","access":"","virtual":false,"description":"","type":"","default":""},{"name":"DELETE","access":"","virtual":false,"description":"","type":"","default":""},{"name":"HELP","access":"","virtual":false,"description":"","type":"","default":""},{"name":"NUM_LOCK","access":"","virtual":false,"description":"","type":"","default":""}]},{"name":"Phaser.Mouse","description":"The Mouse class is responsible for handling all aspects of mouse interaction with the browser.\r\rIt captures and processes mouse events that happen on the game canvas object.\rIt also adds a single `mouseup` listener to `window` which is used to capture the mouse being released\rwhen not over the game.\r\rYou should not normally access this class directly, but instead use a Phaser.Pointer object\rwhich normalises all game input for you, including accurate button handling.","constructor":{"name":"Mouse","description":"The Mouse class is responsible for handling all aspects of mouse interaction with the browser.\r\rIt captures and processes mouse events that happen on the game canvas object.\rIt also adds a single `mouseup` listener to `window` which is used to capture the mouse being released\rwhen not over the game.\r\rYou should not normally access this class directly, but instead use a Phaser.Pointer object\rwhich normalises all game input for you, including accurate button handling.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""}]},"functions":[{"name":"start","description":"Starts the event listeners running.","parameters":[]},{"name":"onMouseDown","description":"The internal method that handles the mouse down event from the browser.","parameters":[{"name":"event","type":"MouseEvent","description":"The native event from the browser. This gets stored in Mouse.event.","default":"","optional":"","nullable":""}]},{"name":"onMouseMove","description":"The internal method that handles the mouse move event from the browser.","parameters":[{"name":"event","type":"MouseEvent","description":"The native event from the browser. This gets stored in Mouse.event.","default":"","optional":"","nullable":""}]},{"name":"onMouseUp","description":"The internal method that handles the mouse up event from the browser.","parameters":[{"name":"event","type":"MouseEvent","description":"The native event from the browser. This gets stored in Mouse.event.","default":"","optional":"","nullable":""}]},{"name":"onMouseUpGlobal","description":"The internal method that handles the mouse up event from the window.","parameters":[{"name":"event","type":"MouseEvent","description":"The native event from the browser. This gets stored in Mouse.event.","default":"","optional":"","nullable":""}]},{"name":"onMouseOutGlobal","description":"The internal method that handles the mouse out event from the window.","parameters":[{"name":"event","type":"MouseEvent","description":"The native event from the browser. This gets stored in Mouse.event.","default":"","optional":"","nullable":""}]},{"name":"onMouseOut","description":"The internal method that handles the mouse out event from the browser.","parameters":[{"name":"event","type":"MouseEvent","description":"The native event from the browser. This gets stored in Mouse.event.","default":"","optional":"","nullable":""}]},{"name":"onMouseOver","description":"The internal method that handles the mouse over event from the browser.","parameters":[{"name":"event","type":"MouseEvent","description":"The native event from the browser. This gets stored in Mouse.event.","default":"","optional":"","nullable":""}]},{"name":"onMouseWheel","description":"The internal method that handles the mouse wheel event from the browser.","parameters":[{"name":"event","type":"MouseEvent","description":"The native event from the browser.","default":"","optional":"","nullable":""}]},{"name":"requestPointerLock","description":"If the browser supports it you can request that the pointer be locked to the browser window.\rThis is classically known as 'FPS controls', where the pointer can't leave the browser until the user presses an exit key.\rIf the browser successfully enters a locked state the event Phaser.Mouse.pointerLock will be dispatched and the first parameter will be 'true'.","parameters":[]},{"name":"pointerLockChange","description":"Internal pointerLockChange handler.","parameters":[{"name":"event","type":"Event","description":"The native event from the browser. This gets stored in Mouse.event.","default":"","optional":"","nullable":""}]},{"name":"releasePointerLock","description":"Internal release pointer lock handler.","parameters":[]},{"name":"stop","description":"Stop the event listeners.","parameters":[]},{"name":"WheelEventProxy","description":"A purely internal event support class to proxy 'wheelscroll' and 'DOMMouseWheel'\revents to 'wheel'-like events.\r\rSee https://developer.mozilla.org/en-US/docs/Web/Events/mousewheel for choosing a scale and delta mode.","parameters":[{"name":"scaleFactor","type":"number","description":"Scale factor as applied to wheelDelta/wheelDeltaX or details.","default":"","optional":"","nullable":""},{"name":"deltaMode","type":"integer","description":"The reported delta mode.","default":"","optional":"","nullable":""}]}],"members":[{"name":"game","access":"","virtual":false,"description":"A reference to the currently running game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"input","access":"protected","virtual":false,"description":"A reference to the Phaser Input Manager.","type":{"names":["Phaser.Input"]},"default":""},{"name":"callbackContext","access":"","virtual":false,"description":"The context under which callbacks are called.","type":{"names":["object"]},"default":""},{"name":"mouseDownCallback","access":"","virtual":false,"description":"A callback that can be fired when the mouse is pressed down.","type":{"names":["function"]},"default":""},{"name":"mouseUpCallback","access":"","virtual":false,"description":"A callback that can be fired when the mouse is released from a pressed down state.","type":{"names":["function"]},"default":""},{"name":"mouseOutCallback","access":"","virtual":false,"description":"A callback that can be fired when the mouse is no longer over the game canvas.","type":{"names":["function"]},"default":""},{"name":"mouseOverCallback","access":"","virtual":false,"description":"A callback that can be fired when the mouse enters the game canvas (usually after a mouseout).","type":{"names":["function"]},"default":""},{"name":"mouseWheelCallback","access":"","virtual":false,"description":"A callback that can be fired when the mousewheel is used.","type":{"names":["function"]},"default":""},{"name":"capture","access":"","virtual":false,"description":"If true the DOM mouse events will have event.preventDefault applied to them, if false they will propagate fully.","type":{"names":["boolean"]},"default":""},{"name":"button","access":"","virtual":false,"description":"This property was removed in Phaser 2.4 and should no longer be used.\rInstead please see the Pointer button properties such as `Pointer.leftButton`, `Pointer.rightButton` and so on.\rOr Pointer.button holds the DOM event button value if you require that.","type":{"names":["number"]},"default":""},{"name":"wheelDelta","access":"","virtual":false,"description":"The direction of the _last_ mousewheel usage 1 for up -1 for down.","type":{"names":["number"]},"default":""},{"name":"enabled","access":"","virtual":false,"description":"Mouse input will only be processed if enabled.","type":{"names":["boolean"]},"default":true},{"name":"locked","access":"","virtual":false,"description":"If the mouse has been Pointer Locked successfully this will be set to true.","type":{"names":["boolean"]},"default":""},{"name":"stopOnGameOut","access":"","virtual":false,"description":"If true Pointer.stop will be called if the mouse leaves the game canvas.","type":{"names":["boolean"]},"default":""},{"name":"pointerLock","access":"","virtual":false,"description":"This event is dispatched when the browser enters or leaves pointer lock state.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"event","access":"","virtual":false,"description":"The browser mouse DOM event. Will be null if no mouse event has ever been received.\rAccess this property only inside a Mouse event handler and do not keep references to it.","type":{"names":["MouseEvent","null"]},"default":""},{"name":"_onMouseDown","access":"private","virtual":false,"description":"Internal event handler reference.","type":{"names":["function"]},"default":""},{"name":"_onMouseMove","access":"private","virtual":false,"description":"Internal event handler reference.","type":{"names":["function"]},"default":""},{"name":"_onMouseUp","access":"private","virtual":false,"description":"Internal event handler reference.","type":{"names":["function"]},"default":""},{"name":"_onMouseOut","access":"private","virtual":false,"description":"Internal event handler reference.","type":{"names":["function"]},"default":""},{"name":"_onMouseOver","access":"private","virtual":false,"description":"Internal event handler reference.","type":{"names":["function"]},"default":""},{"name":"_onMouseWheel","access":"private","virtual":false,"description":"Internal event handler reference.","type":{"names":["function"]},"default":""},{"name":"_wheelEvent","access":"private","virtual":false,"description":"Wheel proxy event object, if required. Shared for all wheel events for this mouse.","type":{"names":["Phaser.Mouse~WheelEventProxy"]},"default":""},{"name":"NO_BUTTON","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"LEFT_BUTTON","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"MIDDLE_BUTTON","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"RIGHT_BUTTON","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"BACK_BUTTON","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"FORWARD_BUTTON","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"WHEEL_UP","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"WHEEL_DOWN","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""}]},{"name":"Phaser.MSPointer","description":"The MSPointer class handles Microsoft touch interactions with the game and the resulting Pointer objects.\r\rIt will work only in Internet Explorer 10+ and Windows Store or Windows Phone 8 apps using JavaScript.\rhttp://msdn.microsoft.com/en-us/library/ie/hh673557(v=vs.85).aspx\r\rYou should not normally access this class directly, but instead use a Phaser.Pointer object which \rnormalises all game input for you including accurate button handling.\r\rPlease note that at the current time of writing Phaser does not yet support chorded button interactions:\rhttp://www.w3.org/TR/pointerevents/#chorded-button-interactions","constructor":{"name":"MSPointer","description":"The MSPointer class handles Microsoft touch interactions with the game and the resulting Pointer objects.\r\rIt will work only in Internet Explorer 10+ and Windows Store or Windows Phone 8 apps using JavaScript.\rhttp://msdn.microsoft.com/en-us/library/ie/hh673557(v=vs.85).aspx\r\rYou should not normally access this class directly, but instead use a Phaser.Pointer object which \rnormalises all game input for you including accurate button handling.\r\rPlease note that at the current time of writing Phaser does not yet support chorded button interactions:\rhttp://www.w3.org/TR/pointerevents/#chorded-button-interactions","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""}]},"functions":[{"name":"start","description":"Starts the event listeners running.","parameters":[]},{"name":"onPointerDown","description":"The function that handles the PointerDown event.","parameters":[{"name":"event","type":"PointerEvent","description":"The native DOM event.","default":"","optional":"","nullable":""}]},{"name":"onPointerMove","description":"The function that handles the PointerMove event.","parameters":[{"name":"event","type":"PointerEvent","description":"The native DOM event.","default":"","optional":"","nullable":""}]},{"name":"onPointerUp","description":"The function that handles the PointerUp event.","parameters":[{"name":"event","type":"PointerEvent","description":"The native DOM event.","default":"","optional":"","nullable":""}]},{"name":"onPointerUpGlobal","description":"The internal method that handles the mouse up event from the window.","parameters":[{"name":"event","type":"PointerEvent","description":"The native event from the browser. This gets stored in MSPointer.event.","default":"","optional":"","nullable":""}]},{"name":"onPointerOut","description":"The internal method that handles the pointer out event from the browser.","parameters":[{"name":"event","type":"PointerEvent","description":"The native event from the browser. This gets stored in MSPointer.event.","default":"","optional":"","nullable":""}]},{"name":"onPointerOut","description":"The internal method that handles the pointer out event from the browser.","parameters":[{"name":"event","type":"PointerEvent","description":"The native event from the browser. This gets stored in MSPointer.event.","default":"","optional":"","nullable":""}]},{"name":"stop","description":"Stop the event listeners.","parameters":[]}],"members":[{"name":"game","access":"","virtual":false,"description":"A reference to the currently running game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"input","access":"protected","virtual":false,"description":"A reference to the Phaser Input Manager.","type":{"names":["Phaser.Input"]},"default":""},{"name":"callbackContext","access":"","virtual":false,"description":"The context under which callbacks are called (defaults to game).","type":{"names":["object"]},"default":""},{"name":"pointerDownCallback","access":"","virtual":false,"description":"A callback that can be fired on a MSPointerDown event.","type":{"names":["function"]},"default":""},{"name":"pointerMoveCallback","access":"","virtual":false,"description":"A callback that can be fired on a MSPointerMove event.","type":{"names":["function"]},"default":""},{"name":"pointerUpCallback","access":"","virtual":false,"description":"A callback that can be fired on a MSPointerUp event.","type":{"names":["function"]},"default":""},{"name":"capture","access":"","virtual":false,"description":"If true the Pointer events will have event.preventDefault applied to them, if false they will propagate fully.","type":{"names":["boolean"]},"default":""},{"name":"button","access":"","virtual":false,"description":"This property was removed in Phaser 2.4 and should no longer be used.\rInstead please see the Pointer button properties such as `Pointer.leftButton`, `Pointer.rightButton` and so on.\rOr Pointer.button holds the DOM event button value if you require that.","type":{"names":["number"]},"default":""},{"name":"event","access":"","virtual":false,"description":"The browser MSPointer DOM event. Will be null if no event has ever been received.\rAccess this property only inside a Pointer event handler and do not keep references to it.","type":{"names":["MSPointerEvent","null"]},"default":""},{"name":"enabled","access":"","virtual":false,"description":"MSPointer input will only be processed if enabled.","type":{"names":["boolean"]},"default":true},{"name":"_onMSPointerDown","access":"private","virtual":false,"description":"Internal function to handle MSPointer events.","type":{"names":["function"]},"default":""},{"name":"_onMSPointerMove","access":"private","virtual":false,"description":"Internal function to handle MSPointer events.","type":{"names":["function"]},"default":""},{"name":"_onMSPointerUp","access":"private","virtual":false,"description":"Internal function to handle MSPointer events.","type":{"names":["function"]},"default":""},{"name":"_onMSPointerUpGlobal","access":"private","virtual":false,"description":"Internal function to handle MSPointer events.","type":{"names":["function"]},"default":""},{"name":"_onMSPointerOut","access":"private","virtual":false,"description":"Internal function to handle MSPointer events.","type":{"names":["function"]},"default":""},{"name":"_onMSPointerOver","access":"private","virtual":false,"description":"Internal function to handle MSPointer events.","type":{"names":["function"]},"default":""}]},{"name":"Phaser.Pointer","description":"A Pointer object is used by the Mouse, Touch and MSPoint managers and represents a single finger on the touch screen.","constructor":{"name":"Pointer","description":"A Pointer object is used by the Mouse, Touch and MSPoint managers and represents a single finger on the touch screen.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"id","type":"number","description":"The ID of the Pointer object within the game. Each game can have up to 10 active pointers.","default":"","optional":"","nullable":""},{"name":"pointerMode","type":"Phaser.PointerMode","description":"The operational mode of this pointer, eg. CURSOR or TOUCH.","default":"(CURSOR|CONTACT)","optional":"","nullable":""}]},"functions":[{"name":"resetButtons","description":"Resets the states of all the button booleans.","parameters":[]},{"name":"processButtonsDown","description":"Called by updateButtons.","parameters":[{"name":"buttons","type":"integer","description":"The DOM event.buttons property.","default":"","optional":"","nullable":""},{"name":"event","type":"MouseEvent","description":"The DOM event.","default":"","optional":"","nullable":""}]},{"name":"processButtonsUp","description":"Called by updateButtons.","parameters":[{"name":"buttons","type":"integer","description":"The DOM event.buttons property.","default":"","optional":"","nullable":""},{"name":"event","type":"MouseEvent","description":"The DOM event.","default":"","optional":"","nullable":""}]},{"name":"updateButtons","description":"Called when the event.buttons property changes from zero.\rContains a button bitmask.","parameters":[{"name":"event","type":"MouseEvent","description":"The DOM event.","default":"","optional":"","nullable":""}]},{"name":"start","description":"Called when the Pointer is pressed onto the touchscreen.","parameters":[{"name":"event","type":"any","description":"The DOM event from the browser.","default":"","optional":"","nullable":""}]},{"name":"update","description":"Called by the Input Manager.","parameters":[]},{"name":"move","description":"Called when the Pointer is moved.","parameters":[{"name":"event","type":["MouseEvent","PointerEvent","TouchEvent"],"description":"The event passed up from the input handler.","default":"","optional":"","nullable":""},{"name":"fromClick","type":"boolean","description":"Was this called from the click event?","default":"","optional":true,"nullable":""}]},{"name":"processInteractiveObjects","description":"Process all interactive objects to find out which ones were updated in the recent Pointer move.","parameters":[{"name":"fromClick","type":"boolean","description":"Was this called from the click event?","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if this method processes an object (i.e. a Sprite becomes the Pointers currentTarget), otherwise false."}},{"name":"swapTarget","description":"This will change the `Pointer.targetObject` object to be the one provided.\r\rThis allows you to have fine-grained control over which object the Pointer is targeting.\r\rNote that even if you set a new Target here, it is still able to be replaced by any other valid\rtarget during the next Pointer update.","parameters":[{"name":"newTarget","type":"Phaser.InputHandler","description":"The new target for this Pointer. Note this is an `InputHandler`, so don't pass a Sprite, instead pass `sprite.input` to it.","default":"","optional":"","nullable":""},{"name":"silent","type":"boolean","description":"If true the new target AND the old one will NOT dispatch their `onInputOver` or `onInputOut` events.","default":"","optional":true,"nullable":""}]},{"name":"leave","description":"Called when the Pointer leaves the target area.","parameters":[{"name":"event","type":["MouseEvent","PointerEvent","TouchEvent"],"description":"The event passed up from the input handler.","default":"","optional":"","nullable":""}]},{"name":"stop","description":"Called when the Pointer leaves the touchscreen.","parameters":[{"name":"event","type":["MouseEvent","PointerEvent","TouchEvent"],"description":"The event passed up from the input handler.","default":"","optional":"","nullable":""}]},{"name":"justPressed","description":"The Pointer is considered justPressed if the time it was pressed onto the touchscreen or clicked is less than justPressedRate.\rNote that calling justPressed doesn't reset the pressed status of the Pointer, it will return `true` for as long as the duration is valid.\rIf you wish to check if the Pointer was pressed down just once then see the Sprite.events.onInputDown event.","parameters":[{"name":"duration","type":"number","description":"The time to check against. If none given it will use InputManager.justPressedRate.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"true if the Pointer was pressed down within the duration given."}},{"name":"justReleased","description":"The Pointer is considered justReleased if the time it left the touchscreen is less than justReleasedRate.\rNote that calling justReleased doesn't reset the pressed status of the Pointer, it will return `true` for as long as the duration is valid.\rIf you wish to check if the Pointer was released just once then see the Sprite.events.onInputUp event.","parameters":[{"name":"duration","type":"number","description":"The time to check against. If none given it will use InputManager.justReleasedRate.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"true if the Pointer was released within the duration given."}},{"name":"addClickTrampoline","description":"Add a click trampoline to this pointer.\r\rA click trampoline is a callback that is run on the DOM 'click' event; this is primarily\rneeded with certain browsers (ie. IE11) which restrict some actions like requestFullscreen\rto the DOM 'click' event and rejects it for 'pointer*' and 'mouse*' events.\r\rThis is used internally by the ScaleManager; click trampoline usage is uncommon.\rClick trampolines can only be added to pointers that are currently down.","parameters":[{"name":"name","type":"string","description":"The name of the trampoline; must be unique among active trampolines in this pointer.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"Callback to run/trampoline.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"Context of the callback.","default":"","optional":"","nullable":""},{"name":"callbackArgs","type":["Array.<object>","null"],"description":"Additional callback args, if any. Supplied as an array.","default":"","optional":"","nullable":""}]},{"name":"processClickTrampolines","description":"Fire all click trampolines for which the pointers are still referring to the registered object.","parameters":[]},{"name":"reset","description":"Resets the Pointer properties. Called by InputManager.reset when you perform a State change.","parameters":[]},{"name":"resetMovement","description":"Resets the movementX and movementY properties. Use in your update handler after retrieving the values.","parameters":[]}],"members":[{"name":"game","access":"","virtual":false,"description":"A reference to the currently running game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"id","access":"","virtual":false,"description":"The ID of the Pointer object within the game. Each game can have up to 10 active pointers.","type":{"names":["number"]},"default":""},{"name":"type","access":"","virtual":false,"description":"The const type of this object.","type":{"names":["number"]},"default":""},{"name":"exists","access":"","virtual":false,"description":"A Pointer object that exists is allowed to be checked for physics collisions and overlaps.","type":{"names":["boolean"]},"default":true},{"name":"identifier","access":"","virtual":false,"description":"The identifier property of the Pointer as set by the DOM event when this Pointer is started.","type":{"names":["number"]},"default":""},{"name":"pointerId","access":"","virtual":false,"description":"The pointerId property of the Pointer as set by the DOM event when this Pointer is started. The browser can and will recycle this value.","type":{"names":["number"]},"default":""},{"name":"pointerMode","access":"","virtual":false,"description":"The operational mode of this pointer.","type":{"names":["Phaser.PointerMode"]},"default":""},{"name":"target","access":"","virtual":false,"description":"The target property of the Pointer as set by the DOM event when this Pointer is started.","type":{"names":["any"]},"default":""},{"name":"button","access":"","virtual":false,"description":"The button property of the most recent DOM event when this Pointer is started.\rYou should not rely on this value for accurate button detection, instead use the Pointer properties\r`leftButton`, `rightButton`, `middleButton` and so on.","type":{"names":["any"]},"default":""},{"name":"leftButton","access":"","virtual":false,"description":"If this Pointer is a Mouse or Pen / Stylus then you can access its left button directly through this property.\r\rThe DeviceButton has its own properties such as `isDown`, `duration` and methods like `justReleased` for more fine-grained\rbutton control.","type":{"names":["Phaser.DeviceButton"]},"default":""},{"name":"middleButton","access":"","virtual":false,"description":"If this Pointer is a Mouse or Pen / Stylus then you can access its middle button directly through this property.\r\rThe DeviceButton has its own properties such as `isDown`, `duration` and methods like `justReleased` for more fine-grained\rbutton control.\r\rPlease see the DeviceButton docs for details on browser button limitations.","type":{"names":["Phaser.DeviceButton"]},"default":""},{"name":"rightButton","access":"","virtual":false,"description":"If this Pointer is a Mouse or Pen / Stylus then you can access its right button directly through this property.\r\rThe DeviceButton has its own properties such as `isDown`, `duration` and methods like `justReleased` for more fine-grained\rbutton control.\r\rPlease see the DeviceButton docs for details on browser button limitations.","type":{"names":["Phaser.DeviceButton"]},"default":""},{"name":"backButton","access":"","virtual":false,"description":"If this Pointer is a Mouse or Pen / Stylus then you can access its X1 (back) button directly through this property.\r\rThe DeviceButton has its own properties such as `isDown`, `duration` and methods like `justReleased` for more fine-grained\rbutton control.\r\rPlease see the DeviceButton docs for details on browser button limitations.","type":{"names":["Phaser.DeviceButton"]},"default":""},{"name":"forwardButton","access":"","virtual":false,"description":"If this Pointer is a Mouse or Pen / Stylus then you can access its X2 (forward) button directly through this property.\r\rThe DeviceButton has its own properties such as `isDown`, `duration` and methods like `justReleased` for more fine-grained\rbutton control.\r\rPlease see the DeviceButton docs for details on browser button limitations.","type":{"names":["Phaser.DeviceButton"]},"default":""},{"name":"eraserButton","access":"","virtual":false,"description":"If this Pointer is a Pen / Stylus then you can access its eraser button directly through this property.\r\rThe DeviceButton has its own properties such as `isDown`, `duration` and methods like `justReleased` for more fine-grained\rbutton control.\r\rPlease see the DeviceButton docs for details on browser button limitations.","type":{"names":["Phaser.DeviceButton"]},"default":""},{"name":"_holdSent","access":"private","virtual":false,"description":"Local private variable to store the status of dispatching a hold event.","type":{"names":["boolean"]},"default":""},{"name":"_history","access":"private","virtual":false,"description":"Local private variable storing the short-term history of pointer movements.","type":{"names":["array"]},"default":""},{"name":"_nextDrop","access":"private","virtual":false,"description":"Local private variable storing the time at which the next history drop should occur.","type":{"names":["number"]},"default":""},{"name":"_stateReset","access":"private","virtual":false,"description":"Monitor events outside of a state reset loop.","type":{"names":["boolean"]},"default":""},{"name":"withinGame","access":"","virtual":false,"description":"true if the Pointer is over the game canvas, otherwise false.","type":{"names":["boolean"]},"default":""},{"name":"clientX","access":"","virtual":false,"description":"The horizontal coordinate of the Pointer within the application's client area at which the event occurred (as opposed to the coordinates within the page).","type":{"names":["number"]},"default":""},{"name":"clientY","access":"","virtual":false,"description":"The vertical coordinate of the Pointer within the application's client area at which the event occurred (as opposed to the coordinates within the page).","type":{"names":["number"]},"default":""},{"name":"pageX","access":"","virtual":false,"description":"The horizontal coordinate of the Pointer relative to whole document.","type":{"names":["number"]},"default":""},{"name":"pageY","access":"","virtual":false,"description":"The vertical coordinate of the Pointer relative to whole document.","type":{"names":["number"]},"default":""},{"name":"screenX","access":"","virtual":false,"description":"The horizontal coordinate of the Pointer relative to the screen.","type":{"names":["number"]},"default":""},{"name":"screenY","access":"","virtual":false,"description":"The vertical coordinate of the Pointer relative to the screen.","type":{"names":["number"]},"default":""},{"name":"rawMovementX","access":"","virtual":false,"description":"The horizontal raw relative movement of the Pointer in pixels since last event.","type":{"names":["number"]},"default":""},{"name":"rawMovementY","access":"","virtual":false,"description":"The vertical raw relative movement of the Pointer in pixels since last event.","type":{"names":["number"]},"default":""},{"name":"movementX","access":"","virtual":false,"description":"The horizontal processed relative movement of the Pointer in pixels since last event.","type":{"names":["number"]},"default":""},{"name":"movementY","access":"","virtual":false,"description":"The vertical processed relative movement of the Pointer in pixels since last event.","type":{"names":["number"]},"default":""},{"name":"x","access":"","virtual":false,"description":"The horizontal coordinate of the Pointer. This value is automatically scaled based on the game scale.","type":{"names":["number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The vertical coordinate of the Pointer. This value is automatically scaled based on the game scale.","type":{"names":["number"]},"default":""},{"name":"isMouse","access":"","virtual":false,"description":"If the Pointer is a mouse or pen / stylus this is true, otherwise false.","type":{"names":["boolean"]},"default":""},{"name":"isDown","access":"","virtual":false,"description":"If the Pointer is touching the touchscreen, or *any* mouse or pen button is held down, isDown is set to true.\rIf you need to check a specific mouse or pen button then use the button properties, i.e. Pointer.rightButton.isDown.","type":{"names":["boolean"]},"default":""},{"name":"isUp","access":"","virtual":false,"description":"If the Pointer is not touching the touchscreen, or *all* mouse or pen buttons are up, isUp is set to true.\rIf you need to check a specific mouse or pen button then use the button properties, i.e. Pointer.rightButton.isUp.","type":{"names":["boolean"]},"default":true},{"name":"timeDown","access":"","virtual":false,"description":"A timestamp representing when the Pointer first touched the touchscreen.","type":{"names":["number"]},"default":""},{"name":"timeUp","access":"","virtual":false,"description":"A timestamp representing when the Pointer left the touchscreen.","type":{"names":["number"]},"default":""},{"name":"previousTapTime","access":"","virtual":false,"description":"A timestamp representing when the Pointer was last tapped or clicked.","type":{"names":["number"]},"default":""},{"name":"totalTouches","access":"","virtual":false,"description":"The total number of times this Pointer has been touched to the touchscreen.","type":{"names":["number"]},"default":""},{"name":"msSinceLastClick","access":"","virtual":false,"description":"The number of milliseconds since the last click or touch event.","type":{"names":["number"]},"default":""},{"name":"targetObject","access":"","virtual":false,"description":"The Game Object this Pointer is currently over / touching / dragging.","type":{"names":["any"]},"default":""},{"name":"interactiveCandidates","access":"","virtual":false,"description":"This array is erased and re-populated every time this Pointer is updated. It contains references to all\rof the Game Objects that were considered as being valid for processing by this Pointer, this frame. To be\rvalid they must have suitable a `priorityID`, be Input enabled, visible and actually have the Pointer over\rthem. You can check the contents of this array in events such as `onInputDown`, but beware it is reset\revery frame.","type":{"names":["array"]},"default":"[]"},{"name":"active","access":"","virtual":false,"description":"An active pointer is one that is currently pressed down on the display. A Mouse is always active.","type":{"names":["boolean"]},"default":""},{"name":"dirty","access":"","virtual":false,"description":"A dirty pointer needs to re-poll any interactive objects it may have been over, regardless if it has moved or not.","type":{"names":["boolean"]},"default":""},{"name":"position","access":"","virtual":false,"description":"A Phaser.Point object containing the current x/y values of the pointer on the display.","type":{"names":["Phaser.Point"]},"default":""},{"name":"positionDown","access":"","virtual":false,"description":"A Phaser.Point object containing the x/y values of the pointer when it was last in a down state on the display.","type":{"names":["Phaser.Point"]},"default":""},{"name":"positionUp","access":"","virtual":false,"description":"A Phaser.Point object containing the x/y values of the pointer when it was last released.","type":{"names":["Phaser.Point"]},"default":""},{"name":"circle","access":"","virtual":false,"description":"A Phaser.Circle that is centered on the x/y coordinates of this pointer, useful for hit detection.\rThe Circle size is 44px (Apples recommended \"finger tip\" size).","type":{"names":["Phaser.Circle"]},"default":""},{"name":"_clickTrampolines","access":"private","virtual":false,"description":"Click trampolines associated with this pointer. See `addClickTrampoline`.","type":{"names":["Array.<object>","null"]},"default":""},{"name":"_trampolineTargetObject","access":"private","virtual":false,"description":"When the Pointer has click trampolines the last target object is stored here\rso it can be used to check for validity of the trampoline in a post-Up/'stop'.","type":{"names":["object"]},"default":""},{"name":"NO_BUTTON","access":"","virtual":false,"description":"No buttons at all.","type":{"names":["number"]},"default":""},{"name":"LEFT_BUTTON","access":"","virtual":false,"description":"The Left Mouse button, or in PointerEvent devices a Touch contact or Pen contact.","type":{"names":["number"]},"default":""},{"name":"RIGHT_BUTTON","access":"","virtual":false,"description":"The Right Mouse button, or in PointerEvent devices a Pen contact with a barrel button.","type":{"names":["number"]},"default":""},{"name":"MIDDLE_BUTTON","access":"","virtual":false,"description":"The Middle Mouse button.","type":{"names":["number"]},"default":""},{"name":"BACK_BUTTON","access":"","virtual":false,"description":"The X1 button. This is typically the mouse Back button, but is often reconfigured.\rOn Linux (GTK) this is unsupported. On Windows if advanced pointer software (such as IntelliPoint) is installed this doesn't register.","type":{"names":["number"]},"default":""},{"name":"FORWARD_BUTTON","access":"","virtual":false,"description":"The X2 button. This is typically the mouse Forward button, but is often reconfigured.\rOn Linux (GTK) this is unsupported. On Windows if advanced pointer software (such as IntelliPoint) is installed this doesn't register.","type":{"names":["number"]},"default":""},{"name":"ERASER_BUTTON","access":"","virtual":false,"description":"The Eraser pen button on PointerEvent supported devices only.","type":{"names":["number"]},"default":""},{"name":"duration","access":"","virtual":false,"description":"How long the Pointer has been depressed on the touchscreen or *any* of the mouse buttons have been held down.\rIf not currently down it returns -1.\rIf you need to test a specific mouse or pen button then access the buttons directly, i.e. `Pointer.rightButton.duration`.","type":{"names":["number"]},"default":""},{"name":"worldX","access":"","virtual":false,"description":"Gets the X value of this Pointer in world coordinates based on the world camera.","type":{"names":["number"]},"default":""},{"name":"worldY","access":"","virtual":false,"description":"Gets the Y value of this Pointer in world coordinates based on the world camera.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.PointerMode","description":"Enumeration categorizing operational modes of pointers.\r\rPointerType values represent valid bitmasks.\rFor example, a value representing both Mouse and Touch devices\rcan be expressed as `PointerMode.CURSOR | PointerMode.CONTACT`.\r\rValues may be added for future mode categorizations.","constructor":{"name":"PointerMode","description":"Enumeration categorizing operational modes of pointers.\r\rPointerType values represent valid bitmasks.\rFor example, a value representing both Mouse and Touch devices\rcan be expressed as `PointerMode.CURSOR | PointerMode.CONTACT`.\r\rValues may be added for future mode categorizations.","parameters":[]},"functions":[],"members":[{"name":"CURSOR","access":"","virtual":false,"description":"A 'CURSOR' is a pointer with a *passive cursor* such as a mouse, touchpad, watcom stylus, or even TV-control arrow-pad.\r\rIt has the property that a cursor is passively moved without activating the input.\rThis currently corresponds with {@link Phaser.Pointer#isMouse} property.","type":"","default":""},{"name":"CONTACT","access":"","virtual":false,"description":"A 'CONTACT' pointer has an *active cursor* that only tracks movement when actived; notably this is a touch-style input.","type":"","default":""}]},{"name":"Phaser.SinglePad","description":"A single Phaser Gamepad","constructor":{"name":"SinglePad","description":"A single Phaser Gamepad","parameters":[{"name":"game","type":"Phaser.Game","description":"Current game instance.","default":"","optional":"","nullable":""},{"name":"padParent","type":"object","description":"The parent Phaser.Gamepad object (all gamepads reside under this)","default":"","optional":"","nullable":""}]},"functions":[{"name":"addCallbacks","description":"Add callbacks to this Gamepad to handle connect / disconnect / button down / button up / axis change / float value buttons.","parameters":[{"name":"context","type":"object","description":"The context under which the callbacks are run.","default":"","optional":"","nullable":""},{"name":"callbacks","type":"object","description":"Object that takes six different callbak methods:\ronConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCallback, onFloatCallback","default":"","optional":"","nullable":""}]},{"name":"getButton","description":"Gets a DeviceButton object from this controller to be stored and referenced locally.\rThe DeviceButton object can then be polled, have events attached to it, etc.","parameters":[{"name":"buttonCode","type":"number","description":"The buttonCode of the button, i.e. Phaser.Gamepad.BUTTON_0, Phaser.Gamepad.XBOX360_A, etc.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.DeviceButton","description":"The DeviceButton object which you can store locally and reference directly."}},{"name":"pollStatus","description":"Main update function called by Phaser.Gamepad.","parameters":[]},{"name":"connect","description":"Gamepad connect function, should be called by Phaser.Gamepad.","parameters":[{"name":"rawPad","type":"object","description":"The raw gamepad object","default":"","optional":"","nullable":""}]},{"name":"disconnect","description":"Gamepad disconnect function, should be called by Phaser.Gamepad.","parameters":[]},{"name":"destroy","description":"Destroys this object and associated callback references.","parameters":[]},{"name":"processAxisChange","description":"Handles changes in axis.","parameters":[{"name":"axisState","type":"object","description":"State of the relevant axis","default":"","optional":"","nullable":""}]},{"name":"processButtonDown","description":"Handles button down press.","parameters":[{"name":"buttonCode","type":"number","description":"Which buttonCode of this button","default":"","optional":"","nullable":""},{"name":"value","type":"object","description":"Button value","default":"","optional":"","nullable":""}]},{"name":"processButtonUp","description":"Handles button release.","parameters":[{"name":"buttonCode","type":"number","description":"Which buttonCode of this button","default":"","optional":"","nullable":""},{"name":"value","type":"object","description":"Button value","default":"","optional":"","nullable":""}]},{"name":"processButtonFloat","description":"Handles buttons with floating values (like analog buttons that acts almost like an axis but still registers like a button)","parameters":[{"name":"buttonCode","type":"number","description":"Which buttonCode of this button","default":"","optional":"","nullable":""},{"name":"value","type":"object","description":"Button value (will range somewhere between 0 and 1, but not specifically 0 or 1.","default":"","optional":"","nullable":""}]},{"name":"axis","description":"Returns value of requested axis.","parameters":[{"name":"axisCode","type":"number","description":"The index of the axis to check","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"Axis value if available otherwise false"}},{"name":"isDown","description":"Returns true if the button is pressed down.","parameters":[{"name":"buttonCode","type":"number","description":"The buttonCode of the button to check.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the button is pressed down."}},{"name":"isUp","description":"Returns true if the button is not currently pressed.","parameters":[{"name":"buttonCode","type":"number","description":"The buttonCode of the button to check.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the button is not currently pressed down."}},{"name":"justReleased","description":"Returns the \"just released\" state of a button from this gamepad. Just released is considered as being true if the button was released within the duration given (default 250ms).","parameters":[{"name":"buttonCode","type":"number","description":"The buttonCode of the button to check for.","default":"","optional":"","nullable":""},{"name":"duration","type":"number","description":"The duration below which the button is considered as being just released.","default":250,"optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the button is just released otherwise false."}},{"name":"justPressed","description":"Returns the \"just pressed\" state of a button from this gamepad. Just pressed is considered true if the button was pressed down within the duration given (default 250ms).","parameters":[{"name":"buttonCode","type":"number","description":"The buttonCode of the button to check for.","default":"","optional":"","nullable":""},{"name":"duration","type":"number","description":"The duration below which the button is considered as being just pressed.","default":250,"optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the button is just pressed otherwise false."}},{"name":"buttonValue","description":"Returns the value of a gamepad button. Intended mainly for cases when you have floating button values, for example\ranalog trigger buttons on the XBOX 360 controller.","parameters":[{"name":"buttonCode","type":"number","description":"The buttonCode of the button to check.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"Button value if available otherwise null. Be careful as this can incorrectly evaluate to 0."}},{"name":"reset","description":"Reset all buttons/axes of this gamepad.","parameters":[]}],"members":[{"name":"game","access":"","virtual":false,"description":"Local reference to game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"index","access":"","virtual":false,"description":"The gamepad index as per browsers data","type":{"names":["number"]},"default":""},{"name":"connected","access":"","virtual":false,"description":"Whether or not this particular gamepad is connected or not.","type":{"names":["boolean"]},"default":""},{"name":"callbackContext","access":"","virtual":false,"description":"The context under which the callbacks are run.","type":{"names":["object"]},"default":""},{"name":"onConnectCallback","access":"","virtual":false,"description":"This callback is invoked every time this gamepad is connected","type":{"names":["function"]},"default":""},{"name":"onDisconnectCallback","access":"","virtual":false,"description":"This callback is invoked every time this gamepad is disconnected","type":{"names":["function"]},"default":""},{"name":"onDownCallback","access":"","virtual":false,"description":"This callback is invoked every time a button is pressed down.","type":{"names":["function"]},"default":""},{"name":"onUpCallback","access":"","virtual":false,"description":"This callback is invoked every time a gamepad button is released.","type":{"names":["function"]},"default":""},{"name":"onAxisCallback","access":"","virtual":false,"description":"This callback is invoked every time an axis is changed.","type":{"names":["function"]},"default":""},{"name":"onFloatCallback","access":"","virtual":false,"description":"This callback is invoked every time a button is changed to a value where value > 0 and value < 1.","type":{"names":["function"]},"default":""},{"name":"deadZone","access":"","virtual":false,"description":"Dead zone for axis feedback - within this value you won't trigger updates.","type":{"names":["number"]},"default":""},{"name":"_padParent","access":"private","virtual":false,"description":"Main Phaser Gamepad object","type":"","default":""},{"name":"_rawPad","access":"private","virtual":false,"description":"The 'raw' gamepad data.","type":{"names":["object"]},"default":""},{"name":"_prevTimestamp","access":"private","virtual":false,"description":"Used to check for differences between earlier polls and current state of gamepads.","type":{"names":["number"]},"default":""},{"name":"_buttons","access":"private","virtual":false,"description":"Array of Phaser.DeviceButton objects. This array is populated when the gamepad is connected.","type":{"names":["Array"]},"default":""},{"name":"_buttonsLen","access":"private","virtual":false,"description":"Length of the _buttons array.","type":{"names":["number"]},"default":""},{"name":"_axes","access":"private","virtual":false,"description":"Current axes state.","type":{"names":["Array"]},"default":""},{"name":"_axesLen","access":"private","virtual":false,"description":"Length of the _axes array.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.Touch","description":"Phaser.Touch handles touch events with your game. Note: Android 2.x only supports 1 touch event at once, no multi-touch.\r\rYou should not normally access this class directly, but instead use a Phaser.Pointer object which normalises all game input for you.","constructor":{"name":"Touch","description":"Phaser.Touch handles touch events with your game. Note: Android 2.x only supports 1 touch event at once, no multi-touch.\r\rYou should not normally access this class directly, but instead use a Phaser.Pointer object which normalises all game input for you.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""}]},"functions":[{"name":"start","description":"Starts the event listeners running.","parameters":[]},{"name":"consumeTouchMove","description":"Consumes all touchmove events on the document (only enable this if you know you need it!).","parameters":[]},{"name":"addTouchLockCallback","description":"Adds a callback that is fired when a browser touchstart or touchend event is received.\r\rThis is used internally to handle audio and video unlocking on mobile devices.\r\rIf the callback returns 'true' then the callback is automatically deleted once invoked.\r\rThe callback is added to the Phaser.Touch.touchLockCallbacks array and should be removed with Phaser.Touch.removeTouchLockCallback.","parameters":[{"name":"callback","type":"function","description":"The callback that will be called when a touchstart event is received.","default":"","optional":"","nullable":""},{"name":"context","type":"object","description":"The context in which the callback will be called.","default":"","optional":"","nullable":""},{"name":"onEnd","type":"boolean","description":"Will the callback fire on a touchstart (default) or touchend event?","default":"","optional":true,"nullable":""}]},{"name":"removeTouchLockCallback","description":"Removes the callback at the defined index from the Phaser.Touch.touchLockCallbacks array","parameters":[{"name":"callback","type":"function","description":"The callback to be removed.","default":"","optional":"","nullable":""},{"name":"context","type":"object","description":"The context in which the callback exists.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the callback was deleted, otherwise false."}},{"name":"onTouchStart","description":"The internal method that handles the touchstart event from the browser.","parameters":[{"name":"event","type":"TouchEvent","description":"The native event from the browser. This gets stored in Touch.event.","default":"","optional":"","nullable":""}]},{"name":"onTouchCancel","description":"Touch cancel - touches that were disrupted (perhaps by moving into a plugin or browser chrome).\rOccurs for example on iOS when you put down 4 fingers and the app selector UI appears.","parameters":[{"name":"event","type":"TouchEvent","description":"The native event from the browser. This gets stored in Touch.event.","default":"","optional":"","nullable":""}]},{"name":"onTouchEnter","description":"For touch enter and leave its a list of the touch points that have entered or left the target.\rDoesn't appear to be supported by most browsers on a canvas element yet.","parameters":[{"name":"event","type":"TouchEvent","description":"The native event from the browser. This gets stored in Touch.event.","default":"","optional":"","nullable":""}]},{"name":"onTouchLeave","description":"For touch enter and leave its a list of the touch points that have entered or left the target.\rDoesn't appear to be supported by most browsers on a canvas element yet.","parameters":[{"name":"event","type":"TouchEvent","description":"The native event from the browser. This gets stored in Touch.event.","default":"","optional":"","nullable":""}]},{"name":"onTouchMove","description":"The handler for the touchmove events.","parameters":[{"name":"event","type":"TouchEvent","description":"The native event from the browser. This gets stored in Touch.event.","default":"","optional":"","nullable":""}]},{"name":"onTouchEnd","description":"The handler for the touchend events.","parameters":[{"name":"event","type":"TouchEvent","description":"The native event from the browser. This gets stored in Touch.event.","default":"","optional":"","nullable":""}]},{"name":"stop","description":"Stop the event listeners.","parameters":[]}],"members":[{"name":"game","access":"","virtual":false,"description":"A reference to the currently running game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"enabled","access":"","virtual":false,"description":"Touch events will only be processed if enabled.","type":{"names":["boolean"]},"default":true},{"name":"touchLockCallbacks","access":"protected","virtual":false,"description":"An array of callbacks that will be fired every time a native touch start or touch end event is received from the browser.\rThis is used internally to handle audio and video unlocking on mobile devices.\rTo add a callback to this array please use `Touch.addTouchLockCallback`.","type":{"names":["array"]},"default":""},{"name":"callbackContext","access":"","virtual":false,"description":"The context under which callbacks are called.","type":{"names":["object"]},"default":""},{"name":"touchStartCallback","access":"","virtual":false,"description":"A callback that can be fired on a touchStart event.","type":{"names":["function"]},"default":""},{"name":"touchMoveCallback","access":"","virtual":false,"description":"A callback that can be fired on a touchMove event.","type":{"names":["function"]},"default":""},{"name":"touchEndCallback","access":"","virtual":false,"description":"A callback that can be fired on a touchEnd event.","type":{"names":["function"]},"default":""},{"name":"touchEnterCallback","access":"","virtual":false,"description":"A callback that can be fired on a touchEnter event.","type":{"names":["function"]},"default":""},{"name":"touchLeaveCallback","access":"","virtual":false,"description":"A callback that can be fired on a touchLeave event.","type":{"names":["function"]},"default":""},{"name":"touchCancelCallback","access":"","virtual":false,"description":"A callback that can be fired on a touchCancel event.","type":{"names":["function"]},"default":""},{"name":"preventDefault","access":"","virtual":false,"description":"If true the TouchEvent will have prevent.default called on it.","type":{"names":["boolean"]},"default":true},{"name":"event","access":"","virtual":false,"description":"The browser touch DOM event. Will be set to null if no touch event has ever been received.","type":{"names":["TouchEvent"]},"default":""},{"name":"_onTouchStart","access":"private","virtual":false,"description":"Internal event handler reference.","type":{"names":["function"]},"default":""},{"name":"_onTouchMove","access":"private","virtual":false,"description":"Internal event handler reference.","type":{"names":["function"]},"default":""},{"name":"_onTouchEnd","access":"private","virtual":false,"description":"Internal event handler reference.","type":{"names":["function"]},"default":""},{"name":"_onTouchEnter","access":"private","virtual":false,"description":"Internal event handler reference.","type":{"names":["function"]},"default":""},{"name":"_onTouchLeave","access":"private","virtual":false,"description":"Internal event handler reference.","type":{"names":["function"]},"default":""},{"name":"_onTouchCancel","access":"private","virtual":false,"description":"Internal event handler reference.","type":{"names":["function"]},"default":""},{"name":"_onTouchMove","access":"private","virtual":false,"description":"Internal event handler reference.","type":{"names":["function"]},"default":""}]},{"name":"Phaser.Cache","description":"Phaser has one single cache in which it stores all assets.\r\rThe cache is split up into sections, such as images, sounds, video, json, etc. All assets are stored using\ra unique string-based key as their identifier. Assets stored in different areas of the cache can have the\rsame key, for example 'playerWalking' could be used as the key for both a sprite sheet and an audio file,\rbecause they are unique data types.\r\rThe cache is automatically populated by the Phaser.Loader. When you use the loader to pull in external assets\rsuch as images they are automatically placed into their respective cache. Most common Game Objects, such as\rSprites and Videos automatically query the cache to extract the assets they need on instantiation.\r\rYou can access the cache from within a State via `this.cache`. From here you can call any public method it has,\rincluding adding new entries to it, deleting them or querying them.\r\rUnderstand that almost without exception when you get an item from the cache it will return a reference to the\ritem stored in the cache, not a copy of it. Therefore if you retrieve an item and then modify it, the original\robject in the cache will also be updated, even if you don't put it back into the cache again.\r\rBy default when you change State the cache is _not_ cleared, although there is an option to clear it should\ryour game require it. In a typical game set-up the cache is populated once after the main game has loaded and\rthen used as an asset store.","constructor":{"name":"Cache","description":"Phaser has one single cache in which it stores all assets.\r\rThe cache is split up into sections, such as images, sounds, video, json, etc. All assets are stored using\ra unique string-based key as their identifier. Assets stored in different areas of the cache can have the\rsame key, for example 'playerWalking' could be used as the key for both a sprite sheet and an audio file,\rbecause they are unique data types.\r\rThe cache is automatically populated by the Phaser.Loader. When you use the loader to pull in external assets\rsuch as images they are automatically placed into their respective cache. Most common Game Objects, such as\rSprites and Videos automatically query the cache to extract the assets they need on instantiation.\r\rYou can access the cache from within a State via `this.cache`. From here you can call any public method it has,\rincluding adding new entries to it, deleting them or querying them.\r\rUnderstand that almost without exception when you get an item from the cache it will return a reference to the\ritem stored in the cache, not a copy of it. Therefore if you retrieve an item and then modify it, the original\robject in the cache will also be updated, even if you don't put it back into the cache again.\r\rBy default when you change State the cache is _not_ cleared, although there is an option to clear it should\ryour game require it. In a typical game set-up the cache is populated once after the main game has loaded and\rthen used as an asset store.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""}]},"functions":[{"name":"addCompressedTextureMetaData","description":"Add a new canvas object in to the cache.","parameters":[{"name":"key","type":"string","description":"The key that this asset will be stored in the cache under. This should be unique within this cache.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"","default":"","optional":"","nullable":""},{"name":"extension","type":"string","description":"","default":"","optional":"","nullable":""},{"name":"arrayBuffer","type":"array","description":"","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"The compressed texture entry."}},{"name":"addCanvas","description":"Add a new canvas object in to the cache.","parameters":[{"name":"key","type":"string","description":"The key that this asset will be stored in the cache under. This should be unique within this cache.","default":"","optional":"","nullable":""},{"name":"canvas","type":"HTMLCanvasElement","description":"The Canvas DOM element.","default":"","optional":"","nullable":""},{"name":"context","type":"CanvasRenderingContext2D","description":"The context of the canvas element. If not specified it will default go `getContext('2d')`.","default":"","optional":true,"nullable":""}]},{"name":"addImage","description":"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.\rIf 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.","parameters":[{"name":"key","type":"string","description":"The key that this asset will be stored in the cache under. This should be unique within this cache.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"The URL the asset was loaded from. If the asset was not loaded externally set to `null`.","default":"","optional":"","nullable":""},{"name":"data","type":"object","description":"Extra image data.","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"The full image object that was added to the cache."}},{"name":"addDefaultImage","description":"Adds a default image to be used in special cases such as WebGL Filters.\rIt uses the special reserved key of `__default`.\rThis method is called automatically when the Cache is created.\rThis image is skipped when `Cache.destroy` is called due to its internal requirements.","parameters":[]},{"name":"addMissingImage","description":"Adds an image to be used when a key is wrong / missing.\rIt uses the special reserved key of `__missing`.\rThis method is called automatically when the Cache is created.\rThis image is skipped when `Cache.destroy` is called due to its internal requirements.","parameters":[]},{"name":"addSound","description":"Adds a Sound file into the Cache. The file must have already been loaded, typically via Phaser.Loader.","parameters":[{"name":"key","type":"string","description":"The key that this asset will be stored in the cache under. This should be unique within this cache.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"The URL the asset was loaded from. If the asset was not loaded externally set to `null`.","default":"","optional":"","nullable":""},{"name":"data","type":"object","description":"Extra sound data.","default":"","optional":"","nullable":""},{"name":"webAudio","type":"boolean","description":"True if the file is using web audio.","default":"","optional":"","nullable":""},{"name":"audioTag","type":"boolean","description":"True if the file is using legacy HTML audio.","default":"","optional":"","nullable":""}]},{"name":"addText","description":"Add a new text data.","parameters":[{"name":"key","type":"string","description":"The key that this asset will be stored in the cache under. This should be unique within this cache.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"The URL the asset was loaded from. If the asset was not loaded externally set to `null`.","default":"","optional":"","nullable":""},{"name":"data","type":"object","description":"Extra text data.","default":"","optional":"","nullable":""}]},{"name":"addPhysicsData","description":"Add a new physics data object to the Cache.","parameters":[{"name":"key","type":"string","description":"The key that this asset will be stored in the cache under. This should be unique within this cache.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"The URL the asset was loaded from. If the asset was not loaded externally set to `null`.","default":"","optional":"","nullable":""},{"name":"JSONData","type":"object","description":"The physics data object (a JSON file).","default":"","optional":"","nullable":""},{"name":"format","type":"number","description":"The format of the physics data.","default":"","optional":"","nullable":""}]},{"name":"addTilemap","description":"Add a new tilemap to the Cache.","parameters":[{"name":"key","type":"string","description":"The key that this asset will be stored in the cache under. This should be unique within this cache.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"The URL the asset was loaded from. If the asset was not loaded externally set to `null`.","default":"","optional":"","nullable":""},{"name":"mapData","type":"object","description":"The tilemap data object (either a CSV or JSON file).","default":"","optional":"","nullable":""},{"name":"format","type":"number","description":"The format of the tilemap data.","default":"","optional":"","nullable":""}]},{"name":"addBinary","description":"Add a binary object in to the cache.","parameters":[{"name":"key","type":"string","description":"The key that this asset will be stored in the cache under. This should be unique within this cache.","default":"","optional":"","nullable":""},{"name":"binaryData","type":"object","description":"The binary object to be added to the cache.","default":"","optional":"","nullable":""}]},{"name":"addBitmapData","description":"Add a BitmapData object to the cache.","parameters":[{"name":"key","type":"string","description":"The key that this asset will be stored in the cache under. This should be unique within this cache.","default":"","optional":"","nullable":""},{"name":"bitmapData","type":"Phaser.BitmapData","description":"The BitmapData object to be addded to the cache.","default":"","optional":"","nullable":""},{"name":"frameData","type":["Phaser.FrameData","null"],"description":"Optional FrameData set associated with the given BitmapData. If not specified (or `undefined`) a new FrameData object is created containing the Bitmap's Frame. If `null` is supplied then no FrameData will be created.","default":"(auto create)","optional":true,"nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"The BitmapData object to be addded to the cache."}},{"name":"addBitmapFont","description":"Add a new Bitmap Font to the Cache.","parameters":[{"name":"key","type":"string","description":"The key that this asset will be stored in the cache under. This should be unique within this cache.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"The URL the asset was loaded from. If the asset was not loaded externally set to `null`.","default":"","optional":"","nullable":""},{"name":"data","type":"object","description":"Extra font data.","default":"","optional":"","nullable":""},{"name":"atlasData","type":"object","description":"The Bitmap Font data.","default":"","optional":"","nullable":""},{"name":"atlasType","type":"string","description":"The format of the Bitmap Font data file: `json` or `xml`.","default":"'xml'","optional":true,"nullable":""},{"name":"xSpacing","type":"number","description":"If you'd like to add additional horizontal spacing between the characters then set the pixel value here.","default":"","optional":true,"nullable":""},{"name":"ySpacing","type":"number","description":"If you'd like to add additional vertical spacing between the lines then set the pixel value here.","default":"","optional":true,"nullable":""}]},{"name":"addBitmapFontFromAtlas","description":"Add a new Bitmap Font to the Cache, where the font texture is part of a Texture Atlas.\r\rThe atlas must already exist in the cache, and be available based on the given `atlasKey`.\r\rThe `atlasFrame` specifies the name of the frame within the atlas that the Bitmap Font is\rstored in.\r\rThe `dataKey` is the key of the XML or JSON Bitmap Font Data, which must already be in\rthe Cache.","parameters":[{"name":"key","type":"string","description":"The key that this asset will be stored in the cache under. This should be unique within this cache.","default":"","optional":"","nullable":""},{"name":"atlasKey","type":"string","description":"The key of the Texture Atlas in the Cache.","default":"","optional":"","nullable":""},{"name":"atlasFrame","type":"string","description":"The frame of the Texture Atlas that the Bitmap Font is in.","default":"","optional":"","nullable":""},{"name":"dataKey","type":"string","description":"The key of the Bitmap Font data in the Cache","default":"","optional":"","nullable":""},{"name":"dataType","type":"string","description":"The format of the Bitmap Font data: `json` or `xml`.","default":"'xml'","optional":true,"nullable":""},{"name":"xSpacing","type":"number","description":"If you'd like to add additional horizontal spacing between the characters then set the pixel value here.","default":"","optional":true,"nullable":""},{"name":"ySpacing","type":"number","description":"If you'd like to add additional vertical spacing between the lines then set the pixel value here.","default":"","optional":true,"nullable":""}]},{"name":"addJSON","description":"Add a new json object into the cache.","parameters":[{"name":"key","type":"string","description":"The key that this asset will be stored in the cache under. This should be unique within this cache.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"The URL the asset was loaded from. If the asset was not loaded externally set to `null`.","default":"","optional":"","nullable":""},{"name":"data","type":"object","description":"Extra json data.","default":"","optional":"","nullable":""}]},{"name":"addXML","description":"Add a new xml object into the cache.","parameters":[{"name":"key","type":"string","description":"The key that this asset will be stored in the cache under. This should be unique within this cache.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"The URL the asset was loaded from. If the asset was not loaded externally set to `null`.","default":"","optional":"","nullable":""},{"name":"data","type":"object","description":"Extra text data.","default":"","optional":"","nullable":""}]},{"name":"addVideo","description":"Adds a Video file into the Cache. The file must have already been loaded, typically via Phaser.Loader.","parameters":[{"name":"key","type":"string","description":"The key that this asset will be stored in the cache under. This should be unique within this cache.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"The URL the asset was loaded from. If the asset was not loaded externally set to `null`.","default":"","optional":"","nullable":""},{"name":"data","type":"object","description":"Extra video data.","default":"","optional":"","nullable":""},{"name":"isBlob","type":"boolean","description":"True if the file was preloaded via xhr and the data parameter is a Blob. false if a Video tag was created instead.","default":"","optional":"","nullable":""}]},{"name":"addShader","description":"Adds a Fragment Shader in to the Cache. The file must have already been loaded, typically via Phaser.Loader.","parameters":[{"name":"key","type":"string","description":"The key that this asset will be stored in the cache under. This should be unique within this cache.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"The URL the asset was loaded from. If the asset was not loaded externally set to `null`.","default":"","optional":"","nullable":""},{"name":"data","type":"object","description":"Extra shader data.","default":"","optional":"","nullable":""}]},{"name":"addRenderTexture","description":"Add a new Phaser.RenderTexture in to the cache.","parameters":[{"name":"key","type":"string","description":"The key that this asset will be stored in the cache under. This should be unique within this cache.","default":"","optional":"","nullable":""},{"name":"texture","type":"Phaser.RenderTexture","description":"The texture to use as the base of the RenderTexture.","default":"","optional":"","nullable":""}]},{"name":"addSpriteSheet","description":"Add a new sprite sheet in to the cache.","parameters":[{"name":"key","type":"string","description":"The key that this asset will be stored in the cache under. This should be unique within this cache.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"The URL the asset was loaded from. If the asset was not loaded externally set to `null`.","default":"","optional":"","nullable":""},{"name":"data","type":"object","description":"Extra sprite sheet data.","default":"","optional":"","nullable":""},{"name":"frameWidth","type":"number","description":"Width of the sprite sheet.","default":"","optional":"","nullable":""},{"name":"frameHeight","type":"number","description":"Height of the sprite sheet.","default":"","optional":"","nullable":""},{"name":"frameMax","type":"number","description":"How many frames stored in the sprite sheet. If -1 then it divides the whole sheet evenly.","default":-1,"optional":true,"nullable":""},{"name":"margin","type":"number","description":"If the frames have been drawn with a margin, specify the amount here.","default":"","optional":true,"nullable":""},{"name":"spacing","type":"number","description":"If the frames have been drawn with spacing between them, specify the amount here.","default":"","optional":true,"nullable":""},{"name":"skipFrames","type":"number","description":"Skip a number of frames. Useful when there are multiple sprite sheets in one image.","default":"","optional":true,"nullable":""}]},{"name":"addTextureAtlas","description":"Add a new texture atlas to the Cache.","parameters":[{"name":"key","type":"string","description":"The key that this asset will be stored in the cache under. This should be unique within this cache.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"The URL the asset was loaded from. If the asset was not loaded externally set to `null`.","default":"","optional":"","nullable":""},{"name":"data","type":"object","description":"Extra texture atlas data.","default":"","optional":"","nullable":""},{"name":"atlasData","type":"object","description":"Texture atlas frames data.","default":"","optional":"","nullable":""},{"name":"format","type":"number","description":"The format of the texture atlas.","default":"","optional":"","nullable":""}]},{"name":"reloadSound","description":"Reload a Sound file from the server.","parameters":[{"name":"key","type":"string","description":"The key of the asset within the cache.","default":"","optional":"","nullable":""}]},{"name":"reloadSoundComplete","description":"Fires the onSoundUnlock event when the sound has completed reloading.","parameters":[{"name":"key","type":"string","description":"The key of the asset within the cache.","default":"","optional":"","nullable":""}]},{"name":"updateSound","description":"Updates the sound object in the cache.","parameters":[{"name":"key","type":"string","description":"The key of the asset within the cache.","default":"","optional":"","nullable":""}]},{"name":"decodedSound","description":"Add a new decoded sound.","parameters":[{"name":"key","type":"string","description":"The key of the asset within the cache.","default":"","optional":"","nullable":""},{"name":"data","type":"object","description":"Extra sound data.","default":"","optional":"","nullable":""}]},{"name":"isSoundDecoded","description":"Check if the given sound has finished decoding.","parameters":[{"name":"key","type":"string","description":"The key of the asset within the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"The decoded state of the Sound object."}},{"name":"isSoundReady","description":"Check if the given sound is ready for playback.\rA sound is considered ready when it has finished decoding and the device is no longer touch locked.","parameters":[{"name":"key","type":"string","description":"The key of the asset within the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the sound is decoded and the device is not touch locked."}},{"name":"checkKey","description":"Checks if a key for the given cache object type exists.","parameters":[{"name":"cache","type":"integer","description":"The cache to search. One of the Cache consts such as `Phaser.Cache.IMAGE` or `Phaser.Cache.SOUND`.","default":"","optional":"","nullable":""},{"name":"key","type":"string","description":"The key of the asset within the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the key exists, otherwise false."}},{"name":"checkURL","description":"Checks if the given URL has been loaded into the Cache.\rThis method will only work if Cache.autoResolveURL was set to `true` before any preloading took place.\rThe 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\rwhich may cause double-load instances.","parameters":[{"name":"url","type":"string","description":"The url to check for in the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the url exists, otherwise false."}},{"name":"checkCanvasKey","description":"Checks if the given key exists in the Canvas Cache.","parameters":[{"name":"key","type":"string","description":"The key of the asset within the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the key exists in the cache, otherwise false."}},{"name":"checkImageKey","description":"Checks if the given key exists in the Image Cache. Note that this also includes Texture Atlases, Sprite Sheets and Retro Fonts.","parameters":[{"name":"key","type":"string","description":"The key of the asset within the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the key exists in the cache, otherwise false."}},{"name":"checkTextureKey","description":"Checks if the given key exists in the Texture Cache.","parameters":[{"name":"key","type":"string","description":"The key of the asset within the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the key exists in the cache, otherwise false."}},{"name":"checkSoundKey","description":"Checks if the given key exists in the Sound Cache.","parameters":[{"name":"key","type":"string","description":"The key of the asset within the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the key exists in the cache, otherwise false."}},{"name":"checkTextKey","description":"Checks if the given key exists in the Text Cache.","parameters":[{"name":"key","type":"string","description":"The key of the asset within the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the key exists in the cache, otherwise false."}},{"name":"checkPhysicsKey","description":"Checks if the given key exists in the Physics Cache.","parameters":[{"name":"key","type":"string","description":"The key of the asset within the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the key exists in the cache, otherwise false."}},{"name":"checkTilemapKey","description":"Checks if the given key exists in the Tilemap Cache.","parameters":[{"name":"key","type":"string","description":"The key of the asset within the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the key exists in the cache, otherwise false."}},{"name":"checkBinaryKey","description":"Checks if the given key exists in the Binary Cache.","parameters":[{"name":"key","type":"string","description":"The key of the asset within the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the key exists in the cache, otherwise false."}},{"name":"checkBitmapDataKey","description":"Checks if the given key exists in the BitmapData Cache.","parameters":[{"name":"key","type":"string","description":"The key of the asset within the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the key exists in the cache, otherwise false."}},{"name":"checkBitmapFontKey","description":"Checks if the given key exists in the BitmapFont Cache.","parameters":[{"name":"key","type":"string","description":"The key of the asset within the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the key exists in the cache, otherwise false."}},{"name":"checkJSONKey","description":"Checks if the given key exists in the JSON Cache.","parameters":[{"name":"key","type":"string","description":"The key of the asset within the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the key exists in the cache, otherwise false."}},{"name":"checkXMLKey","description":"Checks if the given key exists in the XML Cache.","parameters":[{"name":"key","type":"string","description":"The key of the asset within the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the key exists in the cache, otherwise false."}},{"name":"checkVideoKey","description":"Checks if the given key exists in the Video Cache.","parameters":[{"name":"key","type":"string","description":"The key of the asset within the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the key exists in the cache, otherwise false."}},{"name":"checkShaderKey","description":"Checks if the given key exists in the Fragment Shader Cache.","parameters":[{"name":"key","type":"string","description":"The key of the asset within the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the key exists in the cache, otherwise false."}},{"name":"checkRenderTextureKey","description":"Checks if the given key exists in the Render Texture Cache.","parameters":[{"name":"key","type":"string","description":"The key of the asset within the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the key exists in the cache, otherwise false."}},{"name":"getItem","description":"Get an item from a cache based on the given key and property.\r\rThis method is mostly used internally by other Cache methods such as `getImage` but is exposed\rpublicly for your own use as well.","parameters":[{"name":"key","type":"string","description":"The key of the asset within the cache.","default":"","optional":"","nullable":""},{"name":"cache","type":"integer","description":"The cache to search. One of the Cache consts such as `Phaser.Cache.IMAGE` or `Phaser.Cache.SOUND`.","default":"","optional":"","nullable":""},{"name":"method","type":"string","description":"The string name of the method calling getItem. Can be empty, in which case no console warning is output.","default":"","optional":true,"nullable":""},{"name":"property","type":"string","description":"If you require a specific property from the cache item, specify it here.","default":"","optional":true,"nullable":""}],"returns":{"type":"object","description":"The cached item if found, otherwise `null`. If the key is invalid and `method` is set then a console.warn is output."}},{"name":"getCanvas","description":"Gets a Canvas object from the cache.\r\rThe object is looked-up based on the key given.\r\rNote: If the object cannot be found a `console.warn` message is displayed.","parameters":[{"name":"key","type":"string","description":"The key of the asset to retrieve from the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"The canvas object or `null` if no item could be found matching the given key."}},{"name":"getImage","description":"Gets a Image object from the cache. This returns a DOM Image object, not a Phaser.Image object.\r\rThe object is looked-up based on the key given.\r\rNote: If the object cannot be found a `console.warn` message is displayed.\r\rOnly the Image cache is searched, which covers images loaded via Loader.image, Sprite Sheets and Texture Atlases.\r\rIf you need the image used by a bitmap font or similar then please use those respective 'get' methods.","parameters":[{"name":"key","type":"string","description":"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.","default":"","optional":true,"nullable":""},{"name":"full","type":"boolean","description":"If true the full image object will be returned, if false just the HTML Image object is returned.","default":"","optional":true,"nullable":""}],"returns":{"type":"Image","description":"The Image object if found in the Cache, otherwise `null`. If `full` was true then a JavaScript object is returned."}},{"name":"getTextureFrame","description":"Get a single texture frame by key.\r\rYou'd only do this to get the default Frame created for a non-atlas / spritesheet image.","parameters":[{"name":"key","type":"string","description":"The key of the asset to retrieve from the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Frame","description":"The frame data."}},{"name":"getSound","description":"Gets a Phaser.Sound object from the cache.\r\rThe object is looked-up based on the key given.\r\rNote: If the object cannot be found a `console.warn` message is displayed.","parameters":[{"name":"key","type":"string","description":"The key of the asset to retrieve from the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Sound","description":"The sound object."}},{"name":"getSoundData","description":"Gets a raw Sound data object from the cache.\r\rThe object is looked-up based on the key given.\r\rNote: If the object cannot be found a `console.warn` message is displayed.","parameters":[{"name":"key","type":"string","description":"The key of the asset to retrieve from the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"The sound data."}},{"name":"getText","description":"Gets a Text object from the cache.\r\rThe object is looked-up based on the key given.\r\rNote: If the object cannot be found a `console.warn` message is displayed.","parameters":[{"name":"key","type":"string","description":"The key of the asset to retrieve from the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"The text data."}},{"name":"getPhysicsData","description":"Gets a Physics Data object from the cache.\r\rThe object is looked-up based on the key given.\r\rNote: If the object cannot be found a `console.warn` message is displayed.\r\rYou can get either the entire data set, a single object or a single fixture of an object from it.","parameters":[{"name":"key","type":"string","description":"The key of the asset to retrieve from the cache.","default":"","optional":"","nullable":""},{"name":"object","type":"string","description":"If specified it will return just the physics object that is part of the given key, if null it will return them all.","default":"","optional":true,"nullable":""},{"name":"fixtureKey","type":"string","description":"Fixture key of fixture inside an object. This key can be set per fixture with the Phaser Exporter.","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"The requested physics object data if found."}},{"name":"getTilemapData","description":"Gets a raw Tilemap data object from the cache. This will be in either CSV or JSON format.\r\rThe object is looked-up based on the key given.\r\rNote: If the object cannot be found a `console.warn` message is displayed.","parameters":[{"name":"key","type":"string","description":"The key of the asset to retrieve from the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"The raw tilemap data in CSV or JSON format."}},{"name":"getBinary","description":"Gets a binary object from the cache.\r\rThe object is looked-up based on the key given.\r\rNote: If the object cannot be found a `console.warn` message is displayed.","parameters":[{"name":"key","type":"string","description":"The key of the asset to retrieve from the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"The binary data object."}},{"name":"getBitmapData","description":"Gets a BitmapData object from the cache.\r\rThe object is looked-up based on the key given.\r\rNote: If the object cannot be found a `console.warn` message is displayed.","parameters":[{"name":"key","type":"string","description":"The key of the asset to retrieve from the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.BitmapData","description":"The requested BitmapData object if found, or null if not."}},{"name":"getBitmapFont","description":"Gets a Bitmap Font object from the cache.\r\rThe object is looked-up based on the key given.\r\rNote: If the object cannot be found a `console.warn` message is displayed.","parameters":[{"name":"key","type":"string","description":"The key of the asset to retrieve from the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.BitmapFont","description":"The requested BitmapFont object if found, or null if not."}},{"name":"getJSON","description":"Gets a JSON object from the cache.\r\rThe object is looked-up based on the key given.\r\rNote: If the object cannot be found a `console.warn` message is displayed.\r\rYou can either return the object by reference (the default), or return a clone\rof it by setting the `clone` argument to `true`.","parameters":[{"name":"key","type":"string","description":"The key of the asset to retrieve from the cache.","default":"","optional":"","nullable":""},{"name":"clone","type":"boolean","description":"Return a clone of the original object (true) or a reference to it? (false)","default":"","optional":true,"nullable":""}],"returns":{"type":"object","description":"The JSON object, or an Array if the key points to an Array property. If the property wasn't found, it returns null."}},{"name":"getXML","description":"Gets an XML object from the cache.\r\rThe object is looked-up based on the key given.\r\rNote: If the object cannot be found a `console.warn` message is displayed.","parameters":[{"name":"key","type":"string","description":"The key of the asset to retrieve from the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"The XML object."}},{"name":"getVideo","description":"Gets a Phaser.Video object from the cache.\r\rThe object is looked-up based on the key given.\r\rNote: If the object cannot be found a `console.warn` message is displayed.","parameters":[{"name":"key","type":"string","description":"The key of the asset to retrieve from the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Video","description":"The video object."}},{"name":"getShader","description":"Gets a fragment shader object from the cache.\r\rThe object is looked-up based on the key given.\r\rNote: If the object cannot be found a `console.warn` message is displayed.","parameters":[{"name":"key","type":"string","description":"The key of the asset to retrieve from the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"string","description":"The shader object."}},{"name":"getRenderTexture","description":"Gets a RenderTexture object from the cache.\r\rThe object is looked-up based on the key given.\r\rNote: If the object cannot be found a `console.warn` message is displayed.","parameters":[{"name":"key","type":"string","description":"The key of the asset to retrieve from the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"Object","description":"The object with Phaser.RenderTexture and Phaser.Frame."}},{"name":"getBaseTexture","description":"Gets a PIXI.BaseTexture by key from the given Cache.","parameters":[{"name":"key","type":"string","description":"Asset key of the image for which you want the BaseTexture for.","default":"","optional":"","nullable":""},{"name":"cache","type":"integer","description":"The cache to search for the item in.","default":"Phaser.Cache.IMAGE","optional":true,"nullable":""}],"returns":{"type":"PIXI.BaseTexture","description":"The BaseTexture object."}},{"name":"getFrame","description":"Get a single frame by key. You'd only do this to get the default Frame created for a non-atlas/spritesheet image.","parameters":[{"name":"key","type":"string","description":"Asset key of the frame data to retrieve from the Cache.","default":"","optional":"","nullable":""},{"name":"cache","type":"integer","description":"The cache to search for the item in.","default":"Phaser.Cache.IMAGE","optional":true,"nullable":""}],"returns":{"type":"Phaser.Frame","description":"The frame data."}},{"name":"getFrameCount","description":"Get the total number of frames contained in the FrameData object specified by the given key.","parameters":[{"name":"key","type":"string","description":"Asset key of the FrameData you want.","default":"","optional":"","nullable":""},{"name":"cache","type":"integer","description":"The cache to search for the item in.","default":"Phaser.Cache.IMAGE","optional":true,"nullable":""}],"returns":{"type":"number","description":"Then number of frames. 0 if the image is not found."}},{"name":"getFrameData","description":"Gets a Phaser.FrameData object from the Image Cache.\r\rThe object is looked-up based on the key given.\r\rNote: If the object cannot be found a `console.warn` message is displayed.","parameters":[{"name":"key","type":"string","description":"Asset key of the frame data to retrieve from the Cache.","default":"","optional":"","nullable":""},{"name":"cache","type":"integer","description":"The cache to search for the item in.","default":"Phaser.Cache.IMAGE","optional":true,"nullable":""}],"returns":{"type":"Phaser.FrameData","description":"The frame data."}},{"name":"hasFrameData","description":"Check if the FrameData for the given key exists in the Image Cache.","parameters":[{"name":"key","type":"string","description":"Asset key of the frame data to retrieve from the Cache.","default":"","optional":"","nullable":""},{"name":"cache","type":"integer","description":"The cache to search for the item in.","default":"Phaser.Cache.IMAGE","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the given key has frameData in the cache, otherwise false."}},{"name":"updateFrameData","description":"Replaces a set of frameData with a new Phaser.FrameData object.","parameters":[{"name":"key","type":"string","description":"The unique key by which you will reference this object.","default":"","optional":"","nullable":""},{"name":"frameData","type":"number","description":"The new FrameData.","default":"","optional":"","nullable":""},{"name":"cache","type":"integer","description":"The cache to search. One of the Cache consts such as `Phaser.Cache.IMAGE` or `Phaser.Cache.SOUND`.","default":"Phaser.Cache.IMAGE","optional":true,"nullable":""}]},{"name":"getFrameByIndex","description":"Get a single frame out of a frameData set by key.","parameters":[{"name":"key","type":"string","description":"Asset key of the frame data to retrieve from the Cache.","default":"","optional":"","nullable":""},{"name":"index","type":"number","description":"The index of the frame you want to get.","default":"","optional":"","nullable":""},{"name":"cache","type":"integer","description":"The cache to search. One of the Cache consts such as `Phaser.Cache.IMAGE` or `Phaser.Cache.SOUND`.","default":"Phaser.Cache.IMAGE","optional":true,"nullable":""}],"returns":{"type":"Phaser.Frame","description":"The frame object."}},{"name":"getFrameByName","description":"Get a single frame out of a frameData set by key.","parameters":[{"name":"key","type":"string","description":"Asset key of the frame data to retrieve from the Cache.","default":"","optional":"","nullable":""},{"name":"name","type":"string","description":"The name of the frame you want to get.","default":"","optional":"","nullable":""},{"name":"cache","type":"integer","description":"The cache to search. One of the Cache consts such as `Phaser.Cache.IMAGE` or `Phaser.Cache.SOUND`.","default":"Phaser.Cache.IMAGE","optional":true,"nullable":""}],"returns":{"type":"Phaser.Frame","description":"The frame object."}},{"name":"getURL","description":"Get a cached object by the URL.\rThis only returns a value if you set Cache.autoResolveURL to `true` *before* starting the preload of any assets.\rBe 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.","parameters":[{"name":"url","type":"string","description":"The url for the object loaded to get from the cache.","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"The cached object."}},{"name":"getKeys","description":"Gets all keys used in the requested Cache.","parameters":[{"name":"cache","type":"integer","description":"The Cache you wish to get the keys from. Can be any of the Cache consts such as `Phaser.Cache.IMAGE`, `Phaser.Cache.SOUND` etc.","default":"Phaser.Cache.IMAGE","optional":true,"nullable":""}],"returns":{"type":"Array","description":"The array of keys in the requested cache."}},{"name":"removeCanvas","description":"Removes a canvas from the cache.\r\rNote that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere\rthen it will persist in memory.","parameters":[{"name":"key","type":"string","description":"Key of the asset you want to remove.","default":"","optional":"","nullable":""}]},{"name":"removeImage","description":"Removes an image from the cache.\r\rYou can optionally elect to destroy it as well. This calls BaseTexture.destroy on it.\r\rNote that this only removes it from the Phaser Cache. If you still have references to the data elsewhere\rthen it will persist in memory.","parameters":[{"name":"key","type":"string","description":"Key of the asset you want to remove.","default":"","optional":"","nullable":""},{"name":"destroyBaseTexture","type":"boolean","description":"Should the BaseTexture behind this image also be destroyed?","default":true,"optional":true,"nullable":""}]},{"name":"removeSound","description":"Removes a sound from the cache.\r\rIf any `Phaser.Sound` objects use the audio file in the cache that you remove with this method, they will\r_automatically_ destroy themselves. If you wish to have full control over when Sounds are destroyed then\ryou must finish your house-keeping and destroy them all yourself first, before calling this method.\r\rNote that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere\rthen it will persist in memory.","parameters":[{"name":"key","type":"string","description":"Key of the asset you want to remove.","default":"","optional":"","nullable":""}]},{"name":"removeText","description":"Removes a text file from the cache.\r\rNote that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere\rthen it will persist in memory.","parameters":[{"name":"key","type":"string","description":"Key of the asset you want to remove.","default":"","optional":"","nullable":""}]},{"name":"removePhysics","description":"Removes a physics data file from the cache.\r\rNote that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere\rthen it will persist in memory.","parameters":[{"name":"key","type":"string","description":"Key of the asset you want to remove.","default":"","optional":"","nullable":""}]},{"name":"removeTilemap","description":"Removes a tilemap from the cache.\r\rNote that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere\rthen it will persist in memory.","parameters":[{"name":"key","type":"string","description":"Key of the asset you want to remove.","default":"","optional":"","nullable":""}]},{"name":"removeBinary","description":"Removes a binary file from the cache.\r\rNote that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere\rthen it will persist in memory.","parameters":[{"name":"key","type":"string","description":"Key of the asset you want to remove.","default":"","optional":"","nullable":""}]},{"name":"removeBitmapData","description":"Removes a bitmap data from the cache.\r\rNote that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere\rthen it will persist in memory.","parameters":[{"name":"key","type":"string","description":"Key of the asset you want to remove.","default":"","optional":"","nullable":""}]},{"name":"removeBitmapFont","description":"Removes a bitmap font from the cache.\r\rNote that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere\rthen it will persist in memory.","parameters":[{"name":"key","type":"string","description":"Key of the asset you want to remove.","default":"","optional":"","nullable":""}]},{"name":"removeJSON","description":"Removes a json object from the cache.\r\rNote that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere\rthen it will persist in memory.","parameters":[{"name":"key","type":"string","description":"Key of the asset you want to remove.","default":"","optional":"","nullable":""}]},{"name":"removeXML","description":"Removes a xml object from the cache.\r\rNote that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere\rthen it will persist in memory.","parameters":[{"name":"key","type":"string","description":"Key of the asset you want to remove.","default":"","optional":"","nullable":""}]},{"name":"removeVideo","description":"Removes a video from the cache.\r\rNote that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere\rthen it will persist in memory.","parameters":[{"name":"key","type":"string","description":"Key of the asset you want to remove.","default":"","optional":"","nullable":""}]},{"name":"removeShader","description":"Removes a shader from the cache.\r\rNote that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere\rthen it will persist in memory.","parameters":[{"name":"key","type":"string","description":"Key of the asset you want to remove.","default":"","optional":"","nullable":""}]},{"name":"removeRenderTexture","description":"Removes a Render Texture from the cache.\r\rNote that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere\rthen it will persist in memory.","parameters":[{"name":"key","type":"string","description":"Key of the asset you want to remove.","default":"","optional":"","nullable":""}]},{"name":"removeSpriteSheet","description":"Removes a Sprite Sheet from the cache.\r\rNote that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere\rthen it will persist in memory.","parameters":[{"name":"key","type":"string","description":"Key of the asset you want to remove.","default":"","optional":"","nullable":""}]},{"name":"removeTextureAtlas","description":"Removes a Texture Atlas from the cache.\r\rNote that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere\rthen it will persist in memory.","parameters":[{"name":"key","type":"string","description":"Key of the asset you want to remove.","default":"","optional":"","nullable":""}]},{"name":"clearGLTextures","description":"Empties out all of the GL Textures from Images stored in the cache.\rThis is called automatically when the WebGL context is lost and then restored.","parameters":[]},{"name":"_resolveURL","description":"Resolves a URL to its absolute form and stores it in Cache._urlMap as long as Cache.autoResolveURL is set to `true`.\rThis is then looked-up by the Cache.getURL and Cache.checkURL calls.","parameters":[{"name":"url","type":"string","description":"The URL to resolve. This is appended to Loader.baseURL.","default":"","optional":"","nullable":""},{"name":"data","type":"object","description":"The data associated with the URL to be stored to the URL Map.","default":"","optional":true,"nullable":""}],"returns":{"type":"string","description":"The resolved URL."}},{"name":"destroy","description":"Clears the cache. Removes every local cache object reference.\rIf an object in the cache has a `destroy` method it will also be called.","parameters":[]}],"members":[{"name":"game","access":"","virtual":false,"description":"Local reference to game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"autoResolveURL","access":"","virtual":false,"description":"Automatically resolve resource URLs to absolute paths for use with the Cache.getURL method.","type":{"names":["boolean"]},"default":""},{"name":"_cache","access":"private","virtual":false,"description":"The main cache object into which all resources are placed.","type":{"names":["object"]},"default":""},{"name":"_urlMap","access":"private","virtual":false,"description":"Maps URLs to resources.","type":{"names":["object"]},"default":""},{"name":"_urlResolver","access":"private","virtual":false,"description":"Used to resolve URLs to the absolute path.","type":{"names":["Image"]},"default":""},{"name":"_urlTemp","access":"private","virtual":false,"description":"Temporary variable to hold a resolved url.","type":{"names":["string"]},"default":""},{"name":"onSoundUnlock","access":"","virtual":false,"description":"This event is dispatched when the sound system is unlocked via a touch event on cellular devices.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"_cacheMap","access":"private","virtual":false,"description":"Const to cache object look-up array.","type":{"names":["array"]},"default":""},{"name":"CANVAS","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"IMAGE","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"TEXTURE","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"SOUND","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"TEXT","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"PHYSICS","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"TILEMAP","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"BINARY","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"BITMAPDATA","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"BITMAPFONT","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"JSON","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"XML","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"VIDEO","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"SHADER","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"RENDER_TEXTURE","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"DEFAULT","access":"","virtual":false,"description":"The default image used for a texture when no other is specified.","type":{"names":["PIXI.Texture"]},"default":""},{"name":"MISSING","access":"","virtual":false,"description":"The default image used for a texture when the source image is missing.","type":{"names":["PIXI.Texture"]},"default":""}]},{"name":"Phaser.Loader","description":"The Loader handles loading all external content such as Images, Sounds, Texture Atlases and data files.\r\rThe loader uses a combination of tag loading (eg. Image elements) and XHR and provides progress and completion callbacks.\r\rParallel loading (see {@link Phaser.Loader#enableParallel enableParallel}) is supported and enabled by default.\rLoad-before behavior of parallel resources is controlled by synchronization points as discussed in {@link Phaser.Loader#withSyncPoint withSyncPoint}.\r\rTexture Atlases can be created with tools such as [Texture Packer](https://www.codeandweb.com/texturepacker/phaser) and\r[Shoebox](http://renderhjs.net/shoebox/)","constructor":{"name":"Loader","description":"The Loader handles loading all external content such as Images, Sounds, Texture Atlases and data files.\r\rThe loader uses a combination of tag loading (eg. Image elements) and XHR and provides progress and completion callbacks.\r\rParallel loading (see {@link Phaser.Loader#enableParallel enableParallel}) is supported and enabled by default.\rLoad-before behavior of parallel resources is controlled by synchronization points as discussed in {@link Phaser.Loader#withSyncPoint withSyncPoint}.\r\rTexture Atlases can be created with tools such as [Texture Packer](https://www.codeandweb.com/texturepacker/phaser) and\r[Shoebox](http://renderhjs.net/shoebox/)","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""}]},"functions":[{"name":"setPreloadSprite","description":"Set a Sprite to be a \"preload\" sprite by passing it to this method.\r\rA \"preload\" sprite will have its width or height crop adjusted based on the percentage of the loader in real-time.\rThis allows you to easily make loading bars for games.\r\rThe sprite will automatically be made visible when calling this.","parameters":[{"name":"sprite","type":["Phaser.Sprite","Phaser.Image"],"description":"The sprite or image that will be cropped during the load.","default":"","optional":"","nullable":""},{"name":"direction","type":"number","description":"A value of zero means the sprite will be cropped horizontally, a value of 1 means its will be cropped vertically.","default":"","optional":true,"nullable":""}]},{"name":"resize","description":"Called automatically by ScaleManager when the game resizes in RESIZE scalemode.\r\rThis can be used to adjust the preloading sprite size, eg.","parameters":[]},{"name":"checkKeyExists","description":"Check whether a file/asset with a specific key is queued to be loaded.\r\rTo access a loaded asset use Phaser.Cache, eg. {@link Phaser.Cache#checkImageKey}","parameters":[{"name":"type","type":"string","description":"The type asset you want to check.","default":"","optional":"","nullable":""},{"name":"key","type":"string","description":"Key of the asset you want to check.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"Return true if exists, otherwise return false."}},{"name":"getAssetIndex","description":"Get the queue-index of the file/asset with a specific key.\r\rOnly assets in the download file queue will be found.","parameters":[{"name":"type","type":"string","description":"The type asset you want to check.","default":"","optional":"","nullable":""},{"name":"key","type":"string","description":"Key of the asset you want to check.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The index of this key in the filelist, or -1 if not found.\r    The index may change and should only be used immediately following this call"}},{"name":"getAsset","description":"Find a file/asset with a specific key.\r\rOnly assets in the download file queue will be found.","parameters":[{"name":"type","type":"string","description":"The type asset you want to check.","default":"","optional":"","nullable":""},{"name":"key","type":"string","description":"Key of the asset you want to check.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"Returns an object if found that has 2 properties: `index` and `file`; otherwise a non-true value is returned.\r    The index may change and should only be used immediately following this call."}},{"name":"reset","description":"Reset the loader and clear any queued assets. If `Loader.resetLocked` is true this operation will abort.\r\rThis will abort any loading and clear any queued assets.\r\rOptionally you can clear any associated events.","parameters":[{"name":"hard","type":"boolean","description":"If true then the preload sprite and other artifacts may also be cleared.","default":"","optional":true,"nullable":""},{"name":"clearEvents","type":"boolean","description":"If true then the all Loader signals will have removeAll called on them.","default":"","optional":true,"nullable":""}]},{"name":"addToFileList","description":"Internal function that adds a new entry to the file list. Do not call directly.","parameters":[{"name":"type","type":"string","description":"The type of resource to add to the list (image, audio, xml, etc).","default":"","optional":"","nullable":""},{"name":"key","type":"string","description":"The unique Cache ID key of this resource.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"The URL the asset will be loaded from.","default":"","optional":true,"nullable":""},{"name":"properties","type":"object","description":"Any additional properties needed to load the file. These are added directly to the added file object and overwrite any defaults.","default":"(none)","optional":true,"nullable":""},{"name":"overwrite","type":"boolean","description":"If true then this will overwrite a file asset of the same type/key. Otherwise it will only add a new asset. If overwrite is true, and the asset is already being loaded (or has been loaded), then it is appended instead.","default":"","optional":true,"nullable":""},{"name":"extension","type":"string","description":"If no URL is given the Loader will sometimes auto-generate the URL based on the key, using this as the extension.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Loader","description":"This instance of the Phaser Loader."}},{"name":"replaceInFileList","description":"Internal function that replaces an existing entry in the file list with a new one. Do not call directly.","parameters":[{"name":"type","type":"string","description":"The type of resource to add to the list (image, audio, xml, etc).","default":"","optional":"","nullable":""},{"name":"key","type":"string","description":"The unique Cache ID key of this resource.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"The URL the asset will be loaded from.","default":"","optional":"","nullable":""},{"name":"properties","type":"object","description":"Any additional properties needed to load the file.","default":"","optional":"","nullable":""}]},{"name":"pack","description":"Add a JSON resource pack ('packfile') to the Loader.\r\rA packfile is a JSON file that contains a list of assets to the be loaded.\rPlease see the example 'loader/asset pack' in the Phaser Examples repository.\r\rPacks are always put before the first non-pack file that is not loaded / loading.\r\rThis means that all packs added before any loading has started are added to the front\rof the file queue, in the order added.\r\rThe key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.\r\rThe URL of the packfile can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.","parameters":[{"name":"key","type":"string","description":"Unique asset key of this resource pack.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"URL of the Asset Pack JSON file. If you wish to pass a json object instead set this to null and pass the object as the data parameter.","default":"","optional":true,"nullable":""},{"name":"data","type":"object","description":"The Asset Pack JSON data. Use this to pass in a json data object rather than loading it from a URL. TODO","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"Some Loader operations, like Binary and Script require a context for their callbacks. Pass the context here.","default":"(loader)","optional":true,"nullable":""}],"returns":{"type":"Phaser.Loader","description":"This Loader instance."}},{"name":"image","description":"Adds an Image to the current load queue.\r\rThe file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.\r\rPhaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\rThe key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.\r\rRetrieve the image via `Cache.getImage(key)`\r\rThe URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\rIf the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\rand no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension.\rIf you do not desire this action then provide a URL.\r\rThis method also supports passing in a texture object as the `url` argument. This allows you to load\rcompressed textures into Phaser. You can also use `Loader.texture` to do this.\r\rCompressed Textures are a WebGL only feature, and require 3rd party tools to create.\rAvailable tools include Texture Packer, PVRTexTool, DirectX Texture Tool and Mali Texture Compression Tool.\r\rSupported texture compression formats are: PVRTC, S3TC and ETC1.\rSupported file formats are: PVR, DDS, KTX and PKM.\r\rThe formats that support all 3 compression algorithms are PVR and KTX.\rPKM only supports ETC1, and DDS only S3TC for now.\r\rThe texture path object looks like this:\r\r```\rload.image('factory', {\r    etc1: 'assets/factory_etc1.pkm',\r    s3tc: 'assets/factory_dxt1.pvr',\r    pvrtc: 'assets/factory_pvrtc.pvr',\r    truecolor: 'assets/factory.png'\r});\r```\r\rThe `truecolor` property points to a standard PNG file, that will be used if none of the \rcompressed formats are supported by the browser / GPU.","parameters":[{"name":"key","type":"string","description":"Unique asset key of this image file.","default":"","optional":"","nullable":""},{"name":"url","type":["string","object"],"description":"URL of an image file. If undefined or `null` the url will be set to `<key>.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\". Can also be a texture data object.","default":"","optional":true,"nullable":""},{"name":"overwrite","type":"boolean","description":"If an unloaded file with a matching key already exists in the queue, this entry will overwrite it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Loader","description":"This Loader instance."}},{"name":"texture","description":"Adds a Compressed Texture Image to the current load queue.\r\rCompressed Textures are a WebGL only feature, and require 3rd party tools to create.\rAvailable tools include Texture Packer, PVRTexTool, DirectX Texture Tool and Mali Texture Compression Tool.\r\rSupported texture compression formats are: PVRTC, S3TC and ETC1.\rSupported file formats are: PVR, DDS, KTX and PKM.\r\rThe formats that support all 3 compression algorithms are PVR and KTX.\rPKM only supports ETC1, and DDS only S3TC for now.\r\rThe texture path object looks like this:\r\r```\rload.texture('factory', {\r    etc1: 'assets/factory_etc1.pkm',\r    s3tc: 'assets/factory_dxt1.pvr',\r    pvrtc: 'assets/factory_pvrtc.pvr',\r    truecolor: 'assets/factory.png'\r});\r```\r\rThe `truecolor` property points to a standard PNG file, that will be used if none of the \rcompressed formats are supported by the browser / GPU.\r\rThe file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.\r\rThe key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.\r\rRetrieve the image via `Cache.getImage(key)`\r\rThe URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\rIf the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\rand no URL is given then the Loader will set the URL to be \"alien.pvr\". It will always add `.pvr` as the extension.\rIf you do not desire this action then provide a URL.","parameters":[{"name":"key","type":"string","description":"Unique asset key of this image file.","default":"","optional":"","nullable":""},{"name":"object","type":"object","description":"The texture path data object.","default":"","optional":"","nullable":""},{"name":"overwrite","type":"boolean","description":"If an unloaded file with a matching key already exists in the queue, this entry will overwrite it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Loader","description":"This Loader instance."}},{"name":"images","description":"Adds an array of images to the current load queue.\r\rIt works by passing each element of the array to the Loader.image method.\r\rThe files are **not** loaded immediately after calling this method. The files are added to the queue ready to be loaded when the loader starts.\r\rPhaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\rThe keys must be unique Strings. They are used to add the files to the Phaser.Cache upon successful load.\r\rRetrieve the images via `Cache.getImage(key)`\r\rThe URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\rIf the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\rand no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension.\rIf you do not desire this action then provide a URL.","parameters":[{"name":"keys","type":"array","description":"An array of unique asset keys of the image files.","default":"","optional":"","nullable":""},{"name":"urls","type":"array","description":"Optional array of URLs. If undefined or `null` the url will be set to `<key>.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\". If provided the URLs array length must match the keys array length.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Loader","description":"This Loader instance."}},{"name":"text","description":"Adds a Text file to the current load queue.\r\rThe file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.\r\rThe key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.\r\rRetrieve the file via `Cache.getText(key)`\r\rThe URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\rIf the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\rand no URL is given then the Loader will set the URL to be \"alien.txt\". It will always add `.txt` as the extension.\rIf you do not desire this action then provide a URL.","parameters":[{"name":"key","type":"string","description":"Unique asset key of the text file.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"URL of the text file. If undefined or `null` the url will be set to `<key>.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".","default":"","optional":true,"nullable":""},{"name":"overwrite","type":"boolean","description":"If an unloaded file with a matching key already exists in the queue, this entry will overwrite it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Loader","description":"This Loader instance."}},{"name":"json","description":"Adds a JSON file to the current load queue.\r\rThe file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.\r\rThe key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.\r\rRetrieve the file via `Cache.getJSON(key)`. JSON files are automatically parsed upon load.\rIf you need to control when the JSON is parsed then use `Loader.text` instead and parse the text file as needed.\r\rThe URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\rIf the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\rand no URL is given then the Loader will set the URL to be \"alien.json\". It will always add `.json` as the extension.\rIf you do not desire this action then provide a URL.","parameters":[{"name":"key","type":"string","description":"Unique asset key of the json file.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"URL of the JSON file. If undefined or `null` the url will be set to `<key>.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".","default":"","optional":true,"nullable":""},{"name":"overwrite","type":"boolean","description":"If an unloaded file with a matching key already exists in the queue, this entry will overwrite it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Loader","description":"This Loader instance."}},{"name":"shader","description":"Adds a fragment shader file to the current load queue.\r\rThe file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.\r\rThe key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.\r\rRetrieve the file via `Cache.getShader(key)`.\r\rThe URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\rIf the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"blur\"\rand no URL is given then the Loader will set the URL to be \"blur.frag\". It will always add `.frag` as the extension.\rIf you do not desire this action then provide a URL.","parameters":[{"name":"key","type":"string","description":"Unique asset key of the fragment file.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"URL of the fragment file. If undefined or `null` the url will be set to `<key>.frag`, i.e. if `key` was \"blur\" then the URL will be \"blur.frag\".","default":"","optional":true,"nullable":""},{"name":"overwrite","type":"boolean","description":"If an unloaded file with a matching key already exists in the queue, this entry will overwrite it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Loader","description":"This Loader instance."}},{"name":"xml","description":"Adds an XML file to the current load queue.\r\rThe file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.\r\rThe key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.\r\rRetrieve the file via `Cache.getXML(key)`.\r\rThe URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\rIf the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\rand no URL is given then the Loader will set the URL to be \"alien.xml\". It will always add `.xml` as the extension.\rIf you do not desire this action then provide a URL.","parameters":[{"name":"key","type":"string","description":"Unique asset key of the xml file.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"URL of the XML file. If undefined or `null` the url will be set to `<key>.xml`, i.e. if `key` was \"alien\" then the URL will be \"alien.xml\".","default":"","optional":true,"nullable":""},{"name":"overwrite","type":"boolean","description":"If an unloaded file with a matching key already exists in the queue, this entry will overwrite it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Loader","description":"This Loader instance."}},{"name":"script","description":"Adds a JavaScript file to the current load queue.\r\rThe file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.\r\rThe key must be a unique String.\r\rThe URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\rIf the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\rand no URL is given then the Loader will set the URL to be \"alien.js\". It will always add `.js` as the extension.\rIf you do not desire this action then provide a URL.\r\rUpon successful load the JavaScript is automatically turned into a script tag and executed, so be careful what you load!\r\rA callback, which will be invoked as the script tag has been created, can also be specified.\rThe callback must return relevant `data`.","parameters":[{"name":"key","type":"string","description":"Unique asset key of the script file.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"URL of the JavaScript file. If undefined or `null` the url will be set to `<key>.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\".","default":"","optional":true,"nullable":""},{"name":"callback","type":"function","description":"Optional callback that will be called after the script tag has loaded, so you can perform additional processing.","default":"(none)","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context under which the callback will be applied. If not specified it will use the Phaser Loader as the context.","default":"(loader)","optional":true,"nullable":""}],"returns":{"type":"Phaser.Loader","description":"This Loader instance."}},{"name":"binary","description":"Adds a binary file to the current load queue.\r\rThe file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.\r\rThe key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.\r\rRetrieve the file via `Cache.getBinary(key)`.\r\rThe URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\rIf the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\rand no URL is given then the Loader will set the URL to be \"alien.bin\". It will always add `.bin` as the extension.\rIf you do not desire this action then provide a URL.\r\rIt will be loaded via xhr with a responseType of \"arraybuffer\". You can specify an optional callback to process the file after load.\rWhen the callback is called it will be passed 2 parameters: the key of the file and the file data.\r\rWARNING: If a callback is specified the data will be set to whatever it returns. Always return the data object, even if you didn't modify it.","parameters":[{"name":"key","type":"string","description":"Unique asset key of the binary file.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"URL of the binary file. If undefined or `null` the url will be set to `<key>.bin`, i.e. if `key` was \"alien\" then the URL will be \"alien.bin\".","default":"","optional":true,"nullable":""},{"name":"callback","type":"function","description":"Optional callback that will be passed the file after loading, so you can perform additional processing on it.","default":"(none)","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context under which the callback will be applied. If not specified it will use the callback itself as the context.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Loader","description":"This Loader instance."}},{"name":"spritesheet","description":"Adds a Sprite Sheet to the current load queue.\r\rThe file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.\r\rTo clarify the terminology that Phaser uses: A Sprite Sheet is an image containing frames, usually of an animation, that are all equal\rdimensions and often in sequence. For example if the frame size is 32x32 then every frame in the sprite sheet will be that size.\rSometimes (outside of Phaser) the term \"sprite sheet\" is used to refer to a texture atlas.\rA Texture Atlas works by packing together images as best it can, using whatever frame sizes it likes, often with cropping and trimming\rthe frames in the process. Software such as Texture Packer, Flash CC or Shoebox all generate texture atlases, not sprite sheets.\rIf you've got an atlas then use `Loader.atlas` instead.\r\rThe key must be a unique String. It is used to add the image to the Phaser.Cache upon successful load.\r\rRetrieve the file via `Cache.getImage(key)`. Sprite sheets, being image based, live in the same Cache as all other Images.\r\rThe URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\rIf the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\rand no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension.\rIf you do not desire this action then provide a URL.","parameters":[{"name":"key","type":"string","description":"Unique asset key of the sheet file.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"URL of the sprite sheet file. If undefined or `null` the url will be set to `<key>.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".","default":"","optional":"","nullable":""},{"name":"frameWidth","type":"number","description":"Width in pixels of a single frame in the sprite sheet.","default":"","optional":"","nullable":""},{"name":"frameHeight","type":"number","description":"Height in pixels of a single frame in the sprite sheet.","default":"","optional":"","nullable":""},{"name":"frameMax","type":"number","description":"How many frames in this sprite sheet. If not specified it will divide the whole image into frames.","default":-1,"optional":true,"nullable":""},{"name":"margin","type":"number","description":"If the frames have been drawn with a margin, specify the amount here.","default":"","optional":true,"nullable":""},{"name":"spacing","type":"number","description":"If the frames have been drawn with spacing between them, specify the amount here.","default":"","optional":true,"nullable":""},{"name":"skipFrames","type":"number","description":"Skip a number of frames. Useful when there are multiple sprite sheets in one image.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Loader","description":"This Loader instance."}},{"name":"audio","description":"Adds an audio file to the current load queue.\r\rThe file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.\r\rThe key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.\r\rRetrieve the file via `Cache.getSound(key)`.\r\rThe URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\rMobile warning: There are some mobile devices (certain iPad 2 and iPad Mini revisions) that cannot play 48000 Hz audio.\rWhen they try to play the audio becomes extremely distorted and buzzes, eventually crashing the sound system.\rThe solution is to use a lower encoding rate such as 44100 Hz.","parameters":[{"name":"key","type":"string","description":"Unique asset key of the audio file.","default":"","optional":"","nullable":""},{"name":"urls","type":["string","Array.<string>","Array.<object>"],"description":"Either a single string or an array of URIs or pairs of `{uri: .., type: ..}`.\r   If an array is specified then the first URI (or URI + mime pair) that is device-compatible will be selected.\r   For example: `\"jump.mp3\"`, `['jump.mp3', 'jump.ogg', 'jump.m4a']`, or `[{uri: \"data:<opus_resource>\", type: 'opus'}, 'fallback.mp3']`.\r   BLOB and DATA URIs can be used but only support automatic detection when used in the pair form; otherwise the format must be manually checked before adding the resource.","default":"","optional":"","nullable":""},{"name":"autoDecode","type":"boolean","description":"When using Web Audio the audio files can either be decoded at load time or run-time.\r   Audio files can't be played until they are decoded and, if specified, this enables immediate decoding. Decoding is a non-blocking async process, however it consumes huge amounts of CPU time on mobiles especially.","default":true,"optional":true,"nullable":""}],"returns":{"type":"Phaser.Loader","description":"This Loader instance."}},{"name":"audioSprite","description":"Adds an audio sprite file to the current load queue.\r\rThe file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.\r\rThe key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.\r\rAudio Sprites are a combination of audio files and a JSON configuration.\r\rThe JSON follows the format of that created by https://github.com/tonistiigi/audiosprite\r\rRetrieve the file via `Cache.getSoundData(key)`.\r\rThe URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.","parameters":[{"name":"key","type":"string","description":"Unique asset key of the audio file.","default":"","optional":"","nullable":""},{"name":"urls","type":["Array","string"],"description":"An array containing the URLs of the audio files, i.e.: [ 'audiosprite.mp3', 'audiosprite.ogg', 'audiosprite.m4a' ] or a single string containing just one URL.","default":"","optional":"","nullable":""},{"name":"jsonURL","type":"string","description":"The URL of the audiosprite configuration JSON object. If you wish to pass the data directly set this parameter to null.","default":"","optional":true,"nullable":""},{"name":"jsonData","type":["string","object"],"description":"A JSON object or string containing the audiosprite configuration data. This is ignored if jsonURL is not null.","default":"","optional":true,"nullable":""},{"name":"autoDecode","type":"boolean","description":"When using Web Audio the audio files can either be decoded at load time or run-time.\r   Audio files can't be played until they are decoded and, if specified, this enables immediate decoding. Decoding is a non-blocking async process, however it consumes huge amounts of CPU time on mobiles especially.","default":true,"optional":true,"nullable":""}],"returns":{"type":"Phaser.Loader","description":"This Loader instance."}},{"name":"audiosprite","description":"A legacy alias for Loader.audioSprite. Please see that method for documentation.","parameters":[{"name":"key","type":"string","description":"Unique asset key of the audio file.","default":"","optional":"","nullable":""},{"name":"urls","type":["Array","string"],"description":"An array containing the URLs of the audio files, i.e.: [ 'audiosprite.mp3', 'audiosprite.ogg', 'audiosprite.m4a' ] or a single string containing just one URL.","default":"","optional":"","nullable":""},{"name":"jsonURL","type":"string","description":"The URL of the audiosprite configuration JSON object. If you wish to pass the data directly set this parameter to null.","default":"","optional":true,"nullable":""},{"name":"jsonData","type":["string","object"],"description":"A JSON object or string containing the audiosprite configuration data. This is ignored if jsonURL is not null.","default":"","optional":true,"nullable":""},{"name":"autoDecode","type":"boolean","description":"When using Web Audio the audio files can either be decoded at load time or run-time.\r   Audio files can't be played until they are decoded and, if specified, this enables immediate decoding. Decoding is a non-blocking async process, however it consumes huge amounts of CPU time on mobiles especially.","default":true,"optional":true,"nullable":""}],"returns":{"type":"Phaser.Loader","description":"This Loader instance."}},{"name":"video","description":"Adds a video file to the current load queue.\r\rThe file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.\r\rThe key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.\r\rRetrieve the file via `Cache.getVideo(key)`.\r\rThe URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\rYou don't need to preload a video in order to play it in your game. See `Video.createVideoFromURL` for details.","parameters":[{"name":"key","type":"string","description":"Unique asset key of the video file.","default":"","optional":"","nullable":""},{"name":"urls","type":["string","Array.<string>","Array.<object>"],"description":"Either a single string or an array of URIs or pairs of `{uri: .., type: ..}`.\r   If an array is specified then the first URI (or URI + mime pair) that is device-compatible will be selected.\r   For example: `\"boom.mp4\"`, `['boom.mp4', 'boom.ogg', 'boom.webm']`, or `[{uri: \"data:<opus_resource>\", type: 'opus'}, 'fallback.mp4']`.\r   BLOB and DATA URIs can be used but only support automatic detection when used in the pair form; otherwise the format must be manually checked before adding the resource.","default":"","optional":"","nullable":""},{"name":"loadEvent","type":"string","description":"This sets the Video source event to listen for before the load is considered complete.\r   'canplaythrough' implies the video has downloaded enough, and bandwidth is high enough that it can be played to completion.\r   'canplay' implies the video has downloaded enough to start playing, but not necessarily to finish.\r   'loadeddata' just makes sure that the video meta data and first frame have downloaded. Phaser uses this value automatically if the\r   browser is detected as being Firefox and no `loadEvent` is given, otherwise it defaults to `canplaythrough`.","default":"'canplaythrough'","optional":true,"nullable":""},{"name":"asBlob","type":"boolean","description":"Video files can either be loaded via the creation of a video element which has its src property set.\r   Or they can be loaded via xhr, stored as binary data in memory and then converted to a Blob. This isn't supported in IE9 or Android 2.\r   If you need to have the same video playing at different times across multiple Sprites then you need to load it as a Blob.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Loader","description":"This Loader instance."}},{"name":"tilemap","description":"Adds a Tile Map data file to the current load queue.\r\rPhaser can load data in two different formats: CSV and Tiled JSON.\r\rTiled is a free software package, specifically for creating tilemaps, and is available from http://www.mapeditor.org\r\rYou can choose to either load the data externally, by providing a URL to a json file.\rOr you can pass in a JSON object or String via the `data` parameter.\rIf you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.\r\rIf a URL is provided the file is **not** loaded immediately after calling this method, but is added to the load queue.\r\rThe key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.\r\rRetrieve the file via `Cache.getTilemapData(key)`. JSON files are automatically parsed upon load.\rIf you need to control when the JSON is parsed then use `Loader.text` instead and parse the text file as needed.\r\rThe URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\rIf the URL isn't specified and no data is given then the Loader will take the key and create a filename from that.\rFor example if the key is \"level1\" and no URL or data is given then the Loader will set the URL to be \"level1.json\".\rIf you set the format to be Tilemap.CSV it will set the URL to be \"level1.csv\" instead.\r\rIf you do not desire this action then provide a URL or data object.","parameters":[{"name":"key","type":"string","description":"Unique asset key of the tilemap data.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"URL of the tile map file. If undefined or `null` and no data is given the url will be set to `<key>.json`, i.e. if `key` was \"level1\" then the URL will be \"level1.json\".","default":"","optional":true,"nullable":""},{"name":"data","type":["object","string"],"description":"An optional JSON data object. If given then the url is ignored and this JSON object is used for map data instead.","default":"","optional":true,"nullable":""},{"name":"format","type":"number","description":"The format of the map data. Either Phaser.Tilemap.CSV or Phaser.Tilemap.TILED_JSON.","default":"Phaser.Tilemap.CSV","optional":true,"nullable":""}],"returns":{"type":"Phaser.Loader","description":"This Loader instance."}},{"name":"physics","description":"Adds a physics data file to the current load queue.\r\rThe data must be in `Lime + Corona` JSON format. [Physics Editor](https://www.codeandweb.com) by code'n'web exports in this format natively.\r\rYou can choose to either load the data externally, by providing a URL to a json file.\rOr you can pass in a JSON object or String via the `data` parameter.\rIf you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.\r\rIf a URL is provided the file is **not** loaded immediately after calling this method, but is added to the load queue.\r\rThe key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.\r\rRetrieve the file via `Cache.getJSON(key)`. JSON files are automatically parsed upon load.\rIf you need to control when the JSON is parsed then use `Loader.text` instead and parse the text file as needed.\r\rThe URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\rIf the URL isn't specified and no data is given then the Loader will take the key and create a filename from that.\rFor example if the key is \"alien\" and no URL or data is given then the Loader will set the URL to be \"alien.json\".\rIt will always use `.json` as the extension.\r\rIf you do not desire this action then provide a URL or data object.","parameters":[{"name":"key","type":"string","description":"Unique asset key of the physics json data.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"URL of the physics data file. If undefined or `null` and no data is given the url will be set to `<key>.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".","default":"","optional":true,"nullable":""},{"name":"data","type":["object","string"],"description":"An optional JSON data object. If given then the url is ignored and this JSON object is used for physics data instead.","default":"","optional":true,"nullable":""},{"name":"format","type":"string","description":"The format of the physics data.","default":"Phaser.Physics.LIME_CORONA_JSON","optional":true,"nullable":""}],"returns":{"type":"Phaser.Loader","description":"This Loader instance."}},{"name":"bitmapFont","description":"Adds Bitmap Font files to the current load queue.\r\rTo create the Bitmap Font files you can use:\r\rBMFont (Windows, free): http://www.angelcode.com/products/bmfont/\rGlyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner\rLittera (Web-based, free): http://kvazars.com/littera/\r\rYou can choose to either load the data externally, by providing a URL to an xml file.\rOr you can pass in an XML object or String via the `xmlData` parameter.\rIf you pass a String the data is automatically run through `Loader.parseXML` and then immediately added to the Phaser.Cache.\r\rIf URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.\r\rThe key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.\r\rRetrieve the file via `Cache.getBitmapFont(key)`. XML files are automatically parsed upon load.\rIf you need to control when the XML is parsed then use `Loader.text` instead and parse the XML file as needed.\r\rThe URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\rIf the textureURL isn't specified then the Loader will take the key and create a filename from that.\rFor example if the key is \"megaFont\" and textureURL is null then the Loader will set the URL to be \"megaFont.png\".\rThe same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will\rset the atlasURL to be the key. For example if the key is \"megaFont\" the atlasURL will be set to \"megaFont.xml\".\r\rIf you do not desire this action then provide URLs and / or a data object.","parameters":[{"name":"key","type":"string","description":"Unique asset key of the bitmap font.","default":"","optional":"","nullable":""},{"name":"textureURL","type":"string","description":"URL of the Bitmap Font texture file. If undefined or `null` the url will be set to `<key>.png`, i.e. if `key` was \"megaFont\" then the URL will be \"megaFont.png\".","default":"","optional":"","nullable":""},{"name":"atlasURL","type":"string","description":"URL of the Bitmap Font atlas file (xml/json). If undefined or `null` AND `atlasData` is null, the url will be set to `<key>.xml`, i.e. if `key` was \"megaFont\" then the URL will be \"megaFont.xml\".","default":"","optional":"","nullable":""},{"name":"atlasData","type":"object","description":"An optional Bitmap Font atlas in string form (stringified xml/json).","default":"","optional":"","nullable":""},{"name":"xSpacing","type":"number","description":"If you'd like to add additional horizontal spacing between the characters then set the pixel value here.","default":"","optional":true,"nullable":""},{"name":"ySpacing","type":"number","description":"If you'd like to add additional vertical spacing between the lines then set the pixel value here.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Loader","description":"This Loader instance."}},{"name":"atlasJSONArray","description":"Adds a Texture Atlas file to the current load queue.\r\rUnlike `Loader.atlasJSONHash` this call expects the atlas data to be in a JSON Array format.\r\rTo create the Texture Atlas you can use tools such as:\r\r[Texture Packer](https://www.codeandweb.com/texturepacker/phaser)\r[Shoebox](http://renderhjs.net/shoebox/)\r\rIf using Texture Packer we recommend you enable \"Trim sprite names\".\rIf your atlas software has an option to \"rotate\" the resulting frames, you must disable it.\r\rYou can choose to either load the data externally, by providing a URL to a json file.\rOr you can pass in a JSON object or String via the `atlasData` parameter.\rIf you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.\r\rIf URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.\r\rThe key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.\r\rRetrieve the file via `Cache.getImage(key)`. JSON files are automatically parsed upon load.\rIf you need to control when the JSON is parsed then use `Loader.text` instead and parse the JSON file as needed.\r\rThe URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\rIf the textureURL isn't specified then the Loader will take the key and create a filename from that.\rFor example if the key is \"player\" and textureURL is null then the Loader will set the URL to be \"player.png\".\rThe same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will\rset the atlasURL to be the key. For example if the key is \"player\" the atlasURL will be set to \"player.json\".\r\rIf you do not desire this action then provide URLs and / or a data object.","parameters":[{"name":"key","type":"string","description":"Unique asset key of the texture atlas file.","default":"","optional":"","nullable":""},{"name":"textureURL","type":"string","description":"URL of the texture atlas image file. If undefined or `null` the url will be set to `<key>.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".","default":"","optional":true,"nullable":""},{"name":"atlasURL","type":"string","description":"URL of the texture atlas data file. If undefined or `null` and no atlasData is given, the url will be set to `<key>.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".","default":"","optional":true,"nullable":""},{"name":"atlasData","type":"object","description":"A JSON data object. You don't need this if the data is being loaded from a URL.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Loader","description":"This Loader instance."}},{"name":"atlasJSONHash","description":"Adds a Texture Atlas file to the current load queue.\r\rUnlike `Loader.atlas` this call expects the atlas data to be in a JSON Hash format.\r\rTo create the Texture Atlas you can use tools such as:\r\r[Texture Packer](https://www.codeandweb.com/texturepacker/phaser)\r[Shoebox](http://renderhjs.net/shoebox/)\r\rIf using Texture Packer we recommend you enable \"Trim sprite names\".\rIf your atlas software has an option to \"rotate\" the resulting frames, you must disable it.\r\rYou can choose to either load the data externally, by providing a URL to a json file.\rOr you can pass in a JSON object or String via the `atlasData` parameter.\rIf you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.\r\rIf URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.\r\rThe key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.\r\rRetrieve the file via `Cache.getImage(key)`. JSON files are automatically parsed upon load.\rIf you need to control when the JSON is parsed then use `Loader.text` instead and parse the JSON file as needed.\r\rThe URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\rIf the textureURL isn't specified then the Loader will take the key and create a filename from that.\rFor example if the key is \"player\" and textureURL is null then the Loader will set the URL to be \"player.png\".\rThe same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will\rset the atlasURL to be the key. For example if the key is \"player\" the atlasURL will be set to \"player.json\".\r\rIf you do not desire this action then provide URLs and / or a data object.","parameters":[{"name":"key","type":"string","description":"Unique asset key of the texture atlas file.","default":"","optional":"","nullable":""},{"name":"textureURL","type":"string","description":"URL of the texture atlas image file. If undefined or `null` the url will be set to `<key>.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".","default":"","optional":true,"nullable":""},{"name":"atlasURL","type":"string","description":"URL of the texture atlas data file. If undefined or `null` and no atlasData is given, the url will be set to `<key>.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".","default":"","optional":true,"nullable":""},{"name":"atlasData","type":"object","description":"A JSON data object. You don't need this if the data is being loaded from a URL.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Loader","description":"This Loader instance."}},{"name":"atlasXML","description":"Adds a Texture Atlas file to the current load queue.\r\rThis call expects the atlas data to be in the Starling XML data format.\r\rTo create the Texture Atlas you can use tools such as:\r\r[Texture Packer](https://www.codeandweb.com/texturepacker/phaser)\r[Shoebox](http://renderhjs.net/shoebox/)\r\rIf using Texture Packer we recommend you enable \"Trim sprite names\".\rIf your atlas software has an option to \"rotate\" the resulting frames, you must disable it.\r\rYou can choose to either load the data externally, by providing a URL to an xml file.\rOr you can pass in an XML object or String via the `atlasData` parameter.\rIf you pass a String the data is automatically run through `Loader.parseXML` and then immediately added to the Phaser.Cache.\r\rIf URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.\r\rThe key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.\r\rRetrieve the file via `Cache.getImage(key)`. XML files are automatically parsed upon load.\rIf you need to control when the XML is parsed then use `Loader.text` instead and parse the XML file as needed.\r\rThe URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\rIf the textureURL isn't specified then the Loader will take the key and create a filename from that.\rFor example if the key is \"player\" and textureURL is null then the Loader will set the URL to be \"player.png\".\rThe same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will\rset the atlasURL to be the key. For example if the key is \"player\" the atlasURL will be set to \"player.xml\".\r\rIf you do not desire this action then provide URLs and / or a data object.","parameters":[{"name":"key","type":"string","description":"Unique asset key of the texture atlas file.","default":"","optional":"","nullable":""},{"name":"textureURL","type":"string","description":"URL of the texture atlas image file. If undefined or `null` the url will be set to `<key>.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".","default":"","optional":true,"nullable":""},{"name":"atlasURL","type":"string","description":"URL of the texture atlas data file. If undefined or `null` and no atlasData is given, the url will be set to `<key>.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.xml\".","default":"","optional":true,"nullable":""},{"name":"atlasData","type":"object","description":"An XML data object. You don't need this if the data is being loaded from a URL.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Loader","description":"This Loader instance."}},{"name":"atlas","description":"Adds a Texture Atlas file to the current load queue.\r\rTo create the Texture Atlas you can use tools such as:\r\r[Texture Packer](https://www.codeandweb.com/texturepacker/phaser)\r[Shoebox](http://renderhjs.net/shoebox/)\r\rIf using Texture Packer we recommend you enable \"Trim sprite names\".\rIf your atlas software has an option to \"rotate\" the resulting frames, you must disable it.\r\rYou can choose to either load the data externally, by providing a URL to a json file.\rOr you can pass in a JSON object or String via the `atlasData` parameter.\rIf you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.\r\rIf URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.\r\rThe key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.\r\rRetrieve the file via `Cache.getImage(key)`. JSON files are automatically parsed upon load.\rIf you need to control when the JSON is parsed then use `Loader.text` instead and parse the JSON file as needed.\r\rThe URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\rIf the textureURL isn't specified then the Loader will take the key and create a filename from that.\rFor example if the key is \"player\" and textureURL is null then the Loader will set the URL to be \"player.png\".\rThe same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will\rset the atlasURL to be the key. For example if the key is \"player\" the atlasURL will be set to \"player.json\".\r\rIf you do not desire this action then provide URLs and / or a data object.","parameters":[{"name":"key","type":"string","description":"Unique asset key of the texture atlas file.","default":"","optional":"","nullable":""},{"name":"textureURL","type":"string","description":"URL of the texture atlas image file. If undefined or `null` the url will be set to `<key>.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".","default":"","optional":true,"nullable":""},{"name":"atlasURL","type":"string","description":"URL of the texture atlas data file. If undefined or `null` and no atlasData is given, the url will be set to `<key>.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".","default":"","optional":true,"nullable":""},{"name":"atlasData","type":"object","description":"A JSON or XML data object. You don't need this if the data is being loaded from a URL.","default":"","optional":true,"nullable":""},{"name":"format","type":"number","description":"The format of the data. Can be Phaser.Loader.TEXTURE_ATLAS_JSON_ARRAY (the default), Phaser.Loader.TEXTURE_ATLAS_JSON_HASH or Phaser.Loader.TEXTURE_ATLAS_XML_STARLING.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Loader","description":"This Loader instance."}},{"name":"withSyncPoint","description":"Add a synchronization point to the assets / files added within the supplied callback.\r\rA synchronization point denotes that an asset _must_ be completely loaded before\rsubsequent assets can be loaded. An asset marked as a sync-point does not need to wait\rfor previous assets to load (unless they are sync-points). Resources, such as packs, may still\rbe downloaded around sync-points, as long as they do not finalize loading.","parameters":[{"name":"callback","type":"function","description":"The callback is invoked and is supplied with a single argument: the loader.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"Context for the callback.","default":"(loader)","optional":true,"nullable":""}],"returns":{"type":"Phaser.Loader","description":"This Loader instance."}},{"name":"addSyncPoint","description":"Add a synchronization point to a specific file/asset in the load queue.\r\rThis has no effect on already loaded assets.","parameters":[{"name":"type","type":"string","description":"The type of resource to turn into a sync point (image, audio, xml, etc).","default":"","optional":"","nullable":""},{"name":"key","type":"string","description":"Key of the file you want to turn into a sync point.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Loader","description":"This Loader instance."}},{"name":"removeFile","description":"Remove a file/asset from the loading queue.\r\rA file that is loaded or has started loading cannot be removed.","parameters":[{"name":"type","type":"string","description":"The type of resource to add to the list (image, audio, xml, etc).","default":"","optional":"","nullable":""},{"name":"key","type":"string","description":"Key of the file you want to remove.","default":"","optional":"","nullable":""}]},{"name":"removeAll","description":"Remove all file loading requests - this is _insufficient_ to stop current loading. Use `reset` instead.","parameters":[]},{"name":"start","description":"Start loading the assets. Normally you don't need to call this yourself as the StateManager will do so.","parameters":[]},{"name":"processLoadQueue","description":"Process the next item(s) in the file/asset queue.\r\rProcess the queue and start loading enough items to fill up the inflight queue.\r\rIf a sync-file is encountered then subsequent asset processing is delayed until it completes.\rThe exception to this rule is that packfiles can be downloaded (but not processed) even if\rthere appear other sync files (ie. packs) - this enables multiple packfiles to be fetched in parallel.\rsuch as during the start phaser.","parameters":[]},{"name":"finishedLoading","description":"The loading is all finished.","parameters":[{"name":"abnormal","type":"boolean","description":"True if the loading finished abnormally.","default":true,"optional":true,"nullable":""}]},{"name":"asyncComplete","description":"Informs the loader that the given file resource has been fetched and processed;\ror such a request has failed.","parameters":[{"name":"file","type":"object","description":"","default":"","optional":"","nullable":""},{"name":"error","type":"string","description":"The error message, if any. No message implies no error.","default":"''","optional":true,"nullable":""}]},{"name":"processPack","description":"Process pack data. This will usually modify the file list.","parameters":[{"name":"pack","type":"object","description":"","default":"","optional":"","nullable":""}]},{"name":"transformUrl","description":"Transforms the asset URL.\r\rThe default implementation prepends the baseURL if the url doesn't begin with http or //","parameters":[{"name":"url","type":"string","description":"The url to transform.","default":"","optional":"","nullable":""},{"name":"file","type":"object","description":"The file object being transformed.","default":"","optional":"","nullable":""}],"returns":{"type":"string","description":"The transformed url. In rare cases where the url isn't specified it will return false instead."}},{"name":"loadFile","description":"Start fetching a resource.\r\rAll code paths, async or otherwise, from this function must return to `asyncComplete`.","parameters":[{"name":"file","type":"object","description":"","default":"","optional":"","nullable":""}]},{"name":"loadImageTag","description":"Continue async loading through an Image tag.","parameters":[]},{"name":"loadVideoTag","description":"Continue async loading through a Video tag.","parameters":[]},{"name":"loadAudioTag","description":"Continue async loading through an Audio tag.","parameters":[]},{"name":"xhrLoad","description":"Starts the xhr loader.\r\rThis is designed specifically to use with asset file processing.","parameters":[{"name":"file","type":"object","description":"The file/pack to load.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"The URL of the file.","default":"","optional":"","nullable":""},{"name":"type","type":"string","description":"The xhr responseType.","default":"","optional":"","nullable":""},{"name":"onload","type":"function","description":"The function to call on success. Invoked in `this` context and supplied with `(file, xhr)` arguments.","default":"","optional":"","nullable":""},{"name":"onerror","type":"function","description":"The function to call on error. Invoked in `this` context and supplied with `(file, xhr)` arguments.","default":"fileError","optional":true,"nullable":""}]},{"name":"xhrLoad","description":"Starts the xhr loader - using XDomainRequest.\rThis should _only_ be used with IE 9. Phaser does not support IE 8 and XDR is deprecated in IE 10.\r\rThis is designed specifically to use with asset file processing.","parameters":[{"name":"file","type":"object","description":"The file/pack to load.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"The URL of the file.","default":"","optional":"","nullable":""},{"name":"type","type":"string","description":"The xhr responseType.","default":"","optional":"","nullable":""},{"name":"onload","type":"function","description":"The function to call on success. Invoked in `this` context and supplied with `(file, xhr)` arguments.","default":"","optional":"","nullable":""},{"name":"onerror","type":"function","description":"The function to call on error. Invoked in `this` context and supplied with `(file, xhr)` arguments.","default":"fileError","optional":true,"nullable":""}]},{"name":"getVideoURL","description":"Give a bunch of URLs, return the first URL that has an extension this device thinks it can play.\r\rIt is assumed that the device can play \"blob:\" or \"data:\" URIs - There is no mime-type checking on data URIs.","parameters":[{"name":"urls","type":["Array.<object>","Array.<string>"],"description":"See {@link #video} for format.","default":"","optional":"","nullable":""}],"returns":{"type":"string","description":"The URL to try and fetch; or null."}},{"name":"getAudioURL","description":"Give a bunch of URLs, return the first URL that has an extension this device thinks it can play.\r\rIt is assumed that the device can play \"blob:\" or \"data:\" URIs - There is no mime-type checking on data URIs.","parameters":[{"name":"urls","type":["Array.<object>","Array.<string>"],"description":"See {@link #audio} for format.","default":"","optional":"","nullable":""}],"returns":{"type":"string","description":"The URL to try and fetch; or null."}},{"name":"fileError","description":"Error occurred when loading a file.","parameters":[{"name":"file","type":"object","description":"","default":"","optional":"","nullable":""},{"name":"xhr","type":"XMLHttpRequest","description":"XHR request, unspecified if loaded via other means (eg. tags)","default":"","optional":"","nullable":true},{"name":"reason","type":"string","description":"","default":"","optional":"","nullable":""}]},{"name":"fileComplete","description":"Called when a file has been downloaded and needs to be processed further.","parameters":[{"name":"file","type":"object","description":"File loaded","default":"","optional":"","nullable":""},{"name":"xhr","type":"XMLHttpRequest","description":"XHR request, unspecified if loaded via other means (eg. tags)","default":"","optional":"","nullable":true}]},{"name":"jsonLoadComplete","description":"Successfully loaded a JSON file - only used for certain types.","parameters":[{"name":"file","type":"object","description":"File associated with this request","default":"","optional":"","nullable":""},{"name":"xhr","type":"XMLHttpRequest","description":"","default":"","optional":"","nullable":""}]},{"name":"csvLoadComplete","description":"Successfully loaded a CSV file - only used for certain types.","parameters":[{"name":"file","type":"object","description":"File associated with this request","default":"","optional":"","nullable":""},{"name":"xhr","type":"XMLHttpRequest","description":"","default":"","optional":"","nullable":""}]},{"name":"xmlLoadComplete","description":"Successfully loaded an XML file - only used for certain types.","parameters":[{"name":"file","type":"object","description":"File associated with this request","default":"","optional":"","nullable":""},{"name":"xhr","type":"XMLHttpRequest","description":"","default":"","optional":"","nullable":""}]},{"name":"parseXml","description":"Parses string data as XML.","parameters":[{"name":"data","type":"string","description":"The XML text to parse","default":"","optional":"","nullable":""}],"returns":{"type":"XMLDocument","description":"Returns the xml document, or null if such could not parsed to a valid document."}},{"name":"nextFile","description":"Update the loading sprite progress.","parameters":[{"name":"previousFile","type":"object","description":"","default":"","optional":"","nullable":""},{"name":"success","type":"boolean","description":"Whether the previous asset loaded successfully or not.","default":"","optional":"","nullable":""}]},{"name":"totalLoadedFiles","description":"Returns the number of files that have already been loaded, even if they errored.","parameters":[],"returns":{"type":"number","description":"The number of files that have already been loaded (even if they errored)"}},{"name":"totalQueuedFiles","description":"Returns the number of files still waiting to be processed in the load queue. This value decreases as each file in the queue is loaded.","parameters":[],"returns":{"type":"number","description":"The number of files that still remain in the load queue."}},{"name":"totalLoadedPacks","description":"Returns the number of asset packs that have already been loaded, even if they errored.","parameters":[],"returns":{"type":"number","description":"The number of asset packs that have already been loaded (even if they errored)"}},{"name":"totalQueuedPacks","description":"Returns the number of asset packs still waiting to be processed in the load queue. This value decreases as each pack in the queue is loaded.","parameters":[],"returns":{"type":"number","description":"The number of asset packs that still remain in the load queue."}}],"members":[{"name":"game","access":"protected","virtual":false,"description":"Local reference to game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"cache","access":"protected","virtual":false,"description":"Local reference to the Phaser.Cache.","type":{"names":["Phaser.Cache"]},"default":""},{"name":"resetLocked","access":"","virtual":false,"description":"If true all calls to Loader.reset will be ignored. Useful if you need to create a load queue before swapping to a preloader state.","type":{"names":["boolean"]},"default":""},{"name":"isLoading","access":"","virtual":false,"description":"True if the Loader is in the process of loading the queue.","type":{"names":["boolean"]},"default":""},{"name":"hasLoaded","access":"","virtual":false,"description":"True if all assets in the queue have finished loading.","type":{"names":["boolean"]},"default":""},{"name":"preloadSprite","access":"protected","virtual":false,"description":"You can optionally link a progress sprite with {@link Phaser.Loader#setPreloadSprite setPreloadSprite}.\r\rThis property is an object containing: sprite, rect, direction, width and height","type":{"names":["object"]},"default":""},{"name":"crossOrigin","access":"","virtual":false,"description":"The crossOrigin value applied to loaded images. Very often this needs to be set to 'anonymous'.","type":{"names":["boolean","string"]},"default":""},{"name":"baseURL","access":"","virtual":false,"description":"If you want to append a URL before the path of any asset you can set this here.\rUseful if allowing the asset base url to be configured outside of the game code.\rThe string _must_ end with a \"/\".","type":{"names":["string"]},"default":""},{"name":"path","access":"","virtual":false,"description":"The value of `path`, if set, is placed before any _relative_ file path given. For example:\r\r`load.path = \"images/sprites/\";\rload.image(\"ball\", \"ball.png\");\rload.image(\"tree\", \"level1/oaktree.png\");\rload.image(\"boom\", \"http://server.com/explode.png\");`\r\rWould load the `ball` file from `images/sprites/ball.png` and the tree from\r`images/sprites/level1/oaktree.png` but the file `boom` would load from the URL\rgiven as it's an absolute URL.\r\rPlease note that the path is added before the filename but *after* the baseURL (if set.)\r\rThe string _must_ end with a \"/\".","type":{"names":["string"]},"default":""},{"name":"headers","access":"","virtual":false,"description":"Used to map the application mime-types to to the Accept header in XHR requests.\rIf you don't require these mappings, or they cause problems on your server, then\rremove them from the headers object and the XHR request will not try to use them.\r\rThis object can also be used to set the `X-Requested-With` header to \r`XMLHttpRequest` (or any other value you need). To enable this do:\r\r`this.load.headers.requestedWith = 'XMLHttpRequest'`\r\rbefore adding anything to the Loader. The XHR loader will then call:\r\r`setRequestHeader('X-Requested-With', this.headers['requestedWith'])`","type":{"names":["object"]},"default":"{\"undefined\":\"application/xml\"}"},{"name":"onLoadStart","access":"","virtual":false,"description":"This event is dispatched when the loading process starts: before the first file has been requested,\rbut after all the initial packs have been loaded.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onLoadComplete","access":"","virtual":false,"description":"This event is dispatched when the final file in the load queue has either loaded or failed.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onPackComplete","access":"","virtual":false,"description":"This event is dispatched when an asset pack has either loaded or failed to load.\r\rThis is called when the asset pack manifest file has loaded and successfully added its contents to the loader queue.\r\rParams: `(pack key, success?, total packs loaded, total packs)`","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onFileStart","access":"","virtual":false,"description":"This event is dispatched immediately before a file starts loading.\rIt's possible the file may fail (eg. download error, invalid format) after this event is sent.\r\rParams: `(progress, file key, file url)`","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onFileComplete","access":"","virtual":false,"description":"This event is dispatched when a file has either loaded or failed to load.\r\rAny function bound to this will receive the following parameters:\r\rprogress, file key, success?, total loaded files, total files\r\rWhere progress is a number between 1 and 100 (inclusive) representing the percentage of the load.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onFileError","access":"","virtual":false,"description":"This event is dispatched when a file (or pack) errors as a result of the load request.\r\rFor files it will be triggered before `onFileComplete`. For packs it will be triggered before `onPackComplete`.\r\rParams: `(file key, file)`","type":{"names":["Phaser.Signal"]},"default":""},{"name":"useXDomainRequest","access":"","virtual":false,"description":"If true and if the browser supports XDomainRequest, it will be used in preference for XHR.\r\rThis is only relevant for IE 9 and should _only_ be enabled for IE 9 clients when required by the server/CDN.","type":{"names":["boolean"]},"default":""},{"name":"_warnedAboutXDomainRequest","access":"private","virtual":false,"description":"Control number of warnings for using XDR outside of IE 9.","type":{"names":["boolean"]},"default":""},{"name":"enableParallel","access":"","virtual":false,"description":"If true (the default) then parallel downloading will be enabled.\r\rTo disable all parallel downloads this must be set to false prior to any resource being loaded.","type":{"names":["boolean"]},"default":""},{"name":"maxParallelDownloads","access":"protected","virtual":false,"description":"The number of concurrent / parallel resources to try and fetch at once.\r\rMany current browsers limit 6 requests per domain; this is slightly conservative.","type":{"names":["integer"]},"default":""},{"name":"_withSyncPointDepth","access":"","virtual":false,"description":"A counter: if more than zero, files will be automatically added as a synchronization point.","type":"","default":""},{"name":"_fileList","access":"private","virtual":false,"description":"Contains all the information for asset files (including packs) to load.\r\rFile/assets are only removed from the list after all loading completes.","type":{"names":["Array.<file>"]},"default":""},{"name":"_flightQueue","access":"private","virtual":false,"description":"Inflight files (or packs) that are being fetched/processed.\r\rThis means that if there are any files in the flight queue there should still be processing\rgoing on; it should only be empty before or after loading.\r\rThe files in the queue may have additional properties added to them,\rincluding `requestObject` which is normally the associated XHR.","type":{"names":["Array.<file>"]},"default":""},{"name":"_processingHead","access":"private","virtual":false,"description":"The offset into the fileList past all the complete (loaded or error) entries.","type":{"names":["integer"]},"default":""},{"name":"_fileLoadStarted","access":"private","virtual":false,"description":"True when the first file (not pack) has loading started.\rThis used to to control dispatching `onLoadStart` which happens after any initial packs are loaded.","type":"","default":""},{"name":"_totalPackCount","access":"private","virtual":false,"description":"Total packs seen - adjusted when a pack is added.","type":{"names":["integer"]},"default":""},{"name":"_totalFileCount","access":"private","virtual":false,"description":"Total files seen - adjusted when a file is added.","type":{"names":["integer"]},"default":""},{"name":"_loadedPackCount","access":"private","virtual":false,"description":"Total packs loaded - adjusted just prior to `onPackComplete`.","type":{"names":["integer"]},"default":""},{"name":"_loadedFileCount","access":"private","virtual":false,"description":"Total files loaded - adjusted just prior to `onFileComplete`.","type":{"names":["integer"]},"default":""},{"name":"TEXTURE_ATLAS_JSON_ARRAY","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"TEXTURE_ATLAS_JSON_HASH","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"TEXTURE_ATLAS_XML_STARLING","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"PHYSICS_LIME_CORONA_JSON","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"PHYSICS_PHASER_JSON","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"TEXTURE_ATLAS_JSON_PYXEL","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"progressFloat","access":"","virtual":false,"description":"The non-rounded load progress value (from 0.0 to 100.0).\r\rA general indicator of the progress.\rIt is possible for the progress to decrease, after `onLoadStart`, if more files are dynamically added.","type":"","default":""},{"name":"progress","access":"","virtual":false,"description":"The rounded load progress percentage value (from 0 to 100). See {@link Phaser.Loader#progressFloat}.","type":"","default":""}]},{"name":"Phaser.LoaderParser","description":"Phaser.LoaderParser parses data objects from Phaser.Loader that need more preparation before they can be inserted into the Cache.","constructor":{"name":"LoaderParser","description":"Phaser.LoaderParser parses data objects from Phaser.Loader that need more preparation before they can be inserted into the Cache.","parameters":[]},"functions":[{"name":"bitmapFont","description":"Alias for xmlBitmapFont, for backwards compatibility.","parameters":[{"name":"xml","type":"object","description":"XML data you want to parse.","default":"","optional":"","nullable":""},{"name":"baseTexture","type":"PIXI.BaseTexture","description":"The BaseTexture this font uses.","default":"","optional":"","nullable":""},{"name":"xSpacing","type":"number","description":"Additional horizontal spacing between the characters.","default":"","optional":true,"nullable":""},{"name":"ySpacing","type":"number","description":"Additional vertical spacing between the characters.","default":"","optional":true,"nullable":""}],"returns":{"type":"object","description":"The parsed Bitmap Font data."}},{"name":"xmlBitmapFont","description":"Parse a Bitmap Font from an XML file.","parameters":[{"name":"xml","type":"object","description":"XML data you want to parse.","default":"","optional":"","nullable":""},{"name":"baseTexture","type":"PIXI.BaseTexture","description":"The BaseTexture this font uses.","default":"","optional":"","nullable":""},{"name":"xSpacing","type":"number","description":"Additional horizontal spacing between the characters.","default":"","optional":true,"nullable":""},{"name":"ySpacing","type":"number","description":"Additional vertical spacing between the characters.","default":"","optional":true,"nullable":""},{"name":"frame","type":"Phaser.Frame","description":"Optional Frame, if this font is embedded in a texture atlas.","default":"","optional":true,"nullable":""},{"name":"resolution","type":"number","description":"Optional game resolution to apply to the kerning data.","default":"","optional":true,"nullable":""}],"returns":{"type":"object","description":"The parsed Bitmap Font data."}},{"name":"jsonBitmapFont","description":"Parse a Bitmap Font from a JSON file.","parameters":[{"name":"json","type":"object","description":"JSON data you want to parse.","default":"","optional":"","nullable":""},{"name":"baseTexture","type":"PIXI.BaseTexture","description":"The BaseTexture this font uses.","default":"","optional":"","nullable":""},{"name":"xSpacing","type":"number","description":"Additional horizontal spacing between the characters.","default":"","optional":true,"nullable":""},{"name":"ySpacing","type":"number","description":"Additional vertical spacing between the characters.","default":"","optional":true,"nullable":""},{"name":"frame","type":"Phaser.Frame","description":"Optional Frame, if this font is embedded in a texture atlas.","default":"","optional":true,"nullable":""},{"name":"resolution","type":"number","description":"Optional game resolution to apply to the kerning data.","default":"","optional":true,"nullable":""}],"returns":{"type":"object","description":"The parsed Bitmap Font data."}},{"name":"finalizeBitmapFont","description":"Finalize Bitmap Font parsing.","parameters":[{"name":"baseTexture","type":"PIXI.BaseTexture","description":"The BaseTexture this font uses.","default":"","optional":"","nullable":""},{"name":"bitmapFontData","type":"object","description":"Pre-parsed bitmap font data.","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"The parsed Bitmap Font data."}},{"name":"pvr","description":"Extract PVR header from loaded binary","parameters":[{"name":"arrayBuffer","type":"ArrayBuffer","description":"","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"The parsed PVR file including texture data."}},{"name":"dds","description":"Extract DDS header from loaded binary","parameters":[{"name":"arrayBuffer","type":"ArrayBuffer","description":"","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"The parsed DDS file including texture data."}},{"name":"ktx","description":"Extract KTX header from loaded binary","parameters":[{"name":"arrayBuffer","type":"ArrayBuffer","description":"","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"The parsed KTX file including texture data."}},{"name":"pkm","description":"Extract PKM header from loaded binary","parameters":[{"name":"arrayBuffer","type":"ArrayBuffer","description":"","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"The parsed PKM file including texture data."}}],"members":[]},{"name":"Phaser.Math","description":"A collection of useful mathematical functions.\r\rThese are normally accessed through `game.math`.","constructor":{"name":"Math","description":"A collection of useful mathematical functions.\r\rThese are normally accessed through `game.math`.","parameters":[]},"functions":[{"name":"degToRad","description":"Convert degrees to radians.","parameters":[{"name":"degrees","type":"number","description":"Angle in degrees.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"Angle in radians."}},{"name":"radToDeg","description":"Convert radians to degrees.","parameters":[{"name":"radians","type":"number","description":"Angle in radians.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"Angle in degrees"}},{"name":"getNextPowerOfTwo","description":"Given a number, this function returns the closest number that is a power of two.\rThis function is from the Starling Framework.","parameters":[{"name":"value","type":"number","description":"The value to get the closest power of two from.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The closest number that is a power of two."}},{"name":"isPowerOfTwo","description":"Checks if the given dimensions make a power of two texture.","parameters":[{"name":"width","type":"number","description":"The width to check.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height to check.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the width and height are a power of two."}},{"name":"random","description":"Returns a random float in the range `[min, max)`. If these parameters are not in order than they will be put in order.\rDefault is 0 for `min` and 1 for `max`.","parameters":[{"name":"min","type":"number","description":"The minimum value. Must be a Number.","default":"","optional":"","nullable":""},{"name":"max","type":"number","description":"The maximum value. Must be a Number.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"A floating point number between min (inclusive) and max (exclusive)."}},{"name":"between","description":"Returns a random integer in the range `[min, max]`. If these parameters are not in order than they will be put in order.\rDefault is 0 for `min` and 1 for `max`.","parameters":[{"name":"min","type":"number","description":"The minimum value. Must be a Number.","default":"","optional":"","nullable":""},{"name":"max","type":"number","description":"The maximum value. Must be a Number.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"An integer between min (inclusive) and max (inclusive)."}},{"name":"fuzzyEqual","description":"Two number are fuzzyEqual if their difference is less than epsilon.","parameters":[{"name":"a","type":"number","description":"The first number to compare.","default":"","optional":"","nullable":""},{"name":"b","type":"number","description":"The second number to compare.","default":"","optional":"","nullable":""},{"name":"epsilon","type":"number","description":"The epsilon (a small value used in the calculation)","default":0.0001,"optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if |a-b|<epsilon"}},{"name":"fuzzyLessThan","description":"`a` is fuzzyLessThan `b` if it is less than b + epsilon.","parameters":[{"name":"a","type":"number","description":"The first number to compare.","default":"","optional":"","nullable":""},{"name":"b","type":"number","description":"The second number to compare.","default":"","optional":"","nullable":""},{"name":"epsilon","type":"number","description":"The epsilon (a small value used in the calculation)","default":0.0001,"optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if a<b+epsilon"}},{"name":"fuzzyGreaterThan","description":"`a` is fuzzyGreaterThan `b` if it is more than b - epsilon.","parameters":[{"name":"a","type":"number","description":"The first number to compare.","default":"","optional":"","nullable":""},{"name":"b","type":"number","description":"The second number to compare.","default":"","optional":"","nullable":""},{"name":"epsilon","type":"number","description":"The epsilon (a small value used in the calculation)","default":0.0001,"optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if a>b+epsilon"}},{"name":"fuzzyCeil","description":"Applies a fuzzy ceil to the given value.","parameters":[{"name":"val","type":"number","description":"The value to ceil.","default":"","optional":"","nullable":""},{"name":"epsilon","type":"number","description":"The epsilon (a small value used in the calculation)","default":0.0001,"optional":true,"nullable":""}],"returns":{"type":"number","description":"ceiling(val-epsilon)"}},{"name":"fuzzyFloor","description":"Applies a fuzzy floor to the given value.","parameters":[{"name":"val","type":"number","description":"The value to floor.","default":"","optional":"","nullable":""},{"name":"epsilon","type":"number","description":"The epsilon (a small value used in the calculation)","default":0.0001,"optional":true,"nullable":""}],"returns":{"type":"number","description":"floor(val+epsilon)"}},{"name":"average","description":"Averages all values passed to the function and returns the result.","parameters":[],"returns":{"type":"number","description":"The average of all given values."}},{"name":"shear","description":"","parameters":[{"name":"n","type":"number","description":"","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"n mod 1"}},{"name":"snapTo","description":"Snap a value to nearest grid slice, using rounding.\r\rExample: if you have an interval gap of 5 and a position of 12... you will snap to 10 whereas 14 will snap to 15.","parameters":[{"name":"input","type":"number","description":"The value to snap.","default":"","optional":"","nullable":""},{"name":"gap","type":"number","description":"The interval gap of the grid.","default":"","optional":"","nullable":""},{"name":"start","type":"number","description":"Optional starting offset for gap.","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The snapped value."}},{"name":"snapToFloor","description":"Snap a value to nearest grid slice, using floor.\r\rExample: if you have an interval gap of 5 and a position of 12... you will snap to 10.\rAs will 14 snap to 10... but 16 will snap to 15.","parameters":[{"name":"input","type":"number","description":"The value to snap.","default":"","optional":"","nullable":""},{"name":"gap","type":"number","description":"The interval gap of the grid.","default":"","optional":"","nullable":""},{"name":"start","type":"number","description":"Optional starting offset for gap.","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The snapped value."}},{"name":"snapToCeil","description":"Snap a value to nearest grid slice, using ceil.\r\rExample: if you have an interval gap of 5 and a position of 12... you will snap to 15.\rAs will 14 will snap to 15... but 16 will snap to 20.","parameters":[{"name":"input","type":"number","description":"The value to snap.","default":"","optional":"","nullable":""},{"name":"gap","type":"number","description":"The interval gap of the grid.","default":"","optional":"","nullable":""},{"name":"start","type":"number","description":"Optional starting offset for gap.","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The snapped value."}},{"name":"roundTo","description":"Round to some place comparative to a `base`, default is 10 for decimal place.\rThe `place` is represented by the power applied to `base` to get that place.\r\r    e.g. 2000/7 ~= 285.714285714285714285714 ~= (bin)100011101.1011011011011011\r\r    roundTo(2000/7,3) === 0\r    roundTo(2000/7,2) == 300\r    roundTo(2000/7,1) == 290\r    roundTo(2000/7,0) == 286\r    roundTo(2000/7,-1) == 285.7\r    roundTo(2000/7,-2) == 285.71\r    roundTo(2000/7,-3) == 285.714\r    roundTo(2000/7,-4) == 285.7143\r    roundTo(2000/7,-5) == 285.71429\r\r    roundTo(2000/7,3,2)  == 288       -- 100100000\r    roundTo(2000/7,2,2)  == 284       -- 100011100\r    roundTo(2000/7,1,2)  == 286       -- 100011110\r    roundTo(2000/7,0,2)  == 286       -- 100011110\r    roundTo(2000/7,-1,2) == 285.5     -- 100011101.1\r    roundTo(2000/7,-2,2) == 285.75    -- 100011101.11\r    roundTo(2000/7,-3,2) == 285.75    -- 100011101.11\r    roundTo(2000/7,-4,2) == 285.6875  -- 100011101.1011\r    roundTo(2000/7,-5,2) == 285.71875 -- 100011101.10111\r\rNote what occurs when we round to the 3rd space (8ths place), 100100000, this is to be assumed\rbecause we are rounding 100011.1011011011011011 which rounds up.","parameters":[{"name":"value","type":"number","description":"The value to round.","default":"","optional":"","nullable":""},{"name":"place","type":"number","description":"The place to round to.","default":"","optional":true,"nullable":""},{"name":"base","type":"number","description":"The base to round in. Default is 10 for decimal.","default":10,"optional":true,"nullable":""}],"returns":{"type":"number","description":"The rounded value."}},{"name":"floorTo","description":"Floors to some place comparative to a `base`, default is 10 for decimal place.\rThe `place` is represented by the power applied to `base` to get that place.","parameters":[{"name":"value","type":"number","description":"The value to round.","default":"","optional":"","nullable":""},{"name":"place","type":"number","description":"The place to round to.","default":"","optional":true,"nullable":""},{"name":"base","type":"number","description":"The base to round in. Default is 10 for decimal.","default":10,"optional":true,"nullable":""}],"returns":{"type":"number","description":"The rounded value."}},{"name":"ceilTo","description":"Ceils to some place comparative to a `base`, default is 10 for decimal place.\rThe `place` is represented by the power applied to `base` to get that place.","parameters":[{"name":"value","type":"number","description":"The value to round.","default":"","optional":"","nullable":""},{"name":"place","type":"number","description":"The place to round to.","default":"","optional":true,"nullable":""},{"name":"base","type":"number","description":"The base to round in. Default is 10 for decimal.","default":10,"optional":true,"nullable":""}],"returns":{"type":"number","description":"The rounded value."}},{"name":"rotateToAngle","description":"Rotates currentAngle towards targetAngle, taking the shortest rotation distance.\rThe lerp argument is the amount to rotate by in this call.","parameters":[{"name":"currentAngle","type":"number","description":"The current angle, in radians.","default":"","optional":"","nullable":""},{"name":"targetAngle","type":"number","description":"The target angle to rotate to, in radians.","default":"","optional":"","nullable":""},{"name":"lerp","type":"number","description":"The lerp value to add to the current angle.","default":0.05,"optional":true,"nullable":""}],"returns":{"type":"number","description":"The adjusted angle."}},{"name":"getShortestAngle","description":"Gets the shortest angle between `angle1` and `angle2`.\rBoth angles must be in the range -180 to 180, which is the same clamped\rrange that `sprite.angle` uses, so you can pass in two sprite angles to\rthis method, and get the shortest angle back between the two of them.\r\rThe angle returned will be in the same range. If the returned angle is\rgreater than 0 then it's a counter-clockwise rotation, if < 0 then it's\ra clockwise rotation.","parameters":[{"name":"angle1","type":"number","description":"The first angle. In the range -180 to 180.","default":"","optional":"","nullable":""},{"name":"angle2","type":"number","description":"The second angle. In the range -180 to 180.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The shortest angle, in degrees. If greater than zero it's a counter-clockwise rotation."}},{"name":"angleBetween","description":"Find the angle of a segment from (x1, y1) -> (x2, y2).","parameters":[{"name":"x1","type":"number","description":"The x coordinate of the first value.","default":"","optional":"","nullable":""},{"name":"y1","type":"number","description":"The y coordinate of the first value.","default":"","optional":"","nullable":""},{"name":"x2","type":"number","description":"The x coordinate of the second value.","default":"","optional":"","nullable":""},{"name":"y2","type":"number","description":"The y coordinate of the second value.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The angle, in radians."}},{"name":"angleBetweenY","description":"Find the angle of a segment from (x1, y1) -> (x2, y2).\r\rThe difference between this method and Math.angleBetween is that this assumes the y coordinate travels\rdown the screen.","parameters":[{"name":"x1","type":"number","description":"The x coordinate of the first value.","default":"","optional":"","nullable":""},{"name":"y1","type":"number","description":"The y coordinate of the first value.","default":"","optional":"","nullable":""},{"name":"x2","type":"number","description":"The x coordinate of the second value.","default":"","optional":"","nullable":""},{"name":"y2","type":"number","description":"The y coordinate of the second value.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The angle, in radians."}},{"name":"angleBetweenPoints","description":"Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).","parameters":[{"name":"point1","type":"Phaser.Point","description":"The first point.","default":"","optional":"","nullable":""},{"name":"point2","type":"Phaser.Point","description":"The second point.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The angle between the two points, in radians."}},{"name":"angleBetweenPointsY","description":"Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).","parameters":[{"name":"point1","type":"Phaser.Point","description":"","default":"","optional":"","nullable":""},{"name":"point2","type":"Phaser.Point","description":"","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The angle, in radians."}},{"name":"reverseAngle","description":"Reverses an angle.","parameters":[{"name":"angleRad","type":"number","description":"The angle to reverse, in radians.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The reverse angle, in radians."}},{"name":"normalizeAngle","description":"Normalizes an angle to the [0,2pi) range.","parameters":[{"name":"angleRad","type":"number","description":"The angle to normalize, in radians.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The angle, fit within the [0,2pi] range, in radians."}},{"name":"maxAdd","description":"Adds the given amount to the value, but never lets the value go over the specified maximum.","parameters":[{"name":"value","type":"number","description":"The value to add the amount to.","default":"","optional":"","nullable":""},{"name":"amount","type":"number","description":"The amount to add to the value.","default":"","optional":"","nullable":""},{"name":"max","type":"number","description":"The maximum the value is allowed to be.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The new value."}},{"name":"minSub","description":"Subtracts the given amount from the value, but never lets the value go below the specified minimum.","parameters":[{"name":"value","type":"number","description":"The base value.","default":"","optional":"","nullable":""},{"name":"amount","type":"number","description":"The amount to subtract from the base value.","default":"","optional":"","nullable":""},{"name":"min","type":"number","description":"The minimum the value is allowed to be.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The new value."}},{"name":"wrap","description":"Ensures that the value always stays between min and max, by wrapping the value around.\r\rIf `max` is not larger than `min` the result is 0.","parameters":[{"name":"value","type":"number","description":"The value to wrap.","default":"","optional":"","nullable":""},{"name":"min","type":"number","description":"The minimum the value is allowed to be.","default":"","optional":"","nullable":""},{"name":"max","type":"number","description":"The maximum the value is allowed to be, should be larger than `min`.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The wrapped value."}},{"name":"wrapValue","description":"Adds value to amount and ensures that the result always stays between 0 and max, by wrapping the value around.\r\rValues _must_ be positive integers, and are passed through Math.abs. See {@link Phaser.Math#wrap} for an alternative.","parameters":[{"name":"value","type":"number","description":"The value to add the amount to.","default":"","optional":"","nullable":""},{"name":"amount","type":"number","description":"The amount to add to the value.","default":"","optional":"","nullable":""},{"name":"max","type":"number","description":"The maximum the value is allowed to be.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The wrapped value."}},{"name":"isOdd","description":"Returns true if the number given is odd.","parameters":[{"name":"n","type":"integer","description":"The number to check.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the given number is odd. False if the given number is even."}},{"name":"isEven","description":"Returns true if the number given is even.","parameters":[{"name":"n","type":"integer","description":"The number to check.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the given number is even. False if the given number is odd."}},{"name":"min","description":"Variation of Math.min that can be passed either an array of numbers or the numbers as parameters.\r\rPrefer the standard `Math.min` function when appropriate.","parameters":[],"returns":{"type":"number","description":"The lowest value from those given."}},{"name":"max","description":"Variation of Math.max that can be passed either an array of numbers or the numbers as parameters.\r\rPrefer the standard `Math.max` function when appropriate.","parameters":[],"returns":{"type":"number","description":"The largest value from those given."}},{"name":"minProperty","description":"Variation of Math.min that can be passed a property and either an array of objects or the objects as parameters.\rIt will find the lowest matching property value from the given objects.","parameters":[],"returns":{"type":"number","description":"The lowest value from those given."}},{"name":"maxProperty","description":"Variation of Math.max that can be passed a property and either an array of objects or the objects as parameters.\rIt will find the largest matching property value from the given objects.","parameters":[],"returns":{"type":"number","description":"The largest value from those given."}},{"name":"wrapAngle","description":"Keeps an angle value between -180 and +180; or -PI and PI if radians.","parameters":[{"name":"angle","type":"number","description":"The angle value to wrap","default":"","optional":"","nullable":""},{"name":"radians","type":"boolean","description":"Set to `true` if the angle is given in radians, otherwise degrees is expected.","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The new angle value; will be the same as the input angle if it was within bounds."}},{"name":"linearInterpolation","description":"A Linear Interpolation Method, mostly used by Phaser.Tween.","parameters":[{"name":"v","type":"Array","description":"The input array of values to interpolate between.","default":"","optional":"","nullable":""},{"name":"k","type":"number","description":"The percentage of interpolation, between 0 and 1.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The interpolated value"}},{"name":"bezierInterpolation","description":"A Bezier Interpolation Method, mostly used by Phaser.Tween.","parameters":[{"name":"v","type":"Array","description":"The input array of values to interpolate between.","default":"","optional":"","nullable":""},{"name":"k","type":"number","description":"The percentage of interpolation, between 0 and 1.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The interpolated value"}},{"name":"catmullRomInterpolation","description":"A Catmull Rom Interpolation Method, mostly used by Phaser.Tween.","parameters":[{"name":"v","type":"Array","description":"The input array of values to interpolate between.","default":"","optional":"","nullable":""},{"name":"k","type":"number","description":"The percentage of interpolation, between 0 and 1.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The interpolated value"}},{"name":"linear","description":"Calculates a linear (interpolation) value over t.","parameters":[{"name":"p0","type":"number","description":"","default":"","optional":"","nullable":""},{"name":"p1","type":"number","description":"","default":"","optional":"","nullable":""},{"name":"t","type":"number","description":"A value between 0 and 1.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":""}},{"name":"bernstein","description":"","parameters":[{"name":"n","type":"number","description":"","default":"","optional":"","nullable":""},{"name":"i","type":"number","description":"","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":""}},{"name":"factorial","description":"","parameters":[{"name":"value","type":"number","description":"the number you want to evaluate","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":""}},{"name":"catmullRom","description":"Calculates a catmum rom value.","parameters":[{"name":"p0","type":"number","description":"","default":"","optional":"","nullable":""},{"name":"p1","type":"number","description":"","default":"","optional":"","nullable":""},{"name":"p2","type":"number","description":"","default":"","optional":"","nullable":""},{"name":"p3","type":"number","description":"","default":"","optional":"","nullable":""},{"name":"t","type":"number","description":"","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":""}},{"name":"difference","description":"The absolute difference between two values.","parameters":[{"name":"a","type":"number","description":"The first value to check.","default":"","optional":"","nullable":""},{"name":"b","type":"number","description":"The second value to check.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The absolute difference between the two values."}},{"name":"roundAwayFromZero","description":"Round to the next whole number _away_ from zero.","parameters":[{"name":"value","type":"number","description":"Any number.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The rounded value of that number."}},{"name":"sinCosGenerator","description":"Generate a sine and cosine table simultaneously and extremely quickly.\rThe parameters allow you to specify the length, amplitude and frequency of the wave.\rThis generator is fast enough to be used in real-time.\rCode based on research by Franky of scene.at","parameters":[{"name":"length","type":"number","description":"The length of the wave","default":"","optional":"","nullable":""},{"name":"sinAmplitude","type":"number","description":"The amplitude to apply to the sine table (default 1.0) if you need values between say -+ 125 then give 125 as the value","default":"","optional":"","nullable":""},{"name":"cosAmplitude","type":"number","description":"The amplitude to apply to the cosine table (default 1.0) if you need values between say -+ 125 then give 125 as the value","default":"","optional":"","nullable":""},{"name":"frequency","type":"number","description":"The frequency of the sine and cosine table data","default":"","optional":"","nullable":""}],"returns":{"type":"Object","description":"Returns the table data."}},{"name":"hypot","description":"Returns the length of the hypotenuse connecting two segments of given lengths.","parameters":[{"name":"a","type":"number","description":"","default":"","optional":"","nullable":""},{"name":"b","type":"number","description":"","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The length of the hypotenuse connecting the given lengths."}},{"name":"distance","description":"Returns the euclidian distance between the two given set of coordinates.","parameters":[{"name":"x1","type":"number","description":"","default":"","optional":"","nullable":""},{"name":"y1","type":"number","description":"","default":"","optional":"","nullable":""},{"name":"x2","type":"number","description":"","default":"","optional":"","nullable":""},{"name":"y2","type":"number","description":"","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The distance between the two sets of coordinates."}},{"name":"distanceSq","description":"Returns the euclidean distance squared between the two given set of\rcoordinates (cuts out a square root operation before returning).","parameters":[{"name":"x1","type":"number","description":"","default":"","optional":"","nullable":""},{"name":"y1","type":"number","description":"","default":"","optional":"","nullable":""},{"name":"x2","type":"number","description":"","default":"","optional":"","nullable":""},{"name":"y2","type":"number","description":"","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The distance squared between the two sets of coordinates."}},{"name":"distancePow","description":"Returns the distance between the two given set of coordinates at the power given.","parameters":[{"name":"x1","type":"number","description":"","default":"","optional":"","nullable":""},{"name":"y1","type":"number","description":"","default":"","optional":"","nullable":""},{"name":"x2","type":"number","description":"","default":"","optional":"","nullable":""},{"name":"y2","type":"number","description":"","default":"","optional":"","nullable":""},{"name":"pow","type":"number","description":"","default":2,"optional":true,"nullable":""}],"returns":{"type":"number","description":"The distance between the two sets of coordinates."}},{"name":"clamp","description":"Force a value within the boundaries by clamping it to the range `min`, `max`.","parameters":[{"name":"v","type":"float","description":"The value to be clamped.","default":"","optional":"","nullable":""},{"name":"min","type":"float","description":"The minimum bounds.","default":"","optional":"","nullable":""},{"name":"max","type":"float","description":"The maximum bounds.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The clamped value."}},{"name":"clampBottom","description":"Clamp `x` to the range `[a, Infinity)`.\rRoughly the same as `Math.max(x, a)`, except for NaN handling.","parameters":[{"name":"x","type":"number","description":"","default":"","optional":"","nullable":""},{"name":"a","type":"number","description":"","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":""}},{"name":"within","description":"Checks if two values are within the given tolerance of each other.","parameters":[{"name":"a","type":"number","description":"The first number to check","default":"","optional":"","nullable":""},{"name":"b","type":"number","description":"The second number to check","default":"","optional":"","nullable":""},{"name":"tolerance","type":"number","description":"The tolerance. Anything equal to or less than this is considered within the range.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if a is <= tolerance of b."}},{"name":"mapLinear","description":"Linear mapping from range <a1, a2> to range <b1, b2>","parameters":[{"name":"x","type":"number","description":"The value to map","default":"","optional":"","nullable":""},{"name":"a1","type":"number","description":"First endpoint of the range <a1, a2>","default":"","optional":"","nullable":""},{"name":"a2","type":"number","description":"Final endpoint of the range <a1, a2>","default":"","optional":"","nullable":""},{"name":"b1","type":"number","description":"First endpoint of the range <b1, b2>","default":"","optional":"","nullable":""},{"name":"b2","type":"number","description":"Final endpoint of the range  <b1, b2>","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":""}},{"name":"smoothstep","description":"Smoothstep function as detailed at http://en.wikipedia.org/wiki/Smoothstep","parameters":[{"name":"x","type":"float","description":"The input value.","default":"","optional":"","nullable":""},{"name":"min","type":"float","description":"The left edge. Should be smaller than the right edge.","default":"","optional":"","nullable":""},{"name":"max","type":"float","description":"The right edge.","default":"","optional":"","nullable":""}],"returns":{"type":"float","description":"A value between 0 and 1."}},{"name":"smootherstep","description":"Smootherstep function as detailed at http://en.wikipedia.org/wiki/Smoothstep","parameters":[{"name":"x","type":"float","description":"The input value.","default":"","optional":"","nullable":""},{"name":"min","type":"float","description":"The left edge. Should be smaller than the right edge.","default":"","optional":"","nullable":""},{"name":"max","type":"float","description":"The right edge.","default":"","optional":"","nullable":""}],"returns":{"type":"float","description":"A value between 0 and 1."}},{"name":"sign","description":"A value representing the sign of the value: -1 for negative, +1 for positive, 0 if value is 0.\r\rThis works differently from `Math.sign` for values of NaN and -0, etc.","parameters":[{"name":"x","type":"number","description":"","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"An integer in {-1, 0, 1}"}},{"name":"percent","description":"Work out what percentage value `a` is of value `b` using the given base.","parameters":[{"name":"a","type":"number","description":"The value to work out the percentage for.","default":"","optional":"","nullable":""},{"name":"b","type":"number","description":"The value you wish to get the percentage of.","default":"","optional":"","nullable":""},{"name":"base","type":"number","description":"The base value.","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The percentage a is of b, between 0 and 1."}}],"members":[{"name":"PI2","access":"","virtual":false,"description":"Twice PI.","type":"","default":"~6.283"},{"name":"DEG_TO_RAD","access":"","virtual":false,"description":"Degrees to Radians factor.","type":"","default":""},{"name":"RAD_TO_DEG","access":"","virtual":false,"description":"Degrees to Radians factor.","type":"","default":""}]},{"name":"Phaser.QuadTree","description":"A QuadTree implementation. The original code was a conversion of the Java code posted to GameDevTuts.\rHowever I've tweaked it massively to add node indexing, removed lots of temp. var creation and significantly increased performance as a result.\rOriginal version at https://github.com/timohausmann/quadtree-js/","constructor":{"name":"QuadTree","description":"A QuadTree implementation. The original code was a conversion of the Java code posted to GameDevTuts.\rHowever I've tweaked it massively to add node indexing, removed lots of temp. var creation and significantly increased performance as a result.\rOriginal version at https://github.com/timohausmann/quadtree-js/","parameters":[{"name":"x","type":"number","description":"The top left coordinate of the quadtree.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The top left coordinate of the quadtree.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The width of the quadtree in pixels.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height of the quadtree in pixels.","default":"","optional":"","nullable":""},{"name":"maxObjects","type":"number","description":"The maximum number of objects per node.","default":10,"optional":true,"nullable":""},{"name":"maxLevels","type":"number","description":"The maximum number of levels to iterate to.","default":4,"optional":true,"nullable":""},{"name":"level","type":"number","description":"Which level is this?","default":"","optional":true,"nullable":""}]},"functions":[{"name":"reset","description":"Resets the QuadTree.","parameters":[{"name":"x","type":"number","description":"The top left coordinate of the quadtree.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The top left coordinate of the quadtree.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The width of the quadtree in pixels.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height of the quadtree in pixels.","default":"","optional":"","nullable":""},{"name":"maxObjects","type":"number","description":"The maximum number of objects per node.","default":10,"optional":true,"nullable":""},{"name":"maxLevels","type":"number","description":"The maximum number of levels to iterate to.","default":4,"optional":true,"nullable":""},{"name":"level","type":"number","description":"Which level is this?","default":"","optional":true,"nullable":""}]},{"name":"populate","description":"Populates this quadtree with the children of the given Group. In order to be added the child must exist and have a body property.","parameters":[{"name":"group","type":"Phaser.Group","description":"The Group to add to the quadtree.","default":"","optional":"","nullable":""}]},{"name":"populateHandler","description":"Handler for the populate method.","parameters":[{"name":"sprite","type":["Phaser.Sprite","object"],"description":"The Sprite to check.","default":"","optional":"","nullable":""}]},{"name":"split","description":"Split the node into 4 subnodes","parameters":[]},{"name":"insert","description":"Insert the object into the node. If the node exceeds the capacity, it will split and add all objects to their corresponding subnodes.","parameters":[{"name":"body","type":["Phaser.Physics.Arcade.Body","object"],"description":"The Body object to insert into the quadtree. Can be any object so long as it exposes x, y, right and bottom properties.","default":"","optional":"","nullable":""}]},{"name":"getIndex","description":"Determine which node the object belongs to.","parameters":[{"name":"rect","type":["Phaser.Rectangle","object"],"description":"The bounds in which to check.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"index - Index of the subnode (0-3), or -1 if rect cannot completely fit within a subnode and is part of the parent node."}},{"name":"retrieve","description":"Return all objects that could collide with the given Sprite or Rectangle.","parameters":[{"name":"source","type":["Phaser.Sprite","Phaser.Rectangle"],"description":"The source object to check the QuadTree against. Either a Sprite or Rectangle.","default":"","optional":"","nullable":""}],"returns":{"type":"array","description":"- Array with all detected objects."}},{"name":"clear","description":"Clear the quadtree.","parameters":[]}],"members":[{"name":"maxObjects","access":"","virtual":false,"description":"The maximum number of objects per node.","type":{"names":["number"]},"default":10},{"name":"maxLevels","access":"","virtual":false,"description":"The maximum number of levels to break down to.","type":{"names":["number"]},"default":4},{"name":"level","access":"","virtual":false,"description":"The current level.","type":{"names":["number"]},"default":""},{"name":"bounds","access":"","virtual":false,"description":"Object that contains the quadtree bounds.","type":{"names":["object"]},"default":""},{"name":"objects","access":"","virtual":false,"description":"Array of quadtree children.","type":{"names":["array"]},"default":""},{"name":"nodes","access":"","virtual":false,"description":"Array of associated child nodes.","type":{"names":["array"]},"default":""},{"name":"_empty","access":"private","virtual":false,"description":"Internal empty array.","type":{"names":["array"]},"default":""}]},{"name":"Phaser.RandomDataGenerator","description":"An extremely useful repeatable random data generator.\r\rBased on Nonsense by Josh Faul https://github.com/jocafa/Nonsense.\r\rThe random number genererator is based on the Alea PRNG, but is modified.\r - https://github.com/coverslide/node-alea\r - https://github.com/nquinlan/better-random-numbers-for-javascript-mirror\r - http://baagoe.org/en/wiki/Better_random_numbers_for_javascript (original, perm. 404)","constructor":{"name":"RandomDataGenerator","description":"An extremely useful repeatable random data generator.\r\rBased on Nonsense by Josh Faul https://github.com/jocafa/Nonsense.\r\rThe random number genererator is based on the Alea PRNG, but is modified.\r - https://github.com/coverslide/node-alea\r - https://github.com/nquinlan/better-random-numbers-for-javascript-mirror\r - http://baagoe.org/en/wiki/Better_random_numbers_for_javascript (original, perm. 404)","parameters":[{"name":"seeds","type":["Array.<any>","string"],"description":"An array of values to use as the seed, or a generator state (from {#state}).","default":"","optional":true,"nullable":""}]},"functions":[{"name":"rnd","description":"Private random helper.","parameters":[],"returns":{"type":"number","description":""}},{"name":"sow","description":"Reset the seed of the random data generator.\r\r_Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present.","parameters":[{"name":"seeds","type":"Array.<any>","description":"The array of seeds: the `toString()` of each value is used.","default":"","optional":"","nullable":""}]},{"name":"hash","description":"Internal method that creates a seed hash.","parameters":[{"name":"data","type":"any","description":"","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"hashed value."}},{"name":"integer","description":"Returns a random integer between 0 and 2^32.","parameters":[],"returns":{"type":"number","description":"A random integer between 0 and 2^32."}},{"name":"frac","description":"Returns a random real number between 0 and 1.","parameters":[],"returns":{"type":"number","description":"A random real number between 0 and 1."}},{"name":"real","description":"Returns a random real number between 0 and 2^32.","parameters":[],"returns":{"type":"number","description":"A random real number between 0 and 2^32."}},{"name":"integerInRange","description":"Returns a random integer between and including min and max.","parameters":[{"name":"min","type":"number","description":"The minimum value in the range.","default":"","optional":"","nullable":""},{"name":"max","type":"number","description":"The maximum value in the range.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"A random number between min and max."}},{"name":"between","description":"Returns a random integer between and including min and max.\rThis method is an alias for RandomDataGenerator.integerInRange.","parameters":[{"name":"min","type":"number","description":"The minimum value in the range.","default":"","optional":"","nullable":""},{"name":"max","type":"number","description":"The maximum value in the range.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"A random number between min and max."}},{"name":"realInRange","description":"Returns a random real number between min and max.","parameters":[{"name":"min","type":"number","description":"The minimum value in the range.","default":"","optional":"","nullable":""},{"name":"max","type":"number","description":"The maximum value in the range.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"A random number between min and max."}},{"name":"normal","description":"Returns a random real number between -1 and 1.","parameters":[],"returns":{"type":"number","description":"A random real number between -1 and 1."}},{"name":"uuid","description":"Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368","parameters":[],"returns":{"type":"string","description":"A valid RFC4122 version4 ID hex string"}},{"name":"pick","description":"Returns a random member of `array`.","parameters":[{"name":"ary","type":"Array","description":"An Array to pick a random member of.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"A random member of the array."}},{"name":"sign","description":"Returns a sign to be used with multiplication operator.","parameters":[],"returns":{"type":"number","description":"-1 or +1."}},{"name":"weightedPick","description":"Returns a random member of `array`, favoring the earlier entries.","parameters":[{"name":"ary","type":"Array","description":"An Array to pick a random member of.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"A random member of the array."}},{"name":"timestamp","description":"Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.","parameters":[{"name":"min","type":"number","description":"The minimum value in the range.","default":"","optional":"","nullable":""},{"name":"max","type":"number","description":"The maximum value in the range.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"A random timestamp between min and max."}},{"name":"angle","description":"Returns a random angle between -180 and 180.","parameters":[],"returns":{"type":"number","description":"A random number between -180 and 180."}},{"name":"state","description":"Gets or Sets the state of the generator. This allows you to retain the values\rthat the generator is using between games, i.e. in a game save file.\r\rTo seed this generator with a previously saved state you can pass it as the \r`seed` value in your game config, or call this method directly after Phaser has booted.\r\rCall this method with no parameters to return the current state.\r\rIf providing a state it should match the same format that this method\rreturns, which is a string with a header `!rnd` followed by the `c`,\r`s0`, `s1` and `s2` values respectively, each comma-delimited.","parameters":[{"name":"state","type":"string","description":"Generator state to be set.","default":"","optional":true,"nullable":""}],"returns":{"type":"string","description":"The current state of the generator."}}],"members":[{"name":"c","access":"private","virtual":false,"description":"Internal var.","type":{"names":["number"]},"default":""},{"name":"s0","access":"private","virtual":false,"description":"Internal var.","type":{"names":["number"]},"default":""},{"name":"s1","access":"private","virtual":false,"description":"Internal var.","type":{"names":["number"]},"default":""},{"name":"s2","access":"private","virtual":false,"description":"Internal var.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.Net","description":"Phaser.Net handles browser URL related tasks such as checking host names, domain names and query string manipulation.","constructor":{"name":"Net","description":"Phaser.Net handles browser URL related tasks such as checking host names, domain names and query string manipulation.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""}]},"functions":[{"name":"getHostName","description":"Returns the hostname given by the browser.","parameters":[],"returns":{"type":"string","description":""}},{"name":"checkDomainName","description":"Compares the given domain name against the hostname of the browser containing the game.\rIf the domain name is found it returns true.\rYou can specify a part of a domain, for example 'google' would match 'google.com', 'google.co.uk', etc.\rDo not include 'http://' at the start.","parameters":[{"name":"domain","type":"string","description":"","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"true if the given domain fragment can be found in the window.location.hostname"}},{"name":"updateQueryString","description":"Updates a value on the Query String and returns it in full.\rIf the value doesn't already exist it is set.\rIf the value exists it is replaced with the new value given. If you don't provide a new value it is removed from the query string.\rOptionally you can redirect to the new url, or just return it as a string.","parameters":[{"name":"key","type":"string","description":"The querystring key to update.","default":"","optional":"","nullable":""},{"name":"value","type":"string","description":"The new value to be set. If it already exists it will be replaced.","default":"","optional":"","nullable":""},{"name":"redirect","type":"boolean","description":"If true the browser will issue a redirect to the url with the new querystring.","default":"","optional":"","nullable":""},{"name":"url","type":"string","description":"The URL to modify. If none is given it uses window.location.href.","default":"","optional":"","nullable":""}],"returns":{"type":"string","description":"If redirect is false then the modified url and query string is returned."}},{"name":"getQueryString","description":"Returns the Query String as an object.\rIf you specify a parameter it will return just the value of that parameter, should it exist.","parameters":[{"name":"parameter","type":"string","description":"If specified this will return just the value for that key.","default":"''","optional":true,"nullable":""}],"returns":{"type":["string","object"],"description":"An object containing the key value pairs found in the query string or just the value if a parameter was given."}},{"name":"decodeURI","description":"Takes a Uniform Resource Identifier (URI) component (previously created by encodeURIComponent or by a similar routine) and\rdecodes it, replacing \\ with spaces in the return. Used internally by the Net classes.","parameters":[{"name":"value","type":"string","description":"The URI component to be decoded.","default":"","optional":"","nullable":""}],"returns":{"type":"string","description":"The decoded value."}}],"members":[]},{"name":"Phaser.Particles.Arcade","description":"Arcade Particles is a Particle System integrated with Arcade Physics.","constructor":{"name":"Arcade","description":"Arcade Particles is a Particle System integrated with Arcade Physics.","parameters":[]},"functions":[],"members":[]},{"name":"Phaser.Particles.Arcade.Emitter","description":"Emitter is a lightweight particle emitter that uses Arcade Physics.\rIt can be used for one-time explosions or for continuous effects like rain and fire.\rAll it really does is launch Particle objects out at set intervals, and fixes their positions and velocities accordingly.","constructor":{"name":"Emitter","description":"Emitter is a lightweight particle emitter that uses Arcade Physics.\rIt can be used for one-time explosions or for continuous effects like rain and fire.\rAll it really does is launch Particle objects out at set intervals, and fixes their positions and velocities accordingly.","parameters":[{"name":"game","type":"Phaser.Game","description":"Current game instance.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate within the Emitter that the particles are emitted from.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate within the Emitter that the particles are emitted from.","default":"","optional":true,"nullable":""},{"name":"maxParticles","type":"number","description":"The total number of particles in this emitter.","default":50,"optional":true,"nullable":""}]},"functions":[{"name":"update","description":"Called automatically by the game loop, decides when to launch particles and when to \"die\".","parameters":[]},{"name":"makeParticles","description":"This function generates a new set of particles for use by this emitter.\rThe particles are stored internally waiting to be emitted via Emitter.start.","parameters":[{"name":"keys","type":["array","string"],"description":"A string or an array of strings that the particle sprites will use as their texture. If an array one is picked at random.","default":"","optional":"","nullable":""},{"name":"frames","type":["array","number"],"description":"A frame number, or array of frames that the sprite will use. If an array one is picked at random.","default":"","optional":true,"nullable":""},{"name":"quantity","type":"number","description":"The number of particles to generate. If not given it will use the value of Emitter.maxParticles. If the value is greater than Emitter.maxParticles it will use Emitter.maxParticles as the quantity.","default":"","optional":true,"nullable":""},{"name":"collide","type":"boolean","description":"If you want the particles to be able to collide with other Arcade Physics bodies then set this to true.","default":"","optional":true,"nullable":""},{"name":"collideWorldBounds","type":"boolean","description":"A particle can be set to collide against the World bounds automatically and rebound back into the World if this is set to true. Otherwise it will leave the World.","default":"","optional":true,"nullable":""},{"name":"particleArguments","type":"object","description":"Custom arguments to pass to your particle class","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Particles.Arcade.Emitter","description":"This Emitter instance."}},{"name":"kill","description":"Call this function to turn off all the particles and the emitter.","parameters":[],"returns":{"type":"Phaser.Particles.Arcade.Emitter","description":"This Emitter instance."}},{"name":"revive","description":"Handy for bringing game objects \"back to life\". Just sets alive and exists back to true.","parameters":[],"returns":{"type":"Phaser.Particles.Arcade.Emitter","description":"This Emitter instance."}},{"name":"explode","description":"Call this function to emit the given quantity of particles at all once (an explosion)","parameters":[{"name":"lifespan","type":"number","description":"How long each particle lives once emitted in ms. 0 = forever.","default":"","optional":true,"nullable":""},{"name":"quantity","type":"number","description":"How many particles to launch.","default":"this.maxParticles","optional":true,"nullable":""}],"returns":{"type":"Phaser.Particles.Arcade.Emitter","description":"This Emitter instance."}},{"name":"flow","description":"Call this function to start emitting a flow of particles at the given frequency.\rIt will carry on going until the total given is reached.\rEach time the flow is run the quantity number of particles will be emitted together.\rIf you set the total to be 20 and quantity to be 5 then flow will emit 4 times in total (4 x 5 = 20 total)\rIf you set the total to be -1 then no quantity cap is used and it will keep emitting.","parameters":[{"name":"lifespan","type":"number","description":"How long each particle lives once emitted in ms. 0 = forever.","default":"","optional":true,"nullable":""},{"name":"frequency","type":"number","description":"Frequency is how often to emit the particles, given in ms.","default":250,"optional":true,"nullable":""},{"name":"quantity","type":"number","description":"How many particles to launch each time the frequency is met. Can never be > Emitter.maxParticles.","default":1,"optional":true,"nullable":""},{"name":"total","type":"number","description":"How many particles to launch in total. If -1 it will carry on indefinitely.","default":-1,"optional":true,"nullable":""},{"name":"immediate","type":"boolean","description":"Should the flow start immediately (true) or wait until the first frequency event? (false)","default":true,"optional":true,"nullable":""}],"returns":{"type":"Phaser.Particles.Arcade.Emitter","description":"This Emitter instance."}},{"name":"start","description":"Call this function to start emitting particles.","parameters":[{"name":"explode","type":"boolean","description":"Whether the particles should all burst out at once (true) or at the frequency given (false).","default":true,"optional":true,"nullable":""},{"name":"lifespan","type":"number","description":"How long each particle lives once emitted in ms. 0 = forever.","default":"","optional":true,"nullable":""},{"name":"frequency","type":"number","description":"Ignored if `explode` is set to true. Frequency is how often to emit 1 particle. Value given in ms.","default":250,"optional":true,"nullable":""},{"name":"quantity","type":"number","description":"How many particles to launch in total. If `explode` is false and `forceQuantity` is false, quantity = 0 will keep emitting particles until {@link #maxParticles} is reached. If `explode` is true or `forceQuantity` is true, quantity = 0 will launch no particles.","default":"","optional":true,"nullable":""},{"name":"forceQuantity","type":"number","description":"If `true` and creating a particle flow, the quantity emitted will be forced to the quantity given in this call. This can never exceed Emitter.maxParticles.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Particles.Arcade.Emitter","description":"This Emitter instance."}},{"name":"emitParticle","description":"This function is used internally to emit the next particle in the queue.\r\rHowever it can also be called externally to emit a particle.\r\rWhen called externally you can use the arguments to override any defaults the Emitter has set.","parameters":[{"name":"x","type":"number","description":"The x coordinate to emit the particle from. If `null` or `undefined` it will use `Emitter.emitX` or if the Emitter has a width > 1 a random value between `Emitter.left` and `Emitter.right`.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to emit the particle from. If `null` or `undefined` it will use `Emitter.emitY` or if the Emitter has a height > 1 a random value between `Emitter.top` and `Emitter.bottom`.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Particle during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Particle 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.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if a particle was emitted, otherwise false."}},{"name":"destroy","description":"Destroys this Emitter, all associated child Particles and then removes itself from the Particle Manager.","parameters":[]},{"name":"setSize","description":"A more compact way of setting the width and height of the emitter.","parameters":[{"name":"width","type":"number","description":"The desired width of the emitter (particles are spawned randomly within these dimensions).","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The desired height of the emitter.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Particles.Arcade.Emitter","description":"This Emitter instance."}},{"name":"setXSpeed","description":"A more compact way of setting the X velocity range of the emitter.","parameters":[{"name":"min","type":"number","description":"The minimum value for this range.","default":"","optional":true,"nullable":""},{"name":"max","type":"number","description":"The maximum value for this range.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Particles.Arcade.Emitter","description":"This Emitter instance."}},{"name":"setYSpeed","description":"A more compact way of setting the Y velocity range of the emitter.","parameters":[{"name":"min","type":"number","description":"The minimum value for this range.","default":"","optional":true,"nullable":""},{"name":"max","type":"number","description":"The maximum value for this range.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Particles.Arcade.Emitter","description":"This Emitter instance."}},{"name":"setRotation","description":"A more compact way of setting the angular velocity constraints of the particles.","parameters":[{"name":"min","type":"number","description":"The minimum value for this range.","default":"","optional":true,"nullable":""},{"name":"max","type":"number","description":"The maximum value for this range.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Particles.Arcade.Emitter","description":"This Emitter instance."}},{"name":"setAlpha","description":"A more compact way of setting the alpha constraints of the particles.\rThe rate parameter, if set to a value above zero, lets you set the speed at which the Particle change in alpha from min to max.\rIf rate is zero, which is the default, the particle won't change alpha - instead it will pick a random alpha between min and max on emit.","parameters":[{"name":"min","type":"number","description":"The minimum value for this range.","default":1,"optional":true,"nullable":""},{"name":"max","type":"number","description":"The maximum value for this range.","default":1,"optional":true,"nullable":""},{"name":"rate","type":"number","description":"The rate (in ms) at which the particles will change in alpha from min to max, or set to zero to pick a random alpha between the two.","default":"","optional":true,"nullable":""},{"name":"ease","type":"function","description":"If you've set a rate > 0 this is the easing formula applied between the min and max values.","default":"Phaser.Easing.Linear.None","optional":true,"nullable":""},{"name":"yoyo","type":"boolean","description":"If you've set a rate > 0 you can set if the ease will yoyo or not (i.e. ease back to its original values)","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Particles.Arcade.Emitter","description":"This Emitter instance."}},{"name":"setScale","description":"A more compact way of setting the scale constraints of the particles.\rThe rate parameter, if set to a value above zero, lets you set the speed and ease which the Particle uses to change in scale from min to max across both axis.\rIf rate is zero, which is the default, the particle won't change scale during update, instead it will pick a random scale between min and max on emit.","parameters":[{"name":"minX","type":"number","description":"The minimum value of Particle.scale.x.","default":1,"optional":true,"nullable":""},{"name":"maxX","type":"number","description":"The maximum value of Particle.scale.x.","default":1,"optional":true,"nullable":""},{"name":"minY","type":"number","description":"The minimum value of Particle.scale.y.","default":1,"optional":true,"nullable":""},{"name":"maxY","type":"number","description":"The maximum value of Particle.scale.y.","default":1,"optional":true,"nullable":""},{"name":"rate","type":"number","description":"The rate (in ms) at which the particles will change in scale from min to max, or set to zero to pick a random size between the two.","default":"","optional":true,"nullable":""},{"name":"ease","type":"function","description":"If you've set a rate > 0 this is the easing formula applied between the min and max values.","default":"Phaser.Easing.Linear.None","optional":true,"nullable":""},{"name":"yoyo","type":"boolean","description":"If you've set a rate > 0 you can set if the ease will yoyo or not (i.e. ease back to its original values)","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Particles.Arcade.Emitter","description":"This Emitter instance."}},{"name":"at","description":"Change the emitters center to match the center of any object with a `center` property, such as a Sprite.\rIf the object doesn't have a center property it will be set to object.x + object.width / 2","parameters":[{"name":"object","type":["object","Phaser.Sprite","Phaser.Image","Phaser.TileSprite","Phaser.Text","PIXI.DisplayObject"],"description":"The object that you wish to match the center with.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Particles.Arcade.Emitter","description":"This Emitter instance."}},{"name":"add","description":"Adds an existing object as the top child in this group.\r\rThe child is automatically added to the top of the group, and is displayed above every previous child.\r\rOr if the _optional_ index is specified, the child is added at the location specified by the index value, \rthis allows you to control child ordering.\r\rIf the child was already in this Group, it is simply returned, and nothing else happens to it.\r\rIf `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.\r\rUse {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.","parameters":[{"name":"child","type":"DisplayObject","description":"The display object to add as a child.","default":"","optional":"","nullable":""},{"name":"silent","type":"boolean","description":"If true the child will not dispatch the `onAddedToGroup` event.","default":"","optional":true,"nullable":""},{"name":"index","type":"integer","description":"The index within the group to insert the child to. Where 0 is the bottom of the Group.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The child that was added to the group."}},{"name":"addAt","description":"Adds an existing object to this group.\r\rThe child is added to the group at the location specified by the index value, this allows you to control child ordering.\r\rIf `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.","parameters":[{"name":"child","type":"DisplayObject","description":"The display object to add as a child.","default":"","optional":"","nullable":""},{"name":"index","type":"integer","description":"The index within the group to insert the child to.","default":"","optional":true,"nullable":""},{"name":"silent","type":"boolean","description":"If true the child will not dispatch the `onAddedToGroup` event.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The child that was added to the group."}},{"name":"addToHash","description":"Adds a child of this Group into the hash array.\rThis call will return false if the child is not a child of this Group, or is already in the hash.","parameters":[{"name":"child","type":"DisplayObject","description":"The display object to add to this Groups hash. Must be a member of this Group already and not present in the hash.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the child was successfully added to the hash, otherwise false."}},{"name":"removeFromHash","description":"Removes a child of this Group from the hash array.\rThis call will return false if the child is not in the hash.","parameters":[{"name":"child","type":"DisplayObject","description":"The display object to remove from this Groups hash. Must be a member of this Group and in the hash.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the child was successfully removed from the hash, otherwise false."}},{"name":"addMultiple","description":"Adds an array of existing Display Objects to this Group.\r\rThe Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.\r\rAs well as an array you can also pass another Group as the first argument. In this case all of the children from that\rGroup will be removed from it and added into this Group.\r\rIf `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.","parameters":[{"name":"children","type":["Array.<DisplayObject>","Phaser.Group"],"description":"An array of display objects or a Phaser.Group. If a Group is given then *all* children will be moved from it.","default":"","optional":"","nullable":""},{"name":"silent","type":"boolean","description":"If true the children will not dispatch the `onAddedToGroup` event.","default":"","optional":true,"nullable":""}],"returns":{"type":["Array.<DisplayObject>","Phaser.Group"],"description":"The array of children or Group of children that were added to this Group."}},{"name":"getAt","description":"Returns the child found at the given index within this group.","parameters":[{"name":"index","type":"integer","description":"The index to return the child from.","default":"","optional":"","nullable":""}],"returns":{"type":["DisplayObject","integer"],"description":"The child that was found at the given index, or -1 for an invalid index."}},{"name":"create","description":"Creates a new Phaser.Sprite object and adds it to the top of this group.\r\rUse {@link Phaser.Group#classType classType} to change the type of object created.\r\rThe child is automatically added to the top of the group, and is displayed above every previous child.\r\rOr if the _optional_ index is specified, the child is added at the location specified by the index value, \rthis allows you to control child ordering.\r\rIf `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.","parameters":[{"name":"x","type":"number","description":"The x coordinate to display the newly created Sprite at. The value is in relation to the group.x point.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate to display the newly created Sprite at. The value is in relation to the group.y point.","default":"","optional":"","nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""},{"name":"exists","type":"boolean","description":"The default exists state of the Sprite.","default":true,"optional":true,"nullable":""},{"name":"index","type":"integer","description":"The index within the group to insert the child to. Where 0 is the bottom of the Group.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The child that was created: will be a {@link Phaser.Sprite} unless {@link #classType} has been changed."}},{"name":"createMultiple","description":"Creates multiple Phaser.Sprite objects and adds them to the top of this Group.\r\rThis method is useful if you need to quickly generate a pool of sprites, such as bullets.\r\rUse {@link Phaser.Group#classType classType} to change the type of object created.\r\rYou can provide an array as the `key` and / or `frame` arguments. When you do this\rit will create `quantity` Sprites for every key (and frame) in the arrays.\r\rFor example:\r\r`createMultiple(25, ['ball', 'carrot'])`\r\rIn the above code there are 2 keys (ball and carrot) which means that 50 sprites will be\rcreated in total, 25 of each. You can also have the `frame` as an array:\r\r`createMultiple(5, 'bricks', [0, 1, 2, 3])`\r\rIn the above there is one key (bricks), which is a sprite sheet. The frames array tells\rthis method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because\rthe quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with\rframe 1, and so on.\r\rIf you set both the key and frame arguments to be arrays then understand it will create\ra total quantity of sprites equal to the size of both arrays times each other. I.e.:\r\r`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`\r\rThe above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2.\rIt will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2.\rIn total it will have created 120 sprites.\r\rBy default the Sprites will have their `exists` property set to `false`, and they will be \rpositioned at 0x0, relative to the `Group.x / y` values.\r\rIf `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.","parameters":[{"name":"quantity","type":"integer","description":"The number of Sprites to create.","default":"","optional":"","nullable":""},{"name":"key","type":["string","array"],"description":"The Cache key of the image that the Sprites will use. Or an Array of keys. See the description for details on how the quantity applies when arrays are used.","default":"","optional":"","nullable":""},{"name":"frame","type":["integer","string","array"],"description":"If the Sprite image contains multiple frames you can specify which one to use here. Or an Array of frames. See the description for details on how the quantity applies when arrays are used.","default":"","optional":true,"nullable":""},{"name":"exists","type":"boolean","description":"The default exists state of the Sprite.","default":"","optional":true,"nullable":""}],"returns":{"type":"array","description":"An array containing all of the Sprites that were created."}},{"name":"updateZ","description":"Internal method that re-applies all of the children's Z values.\r\rThis must be called whenever children ordering is altered so that their `z` indices are correctly updated.","parameters":[]},{"name":"align","description":"This method iterates through all children in the Group (regardless if they are visible or exist)\rand then changes their position so they are arranged in a Grid formation. Children must have\rthe `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have\rthis.\r\rThe grid dimensions are determined by the first four arguments. The `width` and `height` arguments\rrelate to the width and height of the grid respectively.\r\rFor example if the Group had 100 children in it:\r\r`Group.align(10, 10, 32, 32)`\r\rThis will align all of the children into a grid formation of 10x10, using 32 pixels per\rgrid cell. If you want a wider grid, you could do:\r\r`Group.align(25, 4, 32, 32)`\r\rThis will align the children into a grid of 25x4, again using 32 pixels per grid cell.\r\rYou can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method\rto keep on aligning children until there are no children left. For example if this Group had\r48 children in it, the following:\r\r`Group.align(-1, 8, 32, 32)`\r\r... will align the children so that there are 8 children vertically (the second argument), \rand each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)\r\rYou can also do:\r\r`Group.align(10, -1, 32, 32)`\r\rIn this case it will create a grid 10 wide, and as tall as it needs to be in order to fit\rall of the children in.\r\rThe `position` property allows you to control where in each grid cell the child is positioned.\rThis is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, \r`Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, \r`Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.\r\rThe final argument; `offset` lets you start the alignment from a specific child index.","parameters":[{"name":"width","type":"integer","description":"The width of the grid in items (not pixels). Set to -1 for a dynamic width. If -1 then you must set an explicit height value.","default":"","optional":"","nullable":""},{"name":"height","type":"integer","description":"The height of the grid in items (not pixels). Set to -1 for a dynamic height. If -1 then you must set an explicit width value.","default":"","optional":"","nullable":""},{"name":"cellWidth","type":"integer","description":"The width of each grid cell, in pixels.","default":"","optional":"","nullable":""},{"name":"cellHeight","type":"integer","description":"The height of each grid cell, in pixels.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offset","type":"integer","description":"Optional index to start the alignment from. Defaults to zero, the first child in the Group, but can be set to any valid child index value.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the Group children were aligned, otherwise false."}},{"name":"resetCursor","description":"Sets the group cursor to the first child in the group.\r\rIf the optional index parameter is given it sets the cursor to the object at that index instead.","parameters":[{"name":"index","type":"integer","description":"Set the cursor to point to a specific index.","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"The child the cursor now points to."}},{"name":"next","description":"Advances the group cursor to the next (higher) object in the group.\r\rIf the cursor is at the end of the group (top child) it is moved the start of the group (bottom child).","parameters":[],"returns":{"type":"any","description":"The child the cursor now points to."}},{"name":"previous","description":"Moves the group cursor to the previous (lower) child in the group.\r\rIf the cursor is at the start of the group (bottom child) it is moved to the end (top child).","parameters":[],"returns":{"type":"any","description":"The child the cursor now points to."}},{"name":"swap","description":"Swaps the position of two children in this group.\r\rBoth children must be in this group, a child cannot be swapped with itself, and unparented children cannot be swapped.","parameters":[{"name":"child1","type":"any","description":"The first child to swap.","default":"","optional":"","nullable":""},{"name":"child2","type":"any","description":"The second child to swap.","default":"","optional":"","nullable":""}]},{"name":"bringToTop","description":"Brings the given child to the top of this group so it renders above all other children.","parameters":[{"name":"child","type":"any","description":"The child to bring to the top of this group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The child that was moved."}},{"name":"sendToBack","description":"Sends the given child to the bottom of this group so it renders below all other children.","parameters":[{"name":"child","type":"any","description":"The child to send to the bottom of this group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The child that was moved."}},{"name":"moveUp","description":"Moves the given child up one place in this group unless it's already at the top.","parameters":[{"name":"child","type":"any","description":"The child to move up in the group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The child that was moved."}},{"name":"moveDown","description":"Moves the given child down one place in this group unless it's already at the bottom.","parameters":[{"name":"child","type":"any","description":"The child to move down in the group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The child that was moved."}},{"name":"xy","description":"Positions the child found at the given index within this group to the given x and y coordinates.","parameters":[{"name":"index","type":"integer","description":"The index of the child in the group to set the position of.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The new x position of the child.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The new y position of the child.","default":"","optional":"","nullable":""}]},{"name":"reverse","description":"Reverses all children in this group.\r\rThis operation applies only to immediate children and does not propagate to subgroups.","parameters":[]},{"name":"getIndex","description":"Get the index position of the given child in this group, which should match the child's `z` property.","parameters":[{"name":"child","type":"any","description":"The child to get the index for.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The index of the child or -1 if it's not a member of this group."}},{"name":"getByName","description":"Searches the Group for the first instance of a child with the `name`\rproperty matching the given argument. Should more than one child have\rthe same name only the first instance is returned.","parameters":[{"name":"name","type":"string","description":"The name to search for.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The first child with a matching name, or null if none were found."}},{"name":"replace","description":"Replaces a child of this Group with the given newChild. The newChild cannot be a member of this Group.\r\rIf `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.","parameters":[{"name":"oldChild","type":"any","description":"The child in this group that will be replaced.","default":"","optional":"","nullable":""},{"name":"newChild","type":"any","description":"The child to be inserted into this group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"Returns the oldChild that was replaced within this group."}},{"name":"hasProperty","description":"Checks if the child has the given property.\r\rWill scan up to 4 levels deep only.","parameters":[{"name":"child","type":"any","description":"The child to check for the existence of the property on.","default":"","optional":"","nullable":""},{"name":"key","type":"Array.<string>","description":"An array of strings that make up the property.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the child has the property, otherwise false."}},{"name":"setProperty","description":"Sets a property to the given value on the child. The operation parameter controls how the value is set.\r\rThe operations are:\r- 0: set the existing value to the given value; if force is `true` a new property will be created if needed\r- 1: will add the given value to the value already present.\r- 2: will subtract the given value from the value already present.\r- 3: will multiply the value already present by the given value.\r- 4: will divide the value already present by the given value.","parameters":[{"name":"child","type":"any","description":"The child to set the property value on.","default":"","optional":"","nullable":""},{"name":"key","type":"array","description":"An array of strings that make up the property that will be set.","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be set.","default":"","optional":"","nullable":""},{"name":"operation","type":"integer","description":"Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the property was set, false if not."}},{"name":"checkProperty","description":"Checks a property for the given value on the child.","parameters":[{"name":"child","type":"any","description":"The child to check the property value on.","default":"","optional":"","nullable":""},{"name":"key","type":"array","description":"An array of strings that make up the property that will be set.","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be checked.","default":"","optional":"","nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the property was was equal to value, false if not."}},{"name":"set","description":"Quickly set a property on a single child of this group to a new value.\r\rThe operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.","parameters":[{"name":"child","type":"Phaser.Sprite","description":"The child to set the property on.","default":"","optional":"","nullable":""},{"name":"key","type":"string","description":"The property, as a string, to be set. For example: 'body.velocity.x'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be set.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If set then the child will only be updated if alive=true.","default":"","optional":true,"nullable":""},{"name":"checkVisible","type":"boolean","description":"If set then the child will only be updated if visible=true.","default":"","optional":true,"nullable":""},{"name":"operation","type":"integer","description":"Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the property was set, false if not."}},{"name":"setAll","description":"Quickly set the same property across all children of this group to a new value.\r\rThis call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children.\rIf you need that ability please see `Group.setAllChildren`.\r\rThe operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.","parameters":[{"name":"key","type":"string","description":"The property, as a string, to be set. For example: 'body.velocity.x'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be set.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If set then only children with alive=true will be updated. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"checkVisible","type":"boolean","description":"If set then only children with visible=true will be updated. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"operation","type":"integer","description":"Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.","default":"","optional":true,"nullable":""}]},{"name":"setAllChildren","description":"Quickly set the same property across all children of this group, and any child Groups, to a new value.\r\rIf this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom.\rUnlike with `setAll` the property is NOT set on child Groups itself.\r\rThe operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.","parameters":[{"name":"key","type":"string","description":"The property, as a string, to be set. For example: 'body.velocity.x'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be set.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If set then only children with alive=true will be updated. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"checkVisible","type":"boolean","description":"If set then only children with visible=true will be updated. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"operation","type":"integer","description":"Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.","default":"","optional":true,"nullable":""}]},{"name":"checkAll","description":"Quickly check that the same property across all children of this group is equal to the given value.\r\rThis call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.","parameters":[{"name":"key","type":"string","description":"The property, as a string, to be set. For example: 'body.velocity.x'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be checked.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If set then only children with alive=true will be checked. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"checkVisible","type":"boolean","description":"If set then only children with visible=true will be checked. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned.","default":"","optional":true,"nullable":""}]},{"name":"addAll","description":"Adds the amount to the given property on all children in this group.\r\r`Group.addAll('x', 10)` will add 10 to the child.x value for each child.","parameters":[{"name":"property","type":"string","description":"The property to increment, for example 'body.velocity.x' or 'angle'.","default":"","optional":"","nullable":""},{"name":"amount","type":"number","description":"The amount to increment the property by. If child.x = 10 then addAll('x', 40) would make child.x = 50.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If true the property will only be changed if the child is alive.","default":"","optional":"","nullable":""},{"name":"checkVisible","type":"boolean","description":"If true the property will only be changed if the child is visible.","default":"","optional":"","nullable":""}]},{"name":"subAll","description":"Subtracts the amount from the given property on all children in this group.\r\r`Group.subAll('x', 10)` will minus 10 from the child.x value for each child.","parameters":[{"name":"property","type":"string","description":"The property to decrement, for example 'body.velocity.x' or 'angle'.","default":"","optional":"","nullable":""},{"name":"amount","type":"number","description":"The amount to subtract from the property. If child.x = 50 then subAll('x', 40) would make child.x = 10.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If true the property will only be changed if the child is alive.","default":"","optional":"","nullable":""},{"name":"checkVisible","type":"boolean","description":"If true the property will only be changed if the child is visible.","default":"","optional":"","nullable":""}]},{"name":"multiplyAll","description":"Multiplies the given property by the amount on all children in this group.\r\r`Group.multiplyAll('x', 2)` will x2 the child.x value for each child.","parameters":[{"name":"property","type":"string","description":"The property to multiply, for example 'body.velocity.x' or 'angle'.","default":"","optional":"","nullable":""},{"name":"amount","type":"number","description":"The amount to multiply the property by. If child.x = 10 then multiplyAll('x', 2) would make child.x = 20.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If true the property will only be changed if the child is alive.","default":"","optional":"","nullable":""},{"name":"checkVisible","type":"boolean","description":"If true the property will only be changed if the child is visible.","default":"","optional":"","nullable":""}]},{"name":"divideAll","description":"Divides the given property by the amount on all children in this group.\r\r`Group.divideAll('x', 2)` will half the child.x value for each child.","parameters":[{"name":"property","type":"string","description":"The property to divide, for example 'body.velocity.x' or 'angle'.","default":"","optional":"","nullable":""},{"name":"amount","type":"number","description":"The amount to divide the property by. If child.x = 100 then divideAll('x', 2) would make child.x = 50.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If true the property will only be changed if the child is alive.","default":"","optional":"","nullable":""},{"name":"checkVisible","type":"boolean","description":"If true the property will only be changed if the child is visible.","default":"","optional":"","nullable":""}]},{"name":"callAllExists","description":"Calls a function, specified by name, on all children in the group who exist (or do not exist).\r\rAfter the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.","parameters":[{"name":"callback","type":"string","description":"Name of the function on the children to call.","default":"","optional":"","nullable":""},{"name":"existsValue","type":"boolean","description":"Only children with exists=existsValue will be called.","default":"","optional":"","nullable":""},{"name":"parameter","type":"any","description":"Additional parameters that will be passed to the callback.","default":"","optional":"","nullable":""}]},{"name":"callbackFromArray","description":"Returns a reference to a function that exists on a child of the group based on the given callback array.","parameters":[{"name":"child","type":"object","description":"The object to inspect.","default":"","optional":"","nullable":""},{"name":"callback","type":"array","description":"The array of function names.","default":"","optional":"","nullable":""},{"name":"length","type":"integer","description":"The size of the array (pre-calculated in callAll).","default":"","optional":"","nullable":""}]},{"name":"callAll","description":"Calls a function, specified by name, on all on children.\r\rThe function is called for all children regardless if they are dead or alive (see callAllExists for different options).\rAfter the method parameter and context you can add as many extra parameters as you like, which will all be passed to the child.","parameters":[{"name":"method","type":"string","description":"Name of the function on the child to call. Deep property lookup is supported.","default":"","optional":"","nullable":""},{"name":"context","type":"string","description":"A string containing the context under which the method will be executed. Set to null to default to the child.","default":"","optional":true,"nullable":""},{"name":"args","type":"any","description":"Additional parameters that will be passed to the method.","default":"","optional":"","nullable":""}]},{"name":"preUpdate","description":"The core preUpdate - as called by World.","parameters":[]},{"name":"postUpdate","description":"The core postUpdate - as called by World.","parameters":[]},{"name":"filter","description":"Find children matching a certain predicate.\r\rFor example:\r\r    var healthyList = Group.filter(function(child, index, children) {\r        return child.health > 10 ? true : false;\r    }, true);\r    healthyList.callAll('attack');\r\rNote: Currently this will skip any children which are Groups themselves.","parameters":[{"name":"predicate","type":"function","description":"The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, the index as the second, and the entire child array as the third","default":"","optional":"","nullable":""},{"name":"checkExists","type":"boolean","description":"If true, only existing can be selected; otherwise all children can be selected and will be passed to the predicate.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.ArraySet","description":"Returns an array list containing all the children that the predicate returned true for"}},{"name":"forEach","description":"Call a function on each child in this group.\r\rAdditional arguments for the callback can be specified after the `checkExists` parameter. For example,\r\r    Group.forEach(awardBonusGold, this, true, 100, 500)\r\rwould invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.\r\rNote: This check will skip any children which are Groups themselves.","parameters":[{"name":"callback","type":"function","description":"The function that will be called for each applicable child. The child will be passed as the first argument.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":"","nullable":""},{"name":"checkExists","type":"boolean","description":"If set only children matching for which `exists` is true will be passed to the callback, otherwise all children will be passed.","default":"","optional":true,"nullable":""},{"name":"args","type":"any","description":"Additional arguments to pass to the callback function, after the child item.","default":"(none)","optional":true,"nullable":""}]},{"name":"forEachExists","description":"Call a function on each existing child in this group.\r\rSee {@link Phaser.Group#forEach forEach} for details.","parameters":[{"name":"callback","type":"function","description":"The function that will be called for each applicable child. The child will be passed as the first argument.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":"","nullable":""},{"name":"args","type":"any","description":"Additional arguments to pass to the callback function, after the child item.","default":"(none)","optional":true,"nullable":""}]},{"name":"forEachAlive","description":"Call a function on each alive child in this group.\r\rSee {@link Phaser.Group#forEach forEach} for details.","parameters":[{"name":"callback","type":"function","description":"The function that will be called for each applicable child. The child will be passed as the first argument.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":"","nullable":""},{"name":"args","type":"any","description":"Additional arguments to pass to the callback function, after the child item.","default":"(none)","optional":true,"nullable":""}]},{"name":"forEachDead","description":"Call a function on each dead child in this group.\r\rSee {@link Phaser.Group#forEach forEach} for details.","parameters":[{"name":"callback","type":"function","description":"The function that will be called for each applicable child. The child will be passed as the first argument.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":"","nullable":""},{"name":"args","type":"any","description":"Additional arguments to pass to the callback function, after the child item.","default":"(none)","optional":true,"nullable":""}]},{"name":"sort","description":"Sort the children in the group according to a particular key and ordering.\r\rCall this function to sort the group according to a particular key value and order.\r\rFor example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.\r\rInternally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including\ralphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.","parameters":[{"name":"key","type":"string","description":"The name of the property to sort on. Defaults to the objects z-depth value.","default":"'z'","optional":true,"nullable":""},{"name":"order","type":"integer","description":"Order ascending ({@link Phaser.Group.SORT_ASCENDING SORT_ASCENDING}) or descending ({@link Phaser.Group.SORT_DESCENDING SORT_DESCENDING}).","default":"Phaser.Group.SORT_ASCENDING","optional":true,"nullable":""}]},{"name":"customSort","description":"Sort the children in the group according to custom sort function.\r\rThe `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b).\rIt should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.","parameters":[{"name":"sortHandler","type":"function","description":"The custom sort function.","default":"","optional":"","nullable":""},{"name":"context","type":"object","description":"The context in which the sortHandler is called.","default":"","optional":true,"nullable":""}]},{"name":"ascendingSortHandler","description":"An internal helper function for the sort process.","parameters":[{"name":"a","type":"object","description":"The first object being sorted.","default":"","optional":"","nullable":""},{"name":"b","type":"object","description":"The second object being sorted.","default":"","optional":"","nullable":""}]},{"name":"descendingSortHandler","description":"An internal helper function for the sort process.","parameters":[{"name":"a","type":"object","description":"The first object being sorted.","default":"","optional":"","nullable":""},{"name":"b","type":"object","description":"The second object being sorted.","default":"","optional":"","nullable":""}]},{"name":"iterate","description":"Iterates over the children of the group performing one of several actions for matched children.\r\rA child is considered a match when it has a property, named `key`, whose value is equal to `value`\raccording to a strict equality comparison.\r\rThe result depends on the `returnType`:\r\r- {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}:\r    The callback, if any, is applied to all matching children. The number of matched children is returned.\r- {@link Phaser.Group.RETURN_NONE RETURN_NONE}:\r    The callback, if any, is applied to all matching children. No value is returned.\r- {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}:\r    The callback, if any, is applied to the *first* matching child and the *first* matched child is returned.\r    If there is no matching child then null is returned.\r\rIf `args` is specified it must be an array. The matched child will be assigned to the first\relement and the entire array will be applied to the callback function.","parameters":[{"name":"key","type":"string","description":"The child property to check, i.e. 'exists', 'alive', 'health'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"A child matches if `child[key] === value` is true.","default":"","optional":"","nullable":""},{"name":"returnType","type":"integer","description":"How to iterate the children and what to return.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"Optional function that will be called on each matching child. The matched child is supplied as the first argument.","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":true,"nullable":""},{"name":"args","type":"Array.<any>","description":"The arguments supplied to to the callback; the first array index (argument) will be replaced with the matched child.","default":"(none)","optional":true,"nullable":""}],"returns":{"type":"any","description":"Returns either an integer (for RETURN_TOTAL), the first matched child (for RETURN_CHILD), or null."}},{"name":"getFirstExists","description":"Get the first display object that exists, or doesn't exist.\r\rYou can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.\r\rIt works by calling `Group.create` passing it the parameters given to this method, and returning the new child.\r\rIf a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child\rwill be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.","parameters":[{"name":"exists","type":"boolean","description":"If true, find the first existing child; otherwise find the first non-existing child.","default":true,"optional":true,"nullable":""},{"name":"createIfNull","type":"boolean","description":"If `true` and no alive children are found a new one is created.","default":"","optional":true,"nullable":""},{"name":"x","type":"number","description":"The x coordinate to reset the child to. The value is in relation to the group.x point.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to reset the child to. The value is in relation to the group.y point.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The first child, or `null` if none found and `createIfNull` was false."}},{"name":"getFirstAlive","description":"Get the first child that is alive (`child.alive === true`).\r\rThis is handy for choosing a squad leader, etc.\r\rYou can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.\r\rIt works by calling `Group.create` passing it the parameters given to this method, and returning the new child.\r\rIf a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child\rwill be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.","parameters":[{"name":"createIfNull","type":"boolean","description":"If `true` and no alive children are found a new one is created.","default":"","optional":true,"nullable":""},{"name":"x","type":"number","description":"The x coordinate to reset the child to. The value is in relation to the group.x point.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to reset the child to. The value is in relation to the group.y point.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The alive dead child, or `null` if none found and `createIfNull` was false."}},{"name":"getFirstDead","description":"Get the first child that is dead (`child.alive === false`).\r\rThis is handy for checking if everything has been wiped out and adding to the pool as needed.\r\rYou can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.\r\rIt works by calling `Group.create` passing it the parameters given to this method, and returning the new child.\r\rIf a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child\rwill be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.","parameters":[{"name":"createIfNull","type":"boolean","description":"If `true` and no dead children are found a new one is created.","default":"","optional":true,"nullable":""},{"name":"x","type":"number","description":"The x coordinate to reset the child to. The value is in relation to the group.x point.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to reset the child to. The value is in relation to the group.y point.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The first dead child, or `null` if none found and `createIfNull` was false."}},{"name":"resetChild","description":"Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.\r\rIf the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.\r\rThe two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.","parameters":[{"name":"child","type":"DisplayObject","description":"The child to reset and/or load the texture on.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate to reset the child to. The value is in relation to the group.x point.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to reset the child to. The value is in relation to the group.y point.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The child that was reset: usually a {@link Phaser.Sprite}."}},{"name":"getTop","description":"Return the child at the top of this group.\r\rThe top child is the child displayed (rendered) above every other child.","parameters":[],"returns":{"type":"any","description":"The child at the top of the Group."}},{"name":"getBottom","description":"Returns the child at the bottom of this group.\r\rThe bottom child the child being displayed (rendered) below every other child.","parameters":[],"returns":{"type":"any","description":"The child at the bottom of the Group."}},{"name":"getClosestTo","description":"Get the closest child to given Object, with optional callback to filter children.\r\rThis can be a Sprite, Group, Image or any object with public x and y properties.\r\r'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.\r\rYou can use the optional `callback` argument to apply your own filter to the distance checks.\rIf the child is closer then the previous child, it will be sent to `callback` as the first argument,\rwith the distance as the second. The callback should return `true` if it passes your \rfiltering criteria, otherwise it should return `false`.","parameters":[{"name":"object","type":"any","description":"The object used to determine the distance. This can be a Sprite, Group, Image or any object with public x and y properties.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, with the distance as the second. It should return `true` if the child passes the matching criteria.","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"The child closest to given object, or `null` if no child was found."}},{"name":"getFurthestFrom","description":"Get the child furthest away from the given Object, with optional callback to filter children.\r\rThis can be a Sprite, Group, Image or any object with public x and y properties.\r\r'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.\r\rYou can use the optional `callback` argument to apply your own filter to the distance checks.\rIf the child is closer then the previous child, it will be sent to `callback` as the first argument,\rwith the distance as the second. The callback should return `true` if it passes your \rfiltering criteria, otherwise it should return `false`.","parameters":[{"name":"object","type":"any","description":"The object used to determine the distance. This can be a Sprite, Group, Image or any object with public x and y properties.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, with the distance as the second. It should return `true` if the child passes the matching criteria.","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"The child furthest from the given object, or `null` if no child was found."}},{"name":"countLiving","description":"Get the number of living children in this group.","parameters":[],"returns":{"type":"integer","description":"The number of children flagged as alive."}},{"name":"countDead","description":"Get the number of dead children in this group.","parameters":[],"returns":{"type":"integer","description":"The number of children flagged as dead."}},{"name":"getRandom","description":"Returns a random child from the group.","parameters":[{"name":"startIndex","type":"integer","description":"Offset from the front of the group (lowest child).","default":"","optional":true,"nullable":""},{"name":"length","type":"integer","description":"Restriction on the number of values you want to randomly select from.","default":"(to top)","optional":true,"nullable":""}],"returns":{"type":"any","description":"A random child of this Group."}},{"name":"getRandomExists","description":"Returns a random child from the Group that has `exists` set to `true`.\r\rOptionally you can specify a start and end index. For example if this Group had 100 children,\rand you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only\rthe first 50 children in the Group.","parameters":[{"name":"startIndex","type":"integer","description":"The first child index to start the search from.","default":"","optional":true,"nullable":""},{"name":"endIndex","type":"integer","description":"The last child index to search up to.","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"A random child of this Group that exists."}},{"name":"getAll","description":"Returns all children in this Group.\r\rYou can optionally specify a matching criteria using the `property` and `value` arguments.\r\rFor example: `getAll('exists', true)` would return only children that have their exists property set.\r\rOptionally you can specify a start and end index. For example if this Group had 100 children,\rand you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only\rthe first 50 children in the Group.","parameters":[{"name":"property","type":"string","description":"An optional property to test against the value argument.","default":"","optional":true,"nullable":""},{"name":"value","type":"any","description":"If property is set then Child.property must strictly equal this value to be included in the results.","default":"","optional":true,"nullable":""},{"name":"startIndex","type":"integer","description":"The first child index to start the search from.","default":"","optional":true,"nullable":""},{"name":"endIndex","type":"integer","description":"The last child index to search up until.","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"A random existing child of this Group."}},{"name":"remove","description":"Removes the given child from this group.\r\rThis will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.\r\rIf the group cursor was referring to the removed child it is updated to refer to the next child.","parameters":[{"name":"child","type":"any","description":"The child to remove.","default":"","optional":"","nullable":""},{"name":"destroy","type":"boolean","description":"If true `destroy` will be invoked on the removed child.","default":"","optional":true,"nullable":""},{"name":"silent","type":"boolean","description":"If true the the child will not dispatch the `onRemovedFromGroup` event.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"true if the child was removed from this group, otherwise false."}},{"name":"moveAll","description":"Moves all children from this Group to the Group given.","parameters":[{"name":"group","type":"Phaser.Group","description":"The new Group to which the children will be moved to.","default":"","optional":"","nullable":""},{"name":"silent","type":"boolean","description":"If true the children will not dispatch the `onAddedToGroup` event for the new Group.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Group","description":"The Group to which all the children were moved."}},{"name":"removeAll","description":"Removes all children from this Group, but does not remove the group from its parent.\r\rThe children can be optionally destroyed as they are removed.\r\rYou can also optionally also destroy the BaseTexture the Child is using. Be careful if you've\rmore than one Game Object sharing the same BaseTexture.","parameters":[{"name":"destroy","type":"boolean","description":"If true `destroy` will be invoked on each removed child.","default":"","optional":true,"nullable":""},{"name":"silent","type":"boolean","description":"If true the children will not dispatch their `onRemovedFromGroup` events.","default":"","optional":true,"nullable":""},{"name":"destroyTexture","type":"boolean","description":"If true, and if the `destroy` argument is also true, the BaseTexture belonging to the Child is also destroyed. Note that if another Game Object is sharing the same BaseTexture it will invalidate it.","default":"","optional":true,"nullable":""}]},{"name":"removeBetween","description":"Removes all children from this group whose index falls beteen the given startIndex and endIndex values.","parameters":[{"name":"startIndex","type":"integer","description":"The index to start removing children from.","default":"","optional":"","nullable":""},{"name":"endIndex","type":"integer","description":"The index to stop removing children at. Must be higher than startIndex. If undefined this method will remove all children between startIndex and the end of the group.","default":"","optional":true,"nullable":""},{"name":"destroy","type":"boolean","description":"If true `destroy` will be invoked on each removed child.","default":"","optional":true,"nullable":""},{"name":"silent","type":"boolean","description":"If true the children will not dispatch their `onRemovedFromGroup` events.","default":"","optional":true,"nullable":""}]},{"name":"alignIn","description":"Aligns this Group within another Game Object, or Rectangle, known as the\r'container', to one of 9 possible positions.\r\rThe container must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Groups within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Group to another Game Object does **not** make it a child of\rthe container. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, \r`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, \r`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.\r\rGroups are placed in such a way that their _bounds_ align with the\rcontainer, taking into consideration rotation and scale of its children.\rThis allows you to neatly align Groups, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Group. For example:\r\r`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `group` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the containers bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"container","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Group to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Group","description":"This Group."}},{"name":"alignTo","description":"Aligns this Group to the side of another Game Object, or Rectangle, known as the\r'parent', in one of 11 possible positions.\r\rThe parent must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Groups within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Group to another Game Object does **not** make it a child of\rthe parent. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, \r`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, \r`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` \rand `Phaser.BOTTOM_RIGHT`.\r\rGroups are placed in such a way that their _bounds_ align with the\rparent, taking into consideration rotation and scale of the children.\rThis allows you to neatly align Groups, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Group. For example:\r\r`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `group` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the parents bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"parent","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Group to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Group","description":"This Group."}},{"name":"addChild","description":"Adds a child to the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to add to the container","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"addChildAt","description":"Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child to add","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The index to place the child in","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"swapChildren","description":"Swaps the position of 2 Display Objects within this container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""},{"name":"child2","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}]},{"name":"getChildIndex","description":"Returns the index position of a child DisplayObject instance","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject instance to identify","default":"","optional":"","nullable":""}],"returns":{"type":"Number","description":"The index position of the child display object to identify"}},{"name":"setChildIndex","description":"Changes the position of an existing child in the display object container","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child DisplayObject instance for which you want to change the index number","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The resulting index number for the child display object","default":"","optional":"","nullable":""}]},{"name":"getChildAt","description":"Returns the child at the specified index","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child at the given index, if any."}},{"name":"removeChild","description":"Removes a child from the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to remove","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildAt","description":"Removes a child from the specified index position.","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildren","description":"Removes all children from this container that are within the begin and end indexes.","parameters":[{"name":"beginIndex","type":"Number","description":"The beginning position. Default value is 0.","default":"","optional":"","nullable":""},{"name":"endIndex","type":"Number","description":"The ending position. Default value is size of the container.","default":"","optional":"","nullable":""}]},{"name":"getBounds","description":"Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.","parameters":[{"name":"targetCoordinateSpace","type":["PIXIDisplayObject","PIXIMatrix"],"description":"Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object.","default":"","optional":true,"nullable":""}],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"getLocalBounds","description":"Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.","parameters":[],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"contains","description":"Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}],"returns":{"type":"Boolean","description":""}},{"name":"_renderWebGL","description":"Renders the object using the WebGL renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""}]},{"name":"_renderCanvas","description":"Renders the object using the Canvas renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""}]}],"members":[{"name":"maxParticles","access":"","virtual":false,"description":"The total number of particles in this emitter.","type":{"names":["number"]},"default":""},{"name":"_id","access":"private","virtual":false,"description":"Internal ID for this emitter -- only used by the Particle System in most cases","type":{"names":["number"]},"default":""},{"name":"name","access":"","virtual":false,"description":"A handy string name for this emitter. Can be set to anything.","type":{"names":["string"]},"default":""},{"name":"type","access":"protected","virtual":false,"description":"Internal Phaser Type value.","type":{"names":["number"]},"default":""},{"name":"physicsType","access":"","virtual":false,"description":"The const physics body type of this object.","type":{"names":["number"]},"default":""},{"name":"area","access":"","virtual":false,"description":"The area of the emitter. Particles can be randomly generated from anywhere within this rectangle.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"minParticleSpeed","access":"","virtual":false,"description":"The minimum possible velocity of a particle.","type":{"names":["Phaser.Point"]},"default":""},{"name":"maxParticleSpeed","access":"","virtual":false,"description":"The maximum possible velocity of a particle.","type":{"names":["Phaser.Point"]},"default":""},{"name":"minParticleScale","access":"","virtual":false,"description":"The minimum possible scale of a particle. This is applied to the X and Y axis. If you need to control each axis see minParticleScaleX.","type":{"names":["number"]},"default":1},{"name":"maxParticleScale","access":"","virtual":false,"description":"The maximum possible scale of a particle. This is applied to the X and Y axis. If you need to control each axis see maxParticleScaleX.","type":{"names":["number"]},"default":1},{"name":"scaleData","access":"","virtual":false,"description":"An array of the calculated scale easing data applied to particles with scaleRates > 0.","type":{"names":["array"]},"default":""},{"name":"minRotation","access":"","virtual":false,"description":"The minimum possible angular velocity of a particle.","type":{"names":["number"]},"default":""},{"name":"maxRotation","access":"","virtual":false,"description":"The maximum possible angular velocity of a particle.","type":{"names":["number"]},"default":360},{"name":"minParticleAlpha","access":"","virtual":false,"description":"The minimum possible alpha value of a particle.","type":{"names":["number"]},"default":1},{"name":"maxParticleAlpha","access":"","virtual":false,"description":"The maximum possible alpha value of a particle.","type":{"names":["number"]},"default":1},{"name":"alphaData","access":"","virtual":false,"description":"An array of the calculated alpha easing data applied to particles with alphaRates > 0.","type":{"names":["array"]},"default":""},{"name":"gravity","access":"","virtual":false,"description":"Sets the `body.gravity` of each particle sprite to this on launch.","type":{"names":["Phaser.Point"]},"default":""},{"name":"particleClass","access":"","virtual":false,"description":"For emitting your own particle class types. They must extend Phaser.Particle.","type":{"names":["any"]},"default":""},{"name":"particleDrag","access":"","virtual":false,"description":"The X and Y drag component of particles launched from the emitter.","type":{"names":["Phaser.Point"]},"default":""},{"name":"angularDrag","access":"","virtual":false,"description":"The angular drag component of particles launched from the emitter if they are rotating.","type":{"names":["number"]},"default":""},{"name":"frequency","access":"","virtual":false,"description":"How often a particle is emitted in ms (if emitter is started with Explode === false).","type":{"names":["number"]},"default":100},{"name":"lifespan","access":"","virtual":false,"description":"How long each particle lives once it is emitted in ms. Default is 2 seconds. Set lifespan to 'zero' for particles to live forever.","type":{"names":["number"]},"default":2000},{"name":"bounce","access":"","virtual":false,"description":"How much each particle should bounce on each axis. 1 = full bounce, 0 = no bounce.","type":{"names":["Phaser.Point"]},"default":""},{"name":"on","access":"","virtual":false,"description":"Determines whether the emitter is currently emitting particles. It is totally safe to directly toggle this.","type":{"names":["boolean"]},"default":""},{"name":"particleAnchor","access":"","virtual":false,"description":"When a particle is created its anchor will be set to match this Point object (defaults to x/y: 0.5 to aid in rotation)","type":{"names":["Phaser.Point"]},"default":""},{"name":"blendMode","access":"","virtual":false,"description":"The blendMode as set on the particle when emitted from the Emitter. Defaults to NORMAL. Needs browser capable of supporting canvas blend-modes (most not available in WebGL)","type":{"names":["number"]},"default":""},{"name":"emitX","access":"","virtual":false,"description":"The point the particles are emitted from.\rEmitter.x and Emitter.y control the containers location, which updates all current particles\rEmitter.emitX and Emitter.emitY control the emission location relative to the x/y position.","type":{"names":["number"]},"default":""},{"name":"emitY","access":"","virtual":false,"description":"The point the particles are emitted from.\rEmitter.x and Emitter.y control the containers location, which updates all current particles\rEmitter.emitX and Emitter.emitY control the emission location relative to the x/y position.","type":{"names":["number"]},"default":""},{"name":"autoScale","access":"","virtual":false,"description":"When a new Particle is emitted this controls if it will automatically scale in size. Use Emitter.setScale to configure.","type":{"names":["boolean"]},"default":""},{"name":"autoAlpha","access":"","virtual":false,"description":"When a new Particle is emitted this controls if it will automatically change alpha. Use Emitter.setAlpha to configure.","type":{"names":["boolean"]},"default":""},{"name":"particleBringToTop","access":"","virtual":false,"description":"If this is `true` then when the Particle is emitted it will be bought to the top of the Emitters display list.","type":{"names":["boolean"]},"default":""},{"name":"particleSendToBack","access":"","virtual":false,"description":"If this is `true` then when the Particle is emitted it will be sent to the back of the Emitters display list.","type":{"names":["boolean"]},"default":""},{"name":"_minParticleScale","access":"private","virtual":false,"description":"Internal particle scale var.","type":{"names":["Phaser.Point"]},"default":""},{"name":"_maxParticleScale","access":"private","virtual":false,"description":"Internal particle scale var.","type":{"names":["Phaser.Point"]},"default":""},{"name":"_quantity","access":"private","virtual":false,"description":"Internal helper for deciding how many particles to launch.","type":{"names":["number"]},"default":""},{"name":"_timer","access":"private","virtual":false,"description":"Internal helper for deciding when to launch particles or kill them.","type":{"names":["number"]},"default":""},{"name":"_counter","access":"private","virtual":false,"description":"Internal counter for figuring out how many particles to launch.","type":{"names":["number"]},"default":""},{"name":"_flowQuantity","access":"private","virtual":false,"description":"Internal counter for figuring out how many particles to launch per flow update.","type":{"names":["number"]},"default":""},{"name":"_flowTotal","access":"private","virtual":false,"description":"Internal counter for figuring out how many particles to launch in total.","type":{"names":["number"]},"default":""},{"name":"_explode","access":"private","virtual":false,"description":"Internal helper for the style of particle emission (all at once, or one at a time).","type":{"names":["boolean"]},"default":""},{"name":"_frames","access":"private","virtual":false,"description":"Internal helper for the particle frame.","type":{"names":["any"]},"default":""},{"name":"id","access":"","virtual":false,"description":"Gets the internal ID that represents this emitter.","type":{"names":["number"]},"default":""},{"name":"width","access":"","virtual":false,"description":"Gets or sets the width of the Emitter. This is the region in which a particle can be emitted.","type":{"names":["number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"Gets or sets the height of the Emitter. This is the region in which a particle can be emitted.","type":{"names":["number"]},"default":""},{"name":"x","access":"","virtual":false,"description":"Gets or sets the x position of the Emitter.","type":{"names":["number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"Gets or sets the y position of the Emitter.","type":{"names":["number"]},"default":""},{"name":"left","access":"","virtual":false,"description":"Gets the left position of the Emitter.","type":{"names":["number"]},"default":""},{"name":"right","access":"","virtual":false,"description":"Gets the right position of the Emitter.","type":{"names":["number"]},"default":""},{"name":"top","access":"","virtual":false,"description":"Gets the top position of the Emitter.","type":{"names":["number"]},"default":""},{"name":"bottom","access":"","virtual":false,"description":"Gets the bottom position of the Emitter.","type":{"names":["number"]},"default":""},{"name":"game","access":"protected","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"z","access":"","virtual":false,"description":"The z-depth value of this object within its parent container/Group - the World is a Group as well.\rThis value must be unique for each child in a Group.","type":{"names":["integer"]},"default":""},{"name":"alive","access":"","virtual":false,"description":"The alive property is useful for Groups that are children of other Groups and need to be included/excluded in checks like forEachAlive.","type":{"names":["boolean"]},"default":true},{"name":"exists","access":"","virtual":false,"description":"If exists is false the group will be excluded from collision checks and filters such as {@link forEachExists}. The group will not call `preUpdate` and `postUpdate` on its children and the children will not receive physics updates or camera/world boundary checks. The group will still be {@link Phaser.Group#visible visible} and will still call `update` on its children.","type":{"names":["boolean"]},"default":true},{"name":"ignoreDestroy","access":"","virtual":false,"description":"A group with `ignoreDestroy` set to `true` ignores all calls to its `destroy` method.","type":{"names":["boolean"]},"default":""},{"name":"pendingDestroy","access":"","virtual":false,"description":"A Group is that has `pendingDestroy` set to `true` is flagged to have its destroy method\rcalled on the next logic update.\rYou can set it directly to flag the Group to be destroyed on its next update.\r\rThis is extremely useful if you wish to destroy a Group from within one of its own callbacks\ror a callback of one of its children.","type":{"names":["boolean"]},"default":""},{"name":"classType","access":"","virtual":false,"description":"The type of objects that will be created when using {@link Phaser.Group#create create} or {@link Phaser.Group#createMultiple createMultiple}.\r\rAny object may be used but it should extend either Sprite or Image and accept the same constructor arguments:\rwhen a new object is created it is passed the following parameters to its constructor: `(game, x, y, key, frame)`.","type":{"names":["object"]},"default":"{@link Phaser.Sprite}"},{"name":"cursor","access":"","virtual":false,"description":"The current display object that the group cursor is pointing to, if any. (Can be set manually.)\r\rThe cursor is a way to iterate through the children in a Group using {@link Phaser.Group#next next} and {@link Phaser.Group#previous previous}.","type":{"names":["DisplayObject"]},"default":""},{"name":"inputEnableChildren","access":"","virtual":false,"description":"A Group with `inputEnableChildren` set to `true` will automatically call `inputEnabled = true` \ron any children _added_ to, or _created by_, this Group.\r\rIf there are children already in the Group at the time you set this property, they are not changed.","type":{"names":["boolean"]},"default":""},{"name":"onChildInputDown","access":"","virtual":false,"description":"This Signal is dispatched whenever a child of this Group emits an onInputDown signal as a result\rof having been interacted with by a Pointer. You can bind functions to this Signal instead of to\revery child Sprite.\r\rThis Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and\ra reference to the Pointer that caused it.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onChildInputUp","access":"","virtual":false,"description":"This Signal is dispatched whenever a child of this Group emits an onInputUp signal as a result\rof having been interacted with by a Pointer. You can bind functions to this Signal instead of to\revery child Sprite.\r\rThis Signal is sent 3 arguments: A reference to the Sprite that triggered the signal, \ra reference to the Pointer that caused it, and a boolean value `isOver` that tells you if the Pointer\ris still over the Sprite or not.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onChildInputOver","access":"","virtual":false,"description":"This Signal is dispatched whenever a child of this Group emits an onInputOver signal as a result\rof having been interacted with by a Pointer. You can bind functions to this Signal instead of to\revery child Sprite.\r\rThis Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and\ra reference to the Pointer that caused it.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onChildInputOut","access":"","virtual":false,"description":"This Signal is dispatched whenever a child of this Group emits an onInputOut signal as a result\rof having been interacted with by a Pointer. You can bind functions to this Signal instead of to\revery child Sprite.\r\rThis Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and\ra reference to the Pointer that caused it.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"enableBody","access":"","virtual":false,"description":"If true all Sprites created by, or added to this group, will have a physics body enabled on them.\r\rIf there are children already in the Group at the time you set this property, they are not changed.\r\rThe default body type is controlled with {@link Phaser.Group#physicsBodyType physicsBodyType}.","type":{"names":["boolean"]},"default":""},{"name":"enableBodyDebug","access":"","virtual":false,"description":"If true when a physics body is created (via {@link Phaser.Group#enableBody enableBody}) it will create a physics debug object as well.\r\rThis only works for P2 bodies.","type":{"names":["boolean"]},"default":""},{"name":"physicsBodyType","access":"","virtual":false,"description":"If {@link Phaser.Group#enableBody enableBody} is true this is the type of physics body that is created on new Sprites.\r\rThe valid values are {@link Phaser.Physics.ARCADE}, {@link Phaser.Physics.P2JS}, {@link Phaser.Physics.NINJA}, etc.","type":{"names":["integer"]},"default":""},{"name":"physicsSortDirection","access":"","virtual":false,"description":"If this Group contains Arcade Physics Sprites you can set a custom sort direction via this property.\r\rIt should be set to one of the Phaser.Physics.Arcade sort direction constants: \r\rPhaser.Physics.Arcade.SORT_NONE\rPhaser.Physics.Arcade.LEFT_RIGHT\rPhaser.Physics.Arcade.RIGHT_LEFT\rPhaser.Physics.Arcade.TOP_BOTTOM\rPhaser.Physics.Arcade.BOTTOM_TOP\r\rIf set to `null` the Group will use whatever Phaser.Physics.Arcade.sortDirection is set to. This is the default behavior.","type":{"names":["integer"]},"default":""},{"name":"onDestroy","access":"","virtual":false,"description":"This signal is dispatched when the group is destroyed.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"cursorIndex","access":"","virtual":false,"description":"The current index of the Group cursor. Advance it with Group.next.","type":{"names":["integer"]},"default":""},{"name":"fixedToCamera","access":"","virtual":false,"description":"A Group that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Group.cameraOffset.\r\rNote that the cameraOffset values are in addition to any parent in the display list.\rSo if this Group was in a Group that has x: 200, then this will be added to the cameraOffset.x","type":{"names":["boolean"]},"default":""},{"name":"cameraOffset","access":"","virtual":false,"description":"If this object is {@link Phaser.Group#fixedToCamera fixedToCamera} then this stores the x/y position offset relative to the top-left of the camera view.\rIf the parent of this Group is also `fixedToCamera` then the offset here is in addition to that and should typically be disabled.","type":{"names":["Phaser.Point"]},"default":""},{"name":"hash","access":"","virtual":false,"description":"The hash array is an array belonging to this Group into which you can add any of its children via Group.addToHash and Group.removeFromHash.\r\rOnly children of this Group can be added to and removed from the hash.\r\rThis hash is used automatically by Phaser Arcade Physics in order to perform non z-index based destructive sorting.\rHowever if you don't use Arcade Physics, or this isn't a physics enabled Group, then you can use the hash to perform your own\rsorting and filtering of Group children without touching their z-index (and therefore display draw order)","type":{"names":["array"]},"default":""},{"name":"_sortProperty","access":"private","virtual":false,"description":"The property on which children are sorted.","type":{"names":["string"]},"default":""},{"name":"total","access":"","virtual":false,"description":"Total number of existing children in the group.","type":{"names":["integer"]},"default":""},{"name":"length","access":"","virtual":false,"description":"Total number of children in this group, regardless of exists/alive status.","type":{"names":["integer"]},"default":""},{"name":"angle","access":"","virtual":false,"description":"The angle of rotation of the group container, in degrees.\r\rThis adjusts the group itself by modifying its local rotation transform.\r\rThis has no impact on the rotation/angle properties of the children, but it will update their worldTransform\rand on-screen orientation and position.","type":{"names":["number"]},"default":""},{"name":"centerX","access":"","virtual":false,"description":"The center x coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"centerY","access":"","virtual":false,"description":"The center y coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"rotation","access":"","virtual":false,"description":"The angle of rotation of the group container, in radians.\r\rThis will adjust the group container itself by modifying its rotation.\rThis will have no impact on the rotation value of its children, but it will update their worldTransform and on-screen position.","type":{"names":["number"]},"default":""},{"name":"visible","access":"","virtual":false,"description":"The visible state of the group. Non-visible Groups and all of their children are not rendered.","type":{"names":["boolean"]},"default":""},{"name":"alpha","access":"","virtual":false,"description":"The alpha value of the group container.","type":{"names":["number"]},"default":""},{"name":"children","access":"","virtual":false,"description":"[read-only] The array of children of this container.","type":{"names":["Array.<DisplayObject>"]},"default":""},{"name":"ignoreChildInput","access":"","virtual":false,"description":"If `ignoreChildInput`  is `false` it will allow this objects _children_ to be considered as valid for Input events.\n\nIf this property is `true` then the children will _not_ be considered as valid for Input events.\n\nNote that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.","type":{"names":["Boolean"]},"default":""},{"name":"position","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject, relative to its parent container.\n\nThe value of this property does not reflect any positioning happening further up the display list.\nTo obtain that value please see the `worldPosition` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"scale","access":"","virtual":false,"description":"The scale of this DisplayObject. A scale of 1:1 represents the DisplayObject\nat its default size. A value of 0.5 would scale this DisplayObject by half, and so on.\n\nThe value of this property does not reflect any scaling happening further up the display list.\nTo obtain that value please see the `worldScale` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"pivot","access":"","virtual":false,"description":"The pivot point of this DisplayObject that it rotates around. The values are expressed\nin pixel values.","type":{"names":["PIXIPoint"]},"default":""},{"name":"hitArea","access":"","virtual":false,"description":"This is the defined area that will pick up mouse / touch events. It is null by default.\nSetting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)","type":{"names":["Rectangle","Circle","Ellipse","Polygon"]},"default":""},{"name":"renderable","access":"","virtual":false,"description":"Should this DisplayObject be rendered by the renderer? An object with a renderable value of\n`false` is skipped during the render pass.","type":{"names":["Boolean"]},"default":""},{"name":"parent","access":"","virtual":false,"description":"The parent DisplayObjectContainer that this DisplayObject is a child of.\nAll DisplayObjects must belong to a parent in order to be rendered.\nThe root parent is the Stage object. This property is set automatically when the\nDisplayObject is added to, or removed from, a DisplayObjectContainer.","type":{"names":["PIXIDisplayObjectContainer"]},"default":""},{"name":"worldAlpha","access":"","virtual":false,"description":"The multiplied alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nThis value is the calculated total, based on the alpha values of all parents of this DisplayObjects \nin the display list.\n\nTo obtain, and set, the local alpha value, see the `alpha` property.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"worldTransform","access":"","virtual":false,"description":"The current transform of this DisplayObject.\n\nThis property contains the calculated total, based on the transforms of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIMatrix"]},"default":""},{"name":"worldPosition","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject within the world.\n\nThis property contains the calculated total, based on the positions of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldScale","access":"","virtual":false,"description":"The global scale of this DisplayObject.\n\nThis property contains the calculated total, based on the scales of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldRotation","access":"","virtual":false,"description":"The rotation, in radians, of this DisplayObject.\n\nThis property contains the calculated total, based on the rotations of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"filterArea","access":"","virtual":false,"description":"The rectangular area used by filters when rendering a shader for this DisplayObject.","type":{"names":["Rectangle"]},"default":""},{"name":"_sr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_cr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_bounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_currentBounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_mask","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_cacheAsBitmap","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"_cacheIsDirty","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"worldVisible","access":"","virtual":false,"description":"Indicates if this DisplayObject is visible, based on it, and all of its parents, `visible` property values.","type":{"names":["Boolean"]},"default":""},{"name":"mask","access":"","virtual":false,"description":"Sets a mask for this DisplayObject. A mask is an instance of a Graphics object.\nWhen applied it limits the visible area of this DisplayObject to the shape of the mask.\nUnder a Canvas renderer it uses shape clipping. Under a WebGL renderer it uses a Stencil Buffer.\nTo remove a mask, set this property to `null`.","type":{"names":["PIXIGraphics"]},"default":""},{"name":"filters","access":"","virtual":false,"description":"Sets the filters for this DisplayObject. This is a WebGL only feature, and is ignored by the Canvas\nRenderer. A filter is a shader applied to this DisplayObject. You can modify the placement of the filter\nusing `DisplayObject.filterArea`.\n\nTo remove filters, set this property to `null`.\n\nNote: You cannot have a filter set, and a MULTIPLY Blend Mode active, at the same time. Setting a \nfilter will reset this DisplayObjects blend mode to NORMAL.","type":{"names":["Array"]},"default":""},{"name":"cacheAsBitmap","access":"","virtual":false,"description":"Sets if this DisplayObject should be cached as a bitmap.\n\nWhen invoked it will take a snapshot of the DisplayObject, as it is at that moment, and store it \nin a RenderTexture. This is then used whenever this DisplayObject is rendered. It can provide a\nperformance benefit for complex, but static, DisplayObjects. I.e. those with lots of children.\n\nCached Bitmaps do not track their parents. If you update a property of this DisplayObject, it will not\nre-generate the cached bitmap automatically. To do that you need to call `DisplayObject.updateCache`.\n\nTo remove a cached bitmap, set this property to `null`.","type":{"names":["Boolean"]},"default":""}]},{"name":"Phaser.Particles","description":"Phaser.Particles is the Particle Manager for the game. It is called during the game update loop and in turn updates any Emitters attached to it.","constructor":{"name":"Particles","description":"Phaser.Particles is the Particle Manager for the game. It is called during the game update loop and in turn updates any Emitters attached to it.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""}]},"functions":[{"name":"add","description":"Adds a new Particle Emitter to the Particle Manager.","parameters":[{"name":"emitter","type":"Phaser.Emitter","description":"The emitter to be added to the particle manager.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Emitter","description":"The emitter that was added."}},{"name":"remove","description":"Removes an existing Particle Emitter from the Particle Manager.","parameters":[{"name":"emitter","type":"Phaser.Emitter","description":"The emitter to remove.","default":"","optional":"","nullable":""}]},{"name":"update","description":"Called by the core game loop. Updates all Emitters who have their exists value set to true.","parameters":[]}],"members":[{"name":"game","access":"","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"emitters","access":"","virtual":false,"description":"Internal emitters store.","type":{"names":["object"]},"default":""},{"name":"ID","access":"","virtual":false,"description":"-","type":{"names":["number"]},"default":""}]},{"name":"Phaser.Physics.Arcade.Body","description":"The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than\rthe Sprite itself. For example you can set the velocity, acceleration, bounce values etc all on the Body.","constructor":{"name":"Body","description":"The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than\rthe Sprite itself. For example you can set the velocity, acceleration, bounce values etc all on the Body.","parameters":[{"name":"sprite","type":"Phaser.Sprite","description":"The Sprite object this physics body belongs to.","default":"","optional":"","nullable":""}]},"functions":[{"name":"updateBounds","description":"Internal method.","parameters":[]},{"name":"preUpdate","description":"Internal method.","parameters":[]},{"name":"updateMovement","description":"Internal method.","parameters":[]},{"name":"stopMovement","description":"If this Body is moving as a result of a call to `moveTo` or `moveFrom` (i.e. it\rhas Body.isMoving true), then calling this method will stop the movement before\reither the duration or distance counters expire.\r\rThe `onMoveComplete` signal is dispatched.","parameters":[{"name":"stopVelocity","type":"boolean","description":"Should the Body.velocity be set to zero?","default":"","optional":true,"nullable":""}]},{"name":"postUpdate","description":"Internal method.","parameters":[]},{"name":"checkWorldBounds","description":"Internal method.","parameters":[],"returns":{"type":"boolean","description":"True if the Body collided with the world bounds, otherwise false."}},{"name":"moveFrom","description":"Note: This method is experimental, and may be changed or removed in a future release.\r\rThis method moves the Body in the given direction, for the duration specified.\rIt works by setting the velocity on the Body, and an internal timer, and then\rmonitoring the duration each frame. When the duration is up the movement is\rstopped and the `Body.onMoveComplete` signal is dispatched.\r\rMovement also stops if the Body collides or overlaps with any other Body.\r\rYou can control if the velocity should be reset to zero on collision, by using\rthe property `Body.stopVelocityOnCollide`.\r\rStop the movement at any time by calling `Body.stopMovement`.\r\rYou can optionally set a speed in pixels per second. If not specified it\rwill use the current `Body.speed` value. If this is zero, the function will return false.\r\rPlease note that due to browser timings you should allow for a variance in \rwhen the duration will actually expire. Depending on system it may be as much as\r+- 50ms. Also this method doesn't take into consideration any other forces acting\ron the Body, such as Gravity, drag or maxVelocity, all of which may impact the\rmovement.","parameters":[{"name":"duration","type":"integer","description":"The duration of the movement, in ms.","default":"","optional":"","nullable":""},{"name":"speed","type":"integer","description":"The speed of the movement, in pixels per second. If not provided `Body.speed` is used.","default":"","optional":true,"nullable":""},{"name":"direction","type":"integer","description":"The angle of movement. If not provided `Body.angle` is used.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the movement successfully started, otherwise false."}},{"name":"moveTo","description":"Note: This method is experimental, and may be changed or removed in a future release.\r\rThis method moves the Body in the given direction, for the duration specified.\rIt works by setting the velocity on the Body, and an internal distance counter.\rThe distance is monitored each frame. When the distance equals the distance\rspecified in this call, the movement is stopped, and the `Body.onMoveComplete` \rsignal is dispatched.\r\rMovement also stops if the Body collides or overlaps with any other Body.\r\rYou can control if the velocity should be reset to zero on collision, by using\rthe property `Body.stopVelocityOnCollide`.\r\rStop the movement at any time by calling `Body.stopMovement`.\r\rPlease note that due to browser timings you should allow for a variance in \rwhen the distance will actually expire.\r\rNote: This method doesn't take into consideration any other forces acting\ron the Body, such as Gravity, drag or maxVelocity, all of which may impact the\rmovement.","parameters":[{"name":"duration","type":"integer","description":"The duration of the movement, in ms.","default":"","optional":"","nullable":""},{"name":"distance","type":"integer","description":"The distance, in pixels, the Body will move.","default":"","optional":"","nullable":""},{"name":"direction","type":"integer","description":"The angle of movement. If not provided `Body.angle` is used.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the movement successfully started, otherwise false."}},{"name":"setSize","description":"You can modify the size of the physics Body to be any dimension you need.\rThis allows you to make it smaller, or larger, than the parent Sprite.\rYou can also control the x and y offset of the Body. This is the position of the\rBody relative to the top-left of the Sprite _texture_.\r\rFor example: If you have a Sprite with a texture that is 80x100 in size,\rand you want the physics body to be 32x32 pixels in the middle of the texture, you would do:\r\r`setSize(32 / Math.abs(this.scale.x), 32 / Math.abs(this.scale.y), 24, 34)`\r\rWhere the first two parameters are the new Body size (32x32 pixels) relative to the Sprite's scale.\r24 is the horizontal offset of the Body from the top-left of the Sprites texture, and 34\ris the vertical offset.\r\rIf you've scaled a Sprite by altering its `width`, `height`, or `scale` and you want to\rposition the Body relative to the Sprite's dimensions (which will differ from its texture's\rdimensions), you should divide these arguments by the Sprite's current scale:\r\r`setSize(32 / sprite.scale.x, 32 / sprite.scale.y)`\r\rCalling `setSize` on a Body that has already had `setCircle` will reset all of the Circle\rproperties, making this Body rectangular again.","parameters":[{"name":"width","type":"number","description":"The width of the Body.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height of the Body.","default":"","optional":"","nullable":""},{"name":"offsetX","type":"number","description":"The X offset of the Body from the top-left of the Sprite's texture.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"number","description":"The Y offset of the Body from the top-left of the Sprite's texture.","default":"","optional":true,"nullable":""}]},{"name":"setCircle","description":"Sets this Body as using a circle, of the given radius, for all collision detection instead of a rectangle.\rThe radius is given in pixels and is the distance from the center of the circle to the edge.\r\rYou can also control the x and y offset, which is the position of the Body relative to the top-left of the Sprite.\r\rTo change a Body back to being rectangular again call `Body.setSize`.\r\rNote: Circular collision only happens with other Arcade Physics bodies, it does not\rwork against tile maps, where rectangular collision is the only method supported.","parameters":[{"name":"radius","type":"number","description":"The radius of the Body in pixels. Pass a value of zero / undefined, to stop the Body using a circle for collision.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"number","description":"The X offset of the Body from the Sprite position.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"number","description":"The Y offset of the Body from the Sprite position.","default":"","optional":true,"nullable":""}]},{"name":"reset","description":"Resets all Body values (velocity, acceleration, rotation, etc)","parameters":[{"name":"x","type":"number","description":"The new x position of the Body.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The new y position of the Body.","default":"","optional":"","nullable":""}]},{"name":"getBounds","description":"Returns the bounds of this physics body.\r\rOnly used internally by the World collision methods.","parameters":[{"name":"obj","type":"object","description":"The object in which to set the bounds values.","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"The object that was given to this method."}},{"name":"hitTest","description":"Tests if a world point lies within this Body.","parameters":[{"name":"x","type":"number","description":"The world x coordinate to test.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The world y coordinate to test.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the given coordinates are inside this Body, otherwise false."}},{"name":"onFloor","description":"Returns true if the bottom of this Body is in contact with either the world bounds or a tile.","parameters":[],"returns":{"type":"boolean","description":"True if in contact with either the world bounds or a tile."}},{"name":"onCeiling","description":"Returns true if the top of this Body is in contact with either the world bounds or a tile.","parameters":[],"returns":{"type":"boolean","description":"True if in contact with either the world bounds or a tile."}},{"name":"onWall","description":"Returns true if either side of this Body is in contact with either the world bounds or a tile.","parameters":[],"returns":{"type":"boolean","description":"True if in contact with either the world bounds or a tile."}},{"name":"deltaAbsX","description":"Returns the absolute delta x value.","parameters":[],"returns":{"type":"number","description":"The absolute delta value."}},{"name":"deltaAbsY","description":"Returns the absolute delta y value.","parameters":[],"returns":{"type":"number","description":"The absolute delta value."}},{"name":"deltaX","description":"Returns the delta x value. The difference between Body.x now and in the previous step.","parameters":[],"returns":{"type":"number","description":"The delta value. Positive if the motion was to the right, negative if to the left."}},{"name":"deltaY","description":"Returns the delta y value. The difference between Body.y now and in the previous step.","parameters":[],"returns":{"type":"number","description":"The delta value. Positive if the motion was downwards, negative if upwards."}},{"name":"deltaZ","description":"Returns the delta z value. The difference between Body.rotation now and in the previous step.","parameters":[],"returns":{"type":"number","description":"The delta value. Positive if the motion was clockwise, negative if anti-clockwise."}},{"name":"destroy","description":"Destroys this Body.\r\rFirst it calls Group.removeFromHash if the Game Object this Body belongs to is part of a Group.\rThen it nulls the Game Objects body reference, and nulls this Body.sprite reference.","parameters":[]},{"name":"render","description":"Render Sprite Body.","parameters":[{"name":"context","type":"object","description":"The context to render to.","default":"","optional":"","nullable":""},{"name":"body","type":"Phaser.Physics.Arcade.Body","description":"The Body to render the info of.","default":"","optional":"","nullable":""},{"name":"color","type":"string","description":"color of the debug info to be rendered. (format is css color string).","default":"'rgba(0,255,0,0.4)'","optional":true,"nullable":""},{"name":"filled","type":"boolean","description":"Render the objected as a filled (default, true) or a stroked (false)","default":true,"optional":true,"nullable":""}]},{"name":"renderBodyInfo","description":"Render Sprite Body Physics Data as text.","parameters":[{"name":"body","type":"Phaser.Physics.Arcade.Body","description":"The Body to render the info of.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"X position of the debug info to be rendered.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the debug info to be rendered.","default":"","optional":"","nullable":""},{"name":"color","type":"string","description":"color of the debug info to be rendered. (format is css color string).","default":"'rgb(255,255,255)'","optional":true,"nullable":""}]}],"members":[{"name":"sprite","access":"","virtual":false,"description":"Reference to the parent Sprite.","type":{"names":["Phaser.Sprite"]},"default":""},{"name":"game","access":"","virtual":false,"description":"Local reference to game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"type","access":"","virtual":false,"description":"The type of physics system this body belongs to.","type":{"names":["number"]},"default":""},{"name":"enable","access":"","virtual":false,"description":"A disabled body won't be checked for any form of collision or overlap or have its pre/post updates run.","type":{"names":["boolean"]},"default":true},{"name":"isCircle","access":"","virtual":false,"description":"If `true` this Body is using circular collision detection. If `false` it is using rectangular.\rUse `Body.setCircle` to control the collision shape this Body uses.","type":{"names":["boolean"]},"default":""},{"name":"radius","access":"","virtual":false,"description":"The radius of the circular collision shape this Body is using if Body.setCircle has been enabled.\rIf you wish to change the radius then call `setCircle` again with the new value.\rIf you wish to stop the Body using a circle then call `setCircle` with a radius of zero (or undefined).","type":{"names":["number"]},"default":""},{"name":"offset","access":"","virtual":false,"description":"The offset of the Physics Body from the Sprite x/y position.","type":{"names":["Phaser.Point"]},"default":""},{"name":"position","access":"","virtual":false,"description":"The position of the physics body.","type":{"names":["Phaser.Point"]},"default":""},{"name":"prev","access":"","virtual":false,"description":"The previous position of the physics body.","type":{"names":["Phaser.Point"]},"default":""},{"name":"allowRotation","access":"","virtual":false,"description":"Allow this Body to be rotated? (via angularVelocity, etc)","type":{"names":["boolean"]},"default":true},{"name":"rotation","access":"","virtual":false,"description":"The Body's rotation in degrees, as calculated by its angularVelocity and angularAcceleration. Please understand that the collision Body\ritself never rotates, it is always axis-aligned. However these values are passed up to the parent Sprite and updates its rotation.","type":{"names":["number"]},"default":""},{"name":"preRotation","access":"","virtual":false,"description":"The previous rotation of the physics body.","type":{"names":["number"]},"default":""},{"name":"width","access":"","virtual":false,"description":"The calculated width of the physics body.","type":{"names":["number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The calculated height of the physics body.","type":{"names":["number"]},"default":""},{"name":"sourceWidth","access":"","virtual":false,"description":"The un-scaled original size.","type":{"names":["number"]},"default":""},{"name":"sourceHeight","access":"","virtual":false,"description":"The un-scaled original size.","type":{"names":["number"]},"default":""},{"name":"halfWidth","access":"","virtual":false,"description":"The calculated width / 2 of the physics body.","type":{"names":["number"]},"default":""},{"name":"halfHeight","access":"","virtual":false,"description":"The calculated height / 2 of the physics body.","type":{"names":["number"]},"default":""},{"name":"center","access":"","virtual":false,"description":"The center coordinate of the Physics Body.","type":{"names":["Phaser.Point"]},"default":""},{"name":"velocity","access":"","virtual":false,"description":"The velocity, or rate of change in speed of the Body. Measured in pixels per second.","type":{"names":["Phaser.Point"]},"default":""},{"name":"newVelocity","access":"","virtual":false,"description":"The new velocity. Calculated during the Body.preUpdate and applied to its position.","type":{"names":["Phaser.Point"]},"default":""},{"name":"deltaMax","access":"","virtual":false,"description":"The Sprite position is updated based on the delta x/y values. You can set a cap on those (both +-) using deltaMax.","type":{"names":["Phaser.Point"]},"default":""},{"name":"acceleration","access":"","virtual":false,"description":"The acceleration is the rate of change of the velocity. Measured in pixels per second squared.","type":{"names":["Phaser.Point"]},"default":""},{"name":"drag","access":"","virtual":false,"description":"The drag applied to the motion of the Body.","type":{"names":["Phaser.Point"]},"default":""},{"name":"allowGravity","access":"","virtual":false,"description":"Allow this Body to be influenced by gravity? Either world or local.","type":{"names":["boolean"]},"default":true},{"name":"gravity","access":"","virtual":false,"description":"A local gravity applied to this Body. If non-zero this over rides any world gravity, unless Body.allowGravity is set to false.","type":{"names":["Phaser.Point"]},"default":""},{"name":"bounce","access":"","virtual":false,"description":"The elasticity of the Body when colliding. bounce.x/y = 1 means full rebound, bounce.x/y = 0.5 means 50% rebound velocity.","type":{"names":["Phaser.Point"]},"default":""},{"name":"worldBounce","access":"","virtual":false,"description":"The elasticity of the Body when colliding with the World bounds.\rBy default this property is `null`, in which case `Body.bounce` is used instead. Set this property\rto a Phaser.Point object in order to enable a World bounds specific bounce value.","type":{"names":["Phaser.Point"]},"default":""},{"name":"onWorldBounds","access":"","virtual":false,"description":"A Signal that is dispatched when this Body collides with the world bounds.\rDue to the potentially high volume of signals this could create it is disabled by default.\rTo use this feature set this property to a Phaser.Signal: `sprite.body.onWorldBounds = new Phaser.Signal()`\rand it will be called when a collision happens, passing five arguments:\r`onWorldBounds(sprite, up, down, left, right)`\rwhere the Sprite is a reference to the Sprite that owns this Body, and the other arguments are booleans\rindicating on which side of the world the Body collided.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onCollide","access":"","virtual":false,"description":"A Signal that is dispatched when this Body collides with another Body.\r\rYou still need to call `game.physics.arcade.collide` in your `update` method in order\rfor this signal to be dispatched.\r\rUsually you'd pass a callback to the `collide` method, but this signal provides for\ra different level of notification.\r\rDue to the potentially high volume of signals this could create it is disabled by default.\r\rTo use this feature set this property to a Phaser.Signal: `sprite.body.onCollide = new Phaser.Signal()`\rand it will be called when a collision happens, passing two arguments: the sprites which collided.\rThe first sprite in the argument is always the owner of this Body.\r\rIf two Bodies with this Signal set collide, both will dispatch the Signal.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onOverlap","access":"","virtual":false,"description":"A Signal that is dispatched when this Body overlaps with another Body.\r\rYou still need to call `game.physics.arcade.overlap` in your `update` method in order\rfor this signal to be dispatched.\r\rUsually you'd pass a callback to the `overlap` method, but this signal provides for\ra different level of notification.\r\rDue to the potentially high volume of signals this could create it is disabled by default.\r\rTo use this feature set this property to a Phaser.Signal: `sprite.body.onOverlap = new Phaser.Signal()`\rand it will be called when a collision happens, passing two arguments: the sprites which collided.\rThe first sprite in the argument is always the owner of this Body.\r\rIf two Bodies with this Signal set collide, both will dispatch the Signal.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"maxVelocity","access":"","virtual":false,"description":"The maximum velocity in pixels per second sq. that the Body can reach.","type":{"names":["Phaser.Point"]},"default":""},{"name":"friction","access":"","virtual":false,"description":"The amount of movement that will occur if another object 'rides' this one.","type":{"names":["Phaser.Point"]},"default":""},{"name":"angularVelocity","access":"","virtual":false,"description":"The angular velocity controls the rotation speed of the Body. It is measured in degrees per second.","type":{"names":["number"]},"default":""},{"name":"angularAcceleration","access":"","virtual":false,"description":"The angular acceleration is the rate of change of the angular velocity. Measured in degrees per second squared.","type":{"names":["number"]},"default":""},{"name":"angularDrag","access":"","virtual":false,"description":"The drag applied during the rotation of the Body. Measured in degrees per second squared.","type":{"names":["number"]},"default":""},{"name":"maxAngular","access":"","virtual":false,"description":"The maximum angular velocity in degrees per second that the Body can reach.","type":{"names":["number"]},"default":1000},{"name":"mass","access":"","virtual":false,"description":"The mass of the Body. When two bodies collide their mass is used in the calculation to determine the exchange of velocity.","type":{"names":["number"]},"default":1},{"name":"angle","access":"","virtual":false,"description":"The angle of the Body's velocity in radians.","type":{"names":["number"]},"default":""},{"name":"speed","access":"","virtual":false,"description":"The speed of the Body as calculated by its velocity.","type":{"names":["number"]},"default":""},{"name":"facing","access":"","virtual":false,"description":"A const reference to the direction the Body is traveling or facing.","type":{"names":["number"]},"default":""},{"name":"immovable","access":"","virtual":false,"description":"An immovable Body will not receive any impacts from other bodies.","type":{"names":["boolean"]},"default":""},{"name":"moves","access":"","virtual":false,"description":"If you have a Body that is being moved around the world via a tween or a Group motion, but its local x/y position never\ractually changes, then you should set Body.moves = false. Otherwise it will most likely fly off the screen.\rIf you want the physics system to move the body around, then set moves to true. Set to true to allow the Physics system to move this Body, otherwise false to move it manually.","type":{"names":["boolean"]},"default":true},{"name":"customSeparateX","access":"","virtual":false,"description":"This flag allows you to disable the custom x separation that takes place by Physics.Arcade.separate.\rUsed in combination with your own collision processHandler you can create whatever type of collision response you need. Use a custom separation system or the built-in one?","type":{"names":["boolean"]},"default":""},{"name":"customSeparateY","access":"","virtual":false,"description":"This flag allows you to disable the custom y separation that takes place by Physics.Arcade.separate.\rUsed in combination with your own collision processHandler you can create whatever type of collision response you need. Use a custom separation system or the built-in one?","type":{"names":["boolean"]},"default":""},{"name":"overlapX","access":"","virtual":false,"description":"When this body collides with another, the amount of overlap is stored here. The amount of horizontal overlap during the collision.","type":{"names":["number"]},"default":""},{"name":"overlapY","access":"","virtual":false,"description":"When this body collides with another, the amount of overlap is stored here. The amount of vertical overlap during the collision.","type":{"names":["number"]},"default":""},{"name":"overlapR","access":"","virtual":false,"description":"If `Body.isCircle` is true, and this body collides with another circular body, the amount of overlap is stored here. The amount of overlap during the collision.","type":{"names":["number"]},"default":""},{"name":"embedded","access":"","virtual":false,"description":"If a body is overlapping with another body, but neither of them are moving (maybe they spawned on-top of each other?) this is set to true. Body embed value.","type":{"names":["boolean"]},"default":""},{"name":"collideWorldBounds","access":"","virtual":false,"description":"A Body can be set to collide against the World bounds automatically and rebound back into the World if this is set to true. Otherwise it will leave the World. Should the Body collide with the World bounds?","type":{"names":["boolean"]},"default":""},{"name":"checkCollision","access":"","virtual":false,"description":"Set the checkCollision properties to control which directions collision is processed for this Body.\rFor example checkCollision.up = false means it won't collide when the collision happened while moving up.\rIf you need to disable a Body entirely, use `body.enable = false`, this will also disable motion.\rIf you need to disable just collision and/or overlap checks, but retain motion, set `checkCollision.none = true`. An object containing allowed collision.","type":{"names":["object"]},"default":""},{"name":"touching","access":"","virtual":false,"description":"This object is populated with boolean values when the Body collides with another.\rtouching.up = true means the collision happened to the top of this Body for example. An object containing touching results.","type":{"names":["object"]},"default":""},{"name":"wasTouching","access":"","virtual":false,"description":"This object is populated with previous touching values from the bodies previous collision. An object containing previous touching results.","type":{"names":["object"]},"default":""},{"name":"blocked","access":"","virtual":false,"description":"This object is populated with boolean values when the Body collides with the World bounds or a Tile.\rFor example if blocked.up is true then the Body cannot move up. An object containing on which faces this Body is blocked from moving, if any.","type":{"names":["object"]},"default":""},{"name":"tilePadding","access":"","virtual":false,"description":"If this is an especially small or fast moving object then it can sometimes skip over tilemap collisions if it moves through a tile in a step.\rSet this padding value to add extra padding to its bounds. tilePadding.x applied to its width, y to its height. Extra padding to be added to this sprite's dimensions when checking for tile collision.","type":{"names":["Phaser.Point"]},"default":""},{"name":"dirty","access":"","virtual":false,"description":"If this Body in a preUpdate (true) or postUpdate (false) state?","type":{"names":["boolean"]},"default":""},{"name":"skipQuadTree","access":"","virtual":false,"description":"If true and you collide this Sprite against a Group, it will disable the collision check from using a QuadTree.","type":{"names":["boolean"]},"default":""},{"name":"syncBounds","access":"","virtual":false,"description":"If true the Body will check itself against the Sprite.getBounds() dimensions and adjust its width and height accordingly.\rIf false it will compare its dimensions against the Sprite scale instead, and adjust its width height if the scale has changed.\rTypically you would need to enable syncBounds if your sprite is the child of a responsive display object such as a FlexLayer, \ror in any situation where the Sprite scale doesn't change, but its parents scale is effecting the dimensions regardless.","type":{"names":["boolean"]},"default":""},{"name":"isMoving","access":"","virtual":false,"description":"Set by the `moveTo` and `moveFrom` methods.","type":{"names":["boolean"]},"default":""},{"name":"stopVelocityOnCollide","access":"","virtual":false,"description":"Set by the `moveTo` and `moveFrom` methods.","type":{"names":["boolean"]},"default":""},{"name":"moveTimer","access":"private","virtual":false,"description":"Internal time used by the `moveTo` and `moveFrom` methods.","type":{"names":["integer"]},"default":""},{"name":"moveDistance","access":"private","virtual":false,"description":"Internal distance value, used by the `moveTo` and `moveFrom` methods.","type":{"names":["integer"]},"default":""},{"name":"moveDuration","access":"private","virtual":false,"description":"Internal duration value, used by the `moveTo` and `moveFrom` methods.","type":{"names":["integer"]},"default":""},{"name":"moveTarget","access":"private","virtual":false,"description":"Set by the `moveTo` method, and updated each frame.","type":{"names":["Phaser.Line"]},"default":""},{"name":"moveEnd","access":"private","virtual":false,"description":"Set by the `moveTo` method, and updated each frame.","type":{"names":["Phaser.Point"]},"default":""},{"name":"onMoveComplete","access":"","virtual":false,"description":"Listen for the completion of `moveTo` or `moveFrom` events.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"movementCallback","access":"","virtual":false,"description":"Optional callback. If set, invoked during the running of `moveTo` or `moveFrom` events.","type":{"names":["function"]},"default":""},{"name":"movementCallbackContext","access":"","virtual":false,"description":"Context in which to call the movementCallback.","type":{"names":["object"]},"default":""},{"name":"_reset","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["boolean"]},"default":""},{"name":"_sx","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["number"]},"default":""},{"name":"_sy","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["number"]},"default":""},{"name":"_dx","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["number"]},"default":""},{"name":"_dy","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["number"]},"default":""},{"name":"left","access":"","virtual":false,"description":"The x position of the Body. The same as `Body.x`.","type":{"names":["number"]},"default":""},{"name":"right","access":"","virtual":false,"description":"The right value of this Body (same as Body.x + Body.width)","type":{"names":["number"]},"default":""},{"name":"top","access":"","virtual":false,"description":"The y position of the Body. The same as `Body.y`.","type":{"names":["number"]},"default":""},{"name":"bottom","access":"","virtual":false,"description":"The bottom value of this Body (same as Body.y + Body.height)","type":{"names":["number"]},"default":""},{"name":"x","access":"","virtual":false,"description":"The x position.","type":{"names":["number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The y position.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.Physics.Arcade.TilemapCollision","description":"The Arcade Physics Tile map collision methods.","constructor":{"name":"TilemapCollision","description":"The Arcade Physics Tile map collision methods.","parameters":[]},"functions":[],"members":[{"name":"TILE_BIAS","access":"","virtual":false,"description":"A value added to the delta values during collision with tiles. Adjust this if you get tunneling.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.Physics.Arcade","description":"The Arcade Physics world. Contains Arcade Physics related collision, overlap and motion methods.","constructor":{"name":"Arcade","description":"The Arcade Physics world. Contains Arcade Physics related collision, overlap and motion methods.","parameters":[{"name":"game","type":"Phaser.Game","description":"reference to the current game instance.","default":"","optional":"","nullable":""}]},"functions":[{"name":"setBounds","description":"Updates the size of this physics world.","parameters":[{"name":"x","type":"number","description":"Top left most corner of the world.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Top left most corner of the world.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"New width of the world. Can never be smaller than the Game.width.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"New height of the world. Can never be smaller than the Game.height.","default":"","optional":"","nullable":""}]},{"name":"setBoundsToWorld","description":"Updates the size of this physics world to match the size of the game world.","parameters":[]},{"name":"enable","description":"This will create an Arcade Physics body on the given game object or array of game objects.\rA game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.","parameters":[{"name":"object","type":["object","array","Phaser.Group"],"description":"The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property.","default":"","optional":"","nullable":""},{"name":"children","type":"boolean","description":"Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go.","default":true,"optional":true,"nullable":""}]},{"name":"enableBody","description":"Creates an Arcade Physics body on the given game object.\r\rA game object can only have 1 physics body active at any one time, and it can't be changed until the body is nulled.\r\rWhen you add an Arcade Physics body to an object it will automatically add the object into its parent Groups hash array.","parameters":[{"name":"object","type":"object","description":"The game object to create the physics body on. A body will only be created if this object has a null `body` property.","default":"","optional":"","nullable":""}]},{"name":"updateMotion","description":"Called automatically by a Physics body, it updates all motion related values on the Body unless `World.isPaused` is `true`.","parameters":[{"name":"The","type":"Phaser.Physics.Arcade.Body","description":"Body object to be updated.","default":"","optional":"","nullable":""}]},{"name":"computeVelocity","description":"A tween-like function that takes a starting velocity and some other factors and returns an altered velocity.\rBased on a function in Flixel by @ADAMATOMIC","parameters":[{"name":"axis","type":"number","description":"0 for nothing, 1 for horizontal, 2 for vertical.","default":"","optional":"","nullable":""},{"name":"body","type":"Phaser.Physics.Arcade.Body","description":"The Body object to be updated.","default":"","optional":"","nullable":""},{"name":"velocity","type":"number","description":"Any component of velocity (e.g. 20).","default":"","optional":"","nullable":""},{"name":"acceleration","type":"number","description":"Rate at which the velocity is changing.","default":"","optional":"","nullable":""},{"name":"drag","type":"number","description":"Really kind of a deceleration, this is how much the velocity changes if Acceleration is not set.","default":"","optional":"","nullable":""},{"name":"max","type":"number","description":"An absolute value cap for the velocity.","default":10000,"optional":true,"nullable":""}],"returns":{"type":"number","description":"The altered Velocity value."}},{"name":"overlap","description":"Checks for overlaps between two game objects. The objects can be Sprites, Groups or Emitters.\rYou can perform Sprite vs. Sprite, Sprite vs. Group and Group vs. Group overlap checks.\rUnlike collide the objects are NOT automatically separated or have any physics applied, they merely test for overlap results.\rBoth the first and second parameter can be arrays of objects, of differing types.\rIf two arrays are passed, the contents of the first parameter will be tested against all contents of the 2nd parameter.\rNOTE: This function is not recursive, and will not test against children of objects passed (i.e. Groups within Groups).","parameters":[{"name":"object1","type":["Phaser.Sprite","Phaser.Group","Phaser.Particles.Emitter","array"],"description":"The first object or array of objects to check. Can be Phaser.Sprite, Phaser.Group or Phaser.Particles.Emitter.","default":"","optional":"","nullable":""},{"name":"object2","type":["Phaser.Sprite","Phaser.Group","Phaser.Particles.Emitter","array"],"description":"The second object or array of objects to check. Can be Phaser.Sprite, Phaser.Group or Phaser.Particles.Emitter.","default":"","optional":"","nullable":""},{"name":"overlapCallback","type":"function","description":"An optional callback function that is called if the objects overlap. The two objects will be passed to this function in the same order in which you specified them, unless you are checking Group vs. Sprite, in which case Sprite will always be the first parameter.","default":"","optional":true,"nullable":""},{"name":"processCallback","type":"function","description":"A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then `overlapCallback` will only be called if this callback returns `true`.","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which to run the callbacks.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if an overlap occurred otherwise false."}},{"name":"collide","description":"Checks for collision between two game objects. You can perform Sprite vs. Sprite, Sprite vs. Group, Group vs. Group, Sprite vs. Tilemap Layer or Group vs. Tilemap Layer collisions.\rBoth the first and second parameter can be arrays of objects, of differing types.\rIf two arrays are passed, the contents of the first parameter will be tested against all contents of the 2nd parameter.\rThe objects are also automatically separated. If you don't require separation then use ArcadePhysics.overlap instead.\rAn optional processCallback can be provided. If given this function will be called when two sprites are found to be colliding. It is called before any separation takes place,\rgiving you the chance to perform additional checks. If the function returns true then the collision and separation is carried out. If it returns false it is skipped.\rThe collideCallback is an optional function that is only called if two sprites collide. If a processCallback has been set then it needs to return true for collideCallback to be called.\rNOTE: This function is not recursive, and will not test against children of objects passed (i.e. Groups or Tilemaps within other Groups).","parameters":[{"name":"object1","type":["Phaser.Sprite","Phaser.Group","Phaser.Particles.Emitter","Phaser.TilemapLayer","array"],"description":"The first object or array of objects to check. Can be Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter, or Phaser.TilemapLayer.","default":"","optional":"","nullable":""},{"name":"object2","type":["Phaser.Sprite","Phaser.Group","Phaser.Particles.Emitter","Phaser.TilemapLayer","array"],"description":"The second object or array of objects to check. Can be Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter or Phaser.TilemapLayer.","default":"","optional":"","nullable":""},{"name":"collideCallback","type":"function","description":"An optional callback function that is called if the objects collide. The two objects will be passed to this function in the same order in which you specified them, unless you are colliding Group vs. Sprite, in which case Sprite will always be the first parameter.","default":"","optional":true,"nullable":""},{"name":"processCallback","type":"function","description":"A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then collision will only happen if processCallback returns true. The two objects will be passed to this function in the same order in which you specified them, unless you are colliding Group vs. Sprite, in which case Sprite will always be the first parameter.","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which to run the callbacks.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if a collision occurred otherwise false."}},{"name":"sortLeftRight","description":"A Sort function for sorting two bodies based on a LEFT to RIGHT sort direction.\r\rThis is called automatically by World.sort","parameters":[{"name":"a","type":"Phaser.Sprite","description":"The first Sprite to test. The Sprite must have an Arcade Physics Body.","default":"","optional":"","nullable":""},{"name":"b","type":"Phaser.Sprite","description":"The second Sprite to test. The Sprite must have an Arcade Physics Body.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"A negative value if `a > b`, a positive value if `a < b` or 0 if `a === b` or the bodies are invalid."}},{"name":"sortRightLeft","description":"A Sort function for sorting two bodies based on a RIGHT to LEFT sort direction.\r\rThis is called automatically by World.sort","parameters":[{"name":"a","type":"Phaser.Sprite","description":"The first Sprite to test. The Sprite must have an Arcade Physics Body.","default":"","optional":"","nullable":""},{"name":"b","type":"Phaser.Sprite","description":"The second Sprite to test. The Sprite must have an Arcade Physics Body.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"A negative value if `a > b`, a positive value if `a < b` or 0 if `a === b` or the bodies are invalid."}},{"name":"sortTopBottom","description":"A Sort function for sorting two bodies based on a TOP to BOTTOM sort direction.\r\rThis is called automatically by World.sort","parameters":[{"name":"a","type":"Phaser.Sprite","description":"The first Sprite to test. The Sprite must have an Arcade Physics Body.","default":"","optional":"","nullable":""},{"name":"b","type":"Phaser.Sprite","description":"The second Sprite to test. The Sprite must have an Arcade Physics Body.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"A negative value if `a > b`, a positive value if `a < b` or 0 if `a === b` or the bodies are invalid."}},{"name":"sortBottomTop","description":"A Sort function for sorting two bodies based on a BOTTOM to TOP sort direction.\r\rThis is called automatically by World.sort","parameters":[{"name":"a","type":"Phaser.Sprite","description":"The first Sprite to test. The Sprite must have an Arcade Physics Body.","default":"","optional":"","nullable":""},{"name":"b","type":"Phaser.Sprite","description":"The second Sprite to test. The Sprite must have an Arcade Physics Body.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"A negative value if `a > b`, a positive value if `a < b` or 0 if `a === b` or the bodies are invalid."}},{"name":"sort","description":"This method will sort a Groups hash array.\r\rIf the Group has `physicsSortDirection` set it will use the sort direction defined.\r\rOtherwise if the sortDirection parameter is undefined, or Group.physicsSortDirection is null, it will use Phaser.Physics.Arcade.sortDirection.\r\rBy changing Group.physicsSortDirection you can customise each Group to sort in a different order.","parameters":[{"name":"group","type":"Phaser.Group","description":"The Group to sort.","default":"","optional":"","nullable":""},{"name":"sortDirection","type":"integer","description":"The sort direction used to sort this Group.","default":"","optional":true,"nullable":""}]},{"name":"collideHandler","description":"Internal collision handler.","parameters":[{"name":"object1","type":["Phaser.Sprite","Phaser.Group","Phaser.Particles.Emitter","Phaser.TilemapLayer"],"description":"The first object to check. Can be an instance of Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter, or Phaser.TilemapLayer.","default":"","optional":"","nullable":""},{"name":"object2","type":["Phaser.Sprite","Phaser.Group","Phaser.Particles.Emitter","Phaser.TilemapLayer"],"description":"The second object to check. Can be an instance of Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter or Phaser.TilemapLayer. Can also be an array of objects to check.","default":"","optional":"","nullable":""},{"name":"collideCallback","type":"function","description":"An optional callback function that is called if the objects collide. The two objects will be passed to this function in the same order in which you specified them.","default":"","optional":"","nullable":""},{"name":"processCallback","type":"function","description":"A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then collision will only happen if processCallback returns true. The two objects will be passed to this function in the same order in which you specified them.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which to run the callbacks.","default":"","optional":"","nullable":""},{"name":"overlapOnly","type":"boolean","description":"Just run an overlap or a full collision.","default":"","optional":"","nullable":""}]},{"name":"collideSpriteVsSprite","description":"An internal function. Use Phaser.Physics.Arcade.collide instead.","parameters":[{"name":"sprite1","type":"Phaser.Sprite","description":"The first sprite to check.","default":"","optional":"","nullable":""},{"name":"sprite2","type":"Phaser.Sprite","description":"The second sprite to check.","default":"","optional":"","nullable":""},{"name":"collideCallback","type":"function","description":"An optional callback function that is called if the objects collide. The two objects will be passed to this function in the same order in which you specified them.","default":"","optional":"","nullable":""},{"name":"processCallback","type":"function","description":"A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then collision will only happen if processCallback returns true. The two objects will be passed to this function in the same order in which you specified them.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which to run the callbacks.","default":"","optional":"","nullable":""},{"name":"overlapOnly","type":"boolean","description":"Just run an overlap or a full collision.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if there was a collision, otherwise false."}},{"name":"collideSpriteVsGroup","description":"An internal function. Use Phaser.Physics.Arcade.collide instead.","parameters":[{"name":"sprite","type":"Phaser.Sprite","description":"The sprite to check.","default":"","optional":"","nullable":""},{"name":"group","type":"Phaser.Group","description":"The Group to check.","default":"","optional":"","nullable":""},{"name":"collideCallback","type":"function","description":"An optional callback function that is called if the objects collide. The two objects will be passed to this function in the same order in which you specified them.","default":"","optional":"","nullable":""},{"name":"processCallback","type":"function","description":"A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then collision will only happen if processCallback returns true. The two objects will be passed to this function in the same order in which you specified them.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which to run the callbacks.","default":"","optional":"","nullable":""},{"name":"overlapOnly","type":"boolean","description":"Just run an overlap or a full collision.","default":"","optional":"","nullable":""}]},{"name":"collideGroupVsSelf","description":"An internal function. Use Phaser.Physics.Arcade.collide instead.","parameters":[{"name":"group","type":"Phaser.Group","description":"The Group to check.","default":"","optional":"","nullable":""},{"name":"collideCallback","type":"function","description":"An optional callback function that is called if the objects collide. The two objects will be passed to this function in the same order in which you specified them.","default":"","optional":"","nullable":""},{"name":"processCallback","type":"function","description":"A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then collision will only happen if processCallback returns true. The two objects will be passed to this function in the same order in which you specified them.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which to run the callbacks.","default":"","optional":"","nullable":""},{"name":"overlapOnly","type":"boolean","description":"Just run an overlap or a full collision.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if there was a collision, otherwise false."}},{"name":"collideGroupVsGroup","description":"An internal function. Use Phaser.Physics.Arcade.collide instead.","parameters":[{"name":"group1","type":"Phaser.Group","description":"The first Group to check.","default":"","optional":"","nullable":""},{"name":"group2","type":"Phaser.Group","description":"The second Group to check.","default":"","optional":"","nullable":""},{"name":"collideCallback","type":"function","description":"An optional callback function that is called if the objects collide. The two objects will be passed to this function in the same order in which you specified them.","default":"","optional":"","nullable":""},{"name":"processCallback","type":"function","description":"A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then collision will only happen if processCallback returns true. The two objects will be passed to this function in the same order in which you specified them.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which to run the callbacks.","default":"","optional":"","nullable":""},{"name":"overlapOnly","type":"boolean","description":"Just run an overlap or a full collision.","default":"","optional":"","nullable":""}]},{"name":"separate","description":"The core separation function to separate two physics bodies.","parameters":[{"name":"body1","type":"Phaser.Physics.Arcade.Body","description":"The first Body object to separate.","default":"","optional":"","nullable":""},{"name":"body2","type":"Phaser.Physics.Arcade.Body","description":"The second Body object to separate.","default":"","optional":"","nullable":""},{"name":"processCallback","type":"function","description":"A callback function that lets you perform additional checks against the two objects if they overlap. If this function is set then the sprites will only be collided if it returns true.","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which to run the process callback.","default":"","optional":true,"nullable":""},{"name":"overlapOnly","type":"boolean","description":"Just run an overlap or a full collision.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"Returns true if the bodies collided, otherwise false."}},{"name":"intersects","description":"Check for intersection against two bodies.","parameters":[{"name":"body1","type":"Phaser.Physics.Arcade.Body","description":"The first Body object to check.","default":"","optional":"","nullable":""},{"name":"body2","type":"Phaser.Physics.Arcade.Body","description":"The second Body object to check.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if they intersect, otherwise false."}},{"name":"circleBodyIntersects","description":"Checks to see if a circular Body intersects with a Rectangular Body.","parameters":[{"name":"circle","type":"Phaser.Physics.Arcade.Body","description":"The Body with `isCircle` set.","default":"","optional":"","nullable":""},{"name":"body","type":"Phaser.Physics.Arcade.Body","description":"The Body with `isCircle` not set (i.e. uses Rectangle shape)","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"Returns true if the bodies intersect, otherwise false."}},{"name":"separateCircle","description":"The core separation function to separate two circular physics bodies.","parameters":[{"name":"body1","type":"Phaser.Physics.Arcade.Body","description":"The first Body to separate. Must have `Body.isCircle` true and a positive `radius`.","default":"","optional":"","nullable":""},{"name":"body2","type":"Phaser.Physics.Arcade.Body","description":"The second Body to separate. Must have `Body.isCircle` true and a positive `radius`.","default":"","optional":"","nullable":""},{"name":"overlapOnly","type":"boolean","description":"If true the bodies will only have their overlap data set, no separation or exchange of velocity will take place.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"Returns true if the bodies were separated or overlap, otherwise false."}},{"name":"getOverlapX","description":"Calculates the horizontal overlap between two Bodies and sets their properties accordingly, including:\r`touching.left`, `touching.right` and `overlapX`.","parameters":[{"name":"body1","type":"Phaser.Physics.Arcade.Body","description":"The first Body to separate.","default":"","optional":"","nullable":""},{"name":"body2","type":"Phaser.Physics.Arcade.Body","description":"The second Body to separate.","default":"","optional":"","nullable":""},{"name":"overlapOnly","type":"boolean","description":"Is this an overlap only check, or part of separation?","default":"","optional":"","nullable":""}],"returns":{"type":"float","description":"Returns the amount of horizontal overlap between the two bodies."}},{"name":"getOverlapY","description":"Calculates the vertical overlap between two Bodies and sets their properties accordingly, including:\r`touching.up`, `touching.down` and `overlapY`.","parameters":[{"name":"body1","type":"Phaser.Physics.Arcade.Body","description":"The first Body to separate.","default":"","optional":"","nullable":""},{"name":"body2","type":"Phaser.Physics.Arcade.Body","description":"The second Body to separate.","default":"","optional":"","nullable":""},{"name":"overlapOnly","type":"boolean","description":"Is this an overlap only check, or part of separation?","default":"","optional":"","nullable":""}],"returns":{"type":"float","description":"Returns the amount of vertical overlap between the two bodies."}},{"name":"separateX","description":"The core separation function to separate two physics bodies on the x axis.","parameters":[{"name":"body1","type":"Phaser.Physics.Arcade.Body","description":"The first Body to separate.","default":"","optional":"","nullable":""},{"name":"body2","type":"Phaser.Physics.Arcade.Body","description":"The second Body to separate.","default":"","optional":"","nullable":""},{"name":"overlapOnly","type":"boolean","description":"If true the bodies will only have their overlap data set, no separation or exchange of velocity will take place.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"Returns true if the bodies were separated or overlap, otherwise false."}},{"name":"separateY","description":"The core separation function to separate two physics bodies on the y axis.","parameters":[{"name":"body1","type":"Phaser.Physics.Arcade.Body","description":"The first Body to separate.","default":"","optional":"","nullable":""},{"name":"body2","type":"Phaser.Physics.Arcade.Body","description":"The second Body to separate.","default":"","optional":"","nullable":""},{"name":"overlapOnly","type":"boolean","description":"If true the bodies will only have their overlap data set, no separation or exchange of velocity will take place.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"Returns true if the bodies were separated or overlap, otherwise false."}},{"name":"getObjectsUnderPointer","description":"Given a Group and a Pointer this will check to see which Group children overlap with the Pointer coordinates.\rEach child will be sent to the given callback for further processing.\rNote that the children are not checked for depth order, but simply if they overlap the Pointer or not.","parameters":[{"name":"pointer","type":"Phaser.Pointer","description":"The Pointer to check.","default":"","optional":"","nullable":""},{"name":"group","type":"Phaser.Group","description":"The Group to check.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"A callback function that is called if the object overlaps with the Pointer. The callback will be sent two parameters: the Pointer and the Object that overlapped with it.","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which to run the callback.","default":"","optional":true,"nullable":""}],"returns":{"type":"Array.<PIXI.DisplayObject>","description":"An array of the Sprites from the Group that overlapped the Pointer coordinates."}},{"name":"getObjectsAtLocation","description":"Given a Group and a location this will check to see which Group children overlap with the coordinates.\rEach child will be sent to the given callback for further processing.\rNote that the children are not checked for depth order, but simply if they overlap the coordinate or not.","parameters":[{"name":"x","type":"number","description":"The x coordinate to check.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate to check.","default":"","optional":"","nullable":""},{"name":"group","type":"Phaser.Group","description":"The Group to check.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"A callback function that is called if the object overlaps the coordinates. The callback will be sent two parameters: the callbackArg and the Object that overlapped the location.","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which to run the callback.","default":"","optional":true,"nullable":""},{"name":"callbackArg","type":"object","description":"An argument to pass to the callback.","default":"","optional":true,"nullable":""}],"returns":{"type":"Array.<PIXI.DisplayObject>","description":"An array of the Sprites from the Group that overlapped the coordinates."}},{"name":"moveToObject","description":"Move the given display object towards the destination object at a steady velocity.\rIf you specify a maxTime then it will adjust the speed (overwriting what you set) so it arrives at the destination in that number of seconds.\rTimings are approximate due to the way browser timers work. Allow for a variance of +- 50ms.\rNote: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.\rNote: The display object doesn't stop moving once it reaches the destination coordinates.\rNote: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all)","parameters":[{"name":"displayObject","type":"any","description":"The display object to move.","default":"","optional":"","nullable":""},{"name":"destination","type":"any","description":"The display object to move towards. Can be any object but must have visible x/y properties.","default":"","optional":"","nullable":""},{"name":"speed","type":"number","description":"The speed it will move, in pixels per second (default is 60 pixels/sec)","default":60,"optional":true,"nullable":""},{"name":"maxTime","type":"number","description":"Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms.","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The angle (in radians) that the object should be visually set to in order to match its new velocity."}},{"name":"moveToPointer","description":"Move the given display object towards the pointer at a steady velocity. If no pointer is given it will use Phaser.Input.activePointer.\rIf you specify a maxTime then it will adjust the speed (over-writing what you set) so it arrives at the destination in that number of seconds.\rTimings are approximate due to the way browser timers work. Allow for a variance of +- 50ms.\rNote: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.\rNote: The display object doesn't stop moving once it reaches the destination coordinates.","parameters":[{"name":"displayObject","type":"any","description":"The display object to move.","default":"","optional":"","nullable":""},{"name":"speed","type":"number","description":"The speed it will move, in pixels per second (default is 60 pixels/sec)","default":60,"optional":true,"nullable":""},{"name":"pointer","type":"Phaser.Pointer","description":"The pointer to move towards. Defaults to Phaser.Input.activePointer.","default":"","optional":true,"nullable":""},{"name":"maxTime","type":"number","description":"Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms.","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The angle (in radians) that the object should be visually set to in order to match its new velocity."}},{"name":"moveToXY","description":"Move the given display object towards the x/y coordinates at a steady velocity.\rIf you specify a maxTime then it will adjust the speed (over-writing what you set) so it arrives at the destination in that number of seconds.\rTimings are approximate due to the way browser timers work. Allow for a variance of +- 50ms.\rNote: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.\rNote: The display object doesn't stop moving once it reaches the destination coordinates.\rNote: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all)","parameters":[{"name":"displayObject","type":"any","description":"The display object to move.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate to move towards.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate to move towards.","default":"","optional":"","nullable":""},{"name":"speed","type":"number","description":"The speed it will move, in pixels per second (default is 60 pixels/sec)","default":60,"optional":true,"nullable":""},{"name":"maxTime","type":"number","description":"Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms.","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The angle (in radians) that the object should be visually set to in order to match its new velocity."}},{"name":"velocityFromAngle","description":"Given the angle (in degrees) and speed calculate the velocity and return it as a Point object, or set it to the given point object.\rOne way to use this is: velocityFromAngle(angle, 200, sprite.velocity) which will set the values directly to the sprites velocity and not create a new Point object.","parameters":[{"name":"angle","type":"number","description":"The angle in degrees calculated in clockwise positive direction (down = 90 degrees positive, right = 0 degrees positive, up = 90 degrees negative)","default":"","optional":"","nullable":""},{"name":"speed","type":"number","description":"The speed it will move, in pixels per second sq.","default":60,"optional":true,"nullable":""},{"name":"point","type":["Phaser.Point","object"],"description":"The Point object in which the x and y properties will be set to the calculated velocity.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"- A Point where point.x contains the velocity x value and point.y contains the velocity y value."}},{"name":"velocityFromRotation","description":"Given the rotation (in radians) and speed calculate the velocity and return it as a Point object, or set it to the given point object.\rOne way to use this is: velocityFromRotation(rotation, 200, sprite.velocity) which will set the values directly to the sprites velocity and not create a new Point object.","parameters":[{"name":"rotation","type":"number","description":"The angle in radians.","default":"","optional":"","nullable":""},{"name":"speed","type":"number","description":"The speed it will move, in pixels per second sq.","default":60,"optional":true,"nullable":""},{"name":"point","type":["Phaser.Point","object"],"description":"The Point object in which the x and y properties will be set to the calculated velocity.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"- A Point where point.x contains the velocity x value and point.y contains the velocity y value."}},{"name":"accelerationFromRotation","description":"Given the rotation (in radians) and speed calculate the acceleration and return it as a Point object, or set it to the given point object.\rOne way to use this is: accelerationFromRotation(rotation, 200, sprite.acceleration) which will set the values directly to the sprites acceleration and not create a new Point object.","parameters":[{"name":"rotation","type":"number","description":"The angle in radians.","default":"","optional":"","nullable":""},{"name":"speed","type":"number","description":"The speed it will move, in pixels per second sq.","default":60,"optional":true,"nullable":""},{"name":"point","type":["Phaser.Point","object"],"description":"The Point object in which the x and y properties will be set to the calculated acceleration.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"- A Point where point.x contains the acceleration x value and point.y contains the acceleration y value."}},{"name":"accelerateToObject","description":"Sets the acceleration.x/y property on the display object so it will move towards the target at the given speed (in pixels per second sq.)\rYou must give a maximum speed value, beyond which the display object won't go any faster.\rNote: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.\rNote: The display object doesn't stop moving once it reaches the destination coordinates.","parameters":[{"name":"displayObject","type":"any","description":"The display object to move.","default":"","optional":"","nullable":""},{"name":"destination","type":"any","description":"The display object to move towards. Can be any object but must have visible x/y properties.","default":"","optional":"","nullable":""},{"name":"speed","type":"number","description":"The speed it will accelerate in pixels per second.","default":60,"optional":true,"nullable":""},{"name":"xSpeedMax","type":"number","description":"The maximum x velocity the display object can reach.","default":500,"optional":true,"nullable":""},{"name":"ySpeedMax","type":"number","description":"The maximum y velocity the display object can reach.","default":500,"optional":true,"nullable":""}],"returns":{"type":"number","description":"The angle (in radians) that the object should be visually set to in order to match its new trajectory."}},{"name":"accelerateToPointer","description":"Sets the acceleration.x/y property on the display object so it will move towards the target at the given speed (in pixels per second sq.)\rYou must give a maximum speed value, beyond which the display object won't go any faster.\rNote: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.\rNote: The display object doesn't stop moving once it reaches the destination coordinates.","parameters":[{"name":"displayObject","type":"any","description":"The display object to move.","default":"","optional":"","nullable":""},{"name":"pointer","type":"Phaser.Pointer","description":"The pointer to move towards. Defaults to Phaser.Input.activePointer.","default":"","optional":true,"nullable":""},{"name":"speed","type":"number","description":"The speed it will accelerate in pixels per second.","default":60,"optional":true,"nullable":""},{"name":"xSpeedMax","type":"number","description":"The maximum x velocity the display object can reach.","default":500,"optional":true,"nullable":""},{"name":"ySpeedMax","type":"number","description":"The maximum y velocity the display object can reach.","default":500,"optional":true,"nullable":""}],"returns":{"type":"number","description":"The angle (in radians) that the object should be visually set to in order to match its new trajectory."}},{"name":"accelerateToXY","description":"Sets the acceleration.x/y property on the display object so it will move towards the x/y coordinates at the given speed (in pixels per second sq.)\rYou must give a maximum speed value, beyond which the display object won't go any faster.\rNote: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.\rNote: The display object doesn't stop moving once it reaches the destination coordinates.","parameters":[{"name":"displayObject","type":"any","description":"The display object to move.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate to accelerate towards.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate to accelerate towards.","default":"","optional":"","nullable":""},{"name":"speed","type":"number","description":"The speed it will accelerate in pixels per second.","default":60,"optional":true,"nullable":""},{"name":"xSpeedMax","type":"number","description":"The maximum x velocity the display object can reach.","default":500,"optional":true,"nullable":""},{"name":"ySpeedMax","type":"number","description":"The maximum y velocity the display object can reach.","default":500,"optional":true,"nullable":""}],"returns":{"type":"number","description":"The angle (in radians) that the object should be visually set to in order to match its new trajectory."}},{"name":"distanceBetween","description":"Find the distance between two display objects (like Sprites).\r\rThe optional `world` argument allows you to return the result based on the Game Objects `world` property,\rinstead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group,\ror parent Game Object.","parameters":[{"name":"source","type":"any","description":"The Display Object to test from.","default":"","optional":"","nullable":""},{"name":"target","type":"any","description":"The Display Object to test to.","default":"","optional":"","nullable":""},{"name":"world","type":"boolean","description":"Calculate the distance using World coordinates (true), or Object coordinates (false, the default)","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The distance between the source and target objects."}},{"name":"distanceToXY","description":"Find the distance between a display object (like a Sprite) and the given x/y coordinates.\rThe calculation is made from the display objects x/y coordinate. This may be the top-left if its anchor hasn't been changed.\rIf you need to calculate from the center of a display object instead use the method distanceBetweenCenters()\r\rThe optional `world` argument allows you to return the result based on the Game Objects `world` property,\rinstead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group,\ror parent Game Object.","parameters":[{"name":"displayObject","type":"any","description":"The Display Object to test from.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate to move towards.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate to move towards.","default":"","optional":"","nullable":""},{"name":"world","type":"boolean","description":"Calculate the distance using World coordinates (true), or Object coordinates (false, the default)","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The distance between the object and the x/y coordinates."}},{"name":"distanceToPointer","description":"Find the distance between a display object (like a Sprite) and a Pointer. If no Pointer is given the Input.activePointer is used.\rThe calculation is made from the display objects x/y coordinate. This may be the top-left if its anchor hasn't been changed.\rIf you need to calculate from the center of a display object instead use the method distanceBetweenCenters()\r\rThe optional `world` argument allows you to return the result based on the Game Objects `world` property,\rinstead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group,\ror parent Game Object.","parameters":[{"name":"displayObject","type":"any","description":"The Display Object to test from.","default":"","optional":"","nullable":""},{"name":"pointer","type":"Phaser.Pointer","description":"The Phaser.Pointer to test to. If none is given then Input.activePointer is used.","default":"","optional":true,"nullable":""},{"name":"world","type":"boolean","description":"Calculate the distance using World coordinates (true), or Object coordinates (false, the default)","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The distance between the object and the Pointer."}},{"name":"angleBetween","description":"Find the angle in radians between two display objects (like Sprites).\r\rThe optional `world` argument allows you to return the result based on the Game Objects `world` property,\rinstead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group,\ror parent Game Object.","parameters":[{"name":"source","type":"any","description":"The Display Object to test from.","default":"","optional":"","nullable":""},{"name":"target","type":"any","description":"The Display Object to test to.","default":"","optional":"","nullable":""},{"name":"world","type":"boolean","description":"Calculate the angle using World coordinates (true), or Object coordinates (false, the default)","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The angle in radians between the source and target display objects."}},{"name":"angleBetweenCenters","description":"Find the angle in radians between centers of two display objects (like Sprites).","parameters":[{"name":"source","type":"any","description":"The Display Object to test from.","default":"","optional":"","nullable":""},{"name":"target","type":"any","description":"The Display Object to test to.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The angle in radians between the source and target display objects."}},{"name":"angleToXY","description":"Find the angle in radians between a display object (like a Sprite) and the given x/y coordinate.\r\rThe optional `world` argument allows you to return the result based on the Game Objects `world` property,\rinstead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group,\ror parent Game Object.","parameters":[{"name":"displayObject","type":"any","description":"The Display Object to test from.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate to get the angle to.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate to get the angle to.","default":"","optional":"","nullable":""},{"name":"world","type":"boolean","description":"Calculate the angle using World coordinates (true), or Object coordinates (false, the default)","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The angle in radians between displayObject.x/y to Pointer.x/y"}},{"name":"angleToPointer","description":"Find the angle in radians between a display object (like a Sprite) and a Pointer, taking their x/y and center into account.\r\rThe optional `world` argument allows you to return the result based on the Game Objects `world` property,\rinstead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group,\ror parent Game Object.","parameters":[{"name":"displayObject","type":"any","description":"The Display Object to test from.","default":"","optional":"","nullable":""},{"name":"pointer","type":"Phaser.Pointer","description":"The Phaser.Pointer to test to. If none is given then Input.activePointer is used.","default":"","optional":true,"nullable":""},{"name":"world","type":"boolean","description":"Calculate the angle using World coordinates (true), or Object coordinates (false, the default)","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The angle in radians between displayObject.x/y to Pointer.x/y"}},{"name":"worldAngleToPointer","description":"Find the angle in radians between a display object (like a Sprite) and a Pointer, \rtaking their x/y and center into account relative to the world.","parameters":[{"name":"displayObject","type":"any","description":"The DisplayObjerct to test from.","default":"","optional":"","nullable":""},{"name":"pointer","type":"Phaser.Pointer","description":"The Phaser.Pointer to test to. If none is given then Input.activePointer is used.","default":"","optional":true,"nullable":""}],"returns":{"type":"number","description":"The angle in radians between displayObject.world.x/y to Pointer.worldX / worldY"}}],"members":[{"name":"game","access":"","virtual":false,"description":"Local reference to game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"gravity","access":"","virtual":false,"description":"The World gravity setting. Defaults to x: 0, y: 0, or no gravity.","type":{"names":["Phaser.Point"]},"default":""},{"name":"bounds","access":"","virtual":false,"description":"The bounds inside of which the physics world exists. Defaults to match the world bounds.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"checkCollision","access":"","virtual":false,"description":"Set the checkCollision properties to control for which bounds collision is processed.\rFor example checkCollision.down = false means Bodies cannot collide with the World.bounds.bottom. An object containing allowed collision flags.","type":{"names":["object"]},"default":""},{"name":"maxObjects","access":"","virtual":false,"description":"Used by the QuadTree to set the maximum number of objects per quad.","type":{"names":["number"]},"default":""},{"name":"maxLevels","access":"","virtual":false,"description":"Used by the QuadTree to set the maximum number of iteration levels.","type":{"names":["number"]},"default":""},{"name":"OVERLAP_BIAS","access":"","virtual":false,"description":"A value added to the delta values during collision checks.","type":{"names":["number"]},"default":""},{"name":"forceX","access":"","virtual":false,"description":"If true World.separate will always separate on the X axis before Y. Otherwise it will check gravity totals first.","type":{"names":["boolean"]},"default":""},{"name":"sortDirection","access":"","virtual":false,"description":"Used when colliding a Sprite vs. a Group, or a Group vs. a Group, this defines the direction the sort is based on. Default is Phaser.Physics.Arcade.LEFT_RIGHT.","type":{"names":["number"]},"default":""},{"name":"skipQuadTree","access":"","virtual":false,"description":"If true the QuadTree will not be used for any collision. QuadTrees are great if objects are well spread out in your game, otherwise they are a performance hit. If you enable this you can disable on a per body basis via `Body.skipQuadTree`.","type":{"names":["boolean"]},"default":""},{"name":"isPaused","access":"","virtual":false,"description":"If `true` the `Body.preUpdate` method will be skipped, halting all motion for all bodies. Note that other methods such as `collide` will still work, so be careful not to call them on paused bodies.","type":{"names":["boolean"]},"default":""},{"name":"quadTree","access":"","virtual":false,"description":"The world QuadTree.","type":{"names":["Phaser.QuadTree"]},"default":""},{"name":"_total","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["number"]},"default":""},{"name":"SORT_NONE","access":"","virtual":false,"description":"A constant used for the sortDirection value.\rUse this if you don't wish to perform any pre-collision sorting at all, or will manually sort your Groups.","type":{"names":["number"]},"default":""},{"name":"LEFT_RIGHT","access":"","virtual":false,"description":"A constant used for the sortDirection value.\rUse this if your game world is wide but short and scrolls from the left to the right (i.e. Mario)","type":{"names":["number"]},"default":""},{"name":"RIGHT_LEFT","access":"","virtual":false,"description":"A constant used for the sortDirection value.\rUse this if your game world is wide but short and scrolls from the right to the left (i.e. Mario backwards)","type":{"names":["number"]},"default":""},{"name":"TOP_BOTTOM","access":"","virtual":false,"description":"A constant used for the sortDirection value.\rUse this if your game world is narrow but tall and scrolls from the top to the bottom (i.e. Dig Dug)","type":{"names":["number"]},"default":""},{"name":"BOTTOM_TOP","access":"","virtual":false,"description":"A constant used for the sortDirection value.\rUse this if your game world is narrow but tall and scrolls from the bottom to the top (i.e. Commando or a vertically scrolling shoot-em-up)","type":{"names":["number"]},"default":""}]},{"name":"Phaser.Physics.Ninja.AABB","description":"Ninja Physics AABB constructor.\rNote: This class could be massively optimised and reduced in size. I leave that challenge up to you.","constructor":{"name":"AABB","description":"Ninja Physics AABB constructor.\rNote: This class could be massively optimised and reduced in size. I leave that challenge up to you.","parameters":[{"name":"body","type":"Phaser.Physics.Ninja.Body","description":"The body that owns this shape.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate to create this shape at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate to create this shape at.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The width of this AABB.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height of this AABB.","default":"","optional":"","nullable":""}]},"functions":[{"name":"integrate","description":"Updates this AABBs position.","parameters":[]},{"name":"reportCollision","description":"Process a collision partner-agnostic collision response and apply the resulting forces.","parameters":[{"name":"px","type":"number","description":"The tangent velocity","default":"","optional":"","nullable":""},{"name":"py","type":"number","description":"The tangent velocity","default":"","optional":"","nullable":""},{"name":"dx","type":"number","description":"Collision normal","default":"","optional":"","nullable":""},{"name":"dy","type":"number","description":"Collision normal","default":"","optional":"","nullable":""}]},{"name":"reportCollisionVsWorld","description":"Process a world collision and apply the resulting forces.","parameters":[{"name":"px","type":"number","description":"The tangent velocity","default":"","optional":"","nullable":""},{"name":"py","type":"number","description":"The tangent velocity","default":"","optional":"","nullable":""},{"name":"dx","type":"number","description":"Collision normal","default":"","optional":"","nullable":""},{"name":"dy","type":"number","description":"Collision normal","default":"","optional":"","nullable":""}]},{"name":"reverse","description":"","parameters":[]},{"name":"reportCollisionVsBody","description":"Process a body collision and apply the resulting forces. Still very much WIP and doesn't work fully. Feel free to fix!","parameters":[{"name":"px","type":"number","description":"The tangent velocity","default":"","optional":"","nullable":""},{"name":"py","type":"number","description":"The tangent velocity","default":"","optional":"","nullable":""},{"name":"dx","type":"number","description":"Collision normal","default":"","optional":"","nullable":""},{"name":"dy","type":"number","description":"Collision normal","default":"","optional":"","nullable":""},{"name":"obj","type":"number","description":"Object this AABB collided with","default":"","optional":"","nullable":""}]},{"name":"collideWorldBounds","description":"Collides this AABB against the world bounds.","parameters":[]},{"name":"collideAABBVsAABB","description":"Collides this AABB against a AABB.","parameters":[{"name":"aabb","type":"Phaser.Physics.Ninja.AABB","description":"The AABB to collide against.","default":"","optional":"","nullable":""}]},{"name":"collideAABBVsTile","description":"Collides this AABB against a Tile.","parameters":[{"name":"tile","type":"Phaser.Physics.Ninja.Tile","description":"The Tile to collide against.","default":"","optional":"","nullable":""}]},{"name":"resolveTile","description":"Resolves tile collision.","parameters":[{"name":"x","type":"number","description":"Penetration depth on the x axis.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Penetration depth on the y axis.","default":"","optional":"","nullable":""},{"name":"body","type":"Phaser.Physics.Ninja.AABB","description":"The AABB involved in the collision.","default":"","optional":"","nullable":""},{"name":"tile","type":"Phaser.Physics.Ninja.Tile","description":"The Tile involved in the collision.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the collision was processed, otherwise false."}},{"name":"projAABB_Full","description":"Resolves Full tile collision.","parameters":[{"name":"x","type":"number","description":"Penetration depth on the x axis.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Penetration depth on the y axis.","default":"","optional":"","nullable":""},{"name":"obj","type":"Phaser.Physics.Ninja.AABB","description":"The AABB involved in the collision.","default":"","optional":"","nullable":""},{"name":"t","type":"Phaser.Physics.Ninja.Tile","description":"The Tile involved in the collision.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The result of the collision."}},{"name":"projAABB_Half","description":"Resolves Half tile collision.","parameters":[{"name":"x","type":"number","description":"Penetration depth on the x axis.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Penetration depth on the y axis.","default":"","optional":"","nullable":""},{"name":"obj","type":"Phaser.Physics.Ninja.AABB","description":"The AABB involved in the collision.","default":"","optional":"","nullable":""},{"name":"t","type":"Phaser.Physics.Ninja.Tile","description":"The Tile involved in the collision.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The result of the collision."}},{"name":"projAABB_45Deg","description":"Resolves 45 Degree tile collision.","parameters":[{"name":"x","type":"number","description":"Penetration depth on the x axis.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Penetration depth on the y axis.","default":"","optional":"","nullable":""},{"name":"obj","type":"Phaser.Physics.Ninja.AABB","description":"The AABB involved in the collision.","default":"","optional":"","nullable":""},{"name":"t","type":"Phaser.Physics.Ninja.Tile","description":"The Tile involved in the collision.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The result of the collision."}},{"name":"projAABB_22DegS","description":"Resolves 22 Degree tile collision.","parameters":[{"name":"x","type":"number","description":"Penetration depth on the x axis.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Penetration depth on the y axis.","default":"","optional":"","nullable":""},{"name":"obj","type":"Phaser.Physics.Ninja.AABB","description":"The AABB involved in the collision.","default":"","optional":"","nullable":""},{"name":"t","type":"Phaser.Physics.Ninja.Tile","description":"The Tile involved in the collision.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The result of the collision."}},{"name":"projAABB_22DegB","description":"Resolves 22 Degree tile collision.","parameters":[{"name":"x","type":"number","description":"Penetration depth on the x axis.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Penetration depth on the y axis.","default":"","optional":"","nullable":""},{"name":"obj","type":"Phaser.Physics.Ninja.AABB","description":"The AABB involved in the collision.","default":"","optional":"","nullable":""},{"name":"t","type":"Phaser.Physics.Ninja.Tile","description":"The Tile involved in the collision.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The result of the collision."}},{"name":"projAABB_67DegS","description":"Resolves 67 Degree tile collision.","parameters":[{"name":"x","type":"number","description":"Penetration depth on the x axis.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Penetration depth on the y axis.","default":"","optional":"","nullable":""},{"name":"obj","type":"Phaser.Physics.Ninja.AABB","description":"The AABB involved in the collision.","default":"","optional":"","nullable":""},{"name":"t","type":"Phaser.Physics.Ninja.Tile","description":"The Tile involved in the collision.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The result of the collision."}},{"name":"projAABB_67DegB","description":"Resolves 67 Degree tile collision.","parameters":[{"name":"x","type":"number","description":"Penetration depth on the x axis.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Penetration depth on the y axis.","default":"","optional":"","nullable":""},{"name":"obj","type":"Phaser.Physics.Ninja.AABB","description":"The AABB involved in the collision.","default":"","optional":"","nullable":""},{"name":"t","type":"Phaser.Physics.Ninja.Tile","description":"The Tile involved in the collision.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The result of the collision."}},{"name":"projAABB_Convex","description":"Resolves Convex tile collision.","parameters":[{"name":"x","type":"number","description":"Penetration depth on the x axis.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Penetration depth on the y axis.","default":"","optional":"","nullable":""},{"name":"obj","type":"Phaser.Physics.Ninja.AABB","description":"The AABB involved in the collision.","default":"","optional":"","nullable":""},{"name":"t","type":"Phaser.Physics.Ninja.Tile","description":"The Tile involved in the collision.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The result of the collision."}},{"name":"projAABB_Concave","description":"Resolves Concave tile collision.","parameters":[{"name":"x","type":"number","description":"Penetration depth on the x axis.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Penetration depth on the y axis.","default":"","optional":"","nullable":""},{"name":"obj","type":"Phaser.Physics.Ninja.AABB","description":"The AABB involved in the collision.","default":"","optional":"","nullable":""},{"name":"t","type":"Phaser.Physics.Ninja.Tile","description":"The Tile involved in the collision.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The result of the collision."}},{"name":"destroy","description":"Destroys this AABB's reference to Body and System","parameters":[]},{"name":"render","description":"Render this AABB for debugging purposes.","parameters":[{"name":"context","type":"object","description":"The context to render to.","default":"","optional":"","nullable":""},{"name":"xOffset","type":"number","description":"X offset from AABB's position to render at.","default":"","optional":"","nullable":""},{"name":"yOffset","type":"number","description":"Y offset from AABB's position to render at.","default":"","optional":"","nullable":""},{"name":"color","type":"string","description":"color of the debug shape to be rendered. (format is css color string).","default":"","optional":"","nullable":""},{"name":"filled","type":"boolean","description":"Render the shape as solid (true) or hollow (false).","default":"","optional":"","nullable":""}]}],"members":[{"name":"body","access":"","virtual":false,"description":"A reference to the body that owns this shape.","type":"","default":""},{"name":"system","access":"","virtual":false,"description":"A reference to the physics system.","type":{"names":["Phaser.Physics.Ninja"]},"default":""},{"name":"pos","access":"","virtual":false,"description":"The position of this object.","type":{"names":["Phaser.Point"]},"default":""},{"name":"oldpos","access":"","virtual":false,"description":"The position of this object in the previous update.","type":{"names":["Phaser.Point"]},"default":""},{"name":"xw","access":"","virtual":false,"description":"Half the width.","type":{"names":["number"]},"default":""},{"name":"yw","access":"","virtual":false,"description":"Half the height.","type":"","default":""},{"name":"width","access":"","virtual":false,"description":"The width.","type":{"names":["number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height.","type":{"names":["number"]},"default":""},{"name":"oH","access":"private","virtual":false,"description":"Internal var.","type":{"names":["number"]},"default":""},{"name":"oV","access":"private","virtual":false,"description":"Internal var.","type":{"names":["number"]},"default":""},{"name":"velocity","access":"","virtual":false,"description":"The velocity of this object.","type":{"names":["Phaser.Point"]},"default":""},{"name":"aabbTileProjections","access":"","virtual":false,"description":"All of the collision response handlers.","type":{"names":["object"]},"default":""}]},{"name":"Phaser.Physics.Ninja.Body","description":"The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than\rthe Sprite itself. For example you can set the velocity, bounce values etc all on the Body.","constructor":{"name":"Body","description":"The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than\rthe Sprite itself. For example you can set the velocity, bounce values etc all on the Body.","parameters":[{"name":"system","type":"Phaser.Physics.Ninja","description":"The physics system this Body belongs to.","default":"","optional":"","nullable":""},{"name":"sprite","type":"Phaser.Sprite","description":"The Sprite object this physics body belongs to.","default":"","optional":"","nullable":""},{"name":"type","type":"number","description":"The type of Ninja shape to create. 1 = AABB, 2 = Circle or 3 = Tile.","default":1,"optional":true,"nullable":""},{"name":"id","type":"number","description":"If this body is using a Tile shape, you can set the Tile id here, i.e. Phaser.Physics.Ninja.Tile.SLOPE_45DEGpn, Phaser.Physics.Ninja.Tile.CONVEXpp, etc.","default":1,"optional":true,"nullable":""},{"name":"radius","type":"number","description":"If this body is using a Circle shape this controls the radius.","default":16,"optional":true,"nullable":""},{"name":"x","type":"number","description":"The x coordinate of this Body. This is only used if a sprite is not provided.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate of this Body. This is only used if a sprite is not provided.","default":"","optional":true,"nullable":""},{"name":"width","type":"number","description":"The width of this Body. This is only used if a sprite is not provided.","default":"","optional":true,"nullable":""},{"name":"height","type":"number","description":"The height of this Body. This is only used if a sprite is not provided.","default":"","optional":true,"nullable":""}]},"functions":[{"name":"preUpdate","description":"Internal method.","parameters":[]},{"name":"postUpdate","description":"Internal method.","parameters":[]},{"name":"setZeroVelocity","description":"Stops all movement of this body.","parameters":[]},{"name":"reset","description":"Resets all Body values and repositions on the Sprite.","parameters":[]},{"name":"deltaAbsX","description":"Returns the absolute delta x value.","parameters":[],"returns":{"type":"number","description":"The absolute delta value."}},{"name":"deltaAbsY","description":"Returns the absolute delta y value.","parameters":[],"returns":{"type":"number","description":"The absolute delta value."}},{"name":"deltaX","description":"Returns the delta x value. The difference between Body.x now and in the previous step.","parameters":[],"returns":{"type":"number","description":"The delta value. Positive if the motion was to the right, negative if to the left."}},{"name":"deltaY","description":"Returns the delta y value. The difference between Body.y now and in the previous step.","parameters":[],"returns":{"type":"number","description":"The delta value. Positive if the motion was downwards, negative if upwards."}},{"name":"destroy","description":"Destroys this body's reference to the sprite and system, and destroys its shape.","parameters":[]},{"name":"render","description":"Render Sprite's Body.","parameters":[{"name":"context","type":"object","description":"The context to render to.","default":"","optional":"","nullable":""},{"name":"body","type":"Phaser.Physics.Ninja.Body","description":"The Body to render.","default":"","optional":"","nullable":""},{"name":"color","type":"string","description":"color of the debug shape to be rendered. (format is css color string).","default":"'rgba(0,255,0,0.4)'","optional":true,"nullable":""},{"name":"filled","type":"boolean","description":"Render the shape as a filled (default, true) or a stroked (false)","default":true,"optional":true,"nullable":""}]}],"members":[{"name":"sprite","access":"","virtual":false,"description":"Reference to the parent Sprite.","type":{"names":["Phaser.Sprite"]},"default":""},{"name":"game","access":"","virtual":false,"description":"Local reference to game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"type","access":"","virtual":false,"description":"The type of physics system this body belongs to.","type":{"names":["number"]},"default":""},{"name":"system","access":"","virtual":false,"description":"The parent physics system.","type":{"names":["Phaser.Physics.Ninja"]},"default":""},{"name":"aabb","access":"","virtual":false,"description":"The AABB object this body is using for collision.","type":{"names":["Phaser.Physics.Ninja.AABB"]},"default":""},{"name":"tile","access":"","virtual":false,"description":"The Tile object this body is using for collision.","type":{"names":["Phaser.Physics.Ninja.Tile"]},"default":""},{"name":"circle","access":"","virtual":false,"description":"The Circle object this body is using for collision.","type":{"names":["Phaser.Physics.Ninja.Circle"]},"default":""},{"name":"shape","access":"","virtual":false,"description":"A local reference to the body shape.","type":{"names":["object"]},"default":""},{"name":"drag","access":"","virtual":false,"description":"The drag applied to this object as it moves.","type":{"names":["number"]},"default":1},{"name":"friction","access":"","virtual":false,"description":"The friction applied to this object as it moves.","type":{"names":["number"]},"default":0.05},{"name":"gravityScale","access":"","virtual":false,"description":"How much of the world gravity should be applied to this object? 1 = all of it, 0.5 = 50%, etc.","type":{"names":["number"]},"default":1},{"name":"bounce","access":"","virtual":false,"description":"The bounciness of this object when it collides. A value between 0 and 1. We recommend setting it to 0.999 to avoid jittering.","type":{"names":["number"]},"default":0.3},{"name":"velocity","access":"","virtual":false,"description":"The velocity in pixels per second sq. of the Body.","type":{"names":["Phaser.Point"]},"default":""},{"name":"facing","access":"","virtual":false,"description":"A const reference to the direction the Body is traveling or facing.","type":{"names":["number"]},"default":""},{"name":"immovable","access":"","virtual":false,"description":"An immovable Body will not receive any impacts from other bodies. Not fully implemented.","type":{"names":["boolean"]},"default":""},{"name":"collideWorldBounds","access":"","virtual":false,"description":"A Body can be set to collide against the World bounds automatically and rebound back into the World if this is set to true. Otherwise it will leave the World. Should the Body collide with the World bounds?","type":{"names":["boolean"]},"default":""},{"name":"checkCollision","access":"","virtual":false,"description":"Set the checkCollision properties to control which directions collision is processed for this Body.\rFor example checkCollision.up = false means it won't collide when the collision happened while moving up. An object containing allowed collision.","type":{"names":["object"]},"default":""},{"name":"touching","access":"","virtual":false,"description":"This object is populated with boolean values when the Body collides with another.\rtouching.up = true means the collision happened to the top of this Body for example. An object containing touching results.","type":{"names":["object"]},"default":""},{"name":"wasTouching","access":"","virtual":false,"description":"This object is populated with previous touching values from the bodies previous collision. An object containing previous touching results.","type":{"names":["object"]},"default":""},{"name":"maxSpeed","access":"","virtual":false,"description":"The maximum speed this body can travel at (taking drag and friction into account)","type":{"names":["number"]},"default":8},{"name":"x","access":"","virtual":false,"description":"The x position.","type":{"names":["number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The y position.","type":{"names":["number"]},"default":""},{"name":"width","access":"","virtual":false,"description":"The width of this Body","type":{"names":["number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of this Body","type":{"names":["number"]},"default":""},{"name":"bottom","access":"","virtual":false,"description":"The bottom value of this Body (same as Body.y + Body.height)","type":{"names":["number"]},"default":""},{"name":"right","access":"","virtual":false,"description":"The right value of this Body (same as Body.x + Body.width)","type":{"names":["number"]},"default":""},{"name":"speed","access":"","virtual":false,"description":"The speed of this Body","type":{"names":["number"]},"default":""},{"name":"angle","access":"","virtual":false,"description":"The angle of this Body","type":{"names":["number"]},"default":""}]},{"name":"Phaser.Physics.Ninja.Circle","description":"Ninja Physics Circle constructor.\rNote: This class could be massively optimised and reduced in size. I leave that challenge up to you.","constructor":{"name":"Circle","description":"Ninja Physics Circle constructor.\rNote: This class could be massively optimised and reduced in size. I leave that challenge up to you.","parameters":[{"name":"body","type":"Phaser.Physics.Ninja.Body","description":"The body that owns this shape.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate to create this shape at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate to create this shape at.","default":"","optional":"","nullable":""},{"name":"radius","type":"number","description":"The radius of this Circle.","default":"","optional":"","nullable":""}]},"functions":[{"name":"integrate","description":"Updates this Circles position.","parameters":[]},{"name":"reportCollisionVsWorld","description":"Process a world collision and apply the resulting forces.","parameters":[{"name":"px","type":"number","description":"The tangent velocity","default":"","optional":"","nullable":""},{"name":"py","type":"number","description":"The tangent velocity","default":"","optional":"","nullable":""},{"name":"dx","type":"number","description":"Collision normal","default":"","optional":"","nullable":""},{"name":"dy","type":"number","description":"Collision normal","default":"","optional":"","nullable":""},{"name":"obj","type":"number","description":"Object this Circle collided with","default":"","optional":"","nullable":""}]},{"name":"collideWorldBounds","description":"Collides this Circle against the world bounds.","parameters":[]},{"name":"collideCircleVsTile","description":"Collides this Circle with a Tile.","parameters":[{"name":"t","type":"Phaser.Physics.Ninja.Tile","description":"The Tile involved in the collision.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if they collide, otherwise false."}},{"name":"resolveCircleTile","description":"Resolves tile collision.","parameters":[{"name":"x","type":"number","description":"Penetration depth on the x axis.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Penetration depth on the y axis.","default":"","optional":"","nullable":""},{"name":"oH","type":"number","description":"Grid / voronoi region.","default":"","optional":"","nullable":""},{"name":"oV","type":"number","description":"Grid / voronoi region.","default":"","optional":"","nullable":""},{"name":"obj","type":"Phaser.Physics.Ninja.Circle","description":"The Circle involved in the collision.","default":"","optional":"","nullable":""},{"name":"t","type":"Phaser.Physics.Ninja.Tile","description":"The Tile involved in the collision.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The result of the collision."}},{"name":"projCircle_Full","description":"Resolves Full tile collision.","parameters":[{"name":"x","type":"number","description":"Penetration depth on the x axis.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Penetration depth on the y axis.","default":"","optional":"","nullable":""},{"name":"oH","type":"number","description":"Grid / voronoi region.","default":"","optional":"","nullable":""},{"name":"oV","type":"number","description":"Grid / voronoi region.","default":"","optional":"","nullable":""},{"name":"obj","type":"Phaser.Physics.Ninja.Circle","description":"The Circle involved in the collision.","default":"","optional":"","nullable":""},{"name":"t","type":"Phaser.Physics.Ninja.Tile","description":"The Tile involved in the collision.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The result of the collision."}},{"name":"projCircle_45Deg","description":"Resolves 45 Degree tile collision.","parameters":[{"name":"x","type":"number","description":"Penetration depth on the x axis.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Penetration depth on the y axis.","default":"","optional":"","nullable":""},{"name":"oH","type":"number","description":"Grid / voronoi region.","default":"","optional":"","nullable":""},{"name":"oV","type":"number","description":"Grid / voronoi region.","default":"","optional":"","nullable":""},{"name":"obj","type":"Phaser.Physics.Ninja.Circle","description":"The Circle involved in the collision.","default":"","optional":"","nullable":""},{"name":"t","type":"Phaser.Physics.Ninja.Tile","description":"The Tile involved in the collision.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The result of the collision."}},{"name":"projCircle_Concave","description":"Resolves Concave tile collision.","parameters":[{"name":"x","type":"number","description":"Penetration depth on the x axis.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Penetration depth on the y axis.","default":"","optional":"","nullable":""},{"name":"oH","type":"number","description":"Grid / voronoi region.","default":"","optional":"","nullable":""},{"name":"oV","type":"number","description":"Grid / voronoi region.","default":"","optional":"","nullable":""},{"name":"obj","type":"Phaser.Physics.Ninja.Circle","description":"The Circle involved in the collision.","default":"","optional":"","nullable":""},{"name":"t","type":"Phaser.Physics.Ninja.Tile","description":"The Tile involved in the collision.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The result of the collision."}},{"name":"projCircle_Convex","description":"Resolves Convex tile collision.","parameters":[{"name":"x","type":"number","description":"Penetration depth on the x axis.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Penetration depth on the y axis.","default":"","optional":"","nullable":""},{"name":"oH","type":"number","description":"Grid / voronoi region.","default":"","optional":"","nullable":""},{"name":"oV","type":"number","description":"Grid / voronoi region.","default":"","optional":"","nullable":""},{"name":"obj","type":"Phaser.Physics.Ninja.Circle","description":"The Circle involved in the collision.","default":"","optional":"","nullable":""},{"name":"t","type":"Phaser.Physics.Ninja.Tile","description":"The Tile involved in the collision.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The result of the collision."}},{"name":"projCircle_Half","description":"Resolves Half tile collision.","parameters":[{"name":"x","type":"number","description":"Penetration depth on the x axis.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Penetration depth on the y axis.","default":"","optional":"","nullable":""},{"name":"oH","type":"number","description":"Grid / voronoi region.","default":"","optional":"","nullable":""},{"name":"oV","type":"number","description":"Grid / voronoi region.","default":"","optional":"","nullable":""},{"name":"obj","type":"Phaser.Physics.Ninja.Circle","description":"The Circle involved in the collision.","default":"","optional":"","nullable":""},{"name":"t","type":"Phaser.Physics.Ninja.Tile","description":"The Tile involved in the collision.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The result of the collision."}},{"name":"projCircle_22DegS","description":"Resolves 22 Degree tile collision.","parameters":[{"name":"x","type":"number","description":"Penetration depth on the x axis.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Penetration depth on the y axis.","default":"","optional":"","nullable":""},{"name":"oH","type":"number","description":"Grid / voronoi region.","default":"","optional":"","nullable":""},{"name":"oV","type":"number","description":"Grid / voronoi region.","default":"","optional":"","nullable":""},{"name":"obj","type":"Phaser.Physics.Ninja.Circle","description":"The Circle involved in the collision.","default":"","optional":"","nullable":""},{"name":"t","type":"Phaser.Physics.Ninja.Tile","description":"The Tile involved in the collision.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The result of the collision."}},{"name":"projCircle_22DegB","description":"Resolves 22 Degree tile collision.","parameters":[{"name":"x","type":"number","description":"Penetration depth on the x axis.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Penetration depth on the y axis.","default":"","optional":"","nullable":""},{"name":"oH","type":"number","description":"Grid / voronoi region.","default":"","optional":"","nullable":""},{"name":"oV","type":"number","description":"Grid / voronoi region.","default":"","optional":"","nullable":""},{"name":"obj","type":"Phaser.Physics.Ninja.Circle","description":"The Circle involved in the collision.","default":"","optional":"","nullable":""},{"name":"t","type":"Phaser.Physics.Ninja.Tile","description":"The Tile involved in the collision.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The result of the collision."}},{"name":"projCircle_67DegS","description":"Resolves 67 Degree tile collision.","parameters":[{"name":"x","type":"number","description":"Penetration depth on the x axis.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Penetration depth on the y axis.","default":"","optional":"","nullable":""},{"name":"oH","type":"number","description":"Grid / voronoi region.","default":"","optional":"","nullable":""},{"name":"oV","type":"number","description":"Grid / voronoi region.","default":"","optional":"","nullable":""},{"name":"obj","type":"Phaser.Physics.Ninja.Circle","description":"The Circle involved in the collision.","default":"","optional":"","nullable":""},{"name":"t","type":"Phaser.Physics.Ninja.Tile","description":"The Tile involved in the collision.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The result of the collision."}},{"name":"projCircle_67DegB","description":"Resolves 67 Degree tile collision.","parameters":[{"name":"x","type":"number","description":"Penetration depth on the x axis.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Penetration depth on the y axis.","default":"","optional":"","nullable":""},{"name":"oH","type":"number","description":"Grid / voronoi region.","default":"","optional":"","nullable":""},{"name":"oV","type":"number","description":"Grid / voronoi region.","default":"","optional":"","nullable":""},{"name":"obj","type":"Phaser.Physics.Ninja.Circle","description":"The Circle involved in the collision.","default":"","optional":"","nullable":""},{"name":"t","type":"Phaser.Physics.Ninja.Tile","description":"The Tile involved in the collision.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The result of the collision."}},{"name":"destroy","description":"Destroys this Circle's reference to Body and System","parameters":[]},{"name":"render","description":"Render this circle for debugging purposes.","parameters":[{"name":"context","type":"object","description":"The context to render to.","default":"","optional":"","nullable":""},{"name":"xOffset","type":"number","description":"X offset from circle's position to render at.","default":"","optional":"","nullable":""},{"name":"yOffset","type":"number","description":"Y offset from circle's position to render at.","default":"","optional":"","nullable":""},{"name":"color","type":"string","description":"color of the debug shape to be rendered. (format is css color string).","default":"","optional":"","nullable":""},{"name":"filled","type":"boolean","description":"Render the shape as solid (true) or hollow (false).","default":"","optional":"","nullable":""}]}],"members":[{"name":"body","access":"","virtual":false,"description":"A reference to the body that owns this shape.","type":"","default":""},{"name":"system","access":"","virtual":false,"description":"A reference to the physics system.","type":{"names":["Phaser.Physics.Ninja"]},"default":""},{"name":"pos","access":"","virtual":false,"description":"The position of this object.","type":{"names":["Phaser.Point"]},"default":""},{"name":"oldpos","access":"","virtual":false,"description":"The position of this object in the previous update.","type":{"names":["Phaser.Point"]},"default":""},{"name":"radius","access":"","virtual":false,"description":"The radius of this circle shape.","type":{"names":["number"]},"default":""},{"name":"xw","access":"","virtual":false,"description":"Half the width.","type":{"names":["number"]},"default":""},{"name":"yw","access":"","virtual":false,"description":"Half the height.","type":"","default":""},{"name":"width","access":"","virtual":false,"description":"The width.","type":{"names":["number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height.","type":{"names":["number"]},"default":""},{"name":"oH","access":"private","virtual":false,"description":"Internal var.","type":{"names":["number"]},"default":""},{"name":"oV","access":"private","virtual":false,"description":"Internal var.","type":{"names":["number"]},"default":""},{"name":"velocity","access":"","virtual":false,"description":"The velocity of this object.","type":{"names":["Phaser.Point"]},"default":""},{"name":"circleTileProjections","access":"","virtual":false,"description":"All of the collision response handlers.","type":{"names":["object"]},"default":""}]},{"name":"Phaser.Physics.Ninja.Tile","description":"Ninja Physics Tile constructor.\rA Tile is defined by its width, height and type. It's type can include slope data, such as 45 degree slopes, or convex slopes.\rUnderstand that for any type including a slope (types 2 to 29) the Tile must be SQUARE, i.e. have an equal width and height.\rAlso note that as Tiles are primarily used for levels they have gravity disabled and world bounds collision disabled by default.\r\rNote: This class could be massively optimised and reduced in size. I leave that challenge up to you.","constructor":{"name":"Tile","description":"Ninja Physics Tile constructor.\rA Tile is defined by its width, height and type. It's type can include slope data, such as 45 degree slopes, or convex slopes.\rUnderstand that for any type including a slope (types 2 to 29) the Tile must be SQUARE, i.e. have an equal width and height.\rAlso note that as Tiles are primarily used for levels they have gravity disabled and world bounds collision disabled by default.\r\rNote: This class could be massively optimised and reduced in size. I leave that challenge up to you.","parameters":[{"name":"body","type":"Phaser.Physics.Ninja.Body","description":"The body that owns this shape.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate to create this shape at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate to create this shape at.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The width of this AABB.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height of this AABB.","default":"","optional":"","nullable":""},{"name":"type","type":"number","description":"The type of Ninja shape to create. 1 = AABB, 2 = Circle or 3 = Tile.","default":1,"optional":true,"nullable":""}]},"functions":[{"name":"integrate","description":"Updates this objects position.","parameters":[]},{"name":"collideWorldBounds","description":"Tiles cannot collide with the world bounds, it's up to you to keep them where you want them. But we need this API stub to satisfy the Body.","parameters":[]},{"name":"reportCollisionVsWorld","description":"Process a world collision and apply the resulting forces.","parameters":[{"name":"px","type":"number","description":"The tangent velocity","default":"","optional":"","nullable":""},{"name":"py","type":"number","description":"The tangent velocity","default":"","optional":"","nullable":""},{"name":"dx","type":"number","description":"Collision normal","default":"","optional":"","nullable":""},{"name":"dy","type":"number","description":"Collision normal","default":"","optional":"","nullable":""},{"name":"obj","type":"number","description":"Object this Tile collided with","default":"","optional":"","nullable":""}]},{"name":"setType","description":"Tiles cannot collide with the world bounds, it's up to you to keep them where you want them. But we need this API stub to satisfy the Body.","parameters":[{"name":"id","type":"number","description":"The type of Tile this will use, i.e. Phaser.Physics.Ninja.Tile.SLOPE_45DEGpn, Phaser.Physics.Ninja.Tile.CONVEXpp, etc.","default":"","optional":"","nullable":""}]},{"name":"clear","description":"Sets this tile to be empty.","parameters":[]},{"name":"destroy","description":"Destroys this Tiles reference to Body and System.","parameters":[]},{"name":"updateType","description":"This converts a tile from implicitly-defined (via id), to explicit (via properties).\rDon't call directly, instead of setType.","parameters":[]}],"members":[{"name":"body","access":"","virtual":false,"description":"A reference to the body that owns this shape.","type":"","default":""},{"name":"system","access":"","virtual":false,"description":"A reference to the physics system.","type":{"names":["Phaser.Physics.Ninja"]},"default":""},{"name":"id","access":"","virtual":false,"description":"The ID of this Tile.","type":{"names":["number"]},"default":""},{"name":"type","access":"","virtual":false,"description":"The type of this Tile.","type":{"names":["number"]},"default":""},{"name":"pos","access":"","virtual":false,"description":"The position of this object.","type":{"names":["Phaser.Point"]},"default":""},{"name":"oldpos","access":"","virtual":false,"description":"The position of this object in the previous update.","type":{"names":["Phaser.Point"]},"default":""},{"name":"xw","access":"","virtual":false,"description":"Half the width.","type":{"names":["number"]},"default":""},{"name":"yw","access":"","virtual":false,"description":"Half the height.","type":"","default":""},{"name":"width","access":"","virtual":false,"description":"The width.","type":{"names":["number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height.","type":{"names":["number"]},"default":""},{"name":"velocity","access":"","virtual":false,"description":"The velocity of this object.","type":{"names":["Phaser.Point"]},"default":""},{"name":"signx","access":"private","virtual":false,"description":"Internal var.","type":{"names":["number"]},"default":""},{"name":"signy","access":"private","virtual":false,"description":"Internal var.","type":{"names":["number"]},"default":""},{"name":"sx","access":"private","virtual":false,"description":"Internal var.","type":{"names":["number"]},"default":""},{"name":"sy","access":"private","virtual":false,"description":"Internal var.","type":{"names":["number"]},"default":""},{"name":"x","access":"","virtual":false,"description":"The x position.","type":{"names":["number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The y position.","type":{"names":["number"]},"default":""},{"name":"bottom","access":"","virtual":false,"description":"The bottom value of this Body (same as Body.y + Body.height)","type":{"names":["number"]},"default":""},{"name":"right","access":"","virtual":false,"description":"The right value of this Body (same as Body.x + Body.width)","type":{"names":["number"]},"default":""}]},{"name":"Phaser.Physics.Ninja","description":"Ninja Physics. The Ninja Physics system was created in Flash by Metanet Software and ported to JavaScript by Richard Davey.\r\rIt allows for AABB and Circle to Tile collision. Tiles can be any of 34 different types, including slopes, convex and concave shapes.\r\rIt does what it does very well, but is ripe for expansion and optimisation. Here are some features that I'd love to see the community add:\r\r* AABB to AABB collision\r* AABB to Circle collision\r* AABB and Circle 'immovable' property support\r* n-way collision, so an AABB/Circle could pass through a tile from below and land upon it.\r* QuadTree or spatial grid for faster Body vs. Tile Group look-ups.\r* Optimise the internal vector math and reduce the quantity of temporary vars created.\r* Expand Gravity and Bounce to allow for separate x/y axis values.\r* Support Bodies linked to Sprites that don't have anchor set to 0.5\r\rFeel free to attempt any of the above and submit a Pull Request with your code! Be sure to include test cases proving they work.","constructor":{"name":"Ninja","description":"Ninja Physics. The Ninja Physics system was created in Flash by Metanet Software and ported to JavaScript by Richard Davey.\r\rIt allows for AABB and Circle to Tile collision. Tiles can be any of 34 different types, including slopes, convex and concave shapes.\r\rIt does what it does very well, but is ripe for expansion and optimisation. Here are some features that I'd love to see the community add:\r\r* AABB to AABB collision\r* AABB to Circle collision\r* AABB and Circle 'immovable' property support\r* n-way collision, so an AABB/Circle could pass through a tile from below and land upon it.\r* QuadTree or spatial grid for faster Body vs. Tile Group look-ups.\r* Optimise the internal vector math and reduce the quantity of temporary vars created.\r* Expand Gravity and Bounce to allow for separate x/y axis values.\r* Support Bodies linked to Sprites that don't have anchor set to 0.5\r\rFeel free to attempt any of the above and submit a Pull Request with your code! Be sure to include test cases proving they work.","parameters":[{"name":"game","type":"Phaser.Game","description":"reference to the current game instance.","default":"","optional":"","nullable":""}]},"functions":[{"name":"enableAABB","description":"This will create a Ninja Physics AABB body on the given game object. Its dimensions will match the width and height of the object at the point it is created.\rA game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.","parameters":[{"name":"object","type":["object","array","Phaser.Group"],"description":"The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property.","default":"","optional":"","nullable":""},{"name":"children","type":"boolean","description":"Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go.","default":true,"optional":true,"nullable":""}]},{"name":"enableCircle","description":"This will create a Ninja Physics Circle body on the given game object.\rA game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.","parameters":[{"name":"object","type":["object","array","Phaser.Group"],"description":"The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property.","default":"","optional":"","nullable":""},{"name":"radius","type":"number","description":"The radius of the Circle.","default":"","optional":"","nullable":""},{"name":"children","type":"boolean","description":"Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go.","default":true,"optional":true,"nullable":""}]},{"name":"enableTile","description":"This will create a Ninja Physics Tile body on the given game object. There are 34 different types of tile you can create, including 45 degree slopes,\rconvex and concave circles and more. The id parameter controls which Tile type is created, but you can also change it at run-time.\rNote that for all degree based tile types they need to have an equal width and height. If the given object doesn't have equal width and height it will use the width.\rA game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.","parameters":[{"name":"object","type":["object","array","Phaser.Group"],"description":"The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property.","default":"","optional":"","nullable":""},{"name":"id","type":"number","description":"The type of Tile this will use, i.e. Phaser.Physics.Ninja.Tile.SLOPE_45DEGpn, Phaser.Physics.Ninja.Tile.CONVEXpp, etc.","default":1,"optional":true,"nullable":""},{"name":"children","type":"boolean","description":"Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go.","default":true,"optional":true,"nullable":""}]},{"name":"enable","description":"This will create a Ninja Physics body on the given game object or array of game objects.\rA game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.","parameters":[{"name":"object","type":["object","array","Phaser.Group"],"description":"The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property.","default":"","optional":"","nullable":""},{"name":"type","type":"number","description":"The type of Ninja shape to create. 1 = AABB, 2 = Circle or 3 = Tile.","default":1,"optional":true,"nullable":""},{"name":"id","type":"number","description":"If this body is using a Tile shape, you can set the Tile id here, i.e. Phaser.Physics.Ninja.Tile.SLOPE_45DEGpn, Phaser.Physics.Ninja.Tile.CONVEXpp, etc.","default":1,"optional":true,"nullable":""},{"name":"radius","type":"number","description":"If this body is using a Circle shape this controls the radius.","default":"","optional":true,"nullable":""},{"name":"children","type":"boolean","description":"Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go.","default":true,"optional":true,"nullable":""}]},{"name":"enableBody","description":"Creates a Ninja Physics body on the given game object.\rA game object can only have 1 physics body active at any one time, and it can't be changed until the body is nulled.","parameters":[{"name":"object","type":"object","description":"The game object to create the physics body on. A body will only be created if this object has a null `body` property.","default":"","optional":"","nullable":""}]},{"name":"setBounds","description":"Updates the size of this physics world.","parameters":[{"name":"x","type":"number","description":"Top left most corner of the world.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Top left most corner of the world.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"New width of the world. Can never be smaller than the Game.width.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"New height of the world. Can never be smaller than the Game.height.","default":"","optional":"","nullable":""}]},{"name":"setBoundsToWorld","description":"Updates the size of this physics world to match the size of the game world.","parameters":[]},{"name":"clearTilemapLayerBodies","description":"Clears all physics bodies from the given TilemapLayer that were created with `World.convertTilemap`.","parameters":[{"name":"map","type":"Phaser.Tilemap","description":"The Tilemap to get the map data from.","default":"","optional":"","nullable":""},{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to operate on. If not given will default to map.currentLayer.","default":"","optional":true,"nullable":""}]},{"name":"convertTilemap","description":"Goes through all tiles in the given Tilemap and TilemapLayer and converts those set to collide into physics tiles.\rOnly call this *after* you have specified all of the tiles you wish to collide with calls like Tilemap.setCollisionBetween, etc.\rEvery time you call this method it will destroy any previously created bodies and remove them from the world.\rTherefore understand it's a very expensive operation and not to be done in a core game update loop.\r\rIn Ninja the Tiles have an ID from 0 to 33, where 0 is 'empty', 1 is a full tile, 2 is a 45-degree slope, etc. You can find the ID\rlist either at the very bottom of `Tile.js`, or in a handy visual reference in the `resources/Ninja Physics Debug Tiles` folder in the repository.\rThe slopeMap parameter is an array that controls how the indexes of the tiles in your tilemap data will map to the Ninja Tile IDs.\rFor example if you had 6 tiles in your tileset: Imagine the first 4 should be converted into fully solid Tiles and the other 2 are 45-degree slopes.\rYour slopeMap array would look like this: `[ 1, 1, 1, 1, 2, 3 ]`.\rWhere each element of the array is a tile in your tilemap and the resulting Ninja Tile it should create.","parameters":[{"name":"map","type":"Phaser.Tilemap","description":"The Tilemap to get the map data from.","default":"","optional":"","nullable":""},{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to operate on. If not given will default to map.currentLayer.","default":"","optional":"","nullable":""},{"name":"slopeMap","type":"object","description":"The tilemap index to Tile ID map.","default":"","optional":"","nullable":""}],"returns":{"type":"array","description":"An array of the Phaser.Physics.Ninja.Tile objects that were created."}},{"name":"overlap","description":"Checks for overlaps between two game objects. The objects can be Sprites, Groups or Emitters.\rYou can perform Sprite vs. Sprite, Sprite vs. Group and Group vs. Group overlap checks.\rUnlike collide the objects are NOT automatically separated or have any physics applied, they merely test for overlap results.\rThe second parameter can be an array of objects, of differing types.","parameters":[{"name":"object1","type":["Phaser.Sprite","Phaser.Group","Phaser.Particles.Emitter"],"description":"The first object to check. Can be an instance of Phaser.Sprite, Phaser.Group or Phaser.Particles.Emitter.","default":"","optional":"","nullable":""},{"name":"object2","type":["Phaser.Sprite","Phaser.Group","Phaser.Particles.Emitter","array"],"description":"The second object or array of objects to check. Can be Phaser.Sprite, Phaser.Group or Phaser.Particles.Emitter.","default":"","optional":"","nullable":""},{"name":"overlapCallback","type":"function","description":"An optional callback function that is called if the objects overlap. The two objects will be passed to this function in the same order in which you specified them.","default":"","optional":true,"nullable":""},{"name":"processCallback","type":"function","description":"A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then overlapCallback will only be called if processCallback returns true.","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which to run the callbacks.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if an overlap occured otherwise false."}},{"name":"collide","description":"Checks for collision between two game objects. You can perform Sprite vs. Sprite, Sprite vs. Group, Group vs. Group, Sprite vs. Tilemap Layer or Group vs. Tilemap Layer collisions.\rThe second parameter can be an array of objects, of differing types.\rThe objects are also automatically separated. If you don't require separation then use ArcadePhysics.overlap instead.\rAn optional processCallback can be provided. If given this function will be called when two sprites are found to be colliding. It is called before any separation takes place,\rgiving you the chance to perform additional checks. If the function returns true then the collision and separation is carried out. If it returns false it is skipped.\rThe collideCallback is an optional function that is only called if two sprites collide. If a processCallback has been set then it needs to return true for collideCallback to be called.","parameters":[{"name":"object1","type":["Phaser.Sprite","Phaser.Group","Phaser.Particles.Emitter","Phaser.TilemapLayer"],"description":"The first object to check. Can be an instance of Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter, or Phaser.TilemapLayer.","default":"","optional":"","nullable":""},{"name":"object2","type":["Phaser.Sprite","Phaser.Group","Phaser.Particles.Emitter","Phaser.TilemapLayer","array"],"description":"The second object or array of objects to check. Can be Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter or Phaser.TilemapLayer.","default":"","optional":"","nullable":""},{"name":"collideCallback","type":"function","description":"An optional callback function that is called if the objects collide. The two objects will be passed to this function in the same order in which you specified them.","default":"","optional":true,"nullable":""},{"name":"processCallback","type":"function","description":"A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then collision will only happen if processCallback returns true. The two objects will be passed to this function in the same order in which you specified them.","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which to run the callbacks.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if a collision occured otherwise false."}},{"name":"collideHandler","description":"Internal collision handler.","parameters":[{"name":"object1","type":["Phaser.Sprite","Phaser.Group","Phaser.Particles.Emitter","Phaser.TilemapLayer"],"description":"The first object to check. Can be an instance of Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter, or Phaser.TilemapLayer.","default":"","optional":"","nullable":""},{"name":"object2","type":["Phaser.Sprite","Phaser.Group","Phaser.Particles.Emitter","Phaser.TilemapLayer"],"description":"The second object to check. Can be an instance of Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter or Phaser.TilemapLayer. Can also be an array of objects to check.","default":"","optional":"","nullable":""},{"name":"collideCallback","type":"function","description":"An optional callback function that is called if the objects collide. The two objects will be passed to this function in the same order in which you specified them.","default":"","optional":"","nullable":""},{"name":"processCallback","type":"function","description":"A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then collision will only happen if processCallback returns true. The two objects will be passed to this function in the same order in which you specified them.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which to run the callbacks.","default":"","optional":"","nullable":""},{"name":"overlapOnly","type":"boolean","description":"Just run an overlap or a full collision.","default":"","optional":"","nullable":""}]},{"name":"collideSpriteVsSprite","description":"An internal function. Use Phaser.Physics.Ninja.collide instead.","parameters":[]},{"name":"collideSpriteVsGroup","description":"An internal function. Use Phaser.Physics.Ninja.collide instead.","parameters":[]},{"name":"collideGroupVsSelf","description":"An internal function. Use Phaser.Physics.Ninja.collide instead.","parameters":[]},{"name":"collideGroupVsGroup","description":"An internal function. Use Phaser.Physics.Ninja.collide instead.","parameters":[]},{"name":"separate","description":"The core separation function to separate two physics bodies.","parameters":[{"name":"body1","type":"Phaser.Physics.Ninja.Body","description":"The Body object to separate.","default":"","optional":"","nullable":""},{"name":"body2","type":"Phaser.Physics.Ninja.Body","description":"The Body object to separate.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"Returns true if the bodies collided, otherwise false."}}],"members":[{"name":"game","access":"","virtual":false,"description":"Local reference to game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"time","access":"","virtual":false,"description":"Local reference to game.time.","type":{"names":["Phaser.Time"]},"default":""},{"name":"gravity","access":"","virtual":false,"description":"The World gravity setting.","type":{"names":["number"]},"default":""},{"name":"bounds","access":"","virtual":false,"description":"The bounds inside of which the physics world exists. Defaults to match the world bounds.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"maxObjects","access":"","virtual":false,"description":"Used by the QuadTree to set the maximum number of objects per quad.","type":{"names":["number"]},"default":""},{"name":"maxLevels","access":"","virtual":false,"description":"Used by the QuadTree to set the maximum number of iteration levels.","type":{"names":["number"]},"default":""},{"name":"quadTree","access":"","virtual":false,"description":"The world QuadTree.","type":{"names":["Phaser.QuadTree"]},"default":""}]},{"name":"Phaser.Physics.P2.Body","description":"The Physics Body is typically linked to a single Sprite and defines properties that determine how the physics body is simulated.\rThese properties affect how the body reacts to forces, what forces it generates on itself (to simulate friction), and how it reacts to collisions in the scene.\rIn most cases, the properties are used to simulate physical effects. Each body also has its own property values that determine exactly how it reacts to forces and collisions in the scene.\rBy default a single Rectangle shape is added to the Body that matches the dimensions of the parent Sprite. See addShape, removeShape, clearShapes to add extra shapes around the Body.\rNote: When bound to a Sprite to avoid single-pixel jitters on mobile devices we strongly recommend using Sprite sizes that are even on both axis, i.e. 128x128 not 127x127.\rNote: When a game object is given a P2 body it has its anchor x/y set to 0.5, so it becomes centered.","constructor":{"name":"Body","description":"The Physics Body is typically linked to a single Sprite and defines properties that determine how the physics body is simulated.\rThese properties affect how the body reacts to forces, what forces it generates on itself (to simulate friction), and how it reacts to collisions in the scene.\rIn most cases, the properties are used to simulate physical effects. Each body also has its own property values that determine exactly how it reacts to forces and collisions in the scene.\rBy default a single Rectangle shape is added to the Body that matches the dimensions of the parent Sprite. See addShape, removeShape, clearShapes to add extra shapes around the Body.\rNote: When bound to a Sprite to avoid single-pixel jitters on mobile devices we strongly recommend using Sprite sizes that are even on both axis, i.e. 128x128 not 127x127.\rNote: When a game object is given a P2 body it has its anchor x/y set to 0.5, so it becomes centered.","parameters":[{"name":"game","type":"Phaser.Game","description":"Game reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"sprite","type":"Phaser.Sprite","description":"The Sprite object this physics body belongs to.","default":"","optional":true,"nullable":""},{"name":"x","type":"number","description":"The x coordinate of this Body.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate of this Body.","default":"","optional":true,"nullable":""},{"name":"mass","type":"number","description":"The default mass of this Body (0 = static).","default":1,"optional":true,"nullable":""}]},"functions":[{"name":"createBodyCallback","description":"Sets a callback to be fired any time a shape in this Body impacts with a shape in the given Body. The impact test is performed against body.id values.\rThe callback will be sent 4 parameters: This body, the body that impacted, the Shape in this body and the shape in the impacting body.\rNote that the impact event happens after collision resolution, so it cannot be used to prevent a collision from happening.\rIt also happens mid-step. So do not destroy a Body during this callback, instead set safeDestroy to true so it will be killed on the next preUpdate.","parameters":[{"name":"object","type":["Phaser.Sprite","Phaser.TileSprite","Phaser.Physics.P2.Body","p2.Body"],"description":"The object to send impact events for.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"The callback to fire on impact. Set to null to clear a previously set callback.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context under which the callback will fire.","default":"","optional":"","nullable":""}]},{"name":"createGroupCallback","description":"Sets a callback to be fired any time this Body impacts with the given Group. The impact test is performed against shape.collisionGroup values.\rThe callback will be sent 4 parameters: This body, the body that impacted, the Shape in this body and the shape in the impacting body.\rThis callback will only fire if this Body has been assigned a collision group.\rNote that the impact event happens after collision resolution, so it cannot be used to prevent a collision from happening.\rIt also happens mid-step. So do not destroy a Body during this callback, instead set safeDestroy to true so it will be killed on the next preUpdate.","parameters":[{"name":"group","type":"Phaser.Physics.CollisionGroup","description":"The Group to send impact events for.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"The callback to fire on impact. Set to null to clear a previously set callback.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context under which the callback will fire.","default":"","optional":"","nullable":""}]},{"name":"getCollisionMask","description":"Gets the collision bitmask from the groups this body collides with.","parameters":[],"returns":{"type":"number","description":"The bitmask."}},{"name":"updateCollisionMask","description":"Updates the collisionMask.","parameters":[{"name":"shape","type":"p2.Shape","description":"An optional Shape. If not provided the collision group will be added to all Shapes in this Body.","default":"","optional":true,"nullable":""}]},{"name":"setCollisionGroup","description":"Sets the given CollisionGroup to be the collision group for all shapes in this Body, unless a shape is specified.\rThis also resets the collisionMask.","parameters":[{"name":"group","type":"Phaser.Physics.CollisionGroup","description":"The Collision Group that this Bodies shapes will use.","default":"","optional":"","nullable":""},{"name":"shape","type":"p2.Shape","description":"An optional Shape. If not provided the collision group will be added to all Shapes in this Body.","default":"","optional":true,"nullable":""}]},{"name":"clearCollision","description":"Clears the collision data from the shapes in this Body. Optionally clears Group and/or Mask.","parameters":[{"name":"clearGroup","type":"boolean","description":"Clear the collisionGroup value from the shape/s?","default":true,"optional":true,"nullable":""},{"name":"clearMask","type":"boolean","description":"Clear the collisionMask value from the shape/s?","default":true,"optional":true,"nullable":""},{"name":"shape","type":"p2.Shape","description":"An optional Shape. If not provided the collision data will be cleared from all Shapes in this Body.","default":"","optional":true,"nullable":""}]},{"name":"removeCollisionGroup","description":"Removes the given CollisionGroup, or array of CollisionGroups, from the list of groups that this body will collide with and updates the collision masks.","parameters":[{"name":"group","type":["Phaser.Physics.CollisionGroup","array"],"description":"The Collision Group or Array of Collision Groups that this Bodies shapes should not collide with anymore.","default":"","optional":"","nullable":""},{"name":"clearCallback","type":"boolean","description":"Clear the callback that will be triggered when this Body impacts with the given Group?","default":true,"optional":true,"nullable":""},{"name":"shape","type":"p2.Shape","description":"An optional Shape. If not provided the updated collision mask will be added to all Shapes in this Body.","default":"","optional":true,"nullable":""}]},{"name":"collides","description":"Adds the given CollisionGroup, or array of CollisionGroups, to the list of groups that this body will collide with and updates the collision masks.","parameters":[{"name":"group","type":["Phaser.Physics.CollisionGroup","array"],"description":"The Collision Group or Array of Collision Groups that this Bodies shapes will collide with.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"Optional callback that will be triggered when this Body impacts with the given Group.","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context under which the callback will be called.","default":"","optional":true,"nullable":""},{"name":"shape","type":"p2.Shape","description":"An optional Shape. If not provided the collision mask will be added to all Shapes in this Body.","default":"","optional":true,"nullable":""}]},{"name":"adjustCenterOfMass","description":"Moves the shape offsets so their center of mass becomes the body center of mass.","parameters":[]},{"name":"getVelocityAtPoint","description":"Gets the velocity of a point in the body.","parameters":[{"name":"result","type":"Array","description":"A vector to store the result in.","default":"","optional":"","nullable":""},{"name":"relativePoint","type":"Array","description":"A world oriented vector, indicating the position of the point to get the velocity from.","default":"","optional":"","nullable":""}],"returns":{"type":"Array","description":"The result vector."}},{"name":"applyDamping","description":"Apply damping, see http://code.google.com/p/bullet/issues/detail?id=74 for details.","parameters":[{"name":"dt","type":"number","description":"Current time step.","default":"","optional":"","nullable":""}]},{"name":"applyImpulse","description":"Apply impulse to a point relative to the body.\rThis could for example be a point on the Body surface. An impulse is a force added to a body during a short \rperiod of time (impulse = force * time). Impulses will be added to Body.velocity and Body.angularVelocity.","parameters":[{"name":"impulse","type":["Float32Array","Array"],"description":"The impulse vector to add, oriented in world space.","default":"","optional":"","nullable":""},{"name":"worldX","type":"number","description":"A point relative to the body in world space. If not given, it is set to zero and all of the impulse will be exerted on the center of mass.","default":"","optional":"","nullable":""},{"name":"worldY","type":"number","description":"A point relative to the body in world space. If not given, it is set to zero and all of the impulse will be exerted on the center of mass.","default":"","optional":"","nullable":""}]},{"name":"applyImpulseLocal","description":"Apply impulse to a point local to the body.\r\rThis could for example be a point on the Body surface. An impulse is a force added to a body during a short \rperiod of time (impulse = force * time). Impulses will be added to Body.velocity and Body.angularVelocity.","parameters":[{"name":"impulse","type":["Float32Array","Array"],"description":"The impulse vector to add, oriented in local space.","default":"","optional":"","nullable":""},{"name":"localX","type":"number","description":"A local point on the body.","default":"","optional":"","nullable":""},{"name":"localY","type":"number","description":"A local point on the body.","default":"","optional":"","nullable":""}]},{"name":"applyForce","description":"Apply force to a world point.\r\rThis could for example be a point on the RigidBody surface. Applying force \rthis way will add to Body.force and Body.angularForce.","parameters":[{"name":"force","type":["Float32Array","Array"],"description":"The force vector to add.","default":"","optional":"","nullable":""},{"name":"worldX","type":"number","description":"The world x point to apply the force on.","default":"","optional":"","nullable":""},{"name":"worldY","type":"number","description":"The world y point to apply the force on.","default":"","optional":"","nullable":""}]},{"name":"setZeroForce","description":"Sets the force on the body to zero.","parameters":[]},{"name":"setZeroRotation","description":"If this Body is dynamic then this will zero its angular velocity.","parameters":[]},{"name":"setZeroVelocity","description":"If this Body is dynamic then this will zero its velocity on both axis.","parameters":[]},{"name":"setZeroDamping","description":"Sets the Body damping and angularDamping to zero.","parameters":[]},{"name":"toLocalFrame","description":"Transform a world point to local body frame.","parameters":[{"name":"out","type":["Float32Array","Array"],"description":"The vector to store the result in.","default":"","optional":"","nullable":""},{"name":"worldPoint","type":["Float32Array","Array"],"description":"The input world vector.","default":"","optional":"","nullable":""}]},{"name":"toWorldFrame","description":"Transform a local point to world frame.","parameters":[{"name":"out","type":"Array","description":"The vector to store the result in.","default":"","optional":"","nullable":""},{"name":"localPoint","type":"Array","description":"The input local vector.","default":"","optional":"","nullable":""}]},{"name":"rotateLeft","description":"This will rotate the Body by the given speed to the left (counter-clockwise).","parameters":[{"name":"speed","type":"number","description":"The speed at which it should rotate.","default":"","optional":"","nullable":""}]},{"name":"rotateRight","description":"This will rotate the Body by the given speed to the left (clockwise).","parameters":[{"name":"speed","type":"number","description":"The speed at which it should rotate.","default":"","optional":"","nullable":""}]},{"name":"moveForward","description":"Moves the Body forwards based on its current angle and the given speed.\rThe speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).","parameters":[{"name":"speed","type":"number","description":"The speed at which it should move forwards.","default":"","optional":"","nullable":""}]},{"name":"moveBackward","description":"Moves the Body backwards based on its current angle and the given speed.\rThe speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).","parameters":[{"name":"speed","type":"number","description":"The speed at which it should move backwards.","default":"","optional":"","nullable":""}]},{"name":"thrust","description":"Applies a force to the Body that causes it to 'thrust' forwards, based on its current angle and the given speed.\rThe speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).","parameters":[{"name":"speed","type":"number","description":"The speed at which it should thrust.","default":"","optional":"","nullable":""}]},{"name":"thrustLeft","description":"Applies a force to the Body that causes it to 'thrust' to the left, based on its current angle and the given speed.\rThe speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).","parameters":[{"name":"speed","type":"number","description":"The speed at which it should move to the left.","default":"","optional":"","nullable":""}]},{"name":"thrustRight","description":"Applies a force to the Body that causes it to 'thrust' to the right, based on its current angle and the given speed.\rThe speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).","parameters":[{"name":"speed","type":"number","description":"The speed at which it should move to the right.","default":"","optional":"","nullable":""}]},{"name":"reverse","description":"Applies a force to the Body that causes it to 'thrust' backwards (in reverse), based on its current angle and the given speed.\rThe speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).","parameters":[{"name":"speed","type":"number","description":"The speed at which it should reverse.","default":"","optional":"","nullable":""}]},{"name":"moveLeft","description":"If this Body is dynamic then this will move it to the left by setting its x velocity to the given speed.\rThe speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).","parameters":[{"name":"speed","type":"number","description":"The speed at which it should move to the left, in pixels per second.","default":"","optional":"","nullable":""}]},{"name":"moveRight","description":"If this Body is dynamic then this will move it to the right by setting its x velocity to the given speed.\rThe speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).","parameters":[{"name":"speed","type":"number","description":"The speed at which it should move to the right, in pixels per second.","default":"","optional":"","nullable":""}]},{"name":"moveUp","description":"If this Body is dynamic then this will move it up by setting its y velocity to the given speed.\rThe speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).","parameters":[{"name":"speed","type":"number","description":"The speed at which it should move up, in pixels per second.","default":"","optional":"","nullable":""}]},{"name":"moveDown","description":"If this Body is dynamic then this will move it down by setting its y velocity to the given speed.\rThe speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).","parameters":[{"name":"speed","type":"number","description":"The speed at which it should move down, in pixels per second.","default":"","optional":"","nullable":""}]},{"name":"preUpdate","description":"Internal method. This is called directly before the sprites are sent to the renderer and after the update function has finished.","parameters":[]},{"name":"postUpdate","description":"Internal method. This is called directly before the sprites are sent to the renderer and after the update function has finished.","parameters":[]},{"name":"reset","description":"Resets the Body force, velocity (linear and angular) and rotation. Optionally resets damping and mass.","parameters":[{"name":"x","type":"number","description":"The new x position of the Body.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The new x position of the Body.","default":"","optional":"","nullable":""},{"name":"resetDamping","type":"boolean","description":"Resets the linear and angular damping.","default":"","optional":true,"nullable":""},{"name":"resetMass","type":"boolean","description":"Sets the Body mass back to 1.","default":"","optional":true,"nullable":""}]},{"name":"addToWorld","description":"Adds this physics body to the world.","parameters":[]},{"name":"removeFromWorld","description":"Removes this physics body from the world.","parameters":[]},{"name":"destroy","description":"Destroys this Body and all references it holds to other objects.","parameters":[]},{"name":"clearShapes","description":"Removes all Shapes from this Body.","parameters":[]},{"name":"addShape","description":"Add a shape to the body. You can pass a local transform when adding a shape, so that the shape gets an offset and an angle relative to the body center of mass.\rWill automatically update the mass properties and bounding radius.\rIf this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.","parameters":[{"name":"shape","type":"p2.Shape","description":"The shape to add to the body.","default":"","optional":"","nullable":""},{"name":"offsetX","type":"number","description":"Local horizontal offset of the shape relative to the body center of mass.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"number","description":"Local vertical offset of the shape relative to the body center of mass.","default":"","optional":true,"nullable":""},{"name":"rotation","type":"number","description":"Local rotation of the shape relative to the body center of mass, specified in radians.","default":"","optional":true,"nullable":""}],"returns":{"type":"p2.Shape","description":"The shape that was added to the body."}},{"name":"addCircle","description":"Adds a Circle shape to this Body. You can control the offset from the center of the body and the rotation.","parameters":[{"name":"radius","type":"number","description":"The radius of this circle (in pixels)","default":"","optional":"","nullable":""},{"name":"offsetX","type":"number","description":"Local horizontal offset of the shape relative to the body center of mass.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"number","description":"Local vertical offset of the shape relative to the body center of mass.","default":"","optional":true,"nullable":""},{"name":"rotation","type":"number","description":"Local rotation of the shape relative to the body center of mass, specified in radians.","default":"","optional":true,"nullable":""}],"returns":{"type":"p2.Circle","description":"The Circle shape that was added to the Body."}},{"name":"addRectangle","description":"Adds a Rectangle shape to this Body. You can control the offset from the center of the body and the rotation.","parameters":[{"name":"width","type":"number","description":"The width of the rectangle in pixels.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height of the rectangle in pixels.","default":"","optional":"","nullable":""},{"name":"offsetX","type":"number","description":"Local horizontal offset of the shape relative to the body center of mass.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"number","description":"Local vertical offset of the shape relative to the body center of mass.","default":"","optional":true,"nullable":""},{"name":"rotation","type":"number","description":"Local rotation of the shape relative to the body center of mass, specified in radians.","default":"","optional":true,"nullable":""}],"returns":{"type":"p2.Box","description":"The shape that was added to the Body."}},{"name":"addPlane","description":"Adds a Plane shape to this Body. The plane is facing in the Y direction. You can control the offset from the center of the body and the rotation.","parameters":[{"name":"offsetX","type":"number","description":"Local horizontal offset of the shape relative to the body center of mass.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"number","description":"Local vertical offset of the shape relative to the body center of mass.","default":"","optional":true,"nullable":""},{"name":"rotation","type":"number","description":"Local rotation of the shape relative to the body center of mass, specified in radians.","default":"","optional":true,"nullable":""}],"returns":{"type":"p2.Plane","description":"The Plane shape that was added to the Body."}},{"name":"addParticle","description":"Adds a Particle shape to this Body. You can control the offset from the center of the body and the rotation.","parameters":[{"name":"offsetX","type":"number","description":"Local horizontal offset of the shape relative to the body center of mass.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"number","description":"Local vertical offset of the shape relative to the body center of mass.","default":"","optional":true,"nullable":""},{"name":"rotation","type":"number","description":"Local rotation of the shape relative to the body center of mass, specified in radians.","default":"","optional":true,"nullable":""}],"returns":{"type":"p2.Particle","description":"The Particle shape that was added to the Body."}},{"name":"addLine","description":"Adds a Line shape to this Body.\rThe line shape is along the x direction, and stretches from [-length/2, 0] to [length/2,0].\rYou can control the offset from the center of the body and the rotation.","parameters":[{"name":"length","type":"number","description":"The length of this line (in pixels)","default":"","optional":"","nullable":""},{"name":"offsetX","type":"number","description":"Local horizontal offset of the shape relative to the body center of mass.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"number","description":"Local vertical offset of the shape relative to the body center of mass.","default":"","optional":true,"nullable":""},{"name":"rotation","type":"number","description":"Local rotation of the shape relative to the body center of mass, specified in radians.","default":"","optional":true,"nullable":""}],"returns":{"type":"p2.Line","description":"The Line shape that was added to the Body."}},{"name":"addCapsule","description":"Adds a Capsule shape to this Body.\rYou can control the offset from the center of the body and the rotation.","parameters":[{"name":"length","type":"number","description":"The distance between the end points in pixels.","default":"","optional":"","nullable":""},{"name":"radius","type":"number","description":"Radius of the capsule in pixels.","default":"","optional":"","nullable":""},{"name":"offsetX","type":"number","description":"Local horizontal offset of the shape relative to the body center of mass.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"number","description":"Local vertical offset of the shape relative to the body center of mass.","default":"","optional":true,"nullable":""},{"name":"rotation","type":"number","description":"Local rotation of the shape relative to the body center of mass, specified in radians.","default":"","optional":true,"nullable":""}],"returns":{"type":"p2.Capsule","description":"The Capsule shape that was added to the Body."}},{"name":"addPolygon","description":"Reads a polygon shape path, and assembles convex shapes from that and puts them at proper offset points. The shape must be simple and without holes.\rThis function expects the x.y values to be given in pixels. If you want to provide them at p2 world scales then call Body.data.fromPolygon directly.","parameters":[{"name":"options","type":"object","description":"An object containing the build options:","default":"","optional":"","nullable":""},{"name":"options.optimalDecomp","type":"boolean","description":"Set to true if you need optimal decomposition. Warning: very slow for polygons with more than 10 vertices.","default":"","optional":true,"nullable":""},{"name":"options.skipSimpleCheck","type":"boolean","description":"Set to true if you already know that the path is not intersecting itself.","default":"","optional":true,"nullable":""},{"name":"options.removeCollinearPoints","type":["boolean","number"],"description":"Set to a number (angle threshold value) to remove collinear points, or false to keep all points.","default":"","optional":true,"nullable":""},{"name":"points","type":["Array.<number>","number"],"description":"An array of 2d vectors that form the convex or concave polygon.\r                                      Either [[0,0], [0,1],...] or a flat array of numbers that will be interpreted as [x,y, x,y, ...],\r                                      or the arguments passed can be flat x,y values e.g. `setPolygon(options, x,y, x,y, x,y, ...)` where `x` and `y` are numbers.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True on success, else false."}},{"name":"removeShape","description":"Remove a shape from the body. Will automatically update the mass properties and bounding radius.","parameters":[{"name":"shape","type":["p2.Circle","p2.Rectangle","p2.Plane","p2.Line","p2.Particle"],"description":"The shape to remove from the body.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the shape was found and removed, else false."}},{"name":"setCircle","description":"Clears any previously set shapes. Then creates a new Circle shape and adds it to this Body.\rIf this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.","parameters":[{"name":"radius","type":"number","description":"The radius of this circle (in pixels)","default":"","optional":"","nullable":""},{"name":"offsetX","type":"number","description":"Local horizontal offset of the shape relative to the body center of mass.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"number","description":"Local vertical offset of the shape relative to the body center of mass.","default":"","optional":true,"nullable":""},{"name":"rotation","type":"number","description":"Local rotation of the shape relative to the body center of mass, specified in radians.","default":"","optional":true,"nullable":""}]},{"name":"setRectangle","description":"Clears any previously set shapes. The creates a new Rectangle shape at the given size and offset, and adds it to this Body.\rIf you wish to create a Rectangle to match the size of a Sprite or Image see Body.setRectangleFromSprite.\rIf this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.","parameters":[{"name":"width","type":"number","description":"The width of the rectangle in pixels.","default":16,"optional":true,"nullable":""},{"name":"height","type":"number","description":"The height of the rectangle in pixels.","default":16,"optional":true,"nullable":""},{"name":"offsetX","type":"number","description":"Local horizontal offset of the shape relative to the body center of mass.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"number","description":"Local vertical offset of the shape relative to the body center of mass.","default":"","optional":true,"nullable":""},{"name":"rotation","type":"number","description":"Local rotation of the shape relative to the body center of mass, specified in radians.","default":"","optional":true,"nullable":""}],"returns":{"type":"p2.Rectangle","description":"The Rectangle shape that was added to the Body."}},{"name":"setRectangleFromSprite","description":"Clears any previously set shapes.\rThen creates a Rectangle shape sized to match the dimensions and orientation of the Sprite given.\rIf no Sprite is given it defaults to using the parent of this Body.\rIf this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.","parameters":[{"name":"sprite","type":["Phaser.Sprite","Phaser.Image"],"description":"The Sprite on which the Rectangle will get its dimensions.","default":"","optional":true,"nullable":""}],"returns":{"type":"p2.Rectangle","description":"The Rectangle shape that was added to the Body."}},{"name":"setMaterial","description":"Adds the given Material to all Shapes that belong to this Body.\rIf you only wish to apply it to a specific Shape in this Body then provide that as the 2nd parameter.","parameters":[{"name":"material","type":"Phaser.Physics.P2.Material","description":"The Material that will be applied.","default":"","optional":"","nullable":""},{"name":"shape","type":"p2.Shape","description":"An optional Shape. If not provided the Material will be added to all Shapes in this Body.","default":"","optional":true,"nullable":""}]},{"name":"shapeChanged","description":"Updates the debug draw if any body shapes change.","parameters":[]},{"name":"addPhaserPolygon","description":"Reads the shape data from a physics data file stored in the Game.Cache and adds it as a polygon to this Body.\rThe shape data format is based on the output of the\r{@link https://github.com/photonstorm/phaser/tree/master/resources/PhysicsEditor%20Exporter|custom phaser exporter} for\r{@link https://www.codeandweb.com/physicseditor|PhysicsEditor}","parameters":[{"name":"key","type":"string","description":"The key of the Physics Data file as stored in Game.Cache.","default":"","optional":"","nullable":""},{"name":"object","type":"string","description":"The key of the object within the Physics data file that you wish to load the shape data from.","default":"","optional":"","nullable":""}],"returns":{"type":"Array","description":"A list of created fixtures to be used with Phaser.Physics.P2.FixtureList"}},{"name":"addFixture","description":"Add a polygon fixture. This is used during #loadPolygon.","parameters":[{"name":"fixtureData","type":"string","description":"The data for the fixture. It contains: isSensor, filter (collision) and the actual polygon shapes.","default":"","optional":"","nullable":""}],"returns":{"type":"array","description":"An array containing the generated shapes for the given polygon."}},{"name":"loadPolygon","description":"Reads the shape data from a physics data file stored in the Game.Cache and adds it as a polygon to this Body.\r\rAs well as reading the data from the Cache you can also pass `null` as the first argument and a\rphysics data object as the second. When doing this you must ensure the structure of the object is correct in advance.\r\rFor more details see the format of the Lime / Corona Physics Editor export.","parameters":[{"name":"key","type":"string","description":"The key of the Physics Data file as stored in Game.Cache. Alternatively set to `null` and pass the \r    data as the 2nd argument.","default":"","optional":"","nullable":""},{"name":"object","type":["string","object"],"description":"The key of the object within the Physics data file that you wish to load the shape data from, \r    or if key is null pass the actual physics data object itself as this parameter.","default":"","optional":"","nullable":""},{"name":"scale","type":"number","description":"Optionally resize the loaded polygon.","default":1,"optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True on success, else false."}}],"members":[{"name":"game","access":"","virtual":false,"description":"Local reference to game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"world","access":"","virtual":false,"description":"Local reference to the P2 World.","type":{"names":["Phaser.Physics.P2"]},"default":""},{"name":"sprite","access":"","virtual":false,"description":"Reference to the parent Sprite.","type":{"names":["Phaser.Sprite"]},"default":""},{"name":"type","access":"","virtual":false,"description":"The type of physics system this body belongs to.","type":{"names":["number"]},"default":""},{"name":"offset","access":"","virtual":false,"description":"The offset of the Physics Body from the Sprite x/y position.","type":{"names":["Phaser.Point"]},"default":""},{"name":"data","access":"protected","virtual":false,"description":"The p2 Body data.","type":{"names":["p2.Body"]},"default":""},{"name":"velocity","access":"","virtual":false,"description":"The velocity of the body. Set velocity.x to a negative value to move to the left, position to the right. velocity.y negative values move up, positive move down.","type":{"names":["Phaser.Physics.P2.InversePointProxy"]},"default":""},{"name":"force","access":"","virtual":false,"description":"The force applied to the body.","type":{"names":["Phaser.Physics.P2.InversePointProxy"]},"default":""},{"name":"gravity","access":"","virtual":false,"description":"A locally applied gravity force to the Body. Applied directly before the world step. NOTE: Not currently implemented.","type":{"names":["Phaser.Point"]},"default":""},{"name":"onBeginContact","access":"","virtual":false,"description":"Dispatched when a first contact is created between shapes in two bodies. \rThis event is fired during the step, so collision has already taken place.\r\rThe event will be sent 5 arguments in this order:\r\rThe Phaser.Physics.P2.Body it is in contact with. *This might be null* if the Body was created directly in the p2 world.\rThe p2.Body this Body is in contact with.\rThe Shape from this body that caused the contact.\rThe Shape from the contact body.\rThe Contact Equation data array.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onEndContact","access":"","virtual":false,"description":"Dispatched when contact ends between shapes in two bodies.\rThis event is fired during the step, so collision has already taken place.\r\rThe event will be sent 4 arguments in this order:\r\rThe Phaser.Physics.P2.Body it is in contact with. *This might be null* if the Body was created directly in the p2 world.\rThe p2.Body this Body has ended contact with.\rThe Shape from this body that caused the original contact.\rThe Shape from the contact body.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"collidesWith","access":"","virtual":false,"description":"Array of CollisionGroups that this Bodies shapes collide with.","type":{"names":["array"]},"default":""},{"name":"removeNextStep","access":"","virtual":false,"description":"To avoid deleting this body during a physics step, and causing all kinds of problems, set removeNextStep to true to have it removed in the next preUpdate.","type":{"names":["boolean"]},"default":""},{"name":"debugBody","access":"","virtual":false,"description":"Reference to the debug body.","type":{"names":["Phaser.Physics.P2.BodyDebug"]},"default":""},{"name":"dirty","access":"","virtual":false,"description":"Internally used by Sprite.x/y","type":{"names":["boolean"]},"default":""},{"name":"_collideWorldBounds","access":"private","virtual":false,"description":"Internal var that determines if this Body collides with the world bounds or not.","type":{"names":["boolean"]},"default":""},{"name":"_bodyCallbacks","access":"private","virtual":false,"description":"Array of Body callbacks.","type":{"names":["object"]},"default":""},{"name":"_bodyCallbackContext","access":"private","virtual":false,"description":"Array of Body callback contexts.","type":{"names":["object"]},"default":""},{"name":"_groupCallbacks","access":"private","virtual":false,"description":"Array of Group callbacks.","type":{"names":["object"]},"default":""},{"name":"_groupCallbackContext","access":"private","virtual":false,"description":"Array of Grouo callback contexts.","type":"","default":""},{"name":"_reset","access":"private","virtual":false,"description":"Internal var.","type":{"names":["boolean"]},"default":""},{"name":"DYNAMIC","access":"","virtual":false,"description":"Dynamic body. Dynamic bodies body can move and respond to collisions and forces.","type":{"names":["Number"]},"default":""},{"name":"STATIC","access":"","virtual":false,"description":"Static body. Static bodies do not move, and they do not respond to forces or collision.","type":{"names":["Number"]},"default":""},{"name":"KINEMATIC","access":"","virtual":false,"description":"Kinematic body. Kinematic bodies only moves according to its .velocity, and does not respond to collisions or force.","type":{"names":["Number"]},"default":""},{"name":"static","access":"","virtual":false,"description":"Returns true if the Body is static. Setting Body.static to 'false' will make it dynamic.","type":{"names":["boolean"]},"default":""},{"name":"dynamic","access":"","virtual":false,"description":"Returns true if the Body is dynamic. Setting Body.dynamic to 'false' will make it static.","type":{"names":["boolean"]},"default":""},{"name":"kinematic","access":"","virtual":false,"description":"Returns true if the Body is kinematic. Setting Body.kinematic to 'false' will make it static.","type":{"names":["boolean"]},"default":""},{"name":"allowSleep","access":"","virtual":false,"description":"-","type":{"names":["boolean"]},"default":""},{"name":"angle","access":"","virtual":false,"description":"The angle of the Body in degrees from its original orientation. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.\rValues outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement Body.angle = 450 is the same as Body.angle = 90.\rIf you wish to work in radians instead of degrees use the property Body.rotation instead. Working in radians is faster as it doesn't have to convert values. The angle of this Body in degrees.","type":{"names":["number"]},"default":""},{"name":"angularDamping","access":"","virtual":false,"description":"Damping is specified as a value between 0 and 1, which is the proportion of velocity lost per second. The angular damping acting acting on the body.","type":{"names":["number"]},"default":""},{"name":"angularForce","access":"","virtual":false,"description":"The angular force acting on the body.","type":{"names":["number"]},"default":""},{"name":"angularVelocity","access":"","virtual":false,"description":"The angular velocity of the body.","type":{"names":["number"]},"default":""},{"name":"damping","access":"","virtual":false,"description":"Damping is specified as a value between 0 and 1, which is the proportion of velocity lost per second. The linear damping acting on the body in the velocity direction.","type":{"names":["number"]},"default":""},{"name":"fixedRotation","access":"","virtual":false,"description":"-","type":{"names":["boolean"]},"default":""},{"name":"inertia","access":"","virtual":false,"description":"The inertia of the body around the Z axis..","type":{"names":["number"]},"default":""},{"name":"mass","access":"","virtual":false,"description":"The mass of the body.","type":{"names":["number"]},"default":""},{"name":"motionState","access":"","virtual":false,"description":"The type of motion this body has. Should be one of: Body.STATIC (the body does not move), Body.DYNAMIC (body can move and respond to collisions) and Body.KINEMATIC (only moves according to its .velocity).","type":{"names":["number"]},"default":""},{"name":"rotation","access":"","virtual":false,"description":"The angle of the Body in radians.\rIf you wish to work in degrees instead of radians use the Body.angle property instead. Working in radians is faster as it doesn't have to convert values. The angle of this Body in radians.","type":{"names":["number"]},"default":""},{"name":"sleepSpeedLimit","access":"","virtual":false,"description":".","type":{"names":["number"]},"default":""},{"name":"x","access":"","virtual":false,"description":"The x coordinate of this Body.","type":{"names":["number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The y coordinate of this Body.","type":{"names":["number"]},"default":""},{"name":"id","access":"","virtual":false,"description":"The Body ID. Each Body that has been added to the World has a unique ID.","type":{"names":["number"]},"default":""},{"name":"debug","access":"","virtual":false,"description":"Enable or disable debug drawing of this body","type":{"names":["boolean"]},"default":""},{"name":"collideWorldBounds","access":"","virtual":false,"description":"A Body can be set to collide against the World bounds automatically if this is set to true. Otherwise it will leave the World.\rNote that this only applies if your World has bounds! The response to the collision should be managed via CollisionMaterials.\rAlso note that when you set this it will only effect Body shapes that already exist. If you then add further shapes to your Body\rafter setting this it will *not* proactively set them to collide with the bounds. Should the Body collide with the World bounds?","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.Physics.P2.BodyDebug","description":"Draws a P2 Body to a Graphics instance for visual debugging.\rNeedless to say, for every body you enable debug drawing on, you are adding processor and graphical overhead.\rSo use sparingly and rarely (if ever) in production code.\r\rAlso be aware that the Debug body is only updated when the Sprite it is connected to changes position. If you\rmanipulate the sprite in any other way (such as moving it to another Group or bringToTop, etc) then you will\rneed to manually adjust its BodyDebug as well.","constructor":{"name":"BodyDebug","description":"Draws a P2 Body to a Graphics instance for visual debugging.\rNeedless to say, for every body you enable debug drawing on, you are adding processor and graphical overhead.\rSo use sparingly and rarely (if ever) in production code.\r\rAlso be aware that the Debug body is only updated when the Sprite it is connected to changes position. If you\rmanipulate the sprite in any other way (such as moving it to another Group or bringToTop, etc) then you will\rneed to manually adjust its BodyDebug as well.","parameters":[{"name":"game","type":"Phaser.Game","description":"Game reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"body","type":"Phaser.Physics.P2.Body","description":"The P2 Body to display debug data for.","default":"","optional":"","nullable":""},{"name":"settings","type":"object","description":"Settings object.","default":"","optional":"","nullable":""}]},"functions":[{"name":"updateSpriteTransform","description":"Core update.","parameters":[]},{"name":"draw","description":"Draws the P2 shapes to the Graphics object.","parameters":[]},{"name":"drawRectangle","description":"Draws a p2.Box to the Graphics object.","parameters":[]},{"name":"drawCircle","description":"Draws a p2.Circle to the Graphics object.","parameters":[]},{"name":"drawLine","description":"Draws a p2.Line to the Graphics object.","parameters":[]},{"name":"drawConvex","description":"Draws a p2.Convex to the Graphics object.","parameters":[]},{"name":"drawPath","description":"Draws a p2.Path to the Graphics object.","parameters":[]},{"name":"drawPlane","description":"Draws a p2.Plane to the Graphics object.","parameters":[]},{"name":"drawCapsule","description":"Draws a p2.Capsule to the Graphics object.","parameters":[]},{"name":"randomPastelHex","description":"Picks a random pastel color.","parameters":[]},{"name":"rgbToHex","description":"Converts from RGB to Hex.","parameters":[]},{"name":"componentToHex","description":"Component to hex conversion.","parameters":[]},{"name":"add","description":"Adds an existing object as the top child in this group.\r\rThe child is automatically added to the top of the group, and is displayed above every previous child.\r\rOr if the _optional_ index is specified, the child is added at the location specified by the index value, \rthis allows you to control child ordering.\r\rIf the child was already in this Group, it is simply returned, and nothing else happens to it.\r\rIf `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.\r\rUse {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.","parameters":[{"name":"child","type":"DisplayObject","description":"The display object to add as a child.","default":"","optional":"","nullable":""},{"name":"silent","type":"boolean","description":"If true the child will not dispatch the `onAddedToGroup` event.","default":"","optional":true,"nullable":""},{"name":"index","type":"integer","description":"The index within the group to insert the child to. Where 0 is the bottom of the Group.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The child that was added to the group."}},{"name":"addAt","description":"Adds an existing object to this group.\r\rThe child is added to the group at the location specified by the index value, this allows you to control child ordering.\r\rIf `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.","parameters":[{"name":"child","type":"DisplayObject","description":"The display object to add as a child.","default":"","optional":"","nullable":""},{"name":"index","type":"integer","description":"The index within the group to insert the child to.","default":"","optional":true,"nullable":""},{"name":"silent","type":"boolean","description":"If true the child will not dispatch the `onAddedToGroup` event.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The child that was added to the group."}},{"name":"addToHash","description":"Adds a child of this Group into the hash array.\rThis call will return false if the child is not a child of this Group, or is already in the hash.","parameters":[{"name":"child","type":"DisplayObject","description":"The display object to add to this Groups hash. Must be a member of this Group already and not present in the hash.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the child was successfully added to the hash, otherwise false."}},{"name":"removeFromHash","description":"Removes a child of this Group from the hash array.\rThis call will return false if the child is not in the hash.","parameters":[{"name":"child","type":"DisplayObject","description":"The display object to remove from this Groups hash. Must be a member of this Group and in the hash.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the child was successfully removed from the hash, otherwise false."}},{"name":"addMultiple","description":"Adds an array of existing Display Objects to this Group.\r\rThe Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.\r\rAs well as an array you can also pass another Group as the first argument. In this case all of the children from that\rGroup will be removed from it and added into this Group.\r\rIf `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.","parameters":[{"name":"children","type":["Array.<DisplayObject>","Phaser.Group"],"description":"An array of display objects or a Phaser.Group. If a Group is given then *all* children will be moved from it.","default":"","optional":"","nullable":""},{"name":"silent","type":"boolean","description":"If true the children will not dispatch the `onAddedToGroup` event.","default":"","optional":true,"nullable":""}],"returns":{"type":["Array.<DisplayObject>","Phaser.Group"],"description":"The array of children or Group of children that were added to this Group."}},{"name":"getAt","description":"Returns the child found at the given index within this group.","parameters":[{"name":"index","type":"integer","description":"The index to return the child from.","default":"","optional":"","nullable":""}],"returns":{"type":["DisplayObject","integer"],"description":"The child that was found at the given index, or -1 for an invalid index."}},{"name":"create","description":"Creates a new Phaser.Sprite object and adds it to the top of this group.\r\rUse {@link Phaser.Group#classType classType} to change the type of object created.\r\rThe child is automatically added to the top of the group, and is displayed above every previous child.\r\rOr if the _optional_ index is specified, the child is added at the location specified by the index value, \rthis allows you to control child ordering.\r\rIf `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.","parameters":[{"name":"x","type":"number","description":"The x coordinate to display the newly created Sprite at. The value is in relation to the group.x point.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate to display the newly created Sprite at. The value is in relation to the group.y point.","default":"","optional":"","nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""},{"name":"exists","type":"boolean","description":"The default exists state of the Sprite.","default":true,"optional":true,"nullable":""},{"name":"index","type":"integer","description":"The index within the group to insert the child to. Where 0 is the bottom of the Group.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The child that was created: will be a {@link Phaser.Sprite} unless {@link #classType} has been changed."}},{"name":"createMultiple","description":"Creates multiple Phaser.Sprite objects and adds them to the top of this Group.\r\rThis method is useful if you need to quickly generate a pool of sprites, such as bullets.\r\rUse {@link Phaser.Group#classType classType} to change the type of object created.\r\rYou can provide an array as the `key` and / or `frame` arguments. When you do this\rit will create `quantity` Sprites for every key (and frame) in the arrays.\r\rFor example:\r\r`createMultiple(25, ['ball', 'carrot'])`\r\rIn the above code there are 2 keys (ball and carrot) which means that 50 sprites will be\rcreated in total, 25 of each. You can also have the `frame` as an array:\r\r`createMultiple(5, 'bricks', [0, 1, 2, 3])`\r\rIn the above there is one key (bricks), which is a sprite sheet. The frames array tells\rthis method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because\rthe quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with\rframe 1, and so on.\r\rIf you set both the key and frame arguments to be arrays then understand it will create\ra total quantity of sprites equal to the size of both arrays times each other. I.e.:\r\r`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`\r\rThe above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2.\rIt will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2.\rIn total it will have created 120 sprites.\r\rBy default the Sprites will have their `exists` property set to `false`, and they will be \rpositioned at 0x0, relative to the `Group.x / y` values.\r\rIf `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.","parameters":[{"name":"quantity","type":"integer","description":"The number of Sprites to create.","default":"","optional":"","nullable":""},{"name":"key","type":["string","array"],"description":"The Cache key of the image that the Sprites will use. Or an Array of keys. See the description for details on how the quantity applies when arrays are used.","default":"","optional":"","nullable":""},{"name":"frame","type":["integer","string","array"],"description":"If the Sprite image contains multiple frames you can specify which one to use here. Or an Array of frames. See the description for details on how the quantity applies when arrays are used.","default":"","optional":true,"nullable":""},{"name":"exists","type":"boolean","description":"The default exists state of the Sprite.","default":"","optional":true,"nullable":""}],"returns":{"type":"array","description":"An array containing all of the Sprites that were created."}},{"name":"updateZ","description":"Internal method that re-applies all of the children's Z values.\r\rThis must be called whenever children ordering is altered so that their `z` indices are correctly updated.","parameters":[]},{"name":"align","description":"This method iterates through all children in the Group (regardless if they are visible or exist)\rand then changes their position so they are arranged in a Grid formation. Children must have\rthe `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have\rthis.\r\rThe grid dimensions are determined by the first four arguments. The `width` and `height` arguments\rrelate to the width and height of the grid respectively.\r\rFor example if the Group had 100 children in it:\r\r`Group.align(10, 10, 32, 32)`\r\rThis will align all of the children into a grid formation of 10x10, using 32 pixels per\rgrid cell. If you want a wider grid, you could do:\r\r`Group.align(25, 4, 32, 32)`\r\rThis will align the children into a grid of 25x4, again using 32 pixels per grid cell.\r\rYou can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method\rto keep on aligning children until there are no children left. For example if this Group had\r48 children in it, the following:\r\r`Group.align(-1, 8, 32, 32)`\r\r... will align the children so that there are 8 children vertically (the second argument), \rand each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)\r\rYou can also do:\r\r`Group.align(10, -1, 32, 32)`\r\rIn this case it will create a grid 10 wide, and as tall as it needs to be in order to fit\rall of the children in.\r\rThe `position` property allows you to control where in each grid cell the child is positioned.\rThis is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, \r`Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, \r`Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.\r\rThe final argument; `offset` lets you start the alignment from a specific child index.","parameters":[{"name":"width","type":"integer","description":"The width of the grid in items (not pixels). Set to -1 for a dynamic width. If -1 then you must set an explicit height value.","default":"","optional":"","nullable":""},{"name":"height","type":"integer","description":"The height of the grid in items (not pixels). Set to -1 for a dynamic height. If -1 then you must set an explicit width value.","default":"","optional":"","nullable":""},{"name":"cellWidth","type":"integer","description":"The width of each grid cell, in pixels.","default":"","optional":"","nullable":""},{"name":"cellHeight","type":"integer","description":"The height of each grid cell, in pixels.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offset","type":"integer","description":"Optional index to start the alignment from. Defaults to zero, the first child in the Group, but can be set to any valid child index value.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the Group children were aligned, otherwise false."}},{"name":"resetCursor","description":"Sets the group cursor to the first child in the group.\r\rIf the optional index parameter is given it sets the cursor to the object at that index instead.","parameters":[{"name":"index","type":"integer","description":"Set the cursor to point to a specific index.","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"The child the cursor now points to."}},{"name":"next","description":"Advances the group cursor to the next (higher) object in the group.\r\rIf the cursor is at the end of the group (top child) it is moved the start of the group (bottom child).","parameters":[],"returns":{"type":"any","description":"The child the cursor now points to."}},{"name":"previous","description":"Moves the group cursor to the previous (lower) child in the group.\r\rIf the cursor is at the start of the group (bottom child) it is moved to the end (top child).","parameters":[],"returns":{"type":"any","description":"The child the cursor now points to."}},{"name":"swap","description":"Swaps the position of two children in this group.\r\rBoth children must be in this group, a child cannot be swapped with itself, and unparented children cannot be swapped.","parameters":[{"name":"child1","type":"any","description":"The first child to swap.","default":"","optional":"","nullable":""},{"name":"child2","type":"any","description":"The second child to swap.","default":"","optional":"","nullable":""}]},{"name":"bringToTop","description":"Brings the given child to the top of this group so it renders above all other children.","parameters":[{"name":"child","type":"any","description":"The child to bring to the top of this group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The child that was moved."}},{"name":"sendToBack","description":"Sends the given child to the bottom of this group so it renders below all other children.","parameters":[{"name":"child","type":"any","description":"The child to send to the bottom of this group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The child that was moved."}},{"name":"moveUp","description":"Moves the given child up one place in this group unless it's already at the top.","parameters":[{"name":"child","type":"any","description":"The child to move up in the group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The child that was moved."}},{"name":"moveDown","description":"Moves the given child down one place in this group unless it's already at the bottom.","parameters":[{"name":"child","type":"any","description":"The child to move down in the group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The child that was moved."}},{"name":"xy","description":"Positions the child found at the given index within this group to the given x and y coordinates.","parameters":[{"name":"index","type":"integer","description":"The index of the child in the group to set the position of.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The new x position of the child.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The new y position of the child.","default":"","optional":"","nullable":""}]},{"name":"reverse","description":"Reverses all children in this group.\r\rThis operation applies only to immediate children and does not propagate to subgroups.","parameters":[]},{"name":"getIndex","description":"Get the index position of the given child in this group, which should match the child's `z` property.","parameters":[{"name":"child","type":"any","description":"The child to get the index for.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The index of the child or -1 if it's not a member of this group."}},{"name":"getByName","description":"Searches the Group for the first instance of a child with the `name`\rproperty matching the given argument. Should more than one child have\rthe same name only the first instance is returned.","parameters":[{"name":"name","type":"string","description":"The name to search for.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The first child with a matching name, or null if none were found."}},{"name":"replace","description":"Replaces a child of this Group with the given newChild. The newChild cannot be a member of this Group.\r\rIf `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.\r\rIf `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.","parameters":[{"name":"oldChild","type":"any","description":"The child in this group that will be replaced.","default":"","optional":"","nullable":""},{"name":"newChild","type":"any","description":"The child to be inserted into this group.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"Returns the oldChild that was replaced within this group."}},{"name":"hasProperty","description":"Checks if the child has the given property.\r\rWill scan up to 4 levels deep only.","parameters":[{"name":"child","type":"any","description":"The child to check for the existence of the property on.","default":"","optional":"","nullable":""},{"name":"key","type":"Array.<string>","description":"An array of strings that make up the property.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the child has the property, otherwise false."}},{"name":"setProperty","description":"Sets a property to the given value on the child. The operation parameter controls how the value is set.\r\rThe operations are:\r- 0: set the existing value to the given value; if force is `true` a new property will be created if needed\r- 1: will add the given value to the value already present.\r- 2: will subtract the given value from the value already present.\r- 3: will multiply the value already present by the given value.\r- 4: will divide the value already present by the given value.","parameters":[{"name":"child","type":"any","description":"The child to set the property value on.","default":"","optional":"","nullable":""},{"name":"key","type":"array","description":"An array of strings that make up the property that will be set.","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be set.","default":"","optional":"","nullable":""},{"name":"operation","type":"integer","description":"Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the property was set, false if not."}},{"name":"checkProperty","description":"Checks a property for the given value on the child.","parameters":[{"name":"child","type":"any","description":"The child to check the property value on.","default":"","optional":"","nullable":""},{"name":"key","type":"array","description":"An array of strings that make up the property that will be set.","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be checked.","default":"","optional":"","nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the property was was equal to value, false if not."}},{"name":"set","description":"Quickly set a property on a single child of this group to a new value.\r\rThe operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.","parameters":[{"name":"child","type":"Phaser.Sprite","description":"The child to set the property on.","default":"","optional":"","nullable":""},{"name":"key","type":"string","description":"The property, as a string, to be set. For example: 'body.velocity.x'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be set.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If set then the child will only be updated if alive=true.","default":"","optional":true,"nullable":""},{"name":"checkVisible","type":"boolean","description":"If set then the child will only be updated if visible=true.","default":"","optional":true,"nullable":""},{"name":"operation","type":"integer","description":"Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the property was set, false if not."}},{"name":"setAll","description":"Quickly set the same property across all children of this group to a new value.\r\rThis call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children.\rIf you need that ability please see `Group.setAllChildren`.\r\rThe operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.","parameters":[{"name":"key","type":"string","description":"The property, as a string, to be set. For example: 'body.velocity.x'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be set.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If set then only children with alive=true will be updated. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"checkVisible","type":"boolean","description":"If set then only children with visible=true will be updated. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"operation","type":"integer","description":"Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.","default":"","optional":true,"nullable":""}]},{"name":"setAllChildren","description":"Quickly set the same property across all children of this group, and any child Groups, to a new value.\r\rIf this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom.\rUnlike with `setAll` the property is NOT set on child Groups itself.\r\rThe operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.","parameters":[{"name":"key","type":"string","description":"The property, as a string, to be set. For example: 'body.velocity.x'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be set.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If set then only children with alive=true will be updated. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"checkVisible","type":"boolean","description":"If set then only children with visible=true will be updated. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"operation","type":"integer","description":"Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.","default":"","optional":true,"nullable":""}]},{"name":"checkAll","description":"Quickly check that the same property across all children of this group is equal to the given value.\r\rThis call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.","parameters":[{"name":"key","type":"string","description":"The property, as a string, to be set. For example: 'body.velocity.x'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value that will be checked.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If set then only children with alive=true will be checked. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"checkVisible","type":"boolean","description":"If set then only children with visible=true will be checked. This includes any Groups that are children.","default":"","optional":true,"nullable":""},{"name":"force","type":"boolean","description":"If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned.","default":"","optional":true,"nullable":""}]},{"name":"addAll","description":"Adds the amount to the given property on all children in this group.\r\r`Group.addAll('x', 10)` will add 10 to the child.x value for each child.","parameters":[{"name":"property","type":"string","description":"The property to increment, for example 'body.velocity.x' or 'angle'.","default":"","optional":"","nullable":""},{"name":"amount","type":"number","description":"The amount to increment the property by. If child.x = 10 then addAll('x', 40) would make child.x = 50.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If true the property will only be changed if the child is alive.","default":"","optional":"","nullable":""},{"name":"checkVisible","type":"boolean","description":"If true the property will only be changed if the child is visible.","default":"","optional":"","nullable":""}]},{"name":"subAll","description":"Subtracts the amount from the given property on all children in this group.\r\r`Group.subAll('x', 10)` will minus 10 from the child.x value for each child.","parameters":[{"name":"property","type":"string","description":"The property to decrement, for example 'body.velocity.x' or 'angle'.","default":"","optional":"","nullable":""},{"name":"amount","type":"number","description":"The amount to subtract from the property. If child.x = 50 then subAll('x', 40) would make child.x = 10.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If true the property will only be changed if the child is alive.","default":"","optional":"","nullable":""},{"name":"checkVisible","type":"boolean","description":"If true the property will only be changed if the child is visible.","default":"","optional":"","nullable":""}]},{"name":"multiplyAll","description":"Multiplies the given property by the amount on all children in this group.\r\r`Group.multiplyAll('x', 2)` will x2 the child.x value for each child.","parameters":[{"name":"property","type":"string","description":"The property to multiply, for example 'body.velocity.x' or 'angle'.","default":"","optional":"","nullable":""},{"name":"amount","type":"number","description":"The amount to multiply the property by. If child.x = 10 then multiplyAll('x', 2) would make child.x = 20.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If true the property will only be changed if the child is alive.","default":"","optional":"","nullable":""},{"name":"checkVisible","type":"boolean","description":"If true the property will only be changed if the child is visible.","default":"","optional":"","nullable":""}]},{"name":"divideAll","description":"Divides the given property by the amount on all children in this group.\r\r`Group.divideAll('x', 2)` will half the child.x value for each child.","parameters":[{"name":"property","type":"string","description":"The property to divide, for example 'body.velocity.x' or 'angle'.","default":"","optional":"","nullable":""},{"name":"amount","type":"number","description":"The amount to divide the property by. If child.x = 100 then divideAll('x', 2) would make child.x = 50.","default":"","optional":"","nullable":""},{"name":"checkAlive","type":"boolean","description":"If true the property will only be changed if the child is alive.","default":"","optional":"","nullable":""},{"name":"checkVisible","type":"boolean","description":"If true the property will only be changed if the child is visible.","default":"","optional":"","nullable":""}]},{"name":"callAllExists","description":"Calls a function, specified by name, on all children in the group who exist (or do not exist).\r\rAfter the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.","parameters":[{"name":"callback","type":"string","description":"Name of the function on the children to call.","default":"","optional":"","nullable":""},{"name":"existsValue","type":"boolean","description":"Only children with exists=existsValue will be called.","default":"","optional":"","nullable":""},{"name":"parameter","type":"any","description":"Additional parameters that will be passed to the callback.","default":"","optional":"","nullable":""}]},{"name":"callbackFromArray","description":"Returns a reference to a function that exists on a child of the group based on the given callback array.","parameters":[{"name":"child","type":"object","description":"The object to inspect.","default":"","optional":"","nullable":""},{"name":"callback","type":"array","description":"The array of function names.","default":"","optional":"","nullable":""},{"name":"length","type":"integer","description":"The size of the array (pre-calculated in callAll).","default":"","optional":"","nullable":""}]},{"name":"callAll","description":"Calls a function, specified by name, on all on children.\r\rThe function is called for all children regardless if they are dead or alive (see callAllExists for different options).\rAfter the method parameter and context you can add as many extra parameters as you like, which will all be passed to the child.","parameters":[{"name":"method","type":"string","description":"Name of the function on the child to call. Deep property lookup is supported.","default":"","optional":"","nullable":""},{"name":"context","type":"string","description":"A string containing the context under which the method will be executed. Set to null to default to the child.","default":"","optional":true,"nullable":""},{"name":"args","type":"any","description":"Additional parameters that will be passed to the method.","default":"","optional":"","nullable":""}]},{"name":"preUpdate","description":"The core preUpdate - as called by World.","parameters":[]},{"name":"update","description":"The core update - as called by World.","parameters":[]},{"name":"postUpdate","description":"The core postUpdate - as called by World.","parameters":[]},{"name":"filter","description":"Find children matching a certain predicate.\r\rFor example:\r\r    var healthyList = Group.filter(function(child, index, children) {\r        return child.health > 10 ? true : false;\r    }, true);\r    healthyList.callAll('attack');\r\rNote: Currently this will skip any children which are Groups themselves.","parameters":[{"name":"predicate","type":"function","description":"The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, the index as the second, and the entire child array as the third","default":"","optional":"","nullable":""},{"name":"checkExists","type":"boolean","description":"If true, only existing can be selected; otherwise all children can be selected and will be passed to the predicate.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.ArraySet","description":"Returns an array list containing all the children that the predicate returned true for"}},{"name":"forEach","description":"Call a function on each child in this group.\r\rAdditional arguments for the callback can be specified after the `checkExists` parameter. For example,\r\r    Group.forEach(awardBonusGold, this, true, 100, 500)\r\rwould invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.\r\rNote: This check will skip any children which are Groups themselves.","parameters":[{"name":"callback","type":"function","description":"The function that will be called for each applicable child. The child will be passed as the first argument.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":"","nullable":""},{"name":"checkExists","type":"boolean","description":"If set only children matching for which `exists` is true will be passed to the callback, otherwise all children will be passed.","default":"","optional":true,"nullable":""},{"name":"args","type":"any","description":"Additional arguments to pass to the callback function, after the child item.","default":"(none)","optional":true,"nullable":""}]},{"name":"forEachExists","description":"Call a function on each existing child in this group.\r\rSee {@link Phaser.Group#forEach forEach} for details.","parameters":[{"name":"callback","type":"function","description":"The function that will be called for each applicable child. The child will be passed as the first argument.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":"","nullable":""},{"name":"args","type":"any","description":"Additional arguments to pass to the callback function, after the child item.","default":"(none)","optional":true,"nullable":""}]},{"name":"forEachAlive","description":"Call a function on each alive child in this group.\r\rSee {@link Phaser.Group#forEach forEach} for details.","parameters":[{"name":"callback","type":"function","description":"The function that will be called for each applicable child. The child will be passed as the first argument.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":"","nullable":""},{"name":"args","type":"any","description":"Additional arguments to pass to the callback function, after the child item.","default":"(none)","optional":true,"nullable":""}]},{"name":"forEachDead","description":"Call a function on each dead child in this group.\r\rSee {@link Phaser.Group#forEach forEach} for details.","parameters":[{"name":"callback","type":"function","description":"The function that will be called for each applicable child. The child will be passed as the first argument.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":"","nullable":""},{"name":"args","type":"any","description":"Additional arguments to pass to the callback function, after the child item.","default":"(none)","optional":true,"nullable":""}]},{"name":"sort","description":"Sort the children in the group according to a particular key and ordering.\r\rCall this function to sort the group according to a particular key value and order.\r\rFor example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.\r\rInternally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including\ralphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.","parameters":[{"name":"key","type":"string","description":"The name of the property to sort on. Defaults to the objects z-depth value.","default":"'z'","optional":true,"nullable":""},{"name":"order","type":"integer","description":"Order ascending ({@link Phaser.Group.SORT_ASCENDING SORT_ASCENDING}) or descending ({@link Phaser.Group.SORT_DESCENDING SORT_DESCENDING}).","default":"Phaser.Group.SORT_ASCENDING","optional":true,"nullable":""}]},{"name":"customSort","description":"Sort the children in the group according to custom sort function.\r\rThe `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b).\rIt should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.","parameters":[{"name":"sortHandler","type":"function","description":"The custom sort function.","default":"","optional":"","nullable":""},{"name":"context","type":"object","description":"The context in which the sortHandler is called.","default":"","optional":true,"nullable":""}]},{"name":"ascendingSortHandler","description":"An internal helper function for the sort process.","parameters":[{"name":"a","type":"object","description":"The first object being sorted.","default":"","optional":"","nullable":""},{"name":"b","type":"object","description":"The second object being sorted.","default":"","optional":"","nullable":""}]},{"name":"descendingSortHandler","description":"An internal helper function for the sort process.","parameters":[{"name":"a","type":"object","description":"The first object being sorted.","default":"","optional":"","nullable":""},{"name":"b","type":"object","description":"The second object being sorted.","default":"","optional":"","nullable":""}]},{"name":"iterate","description":"Iterates over the children of the group performing one of several actions for matched children.\r\rA child is considered a match when it has a property, named `key`, whose value is equal to `value`\raccording to a strict equality comparison.\r\rThe result depends on the `returnType`:\r\r- {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}:\r    The callback, if any, is applied to all matching children. The number of matched children is returned.\r- {@link Phaser.Group.RETURN_NONE RETURN_NONE}:\r    The callback, if any, is applied to all matching children. No value is returned.\r- {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}:\r    The callback, if any, is applied to the *first* matching child and the *first* matched child is returned.\r    If there is no matching child then null is returned.\r\rIf `args` is specified it must be an array. The matched child will be assigned to the first\relement and the entire array will be applied to the callback function.","parameters":[{"name":"key","type":"string","description":"The child property to check, i.e. 'exists', 'alive', 'health'","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"A child matches if `child[key] === value` is true.","default":"","optional":"","nullable":""},{"name":"returnType","type":"integer","description":"How to iterate the children and what to return.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"Optional function that will be called on each matching child. The matched child is supplied as the first argument.","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":true,"nullable":""},{"name":"args","type":"Array.<any>","description":"The arguments supplied to to the callback; the first array index (argument) will be replaced with the matched child.","default":"(none)","optional":true,"nullable":""}],"returns":{"type":"any","description":"Returns either an integer (for RETURN_TOTAL), the first matched child (for RETURN_CHILD), or null."}},{"name":"getFirstExists","description":"Get the first display object that exists, or doesn't exist.\r\rYou can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.\r\rIt works by calling `Group.create` passing it the parameters given to this method, and returning the new child.\r\rIf a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child\rwill be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.","parameters":[{"name":"exists","type":"boolean","description":"If true, find the first existing child; otherwise find the first non-existing child.","default":true,"optional":true,"nullable":""},{"name":"createIfNull","type":"boolean","description":"If `true` and no alive children are found a new one is created.","default":"","optional":true,"nullable":""},{"name":"x","type":"number","description":"The x coordinate to reset the child to. The value is in relation to the group.x point.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to reset the child to. The value is in relation to the group.y point.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The first child, or `null` if none found and `createIfNull` was false."}},{"name":"getFirstAlive","description":"Get the first child that is alive (`child.alive === true`).\r\rThis is handy for choosing a squad leader, etc.\r\rYou can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.\r\rIt works by calling `Group.create` passing it the parameters given to this method, and returning the new child.\r\rIf a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child\rwill be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.","parameters":[{"name":"createIfNull","type":"boolean","description":"If `true` and no alive children are found a new one is created.","default":"","optional":true,"nullable":""},{"name":"x","type":"number","description":"The x coordinate to reset the child to. The value is in relation to the group.x point.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to reset the child to. The value is in relation to the group.y point.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The alive dead child, or `null` if none found and `createIfNull` was false."}},{"name":"getFirstDead","description":"Get the first child that is dead (`child.alive === false`).\r\rThis is handy for checking if everything has been wiped out and adding to the pool as needed.\r\rYou can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.\r\rIt works by calling `Group.create` passing it the parameters given to this method, and returning the new child.\r\rIf a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child\rwill be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.","parameters":[{"name":"createIfNull","type":"boolean","description":"If `true` and no dead children are found a new one is created.","default":"","optional":true,"nullable":""},{"name":"x","type":"number","description":"The x coordinate to reset the child to. The value is in relation to the group.x point.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to reset the child to. The value is in relation to the group.y point.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The first dead child, or `null` if none found and `createIfNull` was false."}},{"name":"resetChild","description":"Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.\r\rIf the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.\r\rThe two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.","parameters":[{"name":"child","type":"DisplayObject","description":"The child to reset and/or load the texture on.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate to reset the child to. The value is in relation to the group.x point.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The y coordinate to reset the child to. The value is in relation to the group.y point.","default":"","optional":true,"nullable":""},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":true,"nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""}],"returns":{"type":"DisplayObject","description":"The child that was reset: usually a {@link Phaser.Sprite}."}},{"name":"getTop","description":"Return the child at the top of this group.\r\rThe top child is the child displayed (rendered) above every other child.","parameters":[],"returns":{"type":"any","description":"The child at the top of the Group."}},{"name":"getBottom","description":"Returns the child at the bottom of this group.\r\rThe bottom child the child being displayed (rendered) below every other child.","parameters":[],"returns":{"type":"any","description":"The child at the bottom of the Group."}},{"name":"getClosestTo","description":"Get the closest child to given Object, with optional callback to filter children.\r\rThis can be a Sprite, Group, Image or any object with public x and y properties.\r\r'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.\r\rYou can use the optional `callback` argument to apply your own filter to the distance checks.\rIf the child is closer then the previous child, it will be sent to `callback` as the first argument,\rwith the distance as the second. The callback should return `true` if it passes your \rfiltering criteria, otherwise it should return `false`.","parameters":[{"name":"object","type":"any","description":"The object used to determine the distance. This can be a Sprite, Group, Image or any object with public x and y properties.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, with the distance as the second. It should return `true` if the child passes the matching criteria.","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"The child closest to given object, or `null` if no child was found."}},{"name":"getFurthestFrom","description":"Get the child furthest away from the given Object, with optional callback to filter children.\r\rThis can be a Sprite, Group, Image or any object with public x and y properties.\r\r'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.\r\rYou can use the optional `callback` argument to apply your own filter to the distance checks.\rIf the child is closer then the previous child, it will be sent to `callback` as the first argument,\rwith the distance as the second. The callback should return `true` if it passes your \rfiltering criteria, otherwise it should return `false`.","parameters":[{"name":"object","type":"any","description":"The object used to determine the distance. This can be a Sprite, Group, Image or any object with public x and y properties.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, with the distance as the second. It should return `true` if the child passes the matching criteria.","default":"","optional":true,"nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the function should be called (usually 'this').","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"The child furthest from the given object, or `null` if no child was found."}},{"name":"countLiving","description":"Get the number of living children in this group.","parameters":[],"returns":{"type":"integer","description":"The number of children flagged as alive."}},{"name":"countDead","description":"Get the number of dead children in this group.","parameters":[],"returns":{"type":"integer","description":"The number of children flagged as dead."}},{"name":"getRandom","description":"Returns a random child from the group.","parameters":[{"name":"startIndex","type":"integer","description":"Offset from the front of the group (lowest child).","default":"","optional":true,"nullable":""},{"name":"length","type":"integer","description":"Restriction on the number of values you want to randomly select from.","default":"(to top)","optional":true,"nullable":""}],"returns":{"type":"any","description":"A random child of this Group."}},{"name":"getRandomExists","description":"Returns a random child from the Group that has `exists` set to `true`.\r\rOptionally you can specify a start and end index. For example if this Group had 100 children,\rand you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only\rthe first 50 children in the Group.","parameters":[{"name":"startIndex","type":"integer","description":"The first child index to start the search from.","default":"","optional":true,"nullable":""},{"name":"endIndex","type":"integer","description":"The last child index to search up to.","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"A random child of this Group that exists."}},{"name":"getAll","description":"Returns all children in this Group.\r\rYou can optionally specify a matching criteria using the `property` and `value` arguments.\r\rFor example: `getAll('exists', true)` would return only children that have their exists property set.\r\rOptionally you can specify a start and end index. For example if this Group had 100 children,\rand you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only\rthe first 50 children in the Group.","parameters":[{"name":"property","type":"string","description":"An optional property to test against the value argument.","default":"","optional":true,"nullable":""},{"name":"value","type":"any","description":"If property is set then Child.property must strictly equal this value to be included in the results.","default":"","optional":true,"nullable":""},{"name":"startIndex","type":"integer","description":"The first child index to start the search from.","default":"","optional":true,"nullable":""},{"name":"endIndex","type":"integer","description":"The last child index to search up until.","default":"","optional":true,"nullable":""}],"returns":{"type":"any","description":"A random existing child of this Group."}},{"name":"remove","description":"Removes the given child from this group.\r\rThis will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.\r\rIf the group cursor was referring to the removed child it is updated to refer to the next child.","parameters":[{"name":"child","type":"any","description":"The child to remove.","default":"","optional":"","nullable":""},{"name":"destroy","type":"boolean","description":"If true `destroy` will be invoked on the removed child.","default":"","optional":true,"nullable":""},{"name":"silent","type":"boolean","description":"If true the the child will not dispatch the `onRemovedFromGroup` event.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"true if the child was removed from this group, otherwise false."}},{"name":"moveAll","description":"Moves all children from this Group to the Group given.","parameters":[{"name":"group","type":"Phaser.Group","description":"The new Group to which the children will be moved to.","default":"","optional":"","nullable":""},{"name":"silent","type":"boolean","description":"If true the children will not dispatch the `onAddedToGroup` event for the new Group.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Group","description":"The Group to which all the children were moved."}},{"name":"removeAll","description":"Removes all children from this Group, but does not remove the group from its parent.\r\rThe children can be optionally destroyed as they are removed.\r\rYou can also optionally also destroy the BaseTexture the Child is using. Be careful if you've\rmore than one Game Object sharing the same BaseTexture.","parameters":[{"name":"destroy","type":"boolean","description":"If true `destroy` will be invoked on each removed child.","default":"","optional":true,"nullable":""},{"name":"silent","type":"boolean","description":"If true the children will not dispatch their `onRemovedFromGroup` events.","default":"","optional":true,"nullable":""},{"name":"destroyTexture","type":"boolean","description":"If true, and if the `destroy` argument is also true, the BaseTexture belonging to the Child is also destroyed. Note that if another Game Object is sharing the same BaseTexture it will invalidate it.","default":"","optional":true,"nullable":""}]},{"name":"removeBetween","description":"Removes all children from this group whose index falls beteen the given startIndex and endIndex values.","parameters":[{"name":"startIndex","type":"integer","description":"The index to start removing children from.","default":"","optional":"","nullable":""},{"name":"endIndex","type":"integer","description":"The index to stop removing children at. Must be higher than startIndex. If undefined this method will remove all children between startIndex and the end of the group.","default":"","optional":true,"nullable":""},{"name":"destroy","type":"boolean","description":"If true `destroy` will be invoked on each removed child.","default":"","optional":true,"nullable":""},{"name":"silent","type":"boolean","description":"If true the children will not dispatch their `onRemovedFromGroup` events.","default":"","optional":true,"nullable":""}]},{"name":"destroy","description":"Destroys this group.\r\rRemoves all children, then removes this group from its parent and nulls references.","parameters":[{"name":"destroyChildren","type":"boolean","description":"If true `destroy` will be invoked on each removed child.","default":true,"optional":true,"nullable":""},{"name":"soft","type":"boolean","description":"A 'soft destroy' (set to true) doesn't remove this group from its parent or null the game reference. Set to false and it does.","default":"","optional":true,"nullable":""}]},{"name":"alignIn","description":"Aligns this Group within another Game Object, or Rectangle, known as the\r'container', to one of 9 possible positions.\r\rThe container must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Groups within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Group to another Game Object does **not** make it a child of\rthe container. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, \r`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, \r`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.\r\rGroups are placed in such a way that their _bounds_ align with the\rcontainer, taking into consideration rotation and scale of its children.\rThis allows you to neatly align Groups, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Group. For example:\r\r`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `group` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the containers bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"container","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Group to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Group","description":"This Group."}},{"name":"alignTo","description":"Aligns this Group to the side of another Game Object, or Rectangle, known as the\r'parent', in one of 11 possible positions.\r\rThe parent must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Groups within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Group to another Game Object does **not** make it a child of\rthe parent. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, \r`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, \r`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` \rand `Phaser.BOTTOM_RIGHT`.\r\rGroups are placed in such a way that their _bounds_ align with the\rparent, taking into consideration rotation and scale of the children.\rThis allows you to neatly align Groups, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Group. For example:\r\r`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `group` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the parents bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"parent","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Group to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Group","description":"This Group."}},{"name":"addChild","description":"Adds a child to the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to add to the container","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"addChildAt","description":"Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child to add","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The index to place the child in","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"swapChildren","description":"Swaps the position of 2 Display Objects within this container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""},{"name":"child2","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}]},{"name":"getChildIndex","description":"Returns the index position of a child DisplayObject instance","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject instance to identify","default":"","optional":"","nullable":""}],"returns":{"type":"Number","description":"The index position of the child display object to identify"}},{"name":"setChildIndex","description":"Changes the position of an existing child in the display object container","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child DisplayObject instance for which you want to change the index number","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The resulting index number for the child display object","default":"","optional":"","nullable":""}]},{"name":"getChildAt","description":"Returns the child at the specified index","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child at the given index, if any."}},{"name":"removeChild","description":"Removes a child from the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to remove","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildAt","description":"Removes a child from the specified index position.","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildren","description":"Removes all children from this container that are within the begin and end indexes.","parameters":[{"name":"beginIndex","type":"Number","description":"The beginning position. Default value is 0.","default":"","optional":"","nullable":""},{"name":"endIndex","type":"Number","description":"The ending position. Default value is size of the container.","default":"","optional":"","nullable":""}]},{"name":"getBounds","description":"Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.","parameters":[{"name":"targetCoordinateSpace","type":["PIXIDisplayObject","PIXIMatrix"],"description":"Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object.","default":"","optional":true,"nullable":""}],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"getLocalBounds","description":"Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.","parameters":[],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"contains","description":"Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}],"returns":{"type":"Boolean","description":""}},{"name":"_renderWebGL","description":"Renders the object using the WebGL renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""}]},{"name":"_renderCanvas","description":"Renders the object using the Canvas renderer","parameters":[{"name":"renderSession","type":"RenderSession","description":"-","default":"","optional":"","nullable":""}]}],"members":[{"name":"defaultSettings","access":"private","virtual":false,"description":"Default debug settings.","type":{"names":["object"]},"default":""},{"name":"ppu","access":"","virtual":false,"description":"Pixels per Length Unit.","type":{"names":["number"]},"default":""},{"name":"body","access":"","virtual":false,"description":"The P2 Body to display debug data for.","type":{"names":["Phaser.Physics.P2.Body"]},"default":""},{"name":"canvas","access":"","virtual":false,"description":"The canvas to render the debug info to.","type":{"names":["Phaser.Graphics"]},"default":""},{"name":"game","access":"protected","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"name","access":"","virtual":false,"description":"A name for this group. Not used internally but useful for debugging.","type":{"names":["string"]},"default":""},{"name":"z","access":"","virtual":false,"description":"The z-depth value of this object within its parent container/Group - the World is a Group as well.\rThis value must be unique for each child in a Group.","type":{"names":["integer"]},"default":""},{"name":"type","access":"protected","virtual":false,"description":"Internal Phaser Type value.","type":{"names":["integer"]},"default":""},{"name":"physicsType","access":"","virtual":false,"description":"The const physics body type of this object.","type":{"names":["number"]},"default":""},{"name":"alive","access":"","virtual":false,"description":"The alive property is useful for Groups that are children of other Groups and need to be included/excluded in checks like forEachAlive.","type":{"names":["boolean"]},"default":true},{"name":"exists","access":"","virtual":false,"description":"If exists is false the group will be excluded from collision checks and filters such as {@link forEachExists}. The group will not call `preUpdate` and `postUpdate` on its children and the children will not receive physics updates or camera/world boundary checks. The group will still be {@link Phaser.Group#visible visible} and will still call `update` on its children.","type":{"names":["boolean"]},"default":true},{"name":"ignoreDestroy","access":"","virtual":false,"description":"A group with `ignoreDestroy` set to `true` ignores all calls to its `destroy` method.","type":{"names":["boolean"]},"default":""},{"name":"pendingDestroy","access":"","virtual":false,"description":"A Group is that has `pendingDestroy` set to `true` is flagged to have its destroy method\rcalled on the next logic update.\rYou can set it directly to flag the Group to be destroyed on its next update.\r\rThis is extremely useful if you wish to destroy a Group from within one of its own callbacks\ror a callback of one of its children.","type":{"names":["boolean"]},"default":""},{"name":"classType","access":"","virtual":false,"description":"The type of objects that will be created when using {@link Phaser.Group#create create} or {@link Phaser.Group#createMultiple createMultiple}.\r\rAny object may be used but it should extend either Sprite or Image and accept the same constructor arguments:\rwhen a new object is created it is passed the following parameters to its constructor: `(game, x, y, key, frame)`.","type":{"names":["object"]},"default":"{@link Phaser.Sprite}"},{"name":"cursor","access":"","virtual":false,"description":"The current display object that the group cursor is pointing to, if any. (Can be set manually.)\r\rThe cursor is a way to iterate through the children in a Group using {@link Phaser.Group#next next} and {@link Phaser.Group#previous previous}.","type":{"names":["DisplayObject"]},"default":""},{"name":"inputEnableChildren","access":"","virtual":false,"description":"A Group with `inputEnableChildren` set to `true` will automatically call `inputEnabled = true` \ron any children _added_ to, or _created by_, this Group.\r\rIf there are children already in the Group at the time you set this property, they are not changed.","type":{"names":["boolean"]},"default":""},{"name":"onChildInputDown","access":"","virtual":false,"description":"This Signal is dispatched whenever a child of this Group emits an onInputDown signal as a result\rof having been interacted with by a Pointer. You can bind functions to this Signal instead of to\revery child Sprite.\r\rThis Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and\ra reference to the Pointer that caused it.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onChildInputUp","access":"","virtual":false,"description":"This Signal is dispatched whenever a child of this Group emits an onInputUp signal as a result\rof having been interacted with by a Pointer. You can bind functions to this Signal instead of to\revery child Sprite.\r\rThis Signal is sent 3 arguments: A reference to the Sprite that triggered the signal, \ra reference to the Pointer that caused it, and a boolean value `isOver` that tells you if the Pointer\ris still over the Sprite or not.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onChildInputOver","access":"","virtual":false,"description":"This Signal is dispatched whenever a child of this Group emits an onInputOver signal as a result\rof having been interacted with by a Pointer. You can bind functions to this Signal instead of to\revery child Sprite.\r\rThis Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and\ra reference to the Pointer that caused it.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onChildInputOut","access":"","virtual":false,"description":"This Signal is dispatched whenever a child of this Group emits an onInputOut signal as a result\rof having been interacted with by a Pointer. You can bind functions to this Signal instead of to\revery child Sprite.\r\rThis Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and\ra reference to the Pointer that caused it.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"enableBody","access":"","virtual":false,"description":"If true all Sprites created by, or added to this group, will have a physics body enabled on them.\r\rIf there are children already in the Group at the time you set this property, they are not changed.\r\rThe default body type is controlled with {@link Phaser.Group#physicsBodyType physicsBodyType}.","type":{"names":["boolean"]},"default":""},{"name":"enableBodyDebug","access":"","virtual":false,"description":"If true when a physics body is created (via {@link Phaser.Group#enableBody enableBody}) it will create a physics debug object as well.\r\rThis only works for P2 bodies.","type":{"names":["boolean"]},"default":""},{"name":"physicsBodyType","access":"","virtual":false,"description":"If {@link Phaser.Group#enableBody enableBody} is true this is the type of physics body that is created on new Sprites.\r\rThe valid values are {@link Phaser.Physics.ARCADE}, {@link Phaser.Physics.P2JS}, {@link Phaser.Physics.NINJA}, etc.","type":{"names":["integer"]},"default":""},{"name":"physicsSortDirection","access":"","virtual":false,"description":"If this Group contains Arcade Physics Sprites you can set a custom sort direction via this property.\r\rIt should be set to one of the Phaser.Physics.Arcade sort direction constants: \r\rPhaser.Physics.Arcade.SORT_NONE\rPhaser.Physics.Arcade.LEFT_RIGHT\rPhaser.Physics.Arcade.RIGHT_LEFT\rPhaser.Physics.Arcade.TOP_BOTTOM\rPhaser.Physics.Arcade.BOTTOM_TOP\r\rIf set to `null` the Group will use whatever Phaser.Physics.Arcade.sortDirection is set to. This is the default behavior.","type":{"names":["integer"]},"default":""},{"name":"onDestroy","access":"","virtual":false,"description":"This signal is dispatched when the group is destroyed.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"cursorIndex","access":"","virtual":false,"description":"The current index of the Group cursor. Advance it with Group.next.","type":{"names":["integer"]},"default":""},{"name":"fixedToCamera","access":"","virtual":false,"description":"A Group that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Group.cameraOffset.\r\rNote that the cameraOffset values are in addition to any parent in the display list.\rSo if this Group was in a Group that has x: 200, then this will be added to the cameraOffset.x","type":{"names":["boolean"]},"default":""},{"name":"cameraOffset","access":"","virtual":false,"description":"If this object is {@link Phaser.Group#fixedToCamera fixedToCamera} then this stores the x/y position offset relative to the top-left of the camera view.\rIf the parent of this Group is also `fixedToCamera` then the offset here is in addition to that and should typically be disabled.","type":{"names":["Phaser.Point"]},"default":""},{"name":"hash","access":"","virtual":false,"description":"The hash array is an array belonging to this Group into which you can add any of its children via Group.addToHash and Group.removeFromHash.\r\rOnly children of this Group can be added to and removed from the hash.\r\rThis hash is used automatically by Phaser Arcade Physics in order to perform non z-index based destructive sorting.\rHowever if you don't use Arcade Physics, or this isn't a physics enabled Group, then you can use the hash to perform your own\rsorting and filtering of Group children without touching their z-index (and therefore display draw order)","type":{"names":["array"]},"default":""},{"name":"_sortProperty","access":"private","virtual":false,"description":"The property on which children are sorted.","type":{"names":["string"]},"default":""},{"name":"total","access":"","virtual":false,"description":"Total number of existing children in the group.","type":{"names":["integer"]},"default":""},{"name":"length","access":"","virtual":false,"description":"Total number of children in this group, regardless of exists/alive status.","type":{"names":["integer"]},"default":""},{"name":"angle","access":"","virtual":false,"description":"The angle of rotation of the group container, in degrees.\r\rThis adjusts the group itself by modifying its local rotation transform.\r\rThis has no impact on the rotation/angle properties of the children, but it will update their worldTransform\rand on-screen orientation and position.","type":{"names":["number"]},"default":""},{"name":"centerX","access":"","virtual":false,"description":"The center x coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"centerY","access":"","virtual":false,"description":"The center y coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"left","access":"","virtual":false,"description":"The left coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"right","access":"","virtual":false,"description":"The right coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"top","access":"","virtual":false,"description":"The top coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"bottom","access":"","virtual":false,"description":"The bottom coordinate of this Group.\r\rIt is derived by calling `getBounds`, calculating the Groups dimensions based on its\rvisible children.","type":{"names":["number"]},"default":""},{"name":"x","access":"","virtual":false,"description":"The x coordinate of the group container.\r\rYou can adjust the group container itself by modifying its coordinates.\rThis will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.","type":{"names":["number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The y coordinate of the group container.\r\rYou can adjust the group container itself by modifying its coordinates.\rThis will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.","type":{"names":["number"]},"default":""},{"name":"rotation","access":"","virtual":false,"description":"The angle of rotation of the group container, in radians.\r\rThis will adjust the group container itself by modifying its rotation.\rThis will have no impact on the rotation value of its children, but it will update their worldTransform and on-screen position.","type":{"names":["number"]},"default":""},{"name":"visible","access":"","virtual":false,"description":"The visible state of the group. Non-visible Groups and all of their children are not rendered.","type":{"names":["boolean"]},"default":""},{"name":"alpha","access":"","virtual":false,"description":"The alpha value of the group container.","type":{"names":["number"]},"default":""},{"name":"children","access":"","virtual":false,"description":"[read-only] The array of children of this container.","type":{"names":["Array.<DisplayObject>"]},"default":""},{"name":"ignoreChildInput","access":"","virtual":false,"description":"If `ignoreChildInput`  is `false` it will allow this objects _children_ to be considered as valid for Input events.\n\nIf this property is `true` then the children will _not_ be considered as valid for Input events.\n\nNote that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.","type":{"names":["Boolean"]},"default":""},{"name":"width","access":"","virtual":false,"description":"The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"position","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject, relative to its parent container.\n\nThe value of this property does not reflect any positioning happening further up the display list.\nTo obtain that value please see the `worldPosition` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"scale","access":"","virtual":false,"description":"The scale of this DisplayObject. A scale of 1:1 represents the DisplayObject\nat its default size. A value of 0.5 would scale this DisplayObject by half, and so on.\n\nThe value of this property does not reflect any scaling happening further up the display list.\nTo obtain that value please see the `worldScale` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"pivot","access":"","virtual":false,"description":"The pivot point of this DisplayObject that it rotates around. The values are expressed\nin pixel values.","type":{"names":["PIXIPoint"]},"default":""},{"name":"hitArea","access":"","virtual":false,"description":"This is the defined area that will pick up mouse / touch events. It is null by default.\nSetting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)","type":{"names":["Rectangle","Circle","Ellipse","Polygon"]},"default":""},{"name":"renderable","access":"","virtual":false,"description":"Should this DisplayObject be rendered by the renderer? An object with a renderable value of\n`false` is skipped during the render pass.","type":{"names":["Boolean"]},"default":""},{"name":"parent","access":"","virtual":false,"description":"The parent DisplayObjectContainer that this DisplayObject is a child of.\nAll DisplayObjects must belong to a parent in order to be rendered.\nThe root parent is the Stage object. This property is set automatically when the\nDisplayObject is added to, or removed from, a DisplayObjectContainer.","type":{"names":["PIXIDisplayObjectContainer"]},"default":""},{"name":"worldAlpha","access":"","virtual":false,"description":"The multiplied alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nThis value is the calculated total, based on the alpha values of all parents of this DisplayObjects \nin the display list.\n\nTo obtain, and set, the local alpha value, see the `alpha` property.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"worldTransform","access":"","virtual":false,"description":"The current transform of this DisplayObject.\n\nThis property contains the calculated total, based on the transforms of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIMatrix"]},"default":""},{"name":"worldPosition","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject within the world.\n\nThis property contains the calculated total, based on the positions of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldScale","access":"","virtual":false,"description":"The global scale of this DisplayObject.\n\nThis property contains the calculated total, based on the scales of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldRotation","access":"","virtual":false,"description":"The rotation, in radians, of this DisplayObject.\n\nThis property contains the calculated total, based on the rotations of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"filterArea","access":"","virtual":false,"description":"The rectangular area used by filters when rendering a shader for this DisplayObject.","type":{"names":["Rectangle"]},"default":""},{"name":"_sr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_cr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_bounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_currentBounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_mask","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_cacheAsBitmap","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"_cacheIsDirty","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"worldVisible","access":"","virtual":false,"description":"Indicates if this DisplayObject is visible, based on it, and all of its parents, `visible` property values.","type":{"names":["Boolean"]},"default":""},{"name":"mask","access":"","virtual":false,"description":"Sets a mask for this DisplayObject. A mask is an instance of a Graphics object.\nWhen applied it limits the visible area of this DisplayObject to the shape of the mask.\nUnder a Canvas renderer it uses shape clipping. Under a WebGL renderer it uses a Stencil Buffer.\nTo remove a mask, set this property to `null`.","type":{"names":["PIXIGraphics"]},"default":""},{"name":"filters","access":"","virtual":false,"description":"Sets the filters for this DisplayObject. This is a WebGL only feature, and is ignored by the Canvas\nRenderer. A filter is a shader applied to this DisplayObject. You can modify the placement of the filter\nusing `DisplayObject.filterArea`.\n\nTo remove filters, set this property to `null`.\n\nNote: You cannot have a filter set, and a MULTIPLY Blend Mode active, at the same time. Setting a \nfilter will reset this DisplayObjects blend mode to NORMAL.","type":{"names":["Array"]},"default":""},{"name":"cacheAsBitmap","access":"","virtual":false,"description":"Sets if this DisplayObject should be cached as a bitmap.\n\nWhen invoked it will take a snapshot of the DisplayObject, as it is at that moment, and store it \nin a RenderTexture. This is then used whenever this DisplayObject is rendered. It can provide a\nperformance benefit for complex, but static, DisplayObjects. I.e. those with lots of children.\n\nCached Bitmaps do not track their parents. If you update a property of this DisplayObject, it will not\nre-generate the cached bitmap automatically. To do that you need to call `DisplayObject.updateCache`.\n\nTo remove a cached bitmap, set this property to `null`.","type":{"names":["Boolean"]},"default":""}]},{"name":"Phaser.Physics.P2.CollisionGroup","description":"Collision Group","constructor":{"name":"CollisionGroup","description":"Collision Group","parameters":[{"name":"bitmask","type":"number","description":"The CollisionGroup bitmask.","default":"","optional":"","nullable":""}]},"functions":[],"members":[{"name":"mask","access":"","virtual":false,"description":"The CollisionGroup bitmask.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.Physics.P2.ContactMaterial","description":"Defines a physics material","constructor":{"name":"ContactMaterial","description":"Defines a physics material","parameters":[{"name":"materialA","type":"Phaser.Physics.P2.Material","description":"First material participating in the contact material.","default":"","optional":"","nullable":""},{"name":"materialB","type":"Phaser.Physics.P2.Material","description":"Second material participating in the contact material.","default":"","optional":"","nullable":""},{"name":"options","type":"object","description":"Additional configuration options.","default":"","optional":true,"nullable":""}]},"functions":[],"members":[]},{"name":"Phaser.Physics.P2.DistanceConstraint","description":"A constraint that tries to keep the distance between two bodies constant.","constructor":{"name":"DistanceConstraint","description":"A constraint that tries to keep the distance between two bodies constant.","parameters":[{"name":"world","type":"Phaser.Physics.P2","description":"A reference to the P2 World.","default":"","optional":"","nullable":""},{"name":"bodyA","type":"p2.Body","description":"First connected body.","default":"","optional":"","nullable":""},{"name":"bodyB","type":"p2.Body","description":"Second connected body.","default":"","optional":"","nullable":""},{"name":"distance","type":"number","description":"The distance to keep between the bodies.","default":"","optional":"","nullable":""},{"name":"localAnchorA","type":"Array","description":"The anchor point for bodyA, defined locally in bodyA frame. Defaults to [0,0].","default":"","optional":true,"nullable":""},{"name":"localAnchorB","type":"Array","description":"The anchor point for bodyB, defined locally in bodyB frame. Defaults to [0,0].","default":"","optional":true,"nullable":""},{"name":"maxForce","type":"object","description":"Maximum force to apply.","default":"Number.MAX_VALUE","optional":true,"nullable":""}]},"functions":[],"members":[{"name":"game","access":"","virtual":false,"description":"Local reference to game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"world","access":"","virtual":false,"description":"Local reference to P2 World.","type":{"names":["Phaser.Physics.P2"]},"default":""}]},{"name":"Phaser.Physics.P2.FixtureList","description":"Allow to access a list of created fixture (coming from Body#addPhaserPolygon)\rwhich itself parse the input from PhysicsEditor with the custom phaser exporter.\rYou can access fixtures of a Body by a group index or even by providing a fixture Key.\rYou can set the fixture key and also the group index for a fixture in PhysicsEditor.\rThis gives you the power to create a complex body built of many fixtures and modify them\rduring runtime (to remove parts, set masks, categories & sensor properties)","constructor":{"name":"FixtureList","description":"Allow to access a list of created fixture (coming from Body#addPhaserPolygon)\rwhich itself parse the input from PhysicsEditor with the custom phaser exporter.\rYou can access fixtures of a Body by a group index or even by providing a fixture Key.\rYou can set the fixture key and also the group index for a fixture in PhysicsEditor.\rThis gives you the power to create a complex body built of many fixtures and modify them\rduring runtime (to remove parts, set masks, categories & sensor properties)","parameters":[{"name":"list","type":"Array","description":"A list of fixtures (from Phaser.Physics.P2.Body#addPhaserPolygon)","default":"","optional":"","nullable":""}]},"functions":[{"name":"init","description":"","parameters":[]},{"name":"setCategory","description":"","parameters":[{"name":"bit","type":"number","description":"The bit to set as the collision group.","default":"","optional":"","nullable":""},{"name":"fixtureKey","type":"string","description":"Only apply to the fixture with the given key.","default":"","optional":"","nullable":""}]},{"name":"setMask","description":"","parameters":[{"name":"bit","type":"number","description":"The bit to set as the collision mask","default":"","optional":"","nullable":""},{"name":"fixtureKey","type":"string","description":"Only apply to the fixture with the given key","default":"","optional":"","nullable":""}]},{"name":"setSensor","description":"","parameters":[{"name":"value","type":"boolean","description":"sensor true or false","default":"","optional":"","nullable":""},{"name":"fixtureKey","type":"string","description":"Only apply to the fixture with the given key","default":"","optional":"","nullable":""}]},{"name":"setMaterial","description":"","parameters":[{"name":"material","type":"Object","description":"The contact material for a fixture","default":"","optional":"","nullable":""},{"name":"fixtureKey","type":"string","description":"Only apply to the fixture with the given key","default":"","optional":"","nullable":""}]},{"name":"getFixtures","description":"Accessor to get either a list of specified fixtures by key or the whole fixture list","parameters":[{"name":"keys","type":"array","description":"A list of fixture keys","default":"","optional":"","nullable":""}]},{"name":"getFixtureByKey","description":"Accessor to get either a single fixture by its key.","parameters":[{"name":"key","type":"string","description":"The key of the fixture.","default":"","optional":"","nullable":""}]},{"name":"getGroup","description":"Accessor to get a group of fixtures by its group index.","parameters":[{"name":"groupID","type":"number","description":"The group index.","default":"","optional":"","nullable":""}]},{"name":"parse","description":"Parser for the output of Phaser.Physics.P2.Body#addPhaserPolygon","parameters":[]},{"name":"flatten","description":"A helper to flatten arrays. This is very useful as the fixtures are nested from time to time due to the way P2 creates and splits polygons.","parameters":[{"name":"array","type":"array","description":"The array to flatten. Notice: This will happen recursive not shallow.","default":"","optional":"","nullable":""}]}],"members":[{"name":"namedFixtures","access":"private","virtual":false,"description":"Collect all fixtures with a key","type":{"names":["object"]},"default":""},{"name":"groupedFixtures","access":"private","virtual":false,"description":"Collect all given fixtures per group index. Notice: Every fixture with a key also belongs to a group","type":{"names":["Array"]},"default":""},{"name":"allFixtures","access":"private","virtual":false,"description":"This is a list of everything in this collection","type":{"names":["Array"]},"default":""}]},{"name":"Phaser.Physics.P2.GearConstraint","description":"Connects two bodies at given offset points, letting them rotate relative to each other around this point.","constructor":{"name":"GearConstraint","description":"Connects two bodies at given offset points, letting them rotate relative to each other around this point.","parameters":[{"name":"world","type":"Phaser.Physics.P2","description":"A reference to the P2 World.","default":"","optional":"","nullable":""},{"name":"bodyA","type":"p2.Body","description":"First connected body.","default":"","optional":"","nullable":""},{"name":"bodyB","type":"p2.Body","description":"Second connected body.","default":"","optional":"","nullable":""},{"name":"angle","type":"number","description":"The relative angle","default":"","optional":true,"nullable":""},{"name":"ratio","type":"number","description":"The gear ratio.","default":1,"optional":true,"nullable":""}]},"functions":[],"members":[{"name":"game","access":"","virtual":false,"description":"Local reference to game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"world","access":"","virtual":false,"description":"Local reference to P2 World.","type":{"names":["Phaser.Physics.P2"]},"default":""}]},{"name":"Phaser.Physics.P2.InversePointProxy","description":"A InversePointProxy is an internal class that allows for direct getter/setter style property access to Arrays and TypedArrays but inverses the values on set.","constructor":{"name":"InversePointProxy","description":"A InversePointProxy is an internal class that allows for direct getter/setter style property access to Arrays and TypedArrays but inverses the values on set.","parameters":[{"name":"world","type":"Phaser.Physics.P2","description":"A reference to the P2 World.","default":"","optional":"","nullable":""},{"name":"destination","type":"any","description":"The object to bind to.","default":"","optional":"","nullable":""}]},"functions":[],"members":[{"name":"x","access":"","virtual":false,"description":"The x property of this InversePointProxy get and set in pixels.","type":{"names":["number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The y property of this InversePointProxy get and set in pixels.","type":{"names":["number"]},"default":""},{"name":"mx","access":"","virtual":false,"description":"The x property of this InversePointProxy get and set in meters.","type":{"names":["number"]},"default":""},{"name":"my","access":"","virtual":false,"description":"The y property of this InversePointProxy get and set in meters.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.Physics.P2.LockConstraint","description":"Locks the relative position between two bodies.","constructor":{"name":"LockConstraint","description":"Locks the relative position between two bodies.","parameters":[{"name":"world","type":"Phaser.Physics.P2","description":"A reference to the P2 World.","default":"","optional":"","nullable":""},{"name":"bodyA","type":"p2.Body","description":"First connected body.","default":"","optional":"","nullable":""},{"name":"bodyB","type":"p2.Body","description":"Second connected body.","default":"","optional":"","nullable":""},{"name":"offset","type":"Array","description":"The offset of bodyB in bodyA's frame. The value is an array with 2 elements matching x and y, i.e: [32, 32].","default":"","optional":true,"nullable":""},{"name":"angle","type":"number","description":"The angle of bodyB in bodyA's frame.","default":"","optional":true,"nullable":""},{"name":"maxForce","type":"number","description":"The maximum force that should be applied to constrain the bodies.","default":"","optional":true,"nullable":""}]},"functions":[],"members":[{"name":"game","access":"","virtual":false,"description":"Local reference to game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"world","access":"","virtual":false,"description":"Local reference to P2 World.","type":{"names":["Phaser.Physics.P2"]},"default":""}]},{"name":"Phaser.Physics.P2.Material","description":"A P2 Material.\r\r\\o/ ~ \"Because I'm a Material girl\"","constructor":{"name":"Material","description":"A P2 Material.\r\r\\o/ ~ \"Because I'm a Material girl\"","parameters":[{"name":"name","type":"string","description":"The user defined name given to this Material.","default":"","optional":"","nullable":""}]},"functions":[],"members":[{"name":"name","access":"","virtual":false,"description":"The user defined name given to this Material.","type":{"names":["string"]},"default":""}]},{"name":"Phaser.Physics.P2.PointProxy","description":"A PointProxy is an internal class that allows for direct getter/setter style property access to Arrays and TypedArrays.","constructor":{"name":"PointProxy","description":"A PointProxy is an internal class that allows for direct getter/setter style property access to Arrays and TypedArrays.","parameters":[{"name":"world","type":"Phaser.Physics.P2","description":"A reference to the P2 World.","default":"","optional":"","nullable":""},{"name":"destination","type":"any","description":"The object to bind to.","default":"","optional":"","nullable":""}]},"functions":[],"members":[{"name":"x","access":"","virtual":false,"description":"The x property of this PointProxy get and set in pixels.","type":{"names":["number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The y property of this PointProxy get and set in pixels.","type":{"names":["number"]},"default":""},{"name":"mx","access":"","virtual":false,"description":"The x property of this PointProxy get and set in meters.","type":{"names":["number"]},"default":""},{"name":"my","access":"","virtual":false,"description":"The x property of this PointProxy get and set in meters.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.Physics.P2.PrismaticConstraint","description":"Connects two bodies at given offset points, letting them rotate relative to each other around this point.","constructor":{"name":"PrismaticConstraint","description":"Connects two bodies at given offset points, letting them rotate relative to each other around this point.","parameters":[{"name":"world","type":"Phaser.Physics.P2","description":"A reference to the P2 World.","default":"","optional":"","nullable":""},{"name":"bodyA","type":"p2.Body","description":"First connected body.","default":"","optional":"","nullable":""},{"name":"bodyB","type":"p2.Body","description":"Second connected body.","default":"","optional":"","nullable":""},{"name":"lockRotation","type":"boolean","description":"If set to false, bodyB will be free to rotate around its anchor point.","default":true,"optional":true,"nullable":""},{"name":"anchorA","type":"Array","description":"Body A's anchor point, defined in its own local frame. The value is an array with 2 elements matching x and y, i.e: [32, 32].","default":"","optional":true,"nullable":""},{"name":"anchorB","type":"Array","description":"Body A's anchor point, defined in its own local frame. The value is an array with 2 elements matching x and y, i.e: [32, 32].","default":"","optional":true,"nullable":""},{"name":"axis","type":"Array","description":"An axis, defined in body A frame, that body B's anchor point may slide along. The value is an array with 2 elements matching x and y, i.e: [32, 32].","default":"","optional":true,"nullable":""},{"name":"maxForce","type":"number","description":"The maximum force that should be applied to constrain the bodies.","default":"","optional":true,"nullable":""}]},"functions":[],"members":[{"name":"game","access":"","virtual":false,"description":"Local reference to game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"world","access":"","virtual":false,"description":"Local reference to P2 World.","type":{"names":["Phaser.Physics.P2"]},"default":""}]},{"name":"Phaser.Physics.P2.RevoluteConstraint","description":"Connects two bodies at given offset points, letting them rotate relative to each other around this point.\rThe pivot points are given in world (pixel) coordinates.","constructor":{"name":"RevoluteConstraint","description":"Connects two bodies at given offset points, letting them rotate relative to each other around this point.\rThe pivot points are given in world (pixel) coordinates.","parameters":[{"name":"world","type":"Phaser.Physics.P2","description":"A reference to the P2 World.","default":"","optional":"","nullable":""},{"name":"bodyA","type":"p2.Body","description":"First connected body.","default":"","optional":"","nullable":""},{"name":"pivotA","type":"Float32Array","description":"The point relative to the center of mass of bodyA which bodyA is constrained to. The value is an array with 2 elements matching x and y, i.e: [32, 32].","default":"","optional":"","nullable":""},{"name":"bodyB","type":"p2.Body","description":"Second connected body.","default":"","optional":"","nullable":""},{"name":"pivotB","type":"Float32Array","description":"The point relative to the center of mass of bodyB which bodyB is constrained to. The value is an array with 2 elements matching x and y, i.e: [32, 32].","default":"","optional":"","nullable":""},{"name":"maxForce","type":"number","description":"The maximum force that should be applied to constrain the bodies.","default":"","optional":true,"nullable":""},{"name":"worldPivot","type":"Float32Array","description":"A pivot point given in world coordinates. If specified, localPivotA and localPivotB are automatically computed from this value.","default":"","optional":true,"nullable":""}]},"functions":[],"members":[{"name":"game","access":"","virtual":false,"description":"Local reference to game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"world","access":"","virtual":false,"description":"Local reference to P2 World.","type":{"names":["Phaser.Physics.P2"]},"default":""}]},{"name":"Phaser.Physics.P2.RotationalSpring","description":"Creates a rotational spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.","constructor":{"name":"RotationalSpring","description":"Creates a rotational spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.","parameters":[{"name":"world","type":"Phaser.Physics.P2","description":"A reference to the P2 World.","default":"","optional":"","nullable":""},{"name":"bodyA","type":"p2.Body","description":"First connected body.","default":"","optional":"","nullable":""},{"name":"bodyB","type":"p2.Body","description":"Second connected body.","default":"","optional":"","nullable":""},{"name":"restAngle","type":"number","description":"The relative angle of bodies at which the spring is at rest. If not given, it's set to the current relative angle between the bodies.","default":"","optional":true,"nullable":""},{"name":"stiffness","type":"number","description":"Stiffness of the spring. A number >= 0.","default":100,"optional":true,"nullable":""},{"name":"damping","type":"number","description":"Damping of the spring. A number >= 0.","default":1,"optional":true,"nullable":""}]},"functions":[],"members":[{"name":"game","access":"","virtual":false,"description":"Local reference to game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"world","access":"","virtual":false,"description":"Local reference to P2 World.","type":{"names":["Phaser.Physics.P2"]},"default":""},{"name":"data","access":"","virtual":false,"description":"The actual p2 spring object.","type":{"names":["p2.RotationalSpring"]},"default":""}]},{"name":"Phaser.Physics.P2.Spring","description":"Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.","constructor":{"name":"Spring","description":"Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.","parameters":[{"name":"world","type":"Phaser.Physics.P2","description":"A reference to the P2 World.","default":"","optional":"","nullable":""},{"name":"bodyA","type":"p2.Body","description":"First connected body.","default":"","optional":"","nullable":""},{"name":"bodyB","type":"p2.Body","description":"Second connected body.","default":"","optional":"","nullable":""},{"name":"restLength","type":"number","description":"Rest length of the spring. A number > 0.","default":1,"optional":true,"nullable":""},{"name":"stiffness","type":"number","description":"Stiffness of the spring. A number >= 0.","default":100,"optional":true,"nullable":""},{"name":"damping","type":"number","description":"Damping of the spring. A number >= 0.","default":1,"optional":true,"nullable":""},{"name":"worldA","type":"Array","description":"Where to hook the spring to body A in world coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32].","default":"","optional":true,"nullable":""},{"name":"worldB","type":"Array","description":"Where to hook the spring to body B in world coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32].","default":"","optional":true,"nullable":""},{"name":"localA","type":"Array","description":"Where to hook the spring to body A in local body coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32].","default":"","optional":true,"nullable":""},{"name":"localB","type":"Array","description":"Where to hook the spring to body B in local body coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32].","default":"","optional":true,"nullable":""}]},"functions":[],"members":[{"name":"game","access":"","virtual":false,"description":"Local reference to game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"world","access":"","virtual":false,"description":"Local reference to P2 World.","type":{"names":["Phaser.Physics.P2"]},"default":""},{"name":"data","access":"","virtual":false,"description":"The actual p2 spring object.","type":{"names":["p2.LinearSpring"]},"default":""}]},{"name":"Phaser.Physics.P2","description":"This is your main access to the P2 Physics World.\rFrom here you can create materials, listen for events and add bodies into the physics simulation.","constructor":{"name":"P2","description":"This is your main access to the P2 Physics World.\rFrom here you can create materials, listen for events and add bodies into the physics simulation.","parameters":[{"name":"game","type":"Phaser.Game","description":"Reference to the current game instance.","default":"","optional":"","nullable":""},{"name":"config","type":"object","description":"Physics configuration object passed in from the game constructor.","default":"","optional":true,"nullable":""}]},"functions":[{"name":"removeBodyNextStep","description":"This will add a P2 Physics body into the removal list for the next step.","parameters":[{"name":"body","type":"Phaser.Physics.P2.Body","description":"The body to remove at the start of the next step.","default":"","optional":"","nullable":""}]},{"name":"preUpdate","description":"Called at the start of the core update loop. Purges flagged bodies from the world.","parameters":[]},{"name":"enable","description":"This will create a P2 Physics body on the given game object or array of game objects.\rA game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.\rNote: When the game object is enabled for P2 physics it has its anchor x/y set to 0.5 so it becomes centered.","parameters":[{"name":"object","type":["object","array","Phaser.Group"],"description":"The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property.","default":"","optional":"","nullable":""},{"name":"debug","type":"boolean","description":"Create a debug object to go with this body?","default":"","optional":true,"nullable":""},{"name":"children","type":"boolean","description":"Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go.","default":true,"optional":true,"nullable":""}]},{"name":"enableBody","description":"Creates a P2 Physics body on the given game object.\rA game object can only have 1 physics body active at any one time, and it can't be changed until the body is nulled.","parameters":[{"name":"object","type":"object","description":"The game object to create the physics body on. A body will only be created if this object has a null `body` property.","default":"","optional":"","nullable":""},{"name":"debug","type":"boolean","description":"Create a debug object to go with this body?","default":"","optional":"","nullable":""}]},{"name":"setImpactEvents","description":"Impact event handling is disabled by default. Enable it before any impact events will be dispatched.\rIn a busy world hundreds of impact events can be generated every step, so only enable this if you cannot do what you need via beginContact or collision masks.","parameters":[{"name":"state","type":"boolean","description":"Set to true to enable impact events, or false to disable.","default":"","optional":"","nullable":""}]},{"name":"setPostBroadphaseCallback","description":"Sets a callback to be fired after the Broadphase has collected collision pairs in the world.\rJust because a pair exists it doesn't mean they *will* collide, just that they potentially could do.\rIf your calback returns `false` the pair will be removed from the narrowphase. This will stop them testing for collision this step.\rReturning `true` from the callback will ensure they are checked in the narrowphase.","parameters":[{"name":"callback","type":"function","description":"The callback that will receive the postBroadphase event data. It must return a boolean. Set to null to disable an existing callback.","default":"","optional":"","nullable":""},{"name":"context","type":"object","description":"The context under which the callback will be fired.","default":"","optional":"","nullable":""}]},{"name":"postBroadphaseHandler","description":"Internal handler for the postBroadphase event.","parameters":[{"name":"event","type":"object","description":"The event data.","default":"","optional":"","nullable":""}]},{"name":"impactHandler","description":"Handles a p2 impact event.","parameters":[{"name":"event","type":"object","description":"The event data.","default":"","optional":"","nullable":""}]},{"name":"beginContactHandler","description":"Handles a p2 begin contact event.","parameters":[{"name":"event","type":"object","description":"The event data.","default":"","optional":"","nullable":""}]},{"name":"endContactHandler","description":"Handles a p2 end contact event.","parameters":[{"name":"event","type":"object","description":"The event data.","default":"","optional":"","nullable":""}]},{"name":"updateBoundsCollisionGroup","description":"By default the World will be set to collide everything with everything. The bounds of the world is a Body with 4 shapes, one for each face.\rIf you start to use your own collision groups then your objects will no longer collide with the bounds.\rTo fix this you need to adjust the bounds to use its own collision group first BEFORE changing your Sprites collision group.","parameters":[{"name":"setCollisionGroup","type":"boolean","description":"If true the Bounds will be set to use its own Collision Group.","default":true,"optional":true,"nullable":""}]},{"name":"setBounds","description":"Sets the bounds of the Physics world to match the given world pixel dimensions.\rYou can optionally set which 'walls' to create: left, right, top or bottom.\rIf none of the walls are given it will default to use the walls settings it had previously.\rI.e. if you previously told it to not have the left or right walls, and you then adjust the world size\rthe newly created bounds will also not have the left and right walls.\rExplicitly state them in the parameters to override this.","parameters":[{"name":"x","type":"number","description":"The x coordinate of the top-left corner of the bounds.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate of the top-left corner of the bounds.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The width of the bounds.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height of the bounds.","default":"","optional":"","nullable":""},{"name":"left","type":"boolean","description":"If true will create the left bounds wall.","default":true,"optional":true,"nullable":""},{"name":"right","type":"boolean","description":"If true will create the right bounds wall.","default":true,"optional":true,"nullable":""},{"name":"top","type":"boolean","description":"If true will create the top bounds wall.","default":true,"optional":true,"nullable":""},{"name":"bottom","type":"boolean","description":"If true will create the bottom bounds wall.","default":true,"optional":true,"nullable":""},{"name":"setCollisionGroup","type":"boolean","description":"If true the Bounds will be set to use its own Collision Group.","default":true,"optional":true,"nullable":""}]},{"name":"setupWall","description":"Internal method called by setBounds. Responsible for creating, updating or \rremoving the wall body shapes.","parameters":[{"name":"create","type":"boolean","description":"True to create the wall shape, false to remove it.","default":"","optional":"","nullable":""},{"name":"wall","type":"string","description":"The wall segment to update.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate of the wall.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate of the wall.","default":"","optional":"","nullable":""},{"name":"angle","type":"float","description":"The angle of the wall.","default":"","optional":"","nullable":""},{"name":"setCollisionGroup","type":"boolean","description":"If true the Bounds will be set to use its own Collision Group.","default":true,"optional":true,"nullable":""}]},{"name":"pause","description":"Pauses the P2 World independent of the game pause state.","parameters":[]},{"name":"resume","description":"Resumes a paused P2 World.","parameters":[]},{"name":"update","description":"Internal P2 update loop.","parameters":[]},{"name":"reset","description":"Called by Phaser.Physics when a State swap occurs.\rStarts the begin and end Contact listeners again.","parameters":[]},{"name":"clear","description":"Clears all bodies from the simulation, resets callbacks and resets the collision bitmask.\r\rThe P2 world is also cleared:\r\r* Removes all solver equations\r* Removes all constraints\r* Removes all bodies\r* Removes all springs\r* Removes all contact materials\r\rThis is called automatically when you switch state.","parameters":[]},{"name":"destroy","description":"Clears all bodies from the simulation and unlinks World from Game. Should only be called on game shutdown. Call `clear` on a State change.","parameters":[]},{"name":"addBody","description":"Add a body to the world.","parameters":[{"name":"body","type":"Phaser.Physics.P2.Body","description":"The Body to add to the World.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the Body was added successfully, otherwise false."}},{"name":"removeBody","description":"Removes a body from the world. This will silently fail if the body wasn't part of the world to begin with.","parameters":[{"name":"body","type":"Phaser.Physics.P2.Body","description":"The Body to remove from the World.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Physics.P2.Body","description":"The Body that was removed."}},{"name":"addSpring","description":"Adds a Spring to the world.","parameters":[{"name":"spring","type":["Phaser.Physics.P2.Spring","p2.LinearSpring","p2.RotationalSpring"],"description":"The Spring to add to the World.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Physics.P2.Spring","description":"The Spring that was added."}},{"name":"removeSpring","description":"Removes a Spring from the world.","parameters":[{"name":"spring","type":"Phaser.Physics.P2.Spring","description":"The Spring to remove from the World.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Physics.P2.Spring","description":"The Spring that was removed."}},{"name":"createDistanceConstraint","description":"Creates a constraint that tries to keep the distance between two bodies constant.","parameters":[{"name":"bodyA","type":["Phaser.Sprite","Phaser.Physics.P2.Body","p2.Body"],"description":"First connected body.","default":"","optional":"","nullable":""},{"name":"bodyB","type":["Phaser.Sprite","Phaser.Physics.P2.Body","p2.Body"],"description":"Second connected body.","default":"","optional":"","nullable":""},{"name":"distance","type":"number","description":"The distance to keep between the bodies.","default":"","optional":"","nullable":""},{"name":"localAnchorA","type":"Array","description":"The anchor point for bodyA, defined locally in bodyA frame. Defaults to [0,0].","default":"","optional":true,"nullable":""},{"name":"localAnchorB","type":"Array","description":"The anchor point for bodyB, defined locally in bodyB frame. Defaults to [0,0].","default":"","optional":true,"nullable":""},{"name":"maxForce","type":"number","description":"The maximum force that should be applied to constrain the bodies.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Physics.P2.DistanceConstraint","description":"The constraint"}},{"name":"createGearConstraint","description":"Creates a constraint that tries to keep the distance between two bodies constant.","parameters":[{"name":"bodyA","type":["Phaser.Sprite","Phaser.Physics.P2.Body","p2.Body"],"description":"First connected body.","default":"","optional":"","nullable":""},{"name":"bodyB","type":["Phaser.Sprite","Phaser.Physics.P2.Body","p2.Body"],"description":"Second connected body.","default":"","optional":"","nullable":""},{"name":"angle","type":"number","description":"The relative angle","default":"","optional":true,"nullable":""},{"name":"ratio","type":"number","description":"The gear ratio.","default":1,"optional":true,"nullable":""}],"returns":{"type":"Phaser.Physics.P2.GearConstraint","description":"The constraint"}},{"name":"createRevoluteConstraint","description":"Connects two bodies at given offset points, letting them rotate relative to each other around this point.\rThe pivot points are given in world (pixel) coordinates.","parameters":[{"name":"bodyA","type":["Phaser.Sprite","Phaser.Physics.P2.Body","p2.Body"],"description":"First connected body.","default":"","optional":"","nullable":""},{"name":"pivotA","type":"Array","description":"The point relative to the center of mass of bodyA which bodyA is constrained to. The value is an array with 2 elements matching x and y, i.e: [32, 32].","default":"","optional":"","nullable":""},{"name":"bodyB","type":["Phaser.Sprite","Phaser.Physics.P2.Body","p2.Body"],"description":"Second connected body.","default":"","optional":"","nullable":""},{"name":"pivotB","type":"Array","description":"The point relative to the center of mass of bodyB which bodyB is constrained to. The value is an array with 2 elements matching x and y, i.e: [32, 32].","default":"","optional":"","nullable":""},{"name":"maxForce","type":"number","description":"The maximum force that should be applied to constrain the bodies.","default":"","optional":true,"nullable":""},{"name":"worldPivot","type":"Float32Array","description":"A pivot point given in world coordinates. If specified, localPivotA and localPivotB are automatically computed from this value.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Physics.P2.RevoluteConstraint","description":"The constraint"}},{"name":"createLockConstraint","description":"Locks the relative position between two bodies.","parameters":[{"name":"bodyA","type":["Phaser.Sprite","Phaser.Physics.P2.Body","p2.Body"],"description":"First connected body.","default":"","optional":"","nullable":""},{"name":"bodyB","type":["Phaser.Sprite","Phaser.Physics.P2.Body","p2.Body"],"description":"Second connected body.","default":"","optional":"","nullable":""},{"name":"offset","type":"Array","description":"The offset of bodyB in bodyA's frame. The value is an array with 2 elements matching x and y, i.e: [32, 32].","default":"","optional":true,"nullable":""},{"name":"angle","type":"number","description":"The angle of bodyB in bodyA's frame.","default":"","optional":true,"nullable":""},{"name":"maxForce","type":"number","description":"The maximum force that should be applied to constrain the bodies.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Physics.P2.LockConstraint","description":"The constraint"}},{"name":"createPrismaticConstraint","description":"Constraint that only allows bodies to move along a line, relative to each other.\rSee http://www.iforce2d.net/b2dtut/joints-prismatic","parameters":[{"name":"bodyA","type":["Phaser.Sprite","Phaser.Physics.P2.Body","p2.Body"],"description":"First connected body.","default":"","optional":"","nullable":""},{"name":"bodyB","type":["Phaser.Sprite","Phaser.Physics.P2.Body","p2.Body"],"description":"Second connected body.","default":"","optional":"","nullable":""},{"name":"lockRotation","type":"boolean","description":"If set to false, bodyB will be free to rotate around its anchor point.","default":true,"optional":true,"nullable":""},{"name":"anchorA","type":"Array","description":"Body A's anchor point, defined in its own local frame. The value is an array with 2 elements matching x and y, i.e: [32, 32].","default":"","optional":true,"nullable":""},{"name":"anchorB","type":"Array","description":"Body A's anchor point, defined in its own local frame. The value is an array with 2 elements matching x and y, i.e: [32, 32].","default":"","optional":true,"nullable":""},{"name":"axis","type":"Array","description":"An axis, defined in body A frame, that body B's anchor point may slide along. The value is an array with 2 elements matching x and y, i.e: [32, 32].","default":"","optional":true,"nullable":""},{"name":"maxForce","type":"number","description":"The maximum force that should be applied to constrain the bodies.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Physics.P2.PrismaticConstraint","description":"The constraint"}},{"name":"addConstraint","description":"Adds a Constraint to the world.","parameters":[{"name":"constraint","type":"Phaser.Physics.P2.Constraint","description":"The Constraint to add to the World.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Physics.P2.Constraint","description":"The Constraint that was added."}},{"name":"removeConstraint","description":"Removes a Constraint from the world.","parameters":[{"name":"constraint","type":"Phaser.Physics.P2.Constraint","description":"The Constraint to be removed from the World.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Physics.P2.Constraint","description":"The Constraint that was removed."}},{"name":"addContactMaterial","description":"Adds a Contact Material to the world.","parameters":[{"name":"material","type":"Phaser.Physics.P2.ContactMaterial","description":"The Contact Material to be added to the World.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Physics.P2.ContactMaterial","description":"The Contact Material that was added."}},{"name":"removeContactMaterial","description":"Removes a Contact Material from the world.","parameters":[{"name":"material","type":"Phaser.Physics.P2.ContactMaterial","description":"The Contact Material to be removed from the World.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Physics.P2.ContactMaterial","description":"The Contact Material that was removed."}},{"name":"getContactMaterial","description":"Gets a Contact Material based on the two given Materials.","parameters":[{"name":"materialA","type":"Phaser.Physics.P2.Material","description":"The first Material to search for.","default":"","optional":"","nullable":""},{"name":"materialB","type":"Phaser.Physics.P2.Material","description":"The second Material to search for.","default":"","optional":"","nullable":""}],"returns":{"type":["Phaser.Physics.P2.ContactMaterial","boolean"],"description":"The Contact Material or false if none was found matching the Materials given."}},{"name":"setMaterial","description":"Sets the given Material against all Shapes owned by all the Bodies in the given array.","parameters":[{"name":"material","type":"Phaser.Physics.P2.Material","description":"The Material to be applied to the given Bodies.","default":"","optional":"","nullable":""},{"name":"bodies","type":"array.<Phaser.Physics.P2.Body>","description":"An Array of Body objects that the given Material will be set on.","default":"","optional":"","nullable":""}]},{"name":"createMaterial","description":"Creates a Material. Materials are applied to Shapes owned by a Body and can be set with Body.setMaterial().\rMaterials are a way to control what happens when Shapes collide. Combine unique Materials together to create Contact Materials.\rContact Materials have properties such as friction and restitution that allow for fine-grained collision control between different Materials.","parameters":[{"name":"name","type":"string","description":"Optional name of the Material. Each Material has a unique ID but string names are handy for debugging.","default":"","optional":true,"nullable":""},{"name":"body","type":"Phaser.Physics.P2.Body","description":"Optional Body. If given it will assign the newly created Material to the Body shapes.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Physics.P2.Material","description":"The Material that was created. This is also stored in Phaser.Physics.P2.materials."}},{"name":"createContactMaterial","description":"Creates a Contact Material from the two given Materials. You can then edit the properties of the Contact Material directly.","parameters":[{"name":"materialA","type":"Phaser.Physics.P2.Material","description":"The first Material to create the ContactMaterial from. If undefined it will create a new Material object first.","default":"","optional":true,"nullable":""},{"name":"materialB","type":"Phaser.Physics.P2.Material","description":"The second Material to create the ContactMaterial from. If undefined it will create a new Material object first.","default":"","optional":true,"nullable":""},{"name":"options","type":"object","description":"Material options object.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Physics.P2.ContactMaterial","description":"The Contact Material that was created."}},{"name":"getBodies","description":"Populates and returns an array with references to of all current Bodies in the world.","parameters":[],"returns":{"type":"array.<Phaser.Physics.P2.Body>","description":"An array containing all current Bodies in the world."}},{"name":"getBody","description":"Checks the given object to see if it has a p2.Body and if so returns it.","parameters":[{"name":"object","type":"object","description":"The object to check for a p2.Body on.","default":"","optional":"","nullable":""}],"returns":{"type":"p2.Body","description":"The p2.Body, or null if not found."}},{"name":"getSprings","description":"Populates and returns an array of all current Springs in the world.","parameters":[],"returns":{"type":"array.<Phaser.Physics.P2.Spring>","description":"An array containing all current Springs in the world."}},{"name":"getConstraints","description":"Populates and returns an array of all current Constraints in the world.\rYou will get an array of p2 constraints back. This can be of mixed types, for example the array may contain\rPrismaticConstraints, RevoluteConstraints or any other valid p2 constraint type.","parameters":[],"returns":{"type":"array.<Phaser.Physics.P2.Constraint>","description":"An array containing all current Constraints in the world."}},{"name":"hitTest","description":"Test if a world point overlaps bodies. You will get an array of actual P2 bodies back. You can find out which Sprite a Body belongs to\r(if any) by checking the Body.parent.sprite property. Body.parent is a Phaser.Physics.P2.Body property.","parameters":[{"name":"worldPoint","type":"Phaser.Point","description":"Point to use for intersection tests. The points values must be in world (pixel) coordinates.","default":"","optional":"","nullable":""},{"name":"bodies","type":"Array.<(Phaser.Physics.P2.Body|Phaser.Sprite|p2.Body)>","description":"A list of objects to check for intersection. If not given it will check Phaser.Physics.P2.world.bodies (i.e. all world bodies)","default":"","optional":true,"nullable":""},{"name":"precision","type":"number","description":"Used for matching against particles and lines. Adds some margin to these infinitesimal objects.","default":5,"optional":true,"nullable":""},{"name":"filterStatic","type":"boolean","description":"If true all Static objects will be removed from the results array.","default":"","optional":true,"nullable":""}],"returns":{"type":"Array","description":"Array of bodies that overlap the point."}},{"name":"toJSON","description":"Converts the current world into a JSON object.","parameters":[],"returns":{"type":"object","description":"A JSON representation of the world."}},{"name":"createCollisionGroup","description":"Creates a new Collision Group and optionally applies it to the given object.\rCollision Groups are handled using bitmasks, therefore you have a fixed limit you can create before you need to re-use older groups.","parameters":[{"name":"object","type":["Phaser.Group","Phaser.Sprite"],"description":"An optional Sprite or Group to apply the Collision Group to. If a Group is given it will be applied to all top-level children.","default":"","optional":true,"nullable":""}]},{"name":"createSpring","description":"Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.","parameters":[{"name":"bodyA","type":["Phaser.Sprite","Phaser.Physics.P2.Body","p2.Body"],"description":"First connected body.","default":"","optional":"","nullable":""},{"name":"bodyB","type":["Phaser.Sprite","Phaser.Physics.P2.Body","p2.Body"],"description":"Second connected body.","default":"","optional":"","nullable":""},{"name":"restLength","type":"number","description":"Rest length of the spring. A number > 0.","default":1,"optional":true,"nullable":""},{"name":"stiffness","type":"number","description":"Stiffness of the spring. A number >= 0.","default":100,"optional":true,"nullable":""},{"name":"damping","type":"number","description":"Damping of the spring. A number >= 0.","default":1,"optional":true,"nullable":""},{"name":"worldA","type":"Array","description":"Where to hook the spring to body A in world coordinates. This value is an array by 2 elements, x and y, i.e: [32, 32].","default":"","optional":true,"nullable":""},{"name":"worldB","type":"Array","description":"Where to hook the spring to body B in world coordinates. This value is an array by 2 elements, x and y, i.e: [32, 32].","default":"","optional":true,"nullable":""},{"name":"localA","type":"Array","description":"Where to hook the spring to body A in local body coordinates. This value is an array by 2 elements, x and y, i.e: [32, 32].","default":"","optional":true,"nullable":""},{"name":"localB","type":"Array","description":"Where to hook the spring to body B in local body coordinates. This value is an array by 2 elements, x and y, i.e: [32, 32].","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Physics.P2.Spring","description":"The spring"}},{"name":"createRotationalSpring","description":"Creates a rotational spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.","parameters":[{"name":"bodyA","type":["Phaser.Sprite","Phaser.Physics.P2.Body","p2.Body"],"description":"First connected body.","default":"","optional":"","nullable":""},{"name":"bodyB","type":["Phaser.Sprite","Phaser.Physics.P2.Body","p2.Body"],"description":"Second connected body.","default":"","optional":"","nullable":""},{"name":"restAngle","type":"number","description":"The relative angle of bodies at which the spring is at rest. If not given, it's set to the current relative angle between the bodies.","default":"","optional":true,"nullable":""},{"name":"stiffness","type":"number","description":"Stiffness of the spring. A number >= 0.","default":100,"optional":true,"nullable":""},{"name":"damping","type":"number","description":"Damping of the spring. A number >= 0.","default":1,"optional":true,"nullable":""}],"returns":{"type":"Phaser.Physics.P2.RotationalSpring","description":"The spring"}},{"name":"createBody","description":"Creates a new Body and adds it to the World.","parameters":[{"name":"x","type":"number","description":"The x coordinate of Body.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate of Body.","default":"","optional":"","nullable":""},{"name":"mass","type":"number","description":"The mass of the Body. A mass of 0 means a 'static' Body is created.","default":"","optional":"","nullable":""},{"name":"addToWorld","type":"boolean","description":"Automatically add this Body to the world? (usually false as it won't have any shapes on construction).","default":"","optional":true,"nullable":""},{"name":"options","type":"object","description":"An object containing the build options:","default":"","optional":"","nullable":""},{"name":"options.optimalDecomp","type":"boolean","description":"Set to true if you need optimal decomposition. Warning: very slow for polygons with more than 10 vertices.","default":"","optional":true,"nullable":""},{"name":"options.skipSimpleCheck","type":"boolean","description":"Set to true if you already know that the path is not intersecting itself.","default":"","optional":true,"nullable":""},{"name":"options.removeCollinearPoints","type":["boolean","number"],"description":"Set to a number (angle threshold value) to remove collinear points, or false to keep all points.","default":"","optional":true,"nullable":""},{"name":"points","type":["Array.<number>","number"],"description":"An array of 2d vectors that form the convex or concave polygon.\r                                      Either [[0,0], [0,1],...] or a flat array of numbers that will be interpreted as [x,y, x,y, ...],\r                                      or the arguments passed can be flat x,y values e.g. `setPolygon(options, x,y, x,y, x,y, ...)` where `x` and `y` are numbers.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Physics.P2.Body","description":"The body"}},{"name":"createParticle","description":"Creates a new Particle and adds it to the World.","parameters":[{"name":"x","type":"number","description":"The x coordinate of Body.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate of Body.","default":"","optional":"","nullable":""},{"name":"mass","type":"number","description":"The mass of the Body. A mass of 0 means a 'static' Body is created.","default":"","optional":"","nullable":""},{"name":"addToWorld","type":"boolean","description":"Automatically add this Body to the world? (usually false as it won't have any shapes on construction).","default":"","optional":true,"nullable":""},{"name":"options","type":"object","description":"An object containing the build options:","default":"","optional":"","nullable":""},{"name":"options.optimalDecomp","type":"boolean","description":"Set to true if you need optimal decomposition. Warning: very slow for polygons with more than 10 vertices.","default":"","optional":true,"nullable":""},{"name":"options.skipSimpleCheck","type":"boolean","description":"Set to true if you already know that the path is not intersecting itself.","default":"","optional":true,"nullable":""},{"name":"options.removeCollinearPoints","type":["boolean","number"],"description":"Set to a number (angle threshold value) to remove collinear points, or false to keep all points.","default":"","optional":true,"nullable":""},{"name":"points","type":["Array.<number>","number"],"description":"An array of 2d vectors that form the convex or concave polygon.\r                                      Either [[0,0], [0,1],...] or a flat array of numbers that will be interpreted as [x,y, x,y, ...],\r                                      or the arguments passed can be flat x,y values e.g. `setPolygon(options, x,y, x,y, x,y, ...)` where `x` and `y` are numbers.","default":"","optional":"","nullable":""}]},{"name":"convertCollisionObjects","description":"Converts all of the polylines objects inside a Tiled ObjectGroup into physics bodies that are added to the world.\rNote that the polylines must be created in such a way that they can withstand polygon decomposition.","parameters":[{"name":"map","type":"Phaser.Tilemap","description":"The Tilemap to get the map data from.","default":"","optional":"","nullable":""},{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to operate on. If not given will default to map.currentLayer.","default":"","optional":true,"nullable":""},{"name":"addToWorld","type":"boolean","description":"If true it will automatically add each body to the world.","default":true,"optional":true,"nullable":""}],"returns":{"type":"array","description":"An array of the Phaser.Physics.Body objects that have been created."}},{"name":"clearTilemapLayerBodies","description":"Clears all physics bodies from the given TilemapLayer that were created with `World.convertTilemap`.","parameters":[{"name":"map","type":"Phaser.Tilemap","description":"The Tilemap to get the map data from.","default":"","optional":"","nullable":""},{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to operate on. If not given will default to map.currentLayer.","default":"","optional":true,"nullable":""}]},{"name":"convertTilemap","description":"Goes through all tiles in the given Tilemap and TilemapLayer and converts those set to collide into physics bodies.\rOnly call this *after* you have specified all of the tiles you wish to collide with calls like Tilemap.setCollisionBetween, etc.\rEvery time you call this method it will destroy any previously created bodies and remove them from the world.\rTherefore understand it's a very expensive operation and not to be done in a core game update loop.","parameters":[{"name":"map","type":"Phaser.Tilemap","description":"The Tilemap to get the map data from.","default":"","optional":"","nullable":""},{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to operate on. If not given will default to map.currentLayer.","default":"","optional":true,"nullable":""},{"name":"addToWorld","type":"boolean","description":"If true it will automatically add each body to the world, otherwise it's up to you to do so.","default":true,"optional":true,"nullable":""},{"name":"optimize","type":"boolean","description":"If true adjacent colliding tiles will be combined into a single body to save processing. However it means you cannot perform specific Tile to Body collision responses.","default":true,"optional":true,"nullable":""}],"returns":{"type":"array","description":"An array of the Phaser.Physics.P2.Body objects that were created."}},{"name":"mpx","description":"Convert p2 physics value (meters) to pixel scale.\rBy default Phaser uses a scale of 20px per meter.\rIf you need to modify this you can over-ride these functions via the Physics Configuration object.","parameters":[{"name":"v","type":"number","description":"The value to convert.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The scaled value."}},{"name":"pxm","description":"Convert pixel value to p2 physics scale (meters).\rBy default Phaser uses a scale of 20px per meter.\rIf you need to modify this you can over-ride these functions via the Physics Configuration object.","parameters":[{"name":"v","type":"number","description":"The value to convert.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The scaled value."}},{"name":"mpxi","description":"Convert p2 physics value (meters) to pixel scale and inverses it.\rBy default Phaser uses a scale of 20px per meter.\rIf you need to modify this you can over-ride these functions via the Physics Configuration object.","parameters":[{"name":"v","type":"number","description":"The value to convert.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The scaled value."}},{"name":"pxmi","description":"Convert pixel value to p2 physics scale (meters) and inverses it.\rBy default Phaser uses a scale of 20px per meter.\rIf you need to modify this you can over-ride these functions via the Physics Configuration object.","parameters":[{"name":"v","type":"number","description":"The value to convert.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The scaled value."}}],"members":[{"name":"game","access":"","virtual":false,"description":"Local reference to game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"config","access":"protected","virtual":false,"description":"The p2 World configuration object.","type":{"names":["object"]},"default":""},{"name":"world","access":"protected","virtual":false,"description":"The p2 World in which the simulation is run.","type":{"names":["p2.World"]},"default":""},{"name":"frameRate","access":"","virtual":false,"description":"The frame rate the world will be stepped at. Defaults to 1 / 60, but you can change here. Also see useElapsedTime property.","type":{"names":["number"]},"default":""},{"name":"useElapsedTime","access":"","virtual":false,"description":"If true the frameRate value will be ignored and instead p2 will step with the value of Game.Time.physicsElapsed, which is a delta time value.","type":{"names":["boolean"]},"default":""},{"name":"paused","access":"","virtual":false,"description":"The paused state of the P2 World.","type":{"names":["boolean"]},"default":""},{"name":"materials","access":"protected","virtual":false,"description":"A local array of all created Materials.","type":{"names":["array.<Phaser.Physics.P2.Material>"]},"default":""},{"name":"gravity","access":"","virtual":false,"description":"The gravity applied to all bodies each step.","type":{"names":["Phaser.Physics.P2.InversePointProxy"]},"default":""},{"name":"walls","access":"","virtual":false,"description":"An object containing the 4 wall bodies that bound the physics world.","type":{"names":["object"]},"default":""},{"name":"onBodyAdded","access":"","virtual":false,"description":"This signal is dispatched when a new Body is added to the World.\r\rIt sends 1 argument: `body` which is the `Phaser.Physics.P2.Body` that was added to the world.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onBodyRemoved","access":"","virtual":false,"description":"This signal is dispatched when a Body is removed to the World.\r\rIt sends 1 argument: `body` which is the `Phaser.Physics.P2.Body` that was removed from the world.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onSpringAdded","access":"","virtual":false,"description":"This signal is dispatched when a Spring is added to the World.\r\rIt sends 1 argument: `spring` which is either a `Phaser.Physics.P2.Spring`, `p2.LinearSpring` or `p2.RotationalSpring` that was added to the world.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onSpringRemoved","access":"","virtual":false,"description":"This signal is dispatched when a Spring is removed from the World.\r\rIt sends 1 argument: `spring` which is either a `Phaser.Physics.P2.Spring`, `p2.LinearSpring` or `p2.RotationalSpring` that was removed from the world.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onConstraintAdded","access":"","virtual":false,"description":"This signal is dispatched when a Constraint is added to the World.\r\rIt sends 1 argument: `constraint` which is the `Phaser.Physics.P2.Constraint` that was added to the world.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onConstraintRemoved","access":"","virtual":false,"description":"This signal is dispatched when a Constraint is removed from the World.\r\rIt sends 1 argument: `constraint` which is the `Phaser.Physics.P2.Constraint` that was removed from the world.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onContactMaterialAdded","access":"","virtual":false,"description":"This signal is dispatched when a Contact Material is added to the World.\r\rIt sends 1 argument: `material` which is the `Phaser.Physics.P2.ContactMaterial` that was added to the world.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onContactMaterialRemoved","access":"","virtual":false,"description":"This signal is dispatched when a Contact Material is removed from the World.\r\rIt sends 1 argument: `material` which is the `Phaser.Physics.P2.ContactMaterial` that was removed from the world.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"postBroadphaseCallback","access":"","virtual":false,"description":"A postBroadphase callback.","type":{"names":["function"]},"default":""},{"name":"callbackContext","access":"","virtual":false,"description":"The context under which the callbacks are fired.","type":{"names":["object"]},"default":""},{"name":"onBeginContact","access":"","virtual":false,"description":"This Signal is dispatched when a first contact is created between two bodies. This happens *before* the step has been done.\r\rIt sends 5 arguments: `bodyA`, `bodyB`, `shapeA`, `shapeB` and `contactEquations`.\r\rIt is possible that in certain situations the `bodyA` or `bodyB` values are `null`. You should check for this\rin your own code to avoid processing potentially null physics bodies.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onEndContact","access":"","virtual":false,"description":"This Signal is dispatched when final contact occurs between two bodies. This happens *before* the step has been done.\r\rIt sends 4 arguments: `bodyA`, `bodyB`, `shapeA` and `shapeB`.\r\rIt is possible that in certain situations the `bodyA` or `bodyB` values are `null`. You should check for this\rin your own code to avoid processing potentially null physics bodies.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"collisionGroups","access":"","virtual":false,"description":"An array containing the collision groups that have been defined in the World.","type":{"names":["array"]},"default":""},{"name":"nothingCollisionGroup","access":"","virtual":false,"description":"A default collision group.","type":{"names":["Phaser.Physics.P2.CollisionGroup"]},"default":""},{"name":"boundsCollisionGroup","access":"","virtual":false,"description":"A default collision group.","type":{"names":["Phaser.Physics.P2.CollisionGroup"]},"default":""},{"name":"everythingCollisionGroup","access":"","virtual":false,"description":"A default collision group.","type":{"names":["Phaser.Physics.P2.CollisionGroup"]},"default":""},{"name":"boundsCollidesWith","access":"","virtual":false,"description":"An array of the bodies the world bounds collides with.","type":{"names":["array"]},"default":""},{"name":"_toRemove","access":"private","virtual":false,"description":"Internal var used to hold references to bodies to remove from the world on the next step.","type":{"names":["array"]},"default":""},{"name":"_collisionGroupID","access":"private","virtual":false,"description":"Internal var.","type":{"names":["number"]},"default":""},{"name":"_boundsLeft","access":"private","virtual":false,"description":"Internal var that keeps track of world bounds settings.","type":{"names":["boolean"]},"default":""},{"name":"_boundsRight","access":"private","virtual":false,"description":"Internal var that keeps track of world bounds settings.","type":{"names":["boolean"]},"default":""},{"name":"_boundsTop","access":"private","virtual":false,"description":"Internal var that keeps track of world bounds settings.","type":{"names":["boolean"]},"default":""},{"name":"_boundsBottom","access":"private","virtual":false,"description":"Internal var that keeps track of world bounds settings.","type":{"names":["boolean"]},"default":""},{"name":"_boundsOwnGroup","access":"private","virtual":false,"description":"Internal var that keeps track of world bounds settings.","type":{"names":["boolean"]},"default":""},{"name":"friction","access":"","virtual":false,"description":"Friction between colliding bodies. This value is used if no matching ContactMaterial is found for a Material pair.","type":{"names":["number"]},"default":""},{"name":"restitution","access":"","virtual":false,"description":"Default coefficient of restitution between colliding bodies. This value is used if no matching ContactMaterial is found for a Material pair.","type":{"names":["number"]},"default":""},{"name":"contactMaterial","access":"","virtual":false,"description":"The default Contact Material being used by the World.","type":{"names":["p2.ContactMaterial"]},"default":""},{"name":"applySpringForces","access":"","virtual":false,"description":"Enable to automatically apply spring forces each step.","type":{"names":["boolean"]},"default":""},{"name":"applyDamping","access":"","virtual":false,"description":"Enable to automatically apply body damping each step.","type":{"names":["boolean"]},"default":""},{"name":"applyGravity","access":"","virtual":false,"description":"Enable to automatically apply gravity each step.","type":{"names":["boolean"]},"default":""},{"name":"solveConstraints","access":"","virtual":false,"description":"Enable/disable constraint solving in each step.","type":{"names":["boolean"]},"default":""},{"name":"time","access":"","virtual":false,"description":"The World time.","type":{"names":["boolean"]},"default":""},{"name":"emitImpactEvent","access":"","virtual":false,"description":"Set to true if you want to the world to emit the \"impact\" event. Turning this off could improve performance.","type":{"names":["boolean"]},"default":""},{"name":"sleepMode","access":"","virtual":false,"description":"How to deactivate bodies during simulation. Possible modes are: World.NO_SLEEPING, World.BODY_SLEEPING and World.ISLAND_SLEEPING.\rIf sleeping is enabled, you might need to wake up the bodies if they fall asleep when they shouldn't. If you want to enable sleeping in the world, but want to disable it for a particular body, see Body.allowSleep.","type":{"names":["number"]},"default":""},{"name":"total","access":"","virtual":false,"description":"The total number of bodies in the world.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.Physics","description":"The Physics Manager is responsible for looking after all of the running physics systems.\rPhaser supports 4 physics systems: Arcade Physics, P2, Ninja Physics and Box2D via a commercial plugin.\r\rGame Objects (such as Sprites) can only belong to 1 physics system, but you can have multiple systems active in a single game.\r\rFor example you could have P2 managing a polygon-built terrain landscape that an vehicle drives over, while it could be firing bullets that use the\rfaster (due to being much simpler) Arcade Physics system.","constructor":{"name":"Physics","description":"The Physics Manager is responsible for looking after all of the running physics systems.\rPhaser supports 4 physics systems: Arcade Physics, P2, Ninja Physics and Box2D via a commercial plugin.\r\rGame Objects (such as Sprites) can only belong to 1 physics system, but you can have multiple systems active in a single game.\r\rFor example you could have P2 managing a polygon-built terrain landscape that an vehicle drives over, while it could be firing bullets that use the\rfaster (due to being much simpler) Arcade Physics system.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"physicsConfig","type":"object","description":"A physics configuration object to pass to the Physics world on creation.","default":"","optional":true,"nullable":""}]},"functions":[{"name":"parseConfig","description":"Parses the Physics Configuration object passed to the Game constructor and starts any physics systems specified within.","parameters":[]},{"name":"startSystem","description":"This will create an instance of the requested physics simulation.\rPhaser.Physics.Arcade is running by default, but all others need activating directly.\r\rYou can start the following physics systems:\r\rPhaser.Physics.P2JS - A full-body advanced physics system by Stefan Hedman.\rPhaser.Physics.NINJA - A port of Metanet Softwares N+ physics system.\rPhaser.Physics.BOX2D - A commercial Phaser Plugin (see http://phaser.io)\r\rBoth Ninja Physics and Box2D require their respective plugins to be loaded before you can start them.\rThey are not bundled into the core Phaser library.\r\rIf the physics world has already been created (i.e. in another state in your game) then \rcalling startSystem will reset the physics world, not re-create it. If you need to start them again from their constructors \rthen set Phaser.Physics.p2 (or whichever system you want to recreate) to `null` before calling `startSystem`.","parameters":[{"name":"system","type":"number","description":"The physics system to start: Phaser.Physics.ARCADE, Phaser.Physics.P2JS, Phaser.Physics.NINJA or Phaser.Physics.BOX2D.","default":"","optional":"","nullable":""}]},{"name":"enable","description":"This will create a default physics body on the given game object or array of objects.\rA game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.\rIt can be for any of the physics systems that have been started:\r\rPhaser.Physics.Arcade - A light weight AABB based collision system with basic separation.\rPhaser.Physics.P2JS - A full-body advanced physics system supporting multiple object shapes, polygon loading, contact materials, springs and constraints.\rPhaser.Physics.NINJA - A port of Metanet Softwares N+ physics system. Advanced AABB and Circle vs. Tile collision.\rPhaser.Physics.BOX2D - A port of https://code.google.com/p/box2d-html5\rPhaser.Physics.MATTER - A full-body and light-weight advanced physics system (still in development)\rPhaser.Physics.CHIPMUNK is still in development.\r\rIf you require more control over what type of body is created, for example to create a Ninja Physics Circle instead of the default AABB, then see the\rindividual physics systems `enable` methods instead of using this generic one.","parameters":[{"name":"object","type":["object","array"],"description":"The game object to create the physics body on. Can also be an array of objects, a body will be created on every object in the array.","default":"","optional":"","nullable":""},{"name":"system","type":"number","description":"The physics system that will be used to create the body. Defaults to Arcade Physics.","default":"Phaser.Physics.ARCADE","optional":true,"nullable":""},{"name":"debug","type":"boolean","description":"Enable the debug drawing for this body. Defaults to false.","default":"","optional":true,"nullable":""}]},{"name":"preUpdate","description":"preUpdate checks.","parameters":[]},{"name":"update","description":"Updates all running physics systems.","parameters":[]},{"name":"setBoundsToWorld","description":"Updates the physics bounds to match the world dimensions.","parameters":[]},{"name":"clear","description":"Clears down all active physics systems. This doesn't destroy them, it just clears them of objects and is called when the State changes.","parameters":[]},{"name":"reset","description":"Resets the active physics system. Called automatically on a Phaser.State swap.","parameters":[]},{"name":"destroy","description":"Destroys all active physics systems. Usually only called on a Game Shutdown, not on a State swap.","parameters":[]}],"members":[{"name":"game","access":"","virtual":false,"description":"Local reference to game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"config","access":"","virtual":false,"description":"The physics configuration object as passed to the game on creation.","type":{"names":["object"]},"default":""},{"name":"arcade","access":"","virtual":false,"description":"The Arcade Physics system.","type":{"names":["Phaser.Physics.Arcade"]},"default":""},{"name":"p2","access":"","virtual":false,"description":"The P2.JS Physics system.","type":{"names":["Phaser.Physics.P2"]},"default":""},{"name":"ninja","access":"","virtual":false,"description":"The N+ Ninja Physics system.","type":{"names":["Phaser.Physics.Ninja"]},"default":""},{"name":"box2d","access":"","virtual":false,"description":"The Box2D Physics system.","type":{"names":["Phaser.Physics.Box2D"]},"default":""},{"name":"chipmunk","access":"","virtual":false,"description":"The Chipmunk Physics system (to be done).","type":{"names":["Phaser.Physics.Chipmunk"]},"default":""},{"name":"matter","access":"","virtual":false,"description":"The MatterJS Physics system (coming soon).","type":{"names":["Phaser.Physics.Matter"]},"default":""},{"name":"ARCADE","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"P2JS","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"NINJA","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"BOX2D","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"CHIPMUNK","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"MATTERJS","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""}]},{"name":"Phaser.AudioSprite","description":"Audio Sprites are a combination of audio files and a JSON configuration.\rThe JSON follows the format of that created by https://github.com/tonistiigi/audiosprite","constructor":{"name":"AudioSprite","description":"Audio Sprites are a combination of audio files and a JSON configuration.\rThe JSON follows the format of that created by https://github.com/tonistiigi/audiosprite","parameters":[{"name":"game","type":"Phaser.Game","description":"Reference to the current game instance.","default":"","optional":"","nullable":""},{"name":"key","type":"string","description":"Asset key for the sound.","default":"","optional":"","nullable":""}]},"functions":[{"name":"play","description":"Play a sound with the given name.","parameters":[{"name":"marker","type":"string","description":"The name of sound to play","default":"","optional":true,"nullable":""},{"name":"volume","type":"number","description":"Volume of the sound you want to play. If none is given it will use the volume given to the Sound when it was created (which defaults to 1 if none was specified).","default":1,"optional":true,"nullable":""}],"returns":{"type":"Phaser.Sound","description":"This sound instance."}},{"name":"stop","description":"Stop a sound with the given name.","parameters":[{"name":"marker","type":"string","description":"The name of sound to stop. If none is given it will stop all sounds in the audio sprite.","default":"''","optional":true,"nullable":""}]},{"name":"get","description":"Get a sound with the given name.","parameters":[{"name":"marker","type":"string","description":"The name of sound to get.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Sound","description":"The sound instance."}}],"members":[{"name":"game","access":"","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"key","access":"","virtual":false,"description":"Asset key for the Audio Sprite.","type":{"names":["string"]},"default":""},{"name":"config","access":"","virtual":false,"description":"JSON audio atlas object.","type":{"names":["object"]},"default":""},{"name":"autoplayKey","access":"","virtual":false,"description":"If a sound is set to auto play, this holds the marker key of it.","type":{"names":["string"]},"default":""},{"name":"autoplay","access":"","virtual":false,"description":"Is a sound set to autoplay or not?","type":{"names":["boolean"]},"default":""},{"name":"sounds","access":"","virtual":false,"description":"An object containing the Phaser.Sound objects for the Audio Sprite.","type":{"names":["object"]},"default":""}]},{"name":"Phaser.Sound","description":"The Sound class constructor.","constructor":{"name":"Sound","description":"The Sound class constructor.","parameters":[{"name":"game","type":"Phaser.Game","description":"Reference to the current game instance.","default":"","optional":"","nullable":""},{"name":"key","type":"string","description":"Asset key for the sound.","default":"","optional":"","nullable":""},{"name":"volume","type":"number","description":"Default value for the volume, between 0 and 1.","default":1,"optional":true,"nullable":""},{"name":"loop","type":"boolean","description":"Whether or not the sound will loop.","default":"","optional":true,"nullable":""}]},"functions":[{"name":"soundHasUnlocked","description":"Called automatically when this sound is unlocked.","parameters":[{"name":"key","type":"string","description":"The Phaser.Cache key of the sound file to check for decoding.","default":"","optional":"","nullable":""}]},{"name":"addMarker","description":"Adds a marker into the current Sound. A marker is represented by a unique key and a start time and duration.\rThis allows you to bundle multiple sounds together into a single audio file and use markers to jump between them for playback.","parameters":[{"name":"name","type":"string","description":"A unique name for this marker, i.e. 'explosion', 'gunshot', etc.","default":"","optional":"","nullable":""},{"name":"start","type":"number","description":"The start point of this marker in the audio file, given in seconds. 2.5 = 2500ms, 0.5 = 500ms, etc.","default":"","optional":"","nullable":""},{"name":"duration","type":"number","description":"The duration of the marker in seconds. 2.5 = 2500ms, 0.5 = 500ms, etc.","default":1,"optional":true,"nullable":""},{"name":"volume","type":"number","description":"The volume the sound will play back at, between 0 (silent) and 1 (full volume).","default":1,"optional":true,"nullable":""},{"name":"loop","type":"boolean","description":"Sets if the sound will loop or not.","default":"","optional":true,"nullable":""}]},{"name":"removeMarker","description":"Removes a marker from the sound.","parameters":[{"name":"name","type":"string","description":"The key of the marker to remove.","default":"","optional":"","nullable":""}]},{"name":"onEndedHandler","description":"Called automatically by the AudioContext when the sound stops playing.\rDoesn't get called if the sound is set to loop or is a section of an Audio Sprite.","parameters":[]},{"name":"update","description":"Called automatically by Phaser.SoundManager.","parameters":[]},{"name":"loopFull","description":"Loops this entire sound. If you need to loop a section of it then use Sound.play and the marker and loop parameters.","parameters":[{"name":"volume","type":"number","description":"Volume of the sound you want to play. If none is given it will use the volume given to the Sound when it was created (which defaults to 1 if none was specified).","default":1,"optional":true,"nullable":""}],"returns":{"type":"Phaser.Sound","description":"This sound instance."}},{"name":"play","description":"Play this sound, or a marked section of it.","parameters":[{"name":"marker","type":"string","description":"If you want to play a marker then give the key here, otherwise leave blank to play the full sound.","default":"''","optional":true,"nullable":""},{"name":"position","type":"number","description":"The starting position to play the sound from - this is ignored if you provide a marker.","default":"","optional":true,"nullable":""},{"name":"volume","type":"number","description":"Volume of the sound you want to play. If none is given it will use the volume given to the Sound when it was created (which defaults to 1 if none was specified).","default":1,"optional":true,"nullable":""},{"name":"loop","type":"boolean","description":"Loop when finished playing? If not using a marker / audio sprite the looping will be done via the WebAudio loop property, otherwise it's time based.","default":"","optional":true,"nullable":""},{"name":"forceRestart","type":"boolean","description":"If the sound is already playing you can set forceRestart to restart it from the beginning.","default":true,"optional":true,"nullable":""}],"returns":{"type":"Phaser.Sound","description":"This sound instance."}},{"name":"restart","description":"Restart the sound, or a marked section of it.","parameters":[{"name":"marker","type":"string","description":"If you want to play a marker then give the key here, otherwise leave blank to play the full sound.","default":"''","optional":true,"nullable":""},{"name":"position","type":"number","description":"The starting position to play the sound from - this is ignored if you provide a marker.","default":"","optional":true,"nullable":""},{"name":"volume","type":"number","description":"Volume of the sound you want to play.","default":1,"optional":true,"nullable":""},{"name":"loop","type":"boolean","description":"Loop when it finished playing?","default":"","optional":true,"nullable":""}]},{"name":"pause","description":"Pauses the sound.","parameters":[]},{"name":"resume","description":"Resumes the sound.","parameters":[]},{"name":"stop","description":"Stop playing this sound.","parameters":[]},{"name":"fadeIn","description":"Starts this sound playing (or restarts it if already doing so) and sets the volume to zero.\rThen increases the volume from 0 to 1 over the duration specified.\r\rAt the end of the fade Sound.onFadeComplete is dispatched with this Sound object as the first parameter,\rand the final volume (1) as the second parameter.","parameters":[{"name":"duration","type":"number","description":"The time in milliseconds over which the Sound should fade in.","default":1000,"optional":true,"nullable":""},{"name":"loop","type":"boolean","description":"Should the Sound be set to loop? Note that this doesn't cause the fade to repeat.","default":"","optional":true,"nullable":""},{"name":"marker","type":"string","description":"The marker to start at; defaults to the current (last played) marker. To start playing from the beginning specify specify a marker of `''`.","default":"(current marker)","optional":true,"nullable":""}]},{"name":"fadeOut","description":"Decreases the volume of this Sound from its current value to 0 over the duration specified.\rAt the end of the fade Sound.onFadeComplete is dispatched with this Sound object as the first parameter,\rand the final volume (0) as the second parameter.","parameters":[{"name":"duration","type":"number","description":"The time in milliseconds over which the Sound should fade out.","default":1000,"optional":true,"nullable":""}]},{"name":"fadeTo","description":"Fades the volume of this Sound from its current value to the given volume over the duration specified.\rAt the end of the fade Sound.onFadeComplete is dispatched with this Sound object as the first parameter,\rand the final volume (volume) as the second parameter.","parameters":[{"name":"duration","type":"number","description":"The time in milliseconds during which the Sound should fade out.","default":1000,"optional":true,"nullable":""},{"name":"volume","type":"number","description":"The volume which the Sound should fade to. This is a value between 0 and 1.","default":"","optional":true,"nullable":""}]},{"name":"fadeComplete","description":"Internal handler for Sound.fadeIn, Sound.fadeOut and Sound.fadeTo.","parameters":[]},{"name":"updateGlobalVolume","description":"Called automatically by SoundManager.volume.\r\rSets the volume of AudioTag Sounds as a percentage of the Global Volume.\r\rYou should not normally call this directly.","parameters":[{"name":"globalVolume","type":"float","description":"The global SoundManager volume.","default":"","optional":"","nullable":""}]},{"name":"destroy","description":"Destroys this sound and all associated events and removes it from the SoundManager.","parameters":[{"name":"remove","type":"boolean","description":"If true this Sound is automatically removed from the SoundManager.","default":true,"optional":true,"nullable":""}]}],"members":[{"name":"game","access":"","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"name","access":"","virtual":false,"description":"Name of the sound.","type":{"names":["string"]},"default":""},{"name":"key","access":"","virtual":false,"description":"Asset key for the sound.","type":{"names":["string"]},"default":""},{"name":"loop","access":"","virtual":false,"description":"Whether or not the sound or current sound marker will loop.","type":{"names":["boolean"]},"default":""},{"name":"markers","access":"","virtual":false,"description":"The sound markers.","type":{"names":["object"]},"default":""},{"name":"context","access":"","virtual":false,"description":"Reference to the AudioContext instance.","type":{"names":["AudioContext"]},"default":""},{"name":"autoplay","access":"","virtual":false,"description":"Boolean indicating whether the sound should start automatically.","type":{"names":["boolean"]},"default":""},{"name":"totalDuration","access":"","virtual":false,"description":"The total duration of the sound in seconds.","type":{"names":["number"]},"default":""},{"name":"startTime","access":"","virtual":false,"description":"The time the sound starts at in ms (typically 0 unless starting from a marker).","type":{"names":["number"]},"default":""},{"name":"currentTime","access":"","virtual":false,"description":"The current time of sound playback in ms.","type":{"names":["number"]},"default":""},{"name":"duration","access":"","virtual":false,"description":"The duration of the current sound marker in seconds.","type":{"names":["number"]},"default":""},{"name":"durationMS","access":"","virtual":false,"description":"The duration of the current sound marker in ms.","type":{"names":["number"]},"default":""},{"name":"position","access":"","virtual":false,"description":"The position of the current sound marker in ms.","type":{"names":["number"]},"default":""},{"name":"stopTime","access":"","virtual":false,"description":"The time the sound stopped in ms.","type":{"names":["number"]},"default":""},{"name":"paused","access":"","virtual":false,"description":"true if the sound is paused, otherwise false.","type":{"names":["boolean"]},"default":""},{"name":"pausedPosition","access":"","virtual":false,"description":"The position the sound had reached when it was paused in ms.","type":{"names":["number"]},"default":""},{"name":"pausedTime","access":"","virtual":false,"description":"The game time (ms) at which the sound was paused.","type":{"names":["number"]},"default":""},{"name":"isPlaying","access":"","virtual":false,"description":"true if the sound is currently playing, otherwise false.","type":{"names":["boolean"]},"default":""},{"name":"currentMarker","access":"","virtual":false,"description":"The string ID of the currently playing marker, if any.","type":{"names":["string"]},"default":""},{"name":"fadeTween","access":"","virtual":false,"description":"The tween that fades the audio, set via Sound.fadeIn and Sound.fadeOut.","type":{"names":["Phaser.Tween"]},"default":""},{"name":"pendingPlayback","access":"","virtual":false,"description":"true if the sound file is pending playback","type":{"names":["boolean"]},"default":""},{"name":"override","access":"","virtual":false,"description":"if true when you play this sound it will always start from the beginning.","type":{"names":["boolean"]},"default":""},{"name":"allowMultiple","access":"","virtual":false,"description":"This will allow you to have multiple instances of this Sound playing at once. This is only useful when running under Web Audio, and we recommend you implement a local pooling system to not flood the sound channels.","type":{"names":["boolean"]},"default":""},{"name":"usingWebAudio","access":"","virtual":false,"description":"true if this sound is being played with Web Audio.","type":{"names":["boolean"]},"default":""},{"name":"usingAudioTag","access":"","virtual":false,"description":"true if the sound is being played via the Audio tag.","type":{"names":["boolean"]},"default":""},{"name":"externalNode","access":"","virtual":false,"description":"If defined this Sound won't connect to the SoundManager master gain node, but will instead connect to externalNode.","type":{"names":["object"]},"default":""},{"name":"masterGainNode","access":"","virtual":false,"description":"The master gain node in a Web Audio system.","type":{"names":["object"]},"default":""},{"name":"gainNode","access":"","virtual":false,"description":"The gain node in a Web Audio system.","type":{"names":["object"]},"default":""},{"name":"_sound","access":"private","virtual":false,"description":"Internal var.","type":{"names":["object"]},"default":""},{"name":"_markedToDelete","access":"private","virtual":false,"description":"When audio stops if markedToDelete it's active, will disconnect the nodes and free the memory.","type":{"names":["object"]},"default":""},{"name":"onDecoded","access":"","virtual":false,"description":"The onDecoded event is dispatched when the sound has finished decoding (typically for mp3 files)","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onPlay","access":"","virtual":false,"description":"The onPlay event is dispatched each time this sound is played.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onPause","access":"","virtual":false,"description":"The onPause event is dispatched when this sound is paused.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onResume","access":"","virtual":false,"description":"The onResume event is dispatched when this sound is resumed from a paused state.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onLoop","access":"","virtual":false,"description":"The onLoop event is dispatched when this sound loops during playback.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onStop","access":"","virtual":false,"description":"The onStop event is dispatched when this sound stops playback.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onMute","access":"","virtual":false,"description":"The onMute event is dispatched when this sound is muted.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onMarkerComplete","access":"","virtual":false,"description":"The onMarkerComplete event is dispatched when a marker within this sound completes playback.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onFadeComplete","access":"","virtual":false,"description":"The onFadeComplete event is dispatched when this sound finishes fading either in or out.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"_volume","access":"private","virtual":false,"description":"The global audio volume. A value between 0 (silence) and 1 (full volume).","type":{"names":["number"]},"default":""},{"name":"_buffer","access":"private","virtual":false,"description":"Decoded data buffer / Audio tag.","type":{"names":["any"]},"default":""},{"name":"_muted","access":"private","virtual":false,"description":"Boolean indicating whether the sound is muted or not.","type":{"names":["boolean"]},"default":""},{"name":"_tempMarker","access":"private","virtual":false,"description":"Internal marker var.","type":{"names":["number"]},"default":""},{"name":"_tempPosition","access":"private","virtual":false,"description":"Internal marker var.","type":{"names":["number"]},"default":""},{"name":"_tempVolume","access":"private","virtual":false,"description":"Internal marker var.","type":{"names":["number"]},"default":""},{"name":"_tempPause","access":"private","virtual":false,"description":"Internal marker var.","type":{"names":["number"]},"default":""},{"name":"_muteVolume","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["number"]},"default":""},{"name":"_tempLoop","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["boolean"]},"default":""},{"name":"_paused","access":"private","virtual":false,"description":"Was this sound paused via code or a game event?","type":{"names":["boolean"]},"default":""},{"name":"_onDecodedEventDispatched","access":"private","virtual":false,"description":"Was the onDecoded event dispatched?","type":{"names":["boolean"]},"default":""},{"name":"isDecoding","access":"","virtual":false,"description":"Returns true if the sound file is still decoding.","type":{"names":["boolean"]},"default":""},{"name":"isDecoded","access":"","virtual":false,"description":"Returns true if the sound file has decoded.","type":{"names":["boolean"]},"default":""},{"name":"mute","access":"","virtual":false,"description":"Gets or sets the muted state of this sound.","type":{"names":["boolean"]},"default":""},{"name":"volume","access":"","virtual":false,"description":"Gets or sets the volume of this sound, a value between 0 and 1. The value given is clamped to the range 0 to 1.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.SoundManager","description":"The Sound Manager is responsible for playing back audio via either the Legacy HTML Audio tag or via Web Audio if the browser supports it.\rNote: On Firefox 25+ on Linux if you have media.gstreamer disabled in about:config then it cannot play back mp3 or m4a files.\rThe audio file type and the encoding of those files are extremely important. Not all browsers can play all audio formats.\rThere is a good guide to what's supported here: http://hpr.dogphilosophy.net/test/\r\rIf you are reloading a Phaser Game on a page that never properly refreshes (such as in an AngularJS project) then you will quickly run out\rof AudioContext nodes. If this is the case create a global var called PhaserGlobal on the window object before creating the game. The active\rAudioContext will then be saved to window.PhaserGlobal.audioContext when the Phaser game is destroyed, and re-used when it starts again.\r\rMobile warning: There are some mobile devices (certain iPad 2 and iPad Mini revisions) that cannot play 48000 Hz audio.\rWhen they try to play the audio becomes extremely distorted and buzzes, eventually crashing the sound system.\rThe solution is to use a lower encoding rate such as 44100 Hz. Sometimes the audio context will\rbe created with a sampleRate of 48000. If this happens and audio distorts you should re-create the context.","constructor":{"name":"SoundManager","description":"The Sound Manager is responsible for playing back audio via either the Legacy HTML Audio tag or via Web Audio if the browser supports it.\rNote: On Firefox 25+ on Linux if you have media.gstreamer disabled in about:config then it cannot play back mp3 or m4a files.\rThe audio file type and the encoding of those files are extremely important. Not all browsers can play all audio formats.\rThere is a good guide to what's supported here: http://hpr.dogphilosophy.net/test/\r\rIf you are reloading a Phaser Game on a page that never properly refreshes (such as in an AngularJS project) then you will quickly run out\rof AudioContext nodes. If this is the case create a global var called PhaserGlobal on the window object before creating the game. The active\rAudioContext will then be saved to window.PhaserGlobal.audioContext when the Phaser game is destroyed, and re-used when it starts again.\r\rMobile warning: There are some mobile devices (certain iPad 2 and iPad Mini revisions) that cannot play 48000 Hz audio.\rWhen they try to play the audio becomes extremely distorted and buzzes, eventually crashing the sound system.\rThe solution is to use a lower encoding rate such as 44100 Hz. Sometimes the audio context will\rbe created with a sampleRate of 48000. If this happens and audio distorts you should re-create the context.","parameters":[{"name":"game","type":"Phaser.Game","description":"Reference to the current game instance.","default":"","optional":"","nullable":""}]},"functions":[{"name":"boot","description":"Initialises the sound manager.","parameters":[]},{"name":"setTouchLock","description":"Sets the Input Manager touch callback to be SoundManager.unlock.\rRequired for iOS audio device unlocking. Mostly just used internally.","parameters":[]},{"name":"unlock","description":"Enables the audio, usually after the first touch.","parameters":[],"returns":{"type":"boolean","description":"True if the callback should be removed, otherwise false."}},{"name":"stopAll","description":"Stops all the sounds in the game.","parameters":[]},{"name":"pauseAll","description":"Pauses all the sounds in the game.","parameters":[]},{"name":"resumeAll","description":"Resumes every sound in the game.","parameters":[]},{"name":"decode","description":"Decode a sound by its asset key.","parameters":[{"name":"key","type":"string","description":"Assets key of the sound to be decoded.","default":"","optional":"","nullable":""},{"name":"sound","type":"Phaser.Sound","description":"Its buffer will be set to decoded data.","default":"","optional":true,"nullable":""}]},{"name":"setDecodedCallback","description":"This method allows you to give the SoundManager a list of Sound files, or keys, and a callback.\rOnce all of the Sound files have finished decoding the callback will be invoked.\rThe amount of time spent decoding depends on the codec used and file size.\rIf all of the files given have already decoded the callback is triggered immediately.","parameters":[{"name":"files","type":["string","array"],"description":"An array containing either Phaser.Sound objects or their key strings as found in the Phaser.Cache.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"The callback which will be invoked once all files have finished decoding.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"Object","description":"The context in which the callback will run.","default":"","optional":"","nullable":""}]},{"name":"update","description":"Updates every sound in the game, checks for audio unlock on mobile and monitors the decoding watch list.","parameters":[]},{"name":"add","description":"Adds a new Sound into the SoundManager.","parameters":[{"name":"key","type":"string","description":"Asset key for the sound.","default":"","optional":"","nullable":""},{"name":"volume","type":"number","description":"Default value for the volume.","default":1,"optional":true,"nullable":""},{"name":"loop","type":"boolean","description":"Whether or not the sound will loop.","default":"","optional":true,"nullable":""},{"name":"connect","type":"boolean","description":"Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio.","default":true,"optional":true,"nullable":""}],"returns":{"type":"Phaser.Sound","description":"The new sound instance."}},{"name":"addSprite","description":"Adds a new AudioSprite into the SoundManager.","parameters":[{"name":"key","type":"string","description":"Asset key for the sound.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.AudioSprite","description":"The new AudioSprite instance."}},{"name":"remove","description":"Removes a Sound from the SoundManager. The removed Sound is destroyed before removal.","parameters":[{"name":"sound","type":"Phaser.Sound","description":"The sound object to remove.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the sound was removed successfully, otherwise false."}},{"name":"removeByKey","description":"Removes all Sounds from the SoundManager that have an asset key matching the given value.\rThe removed Sounds are destroyed before removal.","parameters":[{"name":"key","type":"string","description":"The key to match when removing sound objects.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The number of matching sound objects that were removed."}},{"name":"play","description":"Adds a new Sound into the SoundManager and starts it playing.","parameters":[{"name":"key","type":"string","description":"Asset key for the sound.","default":"","optional":"","nullable":""},{"name":"volume","type":"number","description":"Default value for the volume.","default":1,"optional":true,"nullable":""},{"name":"loop","type":"boolean","description":"Whether or not the sound will loop.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Sound","description":"The new sound instance."}},{"name":"setMute","description":"Internal mute handler called automatically by the SoundManager.mute setter.","parameters":[]},{"name":"unsetMute","description":"Internal mute handler called automatically by the SoundManager.mute setter.","parameters":[]},{"name":"destroy","description":"Stops all the sounds in the game, then destroys them and finally clears up any callbacks.","parameters":[]}],"members":[{"name":"game","access":"","virtual":false,"description":"Local reference to game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"onSoundDecode","access":"","virtual":false,"description":"The event dispatched when a sound decodes (typically only for mp3 files)","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onVolumeChange","access":"","virtual":false,"description":"This signal is dispatched whenever the global volume changes. The new volume is passed as the only parameter to your callback.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onMute","access":"","virtual":false,"description":"This signal is dispatched when the SoundManager is globally muted, either directly via game code or as a result of the game pausing.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onUnMute","access":"","virtual":false,"description":"This signal is dispatched when the SoundManager is globally un-muted, either directly via game code or as a result of the game resuming from a pause.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"context","access":"","virtual":false,"description":"The AudioContext being used for playback.","type":{"names":["AudioContext"]},"default":""},{"name":"usingWebAudio","access":"","virtual":false,"description":"True the SoundManager and device are both using Web Audio.","type":{"names":["boolean"]},"default":""},{"name":"usingAudioTag","access":"","virtual":false,"description":"True the SoundManager and device are both using the Audio tag instead of Web Audio.","type":{"names":["boolean"]},"default":""},{"name":"noAudio","access":"","virtual":false,"description":"True if audio been disabled via the PhaserGlobal (useful if you need to use a 3rd party audio library) or the device doesn't support any audio.","type":{"names":["boolean"]},"default":""},{"name":"connectToMaster","access":"","virtual":false,"description":"Used in conjunction with Sound.externalNode this allows you to stop a Sound node being connected to the SoundManager master gain node.","type":{"names":["boolean"]},"default":true},{"name":"touchLocked","access":"","virtual":false,"description":"true if the audio system is currently locked awaiting a touch event.","type":{"names":["boolean"]},"default":""},{"name":"channels","access":"","virtual":false,"description":"The number of audio channels to use in playback.","type":{"names":["number"]},"default":32},{"name":"muteOnPause","access":"","virtual":false,"description":"Set to true to have all sound muted when the Phaser game pauses (such as on loss of focus),\ror set to false to keep audio playing, regardless of the game pause state. You may need to\rdo this should you wish to control audio muting via external DOM buttons or similar.","type":{"names":["boolean"]},"default":true},{"name":"_codeMuted","access":"private","virtual":false,"description":"Internal mute tracking var.","type":{"names":["boolean"]},"default":""},{"name":"_muted","access":"private","virtual":false,"description":"Internal mute tracking var.","type":{"names":["boolean"]},"default":""},{"name":"_unlockSource","access":"private","virtual":false,"description":"Internal unlock tracking var.","type":{"names":["AudioContext"]},"default":""},{"name":"_volume","access":"private","virtual":false,"description":"The global audio volume. A value between 0 (silence) and 1 (full volume).","type":{"names":["number"]},"default":1},{"name":"_sounds","access":"private","virtual":false,"description":"An array containing all the sounds","type":{"names":["array"]},"default":""},{"name":"_watchList","access":"private","virtual":false,"description":"An array set containing all the sounds being monitored for decoding status.","type":{"names":["Phaser.ArraySet"]},"default":""},{"name":"_watching","access":"private","virtual":false,"description":"Is the SoundManager monitoring the watchList?","type":{"names":["boolean"]},"default":""},{"name":"_watchCallback","access":"private","virtual":false,"description":"The callback to invoke once the watchlist is clear.","type":{"names":["function"]},"default":""},{"name":"_watchContext","access":"private","virtual":false,"description":"The context in which to call the watchlist callback.","type":{"names":["object"]},"default":""},{"name":"mute","access":"","virtual":false,"description":"Gets or sets the muted state of the SoundManager. This effects all sounds in the game.","type":{"names":["boolean"]},"default":""},{"name":"volume","access":"","virtual":false,"description":"Gets or sets the global volume of the SoundManager, a value between 0 and 1. The value given is clamped to the range 0 to 1.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.ImageCollection","description":"An Image Collection is a special tileset containing mulitple images, with no slicing into each image.\r\rImage Collections are normally created automatically when Tiled data is loaded.","constructor":{"name":"ImageCollection","description":"An Image Collection is a special tileset containing mulitple images, with no slicing into each image.\r\rImage Collections are normally created automatically when Tiled data is loaded.","parameters":[{"name":"name","type":"string","description":"The name of the image collection in the map data.","default":"","optional":"","nullable":""},{"name":"firstgid","type":"integer","description":"The first image index this image collection contains.","default":"","optional":"","nullable":""},{"name":"width","type":"integer","description":"Width of widest image (in pixels).","default":32,"optional":true,"nullable":""},{"name":"height","type":"integer","description":"Height of tallest image (in pixels).","default":32,"optional":true,"nullable":""},{"name":"margin","type":"integer","description":"The margin around all images in the collection (in pixels).","default":"","optional":true,"nullable":""},{"name":"spacing","type":"integer","description":"The spacing between each image in the collection (in pixels).","default":"","optional":true,"nullable":""},{"name":"properties","type":"object","description":"Custom Image Collection properties.","default":"{}","optional":true,"nullable":""}]},"functions":[{"name":"containsImageIndex","description":"Returns true if and only if this image collection contains the given image index.","parameters":[{"name":"imageIndex","type":"integer","description":"The image index to search for.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if this Image Collection contains the given index."}},{"name":"addImage","description":"Add an image to this Image Collection.","parameters":[{"name":"gid","type":"integer","description":"The gid of the image in the Image Collection.","default":"","optional":"","nullable":""},{"name":"image","type":"string","description":"The the key of the image in the Image Collection and in the cache.","default":"","optional":"","nullable":""}]}],"members":[{"name":"name","access":"","virtual":false,"description":"The name of the Image Collection.","type":{"names":["string"]},"default":""},{"name":"firstgid","access":"","virtual":false,"description":"The Tiled firstgid value.\rThis is the starting index of the first image index this Image Collection contains.","type":{"names":["integer"]},"default":""},{"name":"imageWidth","access":"","virtual":false,"description":"The width of the widest image (in pixels).","type":{"names":["integer"]},"default":""},{"name":"imageHeight","access":"","virtual":false,"description":"The height of the tallest image (in pixels).","type":{"names":["integer"]},"default":""},{"name":"imageMargin","access":"","virtual":false,"description":"The margin around the images in the collection (in pixels).\rUse `setSpacing` to change.","type":"","default":""},{"name":"imageSpacing","access":"","virtual":false,"description":"The spacing between each image in the collection (in pixels).\rUse `setSpacing` to change.","type":{"names":["integer"]},"default":""},{"name":"properties","access":"","virtual":false,"description":"Image Collection-specific properties that are typically defined in the Tiled editor.","type":{"names":["object"]},"default":""},{"name":"images","access":"","virtual":false,"description":"The cached images that are a part of this collection.","type":{"names":["array"]},"default":""},{"name":"total","access":"","virtual":false,"description":"The total number of images in the image collection.","type":{"names":["integer"]},"default":""}]},{"name":"Phaser.Tile","description":"A Tile is a representation of a single tile within the Tilemap.","constructor":{"name":"Tile","description":"A Tile is a representation of a single tile within the Tilemap.","parameters":[{"name":"layer","type":"object","description":"The layer in the Tilemap data that this tile belongs to.","default":"","optional":"","nullable":""},{"name":"index","type":"number","description":"The index of this tile type in the core map data.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate of this tile.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate of this tile.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"Width of the tile.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"Height of the tile.","default":"","optional":"","nullable":""}]},"functions":[{"name":"containsPoint","description":"Check if the given x and y world coordinates are within this Tile.","parameters":[{"name":"x","type":"number","description":"The x coordinate to test.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate to test.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the coordinates are within this Tile, otherwise false."}},{"name":"intersects","description":"Check for intersection with this tile.","parameters":[{"name":"x","type":"number","description":"The x axis in pixels.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y axis in pixels.","default":"","optional":"","nullable":""},{"name":"right","type":"number","description":"The right point.","default":"","optional":"","nullable":""},{"name":"bottom","type":"number","description":"The bottom point.","default":"","optional":"","nullable":""}]},{"name":"setCollisionCallback","description":"Set a callback to be called when this tile is hit by an object.\rThe callback must true true for collision processing to take place.","parameters":[{"name":"callback","type":"function","description":"Callback function.","default":"","optional":"","nullable":""},{"name":"context","type":"object","description":"Callback will be called within this context.","default":"","optional":"","nullable":""}]},{"name":"destroy","description":"Clean up memory.","parameters":[]},{"name":"setCollision","description":"Sets the collision flags for each side of this tile and updates the interesting faces list.","parameters":[{"name":"left","type":"boolean","description":"Indicating collide with any object on the left.","default":"","optional":"","nullable":""},{"name":"right","type":"boolean","description":"Indicating collide with any object on the right.","default":"","optional":"","nullable":""},{"name":"up","type":"boolean","description":"Indicating collide with any object on the top.","default":"","optional":"","nullable":""},{"name":"down","type":"boolean","description":"Indicating collide with any object on the bottom.","default":"","optional":"","nullable":""}]},{"name":"resetCollision","description":"Reset collision status flags.","parameters":[]},{"name":"isInteresting","description":"Is this tile interesting?","parameters":[{"name":"collides","type":"boolean","description":"If true will check any collides value.","default":"","optional":"","nullable":""},{"name":"faces","type":"boolean","description":"If true will check any face value.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the Tile is interesting, otherwise false."}},{"name":"copy","description":"Copies the tile data and properties from the given tile to this tile.","parameters":[{"name":"tile","type":"Phaser.Tile","description":"The tile to copy from.","default":"","optional":"","nullable":""}]}],"members":[{"name":"layer","access":"","virtual":false,"description":"The layer in the Tilemap data that this tile belongs to.","type":{"names":["object"]},"default":""},{"name":"index","access":"","virtual":false,"description":"The index of this tile within the map data corresponding to the tileset, or -1 if this represents a blank/null tile.","type":{"names":["number"]},"default":""},{"name":"x","access":"","virtual":false,"description":"The x map coordinate of this tile.","type":{"names":["number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The y map coordinate of this tile.","type":{"names":["number"]},"default":""},{"name":"rotation","access":"","virtual":false,"description":"The rotation angle of this tile.","type":{"names":["number"]},"default":""},{"name":"flipped","access":"","virtual":false,"description":"Whether this tile is flipped (mirrored) or not.","type":{"names":["boolean"]},"default":""},{"name":"worldX","access":"","virtual":false,"description":"The x map coordinate of this tile.","type":"","default":""},{"name":"worldY","access":"","virtual":false,"description":"The y map coordinate of this tile.","type":"","default":""},{"name":"width","access":"","virtual":false,"description":"The width of the tile in pixels.","type":{"names":["number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the tile in pixels.","type":{"names":["number"]},"default":""},{"name":"centerX","access":"","virtual":false,"description":"The width of the tile in pixels.","type":"","default":""},{"name":"centerY","access":"","virtual":false,"description":"The height of the tile in pixels.","type":"","default":""},{"name":"alpha","access":"","virtual":false,"description":"The alpha value at which this tile is drawn to the canvas.","type":{"names":["number"]},"default":""},{"name":"properties","access":"","virtual":false,"description":"Tile specific properties.","type":{"names":["object"]},"default":""},{"name":"scanned","access":"","virtual":false,"description":"Has this tile been walked / turned into a poly?","type":{"names":["boolean"]},"default":""},{"name":"faceTop","access":"","virtual":false,"description":"Is the top of this tile an interesting edge?","type":{"names":["boolean"]},"default":""},{"name":"faceBottom","access":"","virtual":false,"description":"Is the bottom of this tile an interesting edge?","type":{"names":["boolean"]},"default":""},{"name":"faceLeft","access":"","virtual":false,"description":"Is the left of this tile an interesting edge?","type":{"names":["boolean"]},"default":""},{"name":"faceRight","access":"","virtual":false,"description":"Is the right of this tile an interesting edge?","type":{"names":["boolean"]},"default":""},{"name":"collideLeft","access":"","virtual":false,"description":"Indicating collide with any object on the left.","type":{"names":["boolean"]},"default":""},{"name":"collideRight","access":"","virtual":false,"description":"Indicating collide with any object on the right.","type":{"names":["boolean"]},"default":""},{"name":"collideUp","access":"","virtual":false,"description":"Indicating collide with any object on the top.","type":{"names":["boolean"]},"default":""},{"name":"collideDown","access":"","virtual":false,"description":"Indicating collide with any object on the bottom.","type":{"names":["boolean"]},"default":""},{"name":"collisionCallback","access":"","virtual":false,"description":"Tile collision callback.","type":{"names":["function"]},"default":""},{"name":"collisionCallbackContext","access":"","virtual":false,"description":"The context in which the collision callback will be called.","type":{"names":["object"]},"default":""},{"name":"collides","access":"","virtual":false,"description":"True if this tile can collide on any of its faces.","type":{"names":["boolean"]},"default":""},{"name":"canCollide","access":"","virtual":false,"description":"True if this tile can collide on any of its faces or has a collision callback set.","type":{"names":["boolean"]},"default":""},{"name":"left","access":"","virtual":false,"description":"The x value in pixels.","type":{"names":["number"]},"default":""},{"name":"right","access":"","virtual":false,"description":"The sum of the x and width properties.","type":{"names":["number"]},"default":""},{"name":"top","access":"","virtual":false,"description":"The y value.","type":{"names":["number"]},"default":""},{"name":"bottom","access":"","virtual":false,"description":"The sum of the y and height properties.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.Tilemap","description":"Creates a new Phaser.Tilemap object. The map can either be populated with data from a Tiled JSON file or from a CSV file.\r\rTiled is a free software package specifically for creating tile maps, and is available from http://www.mapeditor.org\r\rTo do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key.\rWhen using CSV data you must provide the key and the tileWidth and tileHeight parameters.\rIf creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here.\rNote that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it.\rA Tile map is rendered to the display using a TilemapLayer. It is not added to the display list directly itself.\rA map may have multiple layers. You can perform operations on the map data such as copying, pasting, filling and shuffling the tiles around.","constructor":{"name":"Tilemap","description":"Creates a new Phaser.Tilemap object. The map can either be populated with data from a Tiled JSON file or from a CSV file.\r\rTiled is a free software package specifically for creating tile maps, and is available from http://www.mapeditor.org\r\rTo do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key.\rWhen using CSV data you must provide the key and the tileWidth and tileHeight parameters.\rIf creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here.\rNote that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it.\rA Tile map is rendered to the display using a TilemapLayer. It is not added to the display list directly itself.\rA map may have multiple layers. You can perform operations on the map data such as copying, pasting, filling and shuffling the tiles around.","parameters":[{"name":"game","type":"Phaser.Game","description":"Game reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"key","type":"string","description":"The key of the tilemap data as stored in the Cache. If you're creating a blank map either leave this parameter out or pass `null`.","default":"","optional":true,"nullable":""},{"name":"tileWidth","type":"number","description":"The pixel width of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data.","default":32,"optional":true,"nullable":""},{"name":"tileHeight","type":"number","description":"The pixel height of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data.","default":32,"optional":true,"nullable":""},{"name":"width","type":"number","description":"The width of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this.","default":10,"optional":true,"nullable":""},{"name":"height","type":"number","description":"The height of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this.","default":10,"optional":true,"nullable":""}]},"functions":[{"name":"create","description":"Creates an empty map of the given dimensions and one blank layer. If layers already exist they are erased.","parameters":[{"name":"name","type":"string","description":"The name of the default layer of the map.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The width of the map in tiles.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height of the map in tiles.","default":"","optional":"","nullable":""},{"name":"tileWidth","type":"number","description":"The width of the tiles the map uses for calculations.","default":"","optional":"","nullable":""},{"name":"tileHeight","type":"number","description":"The height of the tiles the map uses for calculations.","default":"","optional":"","nullable":""},{"name":"group","type":"Phaser.Group","description":"Optional Group to add the layer to. If not specified it will be added to the World group.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.TilemapLayer","description":"The TilemapLayer object. This is an extension of Phaser.Image and can be moved around the display list accordingly."}},{"name":"setTileSize","description":"Sets the base tile size for the map.","parameters":[{"name":"tileWidth","type":"number","description":"The width of the tiles the map uses for calculations.","default":"","optional":"","nullable":""},{"name":"tileHeight","type":"number","description":"The height of the tiles the map uses for calculations.","default":"","optional":"","nullable":""}]},{"name":"addTilesetImage","description":"Adds an image to the map to be used as a tileset. A single map may use multiple tilesets.\rNote that the tileset name can be found in the JSON file exported from Tiled, or in the Tiled editor.","parameters":[{"name":"tileset","type":"string","description":"The name of the tileset as specified in the map data.","default":"","optional":"","nullable":""},{"name":"key","type":["string","Phaser.BitmapData"],"description":"The key of the Phaser.Cache image used for this tileset.\r    If `undefined` or `null` it will look for an image with a key matching the tileset parameter.\r    You can also pass in a BitmapData which can be used instead of an Image.","default":"","optional":true,"nullable":""},{"name":"tileWidth","type":"number","description":"The width of the tiles in the Tileset Image. If not given it will default to the map.tileWidth value, if that isn't set then 32.","default":32,"optional":true,"nullable":""},{"name":"tileHeight","type":"number","description":"The height of the tiles in the Tileset Image. If not given it will default to the map.tileHeight value, if that isn't set then 32.","default":32,"optional":true,"nullable":""},{"name":"tileMargin","type":"number","description":"The width of the tiles in the Tileset Image.","default":"","optional":true,"nullable":""},{"name":"tileSpacing","type":"number","description":"The height of the tiles in the Tileset Image.","default":"","optional":true,"nullable":""},{"name":"gid","type":"number","description":"If adding multiple tilesets to a blank/dynamic map, specify the starting GID the set will use here.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Tileset","description":"Returns the Tileset object that was created or updated, or null if it failed."}},{"name":"createFromObjects","description":"Creates a Sprite for every object matching the given gid in the map data. You can optionally specify the group that the Sprite will be created in. If none is\rgiven it will be created in the World. All properties from the map data objectgroup are copied across to the Sprite, so you can use this as an easy way to\rconfigure Sprite properties from within the map editor. For example giving an object a property of alpha: 0.5 in the map editor will duplicate that when the\rSprite is created. You could also give it a value like: body.velocity.x: 100 to set it moving automatically.","parameters":[{"name":"name","type":"string","description":"The name of the Object Group to create Sprites from.","default":"","optional":"","nullable":""},{"name":"gid","type":"number","description":"The layer array index value, or if a string is given the layer name within the map data.","default":"","optional":"","nullable":""},{"name":"key","type":"string","description":"The Game.cache key of the image that this Sprite will use.","default":"","optional":"","nullable":""},{"name":"frame","type":["number","string"],"description":"If the Sprite image contains multiple frames you can specify which one to use here.","default":"","optional":true,"nullable":""},{"name":"exists","type":"boolean","description":"The default exists state of the Sprite.","default":true,"optional":true,"nullable":""},{"name":"autoCull","type":"boolean","description":"The default autoCull state of the Sprite. Sprites that are autoCulled are culled from the camera if out of its range.","default":"","optional":true,"nullable":""},{"name":"group","type":"Phaser.Group","description":"Group to add the Sprite to. If not specified it will be added to the World group.","default":"Phaser.World","optional":true,"nullable":""},{"name":"CustomClass","type":"object","description":"If you wish to create your own class, rather than Phaser.Sprite, pass the class here. Your class must extend Phaser.Sprite and have the same constructor parameters.","default":"Phaser.Sprite","optional":true,"nullable":""},{"name":"adjustY","type":"boolean","description":"By default the Tiled map editor uses a bottom-left coordinate system. Phaser uses top-left. So most objects will appear too low down. This parameter moves them up by their height.","default":true,"optional":true,"nullable":""}]},{"name":"createFromTiles","description":"Creates a Sprite for every object matching the given tile indexes in the map data.\rYou can specify the group that the Sprite will be created in. If none is given it will be created in the World.\rYou can optional specify if the tile will be replaced with another after the Sprite is created. This is useful if you want to lay down special \rtiles in a level that are converted to Sprites, but want to replace the tile itself with a floor tile or similar once converted.","parameters":[{"name":"tiles","type":["integer","Array"],"description":"The tile index, or array of indexes, to create Sprites from.","default":"","optional":"","nullable":""},{"name":"replacements","type":["integer","Array"],"description":"The tile index, or array of indexes, to change a converted tile to. Set to `null` to not change.","default":"","optional":"","nullable":""},{"name":"key","type":"string","description":"The Game.cache key of the image that this Sprite will use.","default":"","optional":"","nullable":""},{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to operate on.","default":"","optional":true,"nullable":""},{"name":"group","type":"Phaser.Group","description":"Group to add the Sprite to. If not specified it will be added to the World group.","default":"Phaser.World","optional":true,"nullable":""},{"name":"properties","type":"object","description":"An object that contains the default properties for your newly created Sprite. This object will be iterated and any matching Sprite property will be set.","default":"","optional":true,"nullable":""}],"returns":{"type":"integer","description":"The number of Sprites that were created."}},{"name":"createLayer","description":"Creates a new TilemapLayer object. By default TilemapLayers are fixed to the camera.\rThe `layer` parameter is important. If you've created your map in Tiled then you can get this by looking in Tiled and looking at the Layer name.\rOr you can open the JSON file it exports and look at the layers[].name value. Either way it must match.\rIf you wish to create a blank layer to put your own tiles on then see Tilemap.createBlankLayer.","parameters":[{"name":"layer","type":["number","string"],"description":"The layer array index value, or if a string is given the layer name, within the map data that this TilemapLayer represents.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The rendered width of the layer, should never be wider than Game.width. If not given it will be set to Game.width.","default":"","optional":true,"nullable":""},{"name":"height","type":"number","description":"The rendered height of the layer, should never be wider than Game.height. If not given it will be set to Game.height.","default":"","optional":true,"nullable":""},{"name":"group","type":"Phaser.Group","description":"Optional Group to add the object to. If not specified it will be added to the World group.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.TilemapLayer","description":"The TilemapLayer object. This is an extension of Phaser.Sprite and can be moved around the display list accordingly."}},{"name":"createBlankLayer","description":"Creates a new and empty layer on this Tilemap. By default TilemapLayers are fixed to the camera.","parameters":[{"name":"name","type":"string","description":"The name of this layer. Must be unique within the map.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The width of the layer in tiles.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height of the layer in tiles.","default":"","optional":"","nullable":""},{"name":"tileWidth","type":"number","description":"The width of the tiles the layer uses for calculations.","default":"","optional":"","nullable":""},{"name":"tileHeight","type":"number","description":"The height of the tiles the layer uses for calculations.","default":"","optional":"","nullable":""},{"name":"group","type":"Phaser.Group","description":"Optional Group to add the layer to. If not specified it will be added to the World group.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.TilemapLayer","description":"The TilemapLayer object. This is an extension of Phaser.Image and can be moved around the display list accordingly."}},{"name":"getIndex","description":"Gets the layer index based on the layers name.","parameters":[{"name":"location","type":"array","description":"The local array to search.","default":"","optional":"","nullable":""},{"name":"name","type":"string","description":"The name of the array element to get.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The index of the element in the array, or null if not found."}},{"name":"getLayerIndex","description":"Gets the layer index based on its name.","parameters":[{"name":"name","type":"string","description":"The name of the layer to get.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The index of the layer in this tilemap, or null if not found."}},{"name":"getTilesetIndex","description":"Gets the tileset index based on its name.","parameters":[{"name":"name","type":"string","description":"The name of the tileset to get.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The index of the tileset in this tilemap, or null if not found."}},{"name":"getImageIndex","description":"Gets the image index based on its name.","parameters":[{"name":"name","type":"string","description":"The name of the image to get.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The index of the image in this tilemap, or null if not found."}},{"name":"setTileIndexCallback","description":"Sets a global collision callback for the given tile index within the layer. This will affect all tiles on this layer that have the same index.\rIf a callback is already set for the tile index it will be replaced. Set the callback to null to remove it.\rIf you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback.","parameters":[{"name":"indexes","type":["number","array"],"description":"Either a single tile index, or an array of tile indexes to have a collision callback set for.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"The callback that will be invoked when the tile is collided with.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context under which the callback is called.","default":"","optional":"","nullable":""},{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to operate on. If not given will default to this.currentLayer.","default":"","optional":true,"nullable":""}]},{"name":"setTileLocationCallback","description":"Sets a global collision callback for the given map location within the layer. This will affect all tiles on this layer found in the given area.\rIf a callback is already set for the tile index it will be replaced. Set the callback to null to remove it.\rIf you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback.","parameters":[{"name":"x","type":"number","description":"X position of the top left of the area to copy (given in tiles, not pixels)","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the top left of the area to copy (given in tiles, not pixels)","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The width of the area to copy (given in tiles, not pixels)","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height of the area to copy (given in tiles, not pixels)","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"The callback that will be invoked when the tile is collided with.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context under which the callback is called.","default":"","optional":"","nullable":""},{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to operate on. If not given will default to this.currentLayer.","default":"","optional":true,"nullable":""}]},{"name":"setCollision","description":"Sets collision the given tile or tiles. You can pass in either a single numeric index or an array of indexes: [ 2, 3, 15, 20].\rThe `collides` parameter controls if collision will be enabled (true) or disabled (false).","parameters":[{"name":"indexes","type":["number","array"],"description":"Either a single tile index, or an array of tile IDs to be checked for collision.","default":"","optional":"","nullable":""},{"name":"collides","type":"boolean","description":"If true it will enable collision. If false it will clear collision.","default":true,"optional":true,"nullable":""},{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to operate on. If not given will default to this.currentLayer.","default":"","optional":true,"nullable":""},{"name":"recalculate","type":"boolean","description":"Recalculates the tile faces after the update.","default":true,"optional":true,"nullable":""}]},{"name":"setCollisionBetween","description":"Sets collision on a range of tiles where the tile IDs increment sequentially.\rCalling this with a start value of 10 and a stop value of 14 would set collision for tiles 10, 11, 12, 13 and 14.\rThe `collides` parameter controls if collision will be enabled (true) or disabled (false).","parameters":[{"name":"start","type":"number","description":"The first index of the tile to be set for collision.","default":"","optional":"","nullable":""},{"name":"stop","type":"number","description":"The last index of the tile to be set for collision.","default":"","optional":"","nullable":""},{"name":"collides","type":"boolean","description":"If true it will enable collision. If false it will clear collision.","default":true,"optional":true,"nullable":""},{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to operate on. If not given will default to this.currentLayer.","default":"","optional":true,"nullable":""},{"name":"recalculate","type":"boolean","description":"Recalculates the tile faces after the update.","default":true,"optional":true,"nullable":""}]},{"name":"setCollisionByExclusion","description":"Sets collision on all tiles in the given layer, except for the IDs of those in the given array.\rThe `collides` parameter controls if collision will be enabled (true) or disabled (false).","parameters":[{"name":"indexes","type":"array","description":"An array of the tile IDs to not be counted for collision.","default":"","optional":"","nullable":""},{"name":"collides","type":"boolean","description":"If true it will enable collision. If false it will clear collision.","default":true,"optional":true,"nullable":""},{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to operate on. If not given will default to this.currentLayer.","default":"","optional":true,"nullable":""},{"name":"recalculate","type":"boolean","description":"Recalculates the tile faces after the update.","default":true,"optional":true,"nullable":""}]},{"name":"setCollisionByIndex","description":"Sets collision values on a tile in the set.\rYou shouldn't usually call this method directly, instead use setCollision, setCollisionBetween or setCollisionByExclusion.","parameters":[{"name":"index","type":"number","description":"The index of the tile on the layer.","default":"","optional":"","nullable":""},{"name":"collides","type":"boolean","description":"If true it will enable collision on the tile. If false it will clear collision values from the tile.","default":true,"optional":true,"nullable":""},{"name":"layer","type":"number","description":"The layer to operate on. If not given will default to this.currentLayer.","default":"","optional":true,"nullable":""},{"name":"recalculate","type":"boolean","description":"Recalculates the tile faces after the update.","default":true,"optional":true,"nullable":""}]},{"name":"getLayer","description":"Gets the TilemapLayer index as used in the setCollision calls.","parameters":[{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to operate on. If not given will default to this.currentLayer.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The TilemapLayer index."}},{"name":"setPreventRecalculate","description":"Turn off/on the recalculation of faces for tile or collision updates. \r`setPreventRecalculate(true)` puts recalculation on hold while `setPreventRecalculate(false)` recalculates all the changed layers.","parameters":[{"name":"value","type":"boolean","description":"If true it will put the recalculation on hold.","default":"","optional":"","nullable":""}]},{"name":"calculateFaces","description":"Internal function.","parameters":[{"name":"layer","type":"number","description":"The index of the TilemapLayer to operate on.","default":"","optional":"","nullable":""}]},{"name":"getTileAbove","description":"Gets the tile above the tile coordinates given.\rMostly used as an internal function by calculateFaces.","parameters":[{"name":"layer","type":"number","description":"The local layer index to get the tile from. Can be determined by Tilemap.getLayer().","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate to get the tile from. In tiles, not pixels.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate to get the tile from. In tiles, not pixels.","default":"","optional":"","nullable":""}]},{"name":"getTileBelow","description":"Gets the tile below the tile coordinates given.\rMostly used as an internal function by calculateFaces.","parameters":[{"name":"layer","type":"number","description":"The local layer index to get the tile from. Can be determined by Tilemap.getLayer().","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate to get the tile from. In tiles, not pixels.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate to get the tile from. In tiles, not pixels.","default":"","optional":"","nullable":""}]},{"name":"getTileLeft","description":"Gets the tile to the left of the tile coordinates given.\rMostly used as an internal function by calculateFaces.","parameters":[{"name":"layer","type":"number","description":"The local layer index to get the tile from. Can be determined by Tilemap.getLayer().","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate to get the tile from. In tiles, not pixels.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate to get the tile from. In tiles, not pixels.","default":"","optional":"","nullable":""}]},{"name":"getTileRight","description":"Gets the tile to the right of the tile coordinates given.\rMostly used as an internal function by calculateFaces.","parameters":[{"name":"layer","type":"number","description":"The local layer index to get the tile from. Can be determined by Tilemap.getLayer().","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate to get the tile from. In tiles, not pixels.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate to get the tile from. In tiles, not pixels.","default":"","optional":"","nullable":""}]},{"name":"setLayer","description":"Sets the current layer to the given index.","parameters":[{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to set as current.","default":"","optional":"","nullable":""}]},{"name":"hasTile","description":"Checks if there is a tile at the given location.","parameters":[{"name":"x","type":"number","description":"X position to check if a tile exists at (given in tile units, not pixels)","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position to check if a tile exists at (given in tile units, not pixels)","default":"","optional":"","nullable":""},{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to set as current.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if there is a tile at the given location, otherwise false."}},{"name":"removeTile","description":"Removes the tile located at the given coordinates and updates the collision data.","parameters":[{"name":"x","type":"number","description":"X position to place the tile (given in tile units, not pixels)","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position to place the tile (given in tile units, not pixels)","default":"","optional":"","nullable":""},{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to modify.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Tile","description":"The Tile object that was removed from this map."}},{"name":"removeTileWorldXY","description":"Removes the tile located at the given coordinates and updates the collision data. The coordinates are given in pixel values.","parameters":[{"name":"x","type":"number","description":"X position to insert the tile (given in pixels)","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position to insert the tile (given in pixels)","default":"","optional":"","nullable":""},{"name":"tileWidth","type":"number","description":"The width of the tile in pixels.","default":"","optional":"","nullable":""},{"name":"tileHeight","type":"number","description":"The height of the tile in pixels.","default":"","optional":"","nullable":""},{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to modify.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Tile","description":"The Tile object that was removed from this map."}},{"name":"putTile","description":"Puts a tile of the given index value at the coordinate specified.\rIf you pass `null` as the tile it will pass your call over to Tilemap.removeTile instead.","parameters":[{"name":"tile","type":["Phaser.Tile","number","null"],"description":"The index of this tile to set or a Phaser.Tile object. If null the tile is removed from the map.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"X position to place the tile (given in tile units, not pixels)","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position to place the tile (given in tile units, not pixels)","default":"","optional":"","nullable":""},{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to modify.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Tile","description":"The Tile object that was created or added to this map."}},{"name":"putTileWorldXY","description":"Puts a tile into the Tilemap layer. The coordinates are given in pixel values.","parameters":[{"name":"tile","type":["Phaser.Tile","number"],"description":"The index of this tile to set or a Phaser.Tile object.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"X position to insert the tile (given in pixels)","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position to insert the tile (given in pixels)","default":"","optional":"","nullable":""},{"name":"tileWidth","type":"number","description":"The width of the tile in pixels.","default":"","optional":"","nullable":""},{"name":"tileHeight","type":"number","description":"The height of the tile in pixels.","default":"","optional":"","nullable":""},{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to modify.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Tile","description":"The Tile object that was created or added to this map."}},{"name":"searchTileIndex","description":"Searches the entire map layer for the first tile matching the given index, then returns that Phaser.Tile object.\rIf no match is found it returns null.\rThe search starts from the top-left tile and continues horizontally until it hits the end of the row, then it drops down to the next column.\rIf the reverse boolean is true, it scans starting from the bottom-right corner traveling up to the top-left.","parameters":[{"name":"index","type":"number","description":"The tile index value to search for.","default":"","optional":"","nullable":""},{"name":"skip","type":"number","description":"The number of times to skip a matching tile before returning.","default":"","optional":true,"nullable":""},{"name":"reverse","type":"number","description":"If true it will scan the layer in reverse, starting at the bottom-right. Otherwise it scans from the top-left.","default":"","optional":true,"nullable":""},{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to get the tile from.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Tile","description":"The first (or n skipped) tile with the matching index."}},{"name":"getTile","description":"Gets a tile from the Tilemap Layer. The coordinates are given in tile values.","parameters":[{"name":"x","type":"number","description":"X position to get the tile from (given in tile units, not pixels)","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position to get the tile from (given in tile units, not pixels)","default":"","optional":"","nullable":""},{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to get the tile from.","default":"","optional":true,"nullable":""},{"name":"nonNull","type":"boolean","description":"If true getTile won't return null for empty tiles, but a Tile object with an index of -1.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Tile","description":"The tile at the given coordinates or null if no tile was found or the coordinates were invalid."}},{"name":"getTileWorldXY","description":"Gets a tile from the Tilemap layer. The coordinates are given in pixel values.","parameters":[{"name":"x","type":"number","description":"X position to get the tile from (given in pixels)","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position to get the tile from (given in pixels)","default":"","optional":"","nullable":""},{"name":"tileWidth","type":"number","description":"The width of the tiles. If not given the map default is used.","default":"","optional":true,"nullable":""},{"name":"tileHeight","type":"number","description":"The height of the tiles. If not given the map default is used.","default":"","optional":true,"nullable":""},{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to get the tile from.","default":"","optional":true,"nullable":""},{"name":"nonNull","type":"boolean","description":"If true getTile won't return null for empty tiles, but a Tile object with an index of -1.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Tile","description":"The tile at the given coordinates."}},{"name":"copy","description":"Copies all of the tiles in the given rectangular block into the tilemap data buffer.","parameters":[{"name":"x","type":"integer","description":"X position of the top left of the area to copy (given in tiles, not pixels)","default":"","optional":"","nullable":""},{"name":"y","type":"integer","description":"Y position of the top left of the area to copy (given in tiles, not pixels)","default":"","optional":"","nullable":""},{"name":"width","type":"integer","description":"The width of the area to copy (given in tiles, not pixels)","default":"","optional":"","nullable":""},{"name":"height","type":"integer","description":"The height of the area to copy (given in tiles, not pixels)","default":"","optional":"","nullable":""},{"name":"layer","type":["integer","string","Phaser.TilemapLayer"],"description":"The layer to copy the tiles from.","default":"","optional":true,"nullable":""}],"returns":{"type":"array","description":"An array of the tiles that were copied."}},{"name":"paste","description":"Pastes a previously copied block of tile data into the given x/y coordinates. Data should have been prepared with Tilemap.copy.","parameters":[{"name":"x","type":"number","description":"X position of the top left of the area to paste to (given in tiles, not pixels)","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the top left of the area to paste to (given in tiles, not pixels)","default":"","optional":"","nullable":""},{"name":"tileblock","type":"array","description":"The block of tiles to paste.","default":"","optional":"","nullable":""},{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to paste the tiles into.","default":"","optional":true,"nullable":""}]},{"name":"swap","description":"Scans the given area for tiles with an index matching tileA and swaps them with tileB.","parameters":[{"name":"tileA","type":"number","description":"First tile index.","default":"","optional":"","nullable":""},{"name":"tileB","type":"number","description":"Second tile index.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"X position of the top left of the area to operate one, given in tiles, not pixels.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the top left of the area to operate one, given in tiles, not pixels.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The width in tiles of the area to operate on.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height in tiles of the area to operate on.","default":"","optional":"","nullable":""},{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to operate on.","default":"","optional":true,"nullable":""}]},{"name":"swapHandler","description":"Internal function that handles the swapping of tiles.","parameters":[{"name":"value","type":"number","description":"","default":"","optional":"","nullable":""}]},{"name":"forEach","description":"For each tile in the given area defined by x/y and width/height run the given callback.","parameters":[{"name":"callback","type":"number","description":"The callback. Each tile in the given area will be passed to this callback as the first and only parameter.","default":"","optional":"","nullable":""},{"name":"context","type":"number","description":"The context under which the callback should be run.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"X position of the top left of the area to operate one, given in tiles, not pixels.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the top left of the area to operate one, given in tiles, not pixels.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The width in tiles of the area to operate on.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height in tiles of the area to operate on.","default":"","optional":"","nullable":""},{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to operate on.","default":"","optional":true,"nullable":""}]},{"name":"replace","description":"Scans the given area for tiles with an index matching `source` and updates their index to match `dest`.","parameters":[{"name":"source","type":"number","description":"The tile index value to scan for.","default":"","optional":"","nullable":""},{"name":"dest","type":"number","description":"The tile index value to replace found tiles with.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"X position of the top left of the area to operate one, given in tiles, not pixels.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the top left of the area to operate one, given in tiles, not pixels.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The width in tiles of the area to operate on.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height in tiles of the area to operate on.","default":"","optional":"","nullable":""},{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to operate on.","default":"","optional":true,"nullable":""}]},{"name":"random","description":"Randomises a set of tiles in a given area.","parameters":[{"name":"x","type":"number","description":"X position of the top left of the area to operate one, given in tiles, not pixels.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the top left of the area to operate one, given in tiles, not pixels.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The width in tiles of the area to operate on.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height in tiles of the area to operate on.","default":"","optional":"","nullable":""},{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to operate on.","default":"","optional":true,"nullable":""}]},{"name":"shuffle","description":"Shuffles a set of tiles in a given area. It will only randomise the tiles in that area, so if they're all the same nothing will appear to have changed!","parameters":[{"name":"x","type":"number","description":"X position of the top left of the area to operate one, given in tiles, not pixels.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the top left of the area to operate one, given in tiles, not pixels.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The width in tiles of the area to operate on.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height in tiles of the area to operate on.","default":"","optional":"","nullable":""},{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to operate on.","default":"","optional":true,"nullable":""}]},{"name":"fill","description":"Fills the given area with the specified tile.","parameters":[{"name":"index","type":"number","description":"The index of the tile that the area will be filled with.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"X position of the top left of the area to operate one, given in tiles, not pixels.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the top left of the area to operate one, given in tiles, not pixels.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The width in tiles of the area to operate on.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height in tiles of the area to operate on.","default":"","optional":"","nullable":""},{"name":"layer","type":["number","string","Phaser.TilemapLayer"],"description":"The layer to operate on.","default":"","optional":true,"nullable":""}]},{"name":"removeAllLayers","description":"Removes all layers from this tile map.","parameters":[]},{"name":"dump","description":"Dumps the tilemap data out to the console.","parameters":[]},{"name":"destroy","description":"Removes all layer data from this tile map and nulls the game reference.\rNote: You are responsible for destroying any TilemapLayer objects you generated yourself, as Tilemap doesn't keep a reference to them.","parameters":[]}],"members":[{"name":"game","access":"","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"key","access":"","virtual":false,"description":"The key of this map data in the Phaser.Cache.","type":{"names":["string"]},"default":""},{"name":"width","access":"","virtual":false,"description":"The width of the map (in tiles).","type":{"names":["number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the map (in tiles).","type":{"names":["number"]},"default":""},{"name":"tileWidth","access":"","virtual":false,"description":"The base width of the tiles in the map (in pixels).","type":{"names":["number"]},"default":""},{"name":"tileHeight","access":"","virtual":false,"description":"The base height of the tiles in the map (in pixels).","type":{"names":["number"]},"default":""},{"name":"orientation","access":"","virtual":false,"description":"The orientation of the map data (as specified in Tiled), usually 'orthogonal'.","type":{"names":["string"]},"default":""},{"name":"format","access":"","virtual":false,"description":"The format of the map data, either Phaser.Tilemap.CSV or Phaser.Tilemap.TILED_JSON.","type":{"names":["number"]},"default":""},{"name":"version","access":"","virtual":false,"description":"The version of the map data (as specified in Tiled, usually 1).","type":{"names":["number"]},"default":""},{"name":"properties","access":"","virtual":false,"description":"Map specific properties as specified in Tiled.","type":{"names":["object"]},"default":""},{"name":"widthInPixels","access":"","virtual":false,"description":"The width of the map in pixels based on width * tileWidth.","type":{"names":["number"]},"default":""},{"name":"heightInPixels","access":"","virtual":false,"description":"The height of the map in pixels based on height * tileHeight.","type":{"names":["number"]},"default":""},{"name":"layers","access":"","virtual":false,"description":"An array of Tilemap layer data.","type":{"names":["array"]},"default":""},{"name":"tilesets","access":"","virtual":false,"description":"An array of Tilesets.","type":{"names":["array"]},"default":""},{"name":"imagecollections","access":"","virtual":false,"description":"An array of Image Collections.","type":{"names":["array"]},"default":""},{"name":"tiles","access":"","virtual":false,"description":"The super array of Tiles.","type":{"names":["array"]},"default":""},{"name":"objects","access":"","virtual":false,"description":"An array of Tiled Object Layers.","type":{"names":["array"]},"default":""},{"name":"collideIndexes","access":"","virtual":false,"description":"An array of tile indexes that collide.","type":{"names":["array"]},"default":""},{"name":"collision","access":"","virtual":false,"description":"An array of collision data (polylines, etc).","type":{"names":["array"]},"default":""},{"name":"images","access":"","virtual":false,"description":"An array of Tiled Image Layers.","type":{"names":["array"]},"default":""},{"name":"enableDebug","access":"","virtual":false,"description":"If set then console.log is used to dump out useful layer creation debug data.","type":{"names":["boolean"]},"default":""},{"name":"currentLayer","access":"","virtual":false,"description":"The current layer.","type":{"names":["number"]},"default":""},{"name":"debugMap","access":"","virtual":false,"description":"Map data used for debug values only.","type":{"names":["array"]},"default":""},{"name":"_results","access":"private","virtual":false,"description":"Internal var.","type":{"names":["array"]},"default":""},{"name":"_tempA","access":"private","virtual":false,"description":"Internal var.","type":{"names":["number"]},"default":""},{"name":"_tempB","access":"private","virtual":false,"description":"Internal var.","type":{"names":["number"]},"default":""},{"name":"CSV","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"TILED_JSON","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"NORTH","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"EAST","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"SOUTH","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"WEST","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"layer","access":"","virtual":false,"description":"The current layer object.","type":{"names":["number","string","Phaser.TilemapLayer"]},"default":""}]},{"name":"Phaser.TilemapLayer","description":"A TilemapLayer is a Phaser.Image/Sprite that renders a specific TileLayer of a Tilemap.\r\rSince a TilemapLayer is a Sprite it can be moved around the display, added to other groups or display objects, etc.\r\rBy default TilemapLayers have fixedToCamera set to `true`. Changing this will break Camera follow and scrolling behavior.","constructor":{"name":"TilemapLayer","description":"A TilemapLayer is a Phaser.Image/Sprite that renders a specific TileLayer of a Tilemap.\r\rSince a TilemapLayer is a Sprite it can be moved around the display, added to other groups or display objects, etc.\r\rBy default TilemapLayers have fixedToCamera set to `true`. Changing this will break Camera follow and scrolling behavior.","parameters":[{"name":"game","type":"Phaser.Game","description":"Game reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"tilemap","type":"Phaser.Tilemap","description":"The tilemap to which this layer belongs.","default":"","optional":"","nullable":""},{"name":"index","type":"integer","description":"The index of the TileLayer to render within the Tilemap.","default":"","optional":"","nullable":""},{"name":"width","type":"integer","description":"Width of the renderable area of the layer (in pixels).","default":"","optional":"","nullable":""},{"name":"height","type":"integer","description":"Height of the renderable area of the layer (in pixels).","default":"","optional":"","nullable":""}]},"functions":[{"name":"ensureSharedCopyCanvas","description":"Create if needed (and return) a shared copy canvas that is shared across all TilemapLayers.\r\rCode that uses the canvas is responsible to ensure the dimensions and save/restore state as appropriate.","parameters":[]},{"name":"preUpdate","description":"Automatically called by World.preUpdate.","parameters":[]},{"name":"postUpdate","description":"Automatically called by World.postUpdate. Handles cache updates.","parameters":[]},{"name":"_renderCanvas","description":"Automatically called by the Canvas Renderer.\rOverrides the Sprite._renderCanvas function.","parameters":[]},{"name":"_renderWebGL","description":"Automatically called by the Canvas Renderer.\rOverrides the Sprite._renderWebGL function.","parameters":[]},{"name":"destroy","description":"Destroys this TilemapLayer.","parameters":[]},{"name":"resize","description":"Resizes the internal canvas and texture frame used by this TilemapLayer.\r\rThis is an expensive call, so don't bind it to a window resize event! But instead call it at carefully\rselected times.\r\rBe aware that no validation of the new sizes takes place and the current map scroll coordinates are not\rmodified either. You will have to handle both of these things from your game code if required.","parameters":[{"name":"width","type":"number","description":"The new width of the TilemapLayer","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The new height of the TilemapLayer","default":"","optional":"","nullable":""}]},{"name":"resizeWorld","description":"Sets the world size to match the size of this layer.","parameters":[]},{"name":"getLayerOffsetX","description":"Get the X axis position offset of this layer's tiles.","parameters":[],"returns":{"type":"number","description":""}},{"name":"getTileOffsetY","description":"Get the Y axis position offset of this layer's tiles.","parameters":[],"returns":{"type":"number","description":""}},{"name":"_fixX","description":"Take an x coordinate that doesn't account for scrollFactorX and 'fix' it into a scrolled local space.","parameters":[{"name":"x","type":"number","description":"x coordinate in camera space","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"x coordinate in scrollFactor-adjusted dimensions"}},{"name":"_unfixX","description":"Take an x coordinate that _does_ account for scrollFactorX and 'unfix' it back to camera space.","parameters":[{"name":"x","type":"number","description":"x coordinate in scrollFactor-adjusted dimensions","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"x coordinate in camera space"}},{"name":"_fixY","description":"Take a y coordinate that doesn't account for scrollFactorY and 'fix' it into a scrolled local space.","parameters":[{"name":"y","type":"number","description":"y coordinate in camera space","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"y coordinate in scrollFactor-adjusted dimensions"}},{"name":"_unfixY","description":"Take a y coordinate that _does_ account for scrollFactorY and 'unfix' it back to camera space.","parameters":[{"name":"y","type":"number","description":"y coordinate in scrollFactor-adjusted dimensions","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"y coordinate in camera space"}},{"name":"getTileX","description":"Convert a pixel value to a tile coordinate.","parameters":[{"name":"x","type":"number","description":"X position of the point in target tile (in pixels).","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The X map location of the tile."}},{"name":"getTileY","description":"Convert a pixel value to a tile coordinate.","parameters":[{"name":"y","type":"number","description":"Y position of the point in target tile (in pixels).","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The Y map location of the tile."}},{"name":"getTileXY","description":"Convert a pixel coordinate to a tile coordinate.","parameters":[{"name":"x","type":"number","description":"X position of the point in target tile (in pixels).","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the point in target tile (in pixels).","default":"","optional":"","nullable":""},{"name":"point","type":["Phaser.Point","object"],"description":"The Point/object to update.","default":"","optional":"","nullable":""}],"returns":{"type":["Phaser.Point","object"],"description":"A Point/object with its `x` and `y` properties set."}},{"name":"getRayCastTiles","description":"Gets all tiles that intersect with the given line.","parameters":[{"name":"line","type":"Phaser.Line","description":"The line used to determine which tiles to return.","default":"","optional":"","nullable":""},{"name":"stepRate","type":"integer","description":"How many steps through the ray will we check? Defaults to `rayStepRate`.","default":"(rayStepRate)","optional":true,"nullable":""},{"name":"collides","type":"boolean","description":"If true, _only_ return tiles that collide on one or more faces.","default":"","optional":true,"nullable":""},{"name":"interestingFace","type":"boolean","description":"If true, _only_ return tiles that have interesting faces.","default":"","optional":true,"nullable":""}],"returns":{"type":"Array.<Phaser.Tile>","description":"An array of Phaser.Tiles."}},{"name":"getTiles","description":"Get all tiles that exist within the given area, defined by the top-left corner, width and height. Values given are in pixels, not tiles.","parameters":[{"name":"x","type":"number","description":"X position of the top left corner (in pixels).","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the top left corner (in pixels).","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"Width of the area to get (in pixels).","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"Height of the area to get (in pixels).","default":"","optional":"","nullable":""},{"name":"collides","type":"boolean","description":"If true, _only_ return tiles that collide on one or more faces.","default":"","optional":true,"nullable":""},{"name":"interestingFace","type":"boolean","description":"If true, _only_ return tiles that have interesting faces.","default":"","optional":true,"nullable":""}],"returns":{"type":"array.<Phaser.Tile>","description":"An array of Tiles."}},{"name":"resolveTileset","description":"Returns the appropriate tileset for the index, updating the internal cache as required.\rThis should only be called if `tilesets[index]` evaluates to undefined.","parameters":[{"name":"Tile","type":"integer","description":"index","default":"","optional":"","nullable":""}],"returns":{"type":["Phaser.Tileset","null"],"description":"Returns the associated tileset or null if there is no such mapping."}},{"name":"resetTilesetCache","description":"The TilemapLayer caches tileset look-ups.\r\rCall this method of clear the cache if tilesets have been added or updated after the layer has been rendered.","parameters":[]},{"name":"setScale","description":"This method will set the scale of the tilemap as well as update the underlying block data of this layer.","parameters":[{"name":"xScale","type":"number","description":"The scale factor along the X-plane","default":1,"optional":true,"nullable":""},{"name":"yScale","type":"number","description":"The scale factor along the Y-plane","default":"","optional":true,"nullable":""}]},{"name":"shiftCanvas","description":"Shifts the contents of the canvas - does extra math so that different browsers agree on the result.\r\rThe specified (x/y) will be shifted to (0,0) after the copy and the newly exposed canvas area will need to be filled in.","parameters":[{"name":"context","type":"CanvasRenderingContext2D","description":"The context to shift","default":"","optional":"","nullable":""},{"name":"x","type":"integer","description":"","default":"","optional":"","nullable":""},{"name":"y","type":"integer","description":"","default":"","optional":"","nullable":""}]},{"name":"renderRegion","description":"Render tiles in the given area given by the virtual tile coordinates biased by the given scroll factor.\rThis will constrain the tile coordinates based on wrapping but not physical coordinates.","parameters":[{"name":"scrollX","type":"integer","description":"Render x offset/scroll.","default":"","optional":"","nullable":""},{"name":"scrollY","type":"integer","description":"Render y offset/scroll.","default":"","optional":"","nullable":""},{"name":"left","type":"integer","description":"Leftmost column to render.","default":"","optional":"","nullable":""},{"name":"top","type":"integer","description":"Topmost row to render.","default":"","optional":"","nullable":""},{"name":"right","type":"integer","description":"Rightmost column to render.","default":"","optional":"","nullable":""},{"name":"bottom","type":"integer","description":"Bottommost row to render.","default":"","optional":"","nullable":""}]},{"name":"renderDeltaScroll","description":"Shifts the canvas and render damaged edge tiles.","parameters":[]},{"name":"renderFull","description":"Clear and render the entire canvas.","parameters":[]},{"name":"render","description":"Renders the tiles to the layer canvas and pushes to the display.","parameters":[]},{"name":"renderDebug","description":"Renders a debug overlay on-top of the canvas. Called automatically by render when `debug` is true.\r\rSee `debugSettings` for assorted configuration options.","parameters":[]},{"name":"setTexture","description":"Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous\ntexture this Sprite was using.","parameters":[{"name":"texture","type":"PIXI.Texture","description":"The PIXI texture that is displayed by the sprite","default":"","optional":"","nullable":""},{"name":"destroy","type":"Boolean","description":"Call Texture.destroy on the current texture before replacing it with the new one?","default":"","optional":true,"nullable":""}]},{"name":"onTextureUpdate","description":"When the texture is updated, this event will fire to update the scale and frame","parameters":[{"name":"event","type":"","description":"-","default":"","optional":"","nullable":""}]},{"name":"getBounds","description":"Returns the bounds of the Sprite as a rectangle.\nThe bounds calculation takes the worldTransform into account.\n\nIt is important to note that the transform is not updated when you call this method.\nSo if this Sprite is the child of a Display Object which has had its transform\nupdated since the last render pass, those changes will not yet have been applied\nto this Sprites worldTransform. If you need to ensure that all parent transforms\nare factored into this getBounds operation then you should call `updateTransform`\non the root most object in this Sprites display list first.","parameters":[{"name":"matrix","type":"Matrix","description":"the transformation matrix of the sprite","default":"","optional":"","nullable":""}],"returns":{"type":"Rectangle","description":"the framing rectangle"}},{"name":"getLocalBounds","description":"Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.","parameters":[],"returns":{"type":"Rectangle","description":"The rectangular bounding area"}},{"name":"addChild","description":"Adds a child to the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to add to the container","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"addChildAt","description":"Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child to add","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The index to place the child in","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was added."}},{"name":"swapChildren","description":"Swaps the position of 2 Display Objects within this container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""},{"name":"child2","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}]},{"name":"getChildIndex","description":"Returns the index position of a child DisplayObject instance","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject instance to identify","default":"","optional":"","nullable":""}],"returns":{"type":"Number","description":"The index position of the child display object to identify"}},{"name":"setChildIndex","description":"Changes the position of an existing child in the display object container","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The child DisplayObject instance for which you want to change the index number","default":"","optional":"","nullable":""},{"name":"index","type":"Number","description":"The resulting index number for the child display object","default":"","optional":"","nullable":""}]},{"name":"getChildAt","description":"Returns the child at the specified index","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child at the given index, if any."}},{"name":"removeChild","description":"Removes a child from the container.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"The DisplayObject to remove","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildAt","description":"Removes a child from the specified index position.","parameters":[{"name":"index","type":"Number","description":"The index to get the child from","default":"","optional":"","nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"The child that was removed."}},{"name":"removeChildren","description":"Removes all children from this container that are within the begin and end indexes.","parameters":[{"name":"beginIndex","type":"Number","description":"The beginning position. Default value is 0.","default":"","optional":"","nullable":""},{"name":"endIndex","type":"Number","description":"The ending position. Default value is size of the container.","default":"","optional":"","nullable":""}]},{"name":"contains","description":"Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.","parameters":[{"name":"child","type":"PIXI.DisplayObject","description":"-","default":"","optional":"","nullable":""}],"returns":{"type":"Boolean","description":""}},{"name":"update","description":"Override this method in your own custom objects to handle any update requirements.\rIt is called immediately after `preUpdate` and before `postUpdate`.\rRemember if this Game Object has any children you should call update on those too.","parameters":[]},{"name":"play","description":"Plays an Animation.\r\rThe animation should have previously been created via `animations.add`.\r\rIf the animation is already playing calling this again won't do anything.\rIf you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.","parameters":[{"name":"name","type":"string","description":"The name of the animation to be played, e.g. \"fire\", \"walk\", \"jump\". Must have been previously created via 'AnimationManager.add'.","default":"","optional":"","nullable":""},{"name":"frameRate","type":"number","description":"The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used.","default":"","optional":true,"nullable":""},{"name":"loop","type":"boolean","description":"Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.","default":"","optional":true,"nullable":""},{"name":"killOnComplete","type":"boolean","description":"If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Animation","description":"A reference to playing Animation."}},{"name":"alignIn","description":"Aligns this Game Object within another Game Object, or Rectangle, known as the\r'container', to one of 9 possible positions.\r\rThe container must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Game Objects within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Sprite to another Game Object does **not** make it a child of\rthe container. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, \r`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, \r`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.\r\rThe Game Objects are placed in such a way that their _bounds_ align with the\rcontainer, taking into consideration rotation, scale and the anchor property.\rThis allows you to neatly align Game Objects, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Game Object. For example:\r\r`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the containers bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"container","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Object","description":"This Game Object."}},{"name":"alignTo","description":"Aligns this Game Object to the side of another Game Object, or Rectangle, known as the\r'parent', in one of 11 possible positions.\r\rThe parent must be a Game Object, or Phaser.Rectangle object. This can include properties\rsuch as `World.bounds` or `Camera.view`, for aligning Game Objects within the world \rand camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,\rTileSprites or Buttons.\r\rPlease note that aligning a Sprite to another Game Object does **not** make it a child of\rthe parent. It simply modifies its position coordinates so it aligns with it.\r\rThe position constants you can use are:\r\r`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, \r`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, \r`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` \rand `Phaser.BOTTOM_RIGHT`.\r\rThe Game Objects are placed in such a way that their _bounds_ align with the\rparent, taking into consideration rotation, scale and the anchor property.\rThis allows you to neatly align Game Objects, irrespective of their position value.\r\rThe optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final\raligned position of the Game Object. For example:\r\r`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`\r\rWould align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.\rThink of the offsets as applying an adjustment to the parents bounds before the alignment takes place.\rSo providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive\rone expands it.","parameters":[{"name":"parent","type":["Phaser.Rectangle","Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Button","Phaser.Graphics","Phaser.TileSprite"],"description":"The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`.","default":"","optional":"","nullable":""},{"name":"position","type":"integer","description":"The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.","default":"","optional":true,"nullable":""},{"name":"offsetX","type":"integer","description":"A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""},{"name":"offsetY","type":"integer","description":"A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it.","default":"","optional":true,"nullable":""}],"returns":{"type":"Object","description":"This Game Object."}},{"name":"bringToTop","description":"Brings this Game Object to the top of its parents display list.\rVisually this means it will render over the top of any old child in the same Group.\r\rIf this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"sendToBack","description":"Sends this Game Object to the bottom of its parents display list.\rVisually this means it will render below all other children in the same Group.\r\rIf this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"moveUp","description":"Moves this Game Object up one place in its parents display list.\rThis call has no effect if the Game Object is already at the top of the display list.\r\rIf this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"moveDown","description":"Moves this Game Object down one place in its parents display list.\rThis call has no effect if the Game Object is already at the bottom of the display list.\r\rIf this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, \rbecause the World is the root Group from which all Game Objects descend.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"crop","description":"Crop allows you to crop the texture being used to display this Game Object.\rSetting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.\r\rCropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method,\ror by modifying `cropRect` property directly and then calling `updateCrop`.\r\rThe rectangle object given to this method can be either a `Phaser.Rectangle` or any other object \rso long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.\r\rA reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, \rin which case the values are duplicated to a local object.","parameters":[{"name":"rect","type":"Phaser.Rectangle","description":"The Rectangle used during cropping. Pass null or no parameters to clear a previously set crop rectangle.","default":"","optional":"","nullable":""},{"name":"copy","type":"boolean","description":"If false `cropRect` will be stored as a reference to the given rect. If true it will copy the rect values into a local Phaser Rectangle object stored in cropRect.","default":"","optional":true,"nullable":""}]},{"name":"updateCrop","description":"If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property,\ror the rectangle it references, then you need to update the crop frame by calling this method.","parameters":[]},{"name":"revive","description":"Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.\r\rA resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.\r\rIt will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.","parameters":[{"name":"health","type":"number","description":"The health to give the Game Object. Only set if the GameObject has the Health component.","default":100,"optional":true,"nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"kill","description":"Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.\r\rIt will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.\r\rNote that killing a Game Object is a way for you to quickly recycle it in an object pool,\rit doesn't destroy the object or free it up from memory.\r\rIf you don't need this Game Object any more you should call `destroy` instead.","parameters":[],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"loadTexture","description":"Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.\r\rIf your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.\r\rYou should only use `loadTexture` if you want to replace the base texture entirely.\r\rCalling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.\r\rYou can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. \rDoing this then sets the key to be the `frame` argument (the frame is set to zero). \r\rThis allows you to create sprites using `load.image` during development, and then change them \rto use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' \rand swapping it to be the key of the atlas data.\r\rNote: You cannot use a RenderTexture as a texture for a TileSprite.","parameters":[{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"],"description":"This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.","default":"","optional":"","nullable":""},{"name":"frame","type":["string","number"],"description":"If this Sprite 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.","default":"","optional":true,"nullable":""},{"name":"stopAnimation","type":"boolean","description":"If an animation is already playing on this Sprite you can choose to stop it or let it carry on playing.","default":true,"optional":true,"nullable":""}]},{"name":"setFrame","description":"Sets the texture frame the Game Object uses for rendering.\r\rThis is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.","parameters":[{"name":"frame","type":"Phaser.Frame","description":"The Frame to be used by the texture.","default":"","optional":"","nullable":""}]},{"name":"resizeFrame","description":"Resizes the Frame dimensions that the Game Object uses for rendering.\r\rYou shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData\rit can be useful to adjust the dimensions directly in this way.","parameters":[{"name":"parent","type":"object","description":"The parent texture object that caused the resize, i.e. a Phaser.Video object.","default":"","optional":"","nullable":""},{"name":"width","type":"integer","description":"The new width of the texture.","default":"","optional":"","nullable":""},{"name":"height","type":"integer","description":"The new height of the texture.","default":"","optional":"","nullable":""}]},{"name":"resetFrame","description":"Resets the texture frame dimensions that the Game Object uses for rendering.","parameters":[]},{"name":"overlap","description":"Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object, \rwhich can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.\r\rThis check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.\r\rTherefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency.\rIt should be fine for low-volume testing where physics isn't required.","parameters":[{"name":"displayObject","type":["Phaser.Sprite","Phaser.Image","Phaser.TileSprite","Phaser.Button","PIXI.DisplayObject"],"description":"The display object to check against.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the bounds of this Game Object intersects at any point with the bounds of the given display object."}},{"name":"reset","description":"Resets the Game Object.\r\rThis moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, \r`visible` and `renderable` to true.\r\rIf this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.\r\rIf this Game Object has a Physics Body it will reset the Body.","parameters":[{"name":"x","type":"number","description":"The x coordinate (in world space) to position the Game Object at.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate (in world space) to position the Game Object at.","default":"","optional":"","nullable":""},{"name":"health","type":"number","description":"The health to give the Game Object if it has the Health component.","default":1,"optional":true,"nullable":""}],"returns":{"type":"PIXI.DisplayObject","description":"This instance."}},{"name":"checkTransform","description":"Adjust scaling limits, if set, to this Game Object.","parameters":[{"name":"wt","type":"PIXI.Matrix","description":"The updated worldTransform matrix.","default":"","optional":"","nullable":""}]},{"name":"setScaleMinMax","description":"Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.\r\rFor example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored \rand the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.\r\rBy setting these values you can carefully control how Game Objects deal with responsive scaling.\r\rIf only one parameter is given then that value will be used for both scaleMin and scaleMax:\r`setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1\r\rIf only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y:\r`setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2\r\rIf you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly, \ror pass `null` for the `maxX` and `maxY` parameters.\r\rCall `setScaleMinMax(null)` to clear all previously set values.","parameters":[{"name":"minX","type":["number","null"],"description":"The minimum horizontal scale value this Game Object can scale down to.","default":"","optional":"","nullable":""},{"name":"minY","type":["number","null"],"description":"The minimum vertical scale value this Game Object can scale down to.","default":"","optional":"","nullable":""},{"name":"maxX","type":["number","null"],"description":"The maximum horizontal scale value this Game Object can scale up to.","default":"","optional":"","nullable":""},{"name":"maxY","type":["number","null"],"description":"The maximum vertical scale value this Game Object can scale up to.","default":"","optional":"","nullable":""}]}],"members":[{"name":"map","access":"protected","virtual":false,"description":"The Tilemap to which this layer is bound.","type":{"names":["Phaser.Tilemap"]},"default":""},{"name":"index","access":"protected","virtual":false,"description":"The index of this layer within the Tilemap.","type":{"names":["number"]},"default":""},{"name":"layer","access":"protected","virtual":false,"description":"The layer object within the Tilemap that this layer represents.","type":{"names":["object"]},"default":""},{"name":"canvas","access":"protected","virtual":false,"description":"The canvas to which this TilemapLayer draws.","type":{"names":["HTMLCanvasElement"]},"default":""},{"name":"context","access":"private","virtual":false,"description":"The 2d context of the canvas.","type":{"names":["CanvasRenderingContext2D"]},"default":""},{"name":"type","access":"protected","virtual":false,"description":"The const type of this object.","type":{"names":["number"]},"default":"Phaser.TILEMAPLAYER"},{"name":"physicsType","access":"","virtual":false,"description":"The const physics body type of this object.","type":{"names":["number"]},"default":""},{"name":"renderSettings","access":"","virtual":false,"description":"Settings that control standard (non-diagnostic) rendering.","type":"","default":"{\"enableScrollDelta\":true,\"overdrawRatio\":0.2,\"copyCanvas\":null}"},{"name":"debug","access":"","virtual":false,"description":"Enable an additional \"debug rendering\" pass to display collision information.","type":{"names":["boolean"]},"default":""},{"name":"exists","access":"","virtual":false,"description":"Controls if the core game loop and physics update this game object or not.","type":{"names":["boolean"]},"default":""},{"name":"debugSettings","access":"","virtual":false,"description":"Settings used for debugging and diagnostics.","type":"","default":""},{"name":"scrollFactorX","access":"public","virtual":false,"description":"Speed at which this layer scrolls horizontally, relative to the camera (e.g. scrollFactorX of 0.5 scrolls half as quickly as the 'normal' camera-locked layers do).","type":{"names":["number"]},"default":1},{"name":"scrollFactorY","access":"public","virtual":false,"description":"Speed at which this layer scrolls vertically, relative to the camera (e.g. scrollFactorY of 0.5 scrolls half as quickly as the 'normal' camera-locked layers do)","type":{"names":["number"]},"default":1},{"name":"dirty","access":"protected","virtual":false,"description":"If true tiles will be force rendered, even if such is not believed to be required.","type":{"names":["boolean"]},"default":""},{"name":"rayStepRate","access":"","virtual":false,"description":"When ray-casting against tiles this is the number of steps it will jump. For larger tile sizes you can increase this to improve performance.","type":{"names":["integer"]},"default":4},{"name":"_wrap","access":"private","virtual":false,"description":"Flag controlling if the layer tiles wrap at the edges.","type":{"names":["boolean"]},"default":""},{"name":"_mc","access":"private","virtual":false,"description":"Local map data and calculation cache.","type":{"names":["object"]},"default":""},{"name":"_scrollX","access":"private","virtual":false,"description":"The current canvas left after scroll is applied.","type":{"names":["number"]},"default":""},{"name":"_scrollY","access":"private","virtual":false,"description":"The current canvas top after scroll is applied.","type":{"names":["number"]},"default":""},{"name":"tileOffset","access":"","virtual":false,"description":"The position offset of the layer's tiles.","type":"","default":""},{"name":"_results","access":"private","virtual":false,"description":"Used for caching the tiles / array of tiles.","type":{"names":["Array.<Phaser.Tile>"]},"default":""},{"name":"sharedCopyCanvas","access":"private","virtual":false,"description":"The shared double-copy canvas, created as needed.","type":"","default":""},{"name":"anchor","access":"","virtual":false,"description":"The anchor sets the origin point of the texture.\nThe default is 0,0 this means the texture's origin is the top left\nSetting than anchor to 0.5,0.5 means the textures origin is centered\nSetting the anchor to 1,1 would mean the textures origin points will be the bottom right corner","type":{"names":["Point"]},"default":""},{"name":"texture","access":"","virtual":false,"description":"The texture that the sprite is using","type":{"names":["PIXI.Texture"]},"default":""},{"name":"_width","access":"private","virtual":false,"description":"The width of the sprite (this is initially set by the texture)","type":{"names":["Number"]},"default":""},{"name":"_height","access":"private","virtual":false,"description":"The height of the sprite (this is initially set by the texture)","type":{"names":["Number"]},"default":""},{"name":"tint","access":"","virtual":false,"description":"The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.","type":{"names":["Number"]},"default":"0xFFFFFF"},{"name":"cachedTint","access":"private","virtual":false,"description":"The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.","type":{"names":["Number"]},"default":"-1"},{"name":"tintedTexture","access":"","virtual":false,"description":"A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)","type":{"names":["Canvas"]},"default":"null"},{"name":"blendMode","access":"","virtual":false,"description":"The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.\n\nWarning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.","type":{"names":["Number"]},"default":"PIXI.blendModes.NORMAL;"},{"name":"shader","access":"","virtual":false,"description":"The shader that will be used to render this Sprite.\nSet to null to remove a current shader.","type":{"names":["PhaserFilter"]},"default":"null"},{"name":"width","access":"","virtual":false,"description":"The width of the sprite, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"height","access":"","virtual":false,"description":"The height of the sprite, setting this will actually modify the scale to achieve the value set","type":{"names":["Number"]},"default":""},{"name":"children","access":"","virtual":false,"description":"[read-only] The array of children of this container.","type":{"names":["Array.<DisplayObject>"]},"default":""},{"name":"ignoreChildInput","access":"","virtual":false,"description":"If `ignoreChildInput`  is `false` it will allow this objects _children_ to be considered as valid for Input events.\n\nIf this property is `true` then the children will _not_ be considered as valid for Input events.\n\nNote that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.","type":{"names":["Boolean"]},"default":""},{"name":"position","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject, relative to its parent container.\n\nThe value of this property does not reflect any positioning happening further up the display list.\nTo obtain that value please see the `worldPosition` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"scale","access":"","virtual":false,"description":"The scale of this DisplayObject. A scale of 1:1 represents the DisplayObject\nat its default size. A value of 0.5 would scale this DisplayObject by half, and so on.\n\nThe value of this property does not reflect any scaling happening further up the display list.\nTo obtain that value please see the `worldScale` property.","type":{"names":["PIXIPoint"]},"default":""},{"name":"pivot","access":"","virtual":false,"description":"The pivot point of this DisplayObject that it rotates around. The values are expressed\nin pixel values.","type":{"names":["PIXIPoint"]},"default":""},{"name":"rotation","access":"","virtual":false,"description":"The rotation of this DisplayObject. The value is given, and expressed, in radians, and is based on\na right-handed orientation.\n\nThe value of this property does not reflect any rotation happening further up the display list.\nTo obtain that value please see the `worldRotation` property.","type":{"names":["Number"]},"default":""},{"name":"alpha","access":"","virtual":false,"description":"The alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nPlease note that an object with an alpha value of 0 is skipped during the render pass.\n\nThe value of this property does not reflect any alpha values set further up the display list.\nTo obtain that value please see the `worldAlpha` property.","type":{"names":["Number"]},"default":""},{"name":"visible","access":"","virtual":false,"description":"The visibility of this DisplayObject. A value of `false` makes the object invisible.\nA value of `true` makes it visible. Please note that an object with a visible value of\n`false` is skipped during the render pass. Equally a DisplayObject with visible false will\nnot render any of its children.\n\nThe value of this property does not reflect any visible values set further up the display list.\nTo obtain that value please see the `worldVisible` property.","type":{"names":["Boolean"]},"default":""},{"name":"hitArea","access":"","virtual":false,"description":"This is the defined area that will pick up mouse / touch events. It is null by default.\nSetting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)","type":{"names":["Rectangle","Circle","Ellipse","Polygon"]},"default":""},{"name":"renderable","access":"","virtual":false,"description":"Should this DisplayObject be rendered by the renderer? An object with a renderable value of\n`false` is skipped during the render pass.","type":{"names":["Boolean"]},"default":""},{"name":"parent","access":"","virtual":false,"description":"The parent DisplayObjectContainer that this DisplayObject is a child of.\nAll DisplayObjects must belong to a parent in order to be rendered.\nThe root parent is the Stage object. This property is set automatically when the\nDisplayObject is added to, or removed from, a DisplayObjectContainer.","type":{"names":["PIXIDisplayObjectContainer"]},"default":""},{"name":"worldAlpha","access":"","virtual":false,"description":"The multiplied alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.\nThis value is the calculated total, based on the alpha values of all parents of this DisplayObjects \nin the display list.\n\nTo obtain, and set, the local alpha value, see the `alpha` property.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"worldTransform","access":"","virtual":false,"description":"The current transform of this DisplayObject.\n\nThis property contains the calculated total, based on the transforms of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIMatrix"]},"default":""},{"name":"worldPosition","access":"","virtual":false,"description":"The coordinates, in pixels, of this DisplayObject within the world.\n\nThis property contains the calculated total, based on the positions of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldScale","access":"","virtual":false,"description":"The global scale of this DisplayObject.\n\nThis property contains the calculated total, based on the scales of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["PIXIPoint"]},"default":""},{"name":"worldRotation","access":"","virtual":false,"description":"The rotation, in radians, of this DisplayObject.\n\nThis property contains the calculated total, based on the rotations of all parents of this \nDisplayObject in the display list.\n\nNote: This property is only updated at the end of the `updateTransform` call, once per render. Until \nthat happens this property will contain values based on the previous frame. Be mindful of this if\naccessing this property outside of the normal game flow, i.e. from an asynchronous event callback.","type":{"names":["Number"]},"default":""},{"name":"filterArea","access":"","virtual":false,"description":"The rectangular area used by filters when rendering a shader for this DisplayObject.","type":{"names":["Rectangle"]},"default":""},{"name":"_sr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_cr","access":"private","virtual":false,"description":"","type":{"names":["Number"]},"default":""},{"name":"_bounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_currentBounds","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_mask","access":"private","virtual":false,"description":"","type":{"names":["PIXIRectangle"]},"default":""},{"name":"_cacheAsBitmap","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"_cacheIsDirty","access":"private","virtual":false,"description":"","type":{"names":["Boolean"]},"default":""},{"name":"x","access":"","virtual":false,"description":"The horizontal position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"y","access":"","virtual":false,"description":"The vertical position of the DisplayObject, in pixels, relative to its parent.\nIf you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.","type":{"names":["Number"]},"default":""},{"name":"worldVisible","access":"","virtual":false,"description":"Indicates if this DisplayObject is visible, based on it, and all of its parents, `visible` property values.","type":{"names":["Boolean"]},"default":""},{"name":"mask","access":"","virtual":false,"description":"Sets a mask for this DisplayObject. A mask is an instance of a Graphics object.\nWhen applied it limits the visible area of this DisplayObject to the shape of the mask.\nUnder a Canvas renderer it uses shape clipping. Under a WebGL renderer it uses a Stencil Buffer.\nTo remove a mask, set this property to `null`.","type":{"names":["PIXIGraphics"]},"default":""},{"name":"filters","access":"","virtual":false,"description":"Sets the filters for this DisplayObject. This is a WebGL only feature, and is ignored by the Canvas\nRenderer. A filter is a shader applied to this DisplayObject. You can modify the placement of the filter\nusing `DisplayObject.filterArea`.\n\nTo remove filters, set this property to `null`.\n\nNote: You cannot have a filter set, and a MULTIPLY Blend Mode active, at the same time. Setting a \nfilter will reset this DisplayObjects blend mode to NORMAL.","type":{"names":["Array"]},"default":""},{"name":"cacheAsBitmap","access":"","virtual":false,"description":"Sets if this DisplayObject should be cached as a bitmap.\n\nWhen invoked it will take a snapshot of the DisplayObject, as it is at that moment, and store it \nin a RenderTexture. This is then used whenever this DisplayObject is rendered. It can provide a\nperformance benefit for complex, but static, DisplayObjects. I.e. those with lots of children.\n\nCached Bitmaps do not track their parents. If you update a property of this DisplayObject, it will not\nre-generate the cached bitmap automatically. To do that you need to call `DisplayObject.updateCache`.\n\nTo remove a cached bitmap, set this property to `null`.","type":{"names":["Boolean"]},"default":""},{"name":"game","access":"","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"name","access":"","virtual":false,"description":"A user defined name given to this Game Object.\rThis value isn't ever used internally by Phaser, it is meant as a game level property.","type":{"names":["string"]},"default":""},{"name":"data","access":"","virtual":false,"description":"An empty Object that belongs to this Game Object.\rThis value isn't ever used internally by Phaser, but may be used by your own code, or\rby Phaser Plugins, to store data that needs to be associated with the Game Object,\rwithout polluting the Game Object directly.","type":{"names":["Object"]},"default":"{}"},{"name":"components","access":"protected","virtual":false,"description":"The components this Game Object has installed.","type":{"names":["object"]},"default":""},{"name":"z","access":"","virtual":false,"description":"The z depth of this Game Object within its parent Group.\rNo two objects in a Group can have the same z value.\rThis value is adjusted automatically whenever the Group hierarchy changes.\rIf you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.","type":{"names":["number"]},"default":""},{"name":"events","access":"","virtual":false,"description":"All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this\rGame Object, or any of its components.","type":{"names":["Phaser.Events"]},"default":""},{"name":"animations","access":"","virtual":false,"description":"If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance.\rThrough it you can create, play, pause and stop animations.","type":{"names":["Phaser.AnimationManager"]},"default":""},{"name":"key","access":"","virtual":false,"description":"The key of the image or texture used by this Game Object during rendering.\rIf it is a string it's the string used to retrieve the texture from the Phaser Image Cache.\rIt can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.\rIf a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache.\rIf a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.","type":{"names":["string","Phaser.RenderTexture","Phaser.BitmapData","Phaser.Video","PIXI.Texture"]},"default":""},{"name":"world","access":"","virtual":false,"description":"The world coordinates of this Game Object in pixels.\rDepending on where in the display list this Game Object is placed this value can differ from `position`, \rwhich contains the x/y coordinates relative to the Game Objects parent.","type":{"names":["Phaser.Point"]},"default":""},{"name":"previousPosition","access":"","virtual":false,"description":"The position the Game Object was located in the previous frame.","type":{"names":["Phaser.Point"]},"default":""},{"name":"previousRotation","access":"","virtual":false,"description":"The rotation the Game Object was in set to in the previous frame. Value is in radians.","type":{"names":["number"]},"default":""},{"name":"renderOrderID","access":"","virtual":false,"description":"The render order ID is used internally by the renderer and Input Manager and should not be modified.\rThis property is mostly used internally by the renderers, but is exposed for the use of plugins.","type":{"names":["number"]},"default":""},{"name":"fresh","access":"","virtual":false,"description":"A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update.\rThis property is mostly used internally by the physics systems, but is exposed for the use of plugins.","type":{"names":["boolean"]},"default":""},{"name":"pendingDestroy","access":"","virtual":false,"description":"A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update.\rYou can set it directly to allow you to flag an object to be destroyed on its next update.\r\rThis is extremely useful if you wish to destroy an object from within one of its own callbacks \rsuch as with Buttons or other Input events.","type":{"names":["boolean"]},"default":""},{"name":"_exists","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["boolean"]},"default":""},{"name":"angle","access":"","virtual":false,"description":"The angle property is the rotation of the Game Object in *degrees* from its original orientation.\r\rValues from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.\r\rValues outside this range are added to or subtracted from 360 to obtain a value within the range. \rFor example, the statement player.angle = 450 is the same as player.angle = 90.\r\rIf you wish to work in radians instead of degrees you can use the property `rotation` instead. \rWorking in radians is slightly faster as it doesn't have to perform any calculations.","type":{"names":["number"]},"default":""},{"name":"autoCull","access":"","virtual":false,"description":"A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame.\rIf it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`.\rThis keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.\r\rThis is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,\ror you have tested performance and find it acceptable.","type":{"names":["boolean"]},"default":""},{"name":"inCamera","access":"","virtual":false,"description":"Checks if the Game Objects bounds intersect with the Game Camera bounds.\rReturns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.","type":{"names":["boolean"]},"default":""},{"name":"offsetX","access":"","virtual":false,"description":"The amount the Game Object is visually offset from its x coordinate.\rThis is the same as `width * anchor.x`.\rIt will only be > 0 if anchor.x is not equal to zero.","type":{"names":["number"]},"default":""},{"name":"offsetY","access":"","virtual":false,"description":"The amount the Game Object is visually offset from its y coordinate.\rThis is the same as `height * anchor.y`.\rIt will only be > 0 if anchor.y is not equal to zero.","type":{"names":["number"]},"default":""},{"name":"centerX","access":"","virtual":false,"description":"The center x coordinate of the Game Object.\rThis is the same as `(x - offsetX) + (width / 2)`.","type":{"names":["number"]},"default":""},{"name":"centerY","access":"","virtual":false,"description":"The center y coordinate of the Game Object.\rThis is the same as `(y - offsetY) + (height / 2)`.","type":{"names":["number"]},"default":""},{"name":"left","access":"","virtual":false,"description":"The left coordinate of the Game Object.\rThis is the same as `x - offsetX`.","type":{"names":["number"]},"default":""},{"name":"right","access":"","virtual":false,"description":"The right coordinate of the Game Object.\rThis is the same as `x + width - offsetX`.","type":{"names":["number"]},"default":""},{"name":"top","access":"","virtual":false,"description":"The y coordinate of the Game Object.\rThis is the same as `y - offsetY`.","type":{"names":["number"]},"default":""},{"name":"bottom","access":"","virtual":false,"description":"The sum of the y and height properties.\rThis is the same as `y + height - offsetY`.","type":{"names":["number"]},"default":""},{"name":"cropRect","access":"","virtual":false,"description":"The Rectangle used to crop the texture this Game Object uses.\rSet this property via `crop`. \rIf you modify this property directly you must call `updateCrop` in order to have the change take effect.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"_crop","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"deltaX","access":"","virtual":false,"description":"Returns the delta x value. The difference between world.x now and in the previous frame.\r\rThe value will be positive if the Game Object has moved to the right or negative if to the left.","type":{"names":["number"]},"default":""},{"name":"deltaY","access":"","virtual":false,"description":"Returns the delta y value. The difference between world.y now and in the previous frame.\r\rThe value will be positive if the Game Object has moved down or negative if up.","type":{"names":["number"]},"default":""},{"name":"deltaZ","access":"","virtual":false,"description":"Returns the delta z value. The difference between rotation now and in the previous frame. The delta value.","type":{"names":["number"]},"default":""},{"name":"destroyPhase","access":"","virtual":false,"description":"As a Game Object runs through its destroy method this flag is set to true, \rand can be checked in any sub-systems or plugins it is being destroyed from.","type":{"names":["boolean"]},"default":""},{"name":"_fixedToCamera","access":"private","virtual":false,"description":"","type":{"names":["boolean"]},"default":""},{"name":"fixedToCamera","access":"","virtual":false,"description":"A Game Object that is \"fixed\" to the camera is rendered at a given x/y offsets from the top left of the camera. The offsets \rare stored in the `cameraOffset` property, which is initialized with the current object coordinates. \r\rThe values are adjusted at the rendering stage, overriding the Game Objects actual world position.\r\rThe end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world\rthe camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times \rregardless where in the world the camera is.\r\rNote that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.\r\rBe careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.","type":{"names":["boolean"]},"default":""},{"name":"cameraOffset","access":"","virtual":false,"description":"The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.\r\rThe values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.","type":{"names":["Phaser.Point"]},"default":""},{"name":"health","access":"","virtual":false,"description":"The Game Objects health value. This is a handy property for setting and manipulating health on a Game Object.\r\rIt can be used in combination with the `damage` method or modified directly.","type":{"names":["number"]},"default":1},{"name":"maxHealth","access":"","virtual":false,"description":"The Game Objects maximum health value. This works in combination with the `heal` method to ensure\rthe health value never exceeds the maximum.","type":{"names":["number"]},"default":100},{"name":"damage","access":"","virtual":false,"description":"Damages the Game Object. This removes the given amount of health from the `health` property.\r\rIf health is taken below or is equal to zero then the `kill` method is called.","type":"","default":""},{"name":"setHealth","access":"","virtual":false,"description":"Sets the health property of the Game Object to the given amount.\rWill never exceed the `maxHealth` value.","type":"","default":""},{"name":"heal","access":"","virtual":false,"description":"Heal the Game Object. This adds the given amount of health to the `health` property.","type":"","default":""},{"name":"input","access":"","virtual":false,"description":"The Input Handler for this Game Object.\r\rBy default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.\r\rAfter you have done this, this property will be a reference to the Phaser InputHandler.","type":{"names":["Phaser.InputHandler","null"]},"default":""},{"name":"inputEnabled","access":"","virtual":false,"description":"By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created\rfor this Game Object and it will then start to process click / touch events and more.\r\rYou can then access the Input Handler via `this.input`.\r\rNote that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.\r\rIf you set this property to false it will stop the Input Handler from processing any more input events.\r\rIf you want to _temporarily_ disable input for a Game Object, then it's better to set\r`input.enabled = false`, as it won't reset any of the Input Handlers internal properties.\rYou can then toggle this back on as needed.","type":{"names":["boolean"]},"default":""},{"name":"checkWorldBounds","access":"","virtual":false,"description":"If this is set to `true` the Game Object checks if it is within the World bounds each frame. \r\rWhen it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.\r\rIf it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.\r\rIt also optionally kills the Game Object if `outOfBoundsKill` is `true`.\r\rWhen `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.\r\rThis is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,\ror you have tested performance and find it acceptable.","type":{"names":["boolean"]},"default":""},{"name":"outOfBoundsKill","access":"","virtual":false,"description":"If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.","type":{"names":["boolean"]},"default":""},{"name":"outOfCameraBoundsKill","access":"","virtual":false,"description":"If this and the `autoCull` property are both set to `true`, then the `kill` method\ris called as soon as the Game Object leaves the camera bounds.","type":{"names":["boolean"]},"default":""},{"name":"_outOfBoundsFired","access":"private","virtual":false,"description":"Internal state var.","type":{"names":["boolean"]},"default":""},{"name":"inWorld","access":"","virtual":false,"description":"Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.","type":{"names":["boolean"]},"default":""},{"name":"alive","access":"","virtual":false,"description":"A useful flag to control if the Game Object is alive or dead.\r\rThis is set automatically by the Health components `damage` method should the object run out of health.\rOr you can toggle it via your game code.\r\rThis property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates.\rHowever you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.","type":{"names":["boolean"]},"default":true},{"name":"lifespan","access":"","virtual":false,"description":"The lifespan allows you to give a Game Object a lifespan in milliseconds.\r\rOnce the Game Object is 'born' you can set this to a positive value.\r\rIt is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame.\rWhen it reaches zero it will call the `kill` method.\r\rVery handy for particles, bullets, collectibles, or any other short-lived entity.","type":{"names":["number"]},"default":""},{"name":"customRender","access":"private","virtual":false,"description":"Does this texture require a custom render call? (as set by BitmapData, Video, etc)","type":{"names":["boolean"]},"default":""},{"name":"_frame","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"frame","access":"","virtual":false,"description":"Gets or sets the current frame index of the texture being used to render this Game Object.\r\rTo change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use,\rfor example: `player.frame = 4`.\r\rIf the frame index given doesn't exist it will revert to the first frame found in the texture.\r\rIf you are using a texture atlas then you should use the `frameName` property instead.\r\rIf you wish to fully replace the texture being used see `loadTexture`.","type":{"names":["integer"]},"default":""},{"name":"frameName","access":"","virtual":false,"description":"Gets or sets the current frame name of the texture being used to render this Game Object.\r\rTo change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use, \rfor example: `player.frameName = \"idle\"`.\r\rIf the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.\r\rIf you are using a sprite sheet then you should use the `frame` property instead.\r\rIf you wish to fully replace the texture being used see `loadTexture`.","type":{"names":["string"]},"default":""},{"name":"body","access":"","virtual":false,"description":"`body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated \rproperties and methods via it.\r\rBy default Game Objects won't add themselves to any physics system and their `body` property will be `null`.\r\rTo enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object\rand `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.\r\rYou can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.\r\rImportant: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5, \rso the physics body is centered on the Game Object.\r\rIf you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.","type":{"names":["Phaser.Physics.Arcade.Body","Phaser.Physics.P2.Body","Phaser.Physics.Ninja.Body","null"]},"default":""},{"name":"transformCallback","access":"","virtual":false,"description":"The callback that will apply any scale limiting to the worldTransform.","type":{"names":["function"]},"default":""},{"name":"transformCallbackContext","access":"","virtual":false,"description":"The context under which `transformCallback` is called.","type":{"names":["object"]},"default":""},{"name":"scaleMin","access":"","virtual":false,"description":"The minimum scale this Game Object will scale down to.\r\rIt allows you to prevent a parent from scaling this Game Object lower than the given value.\r\rSet it to `null` to remove the limit.","type":{"names":["Phaser.Point"]},"default":""},{"name":"scaleMax","access":"","virtual":false,"description":"The maximum scale this Game Object will scale up to. \r\rIt allows you to prevent a parent from scaling this Game Object higher than the given value.\r\rSet it to `null` to remove the limit.","type":{"names":["Phaser.Point"]},"default":""},{"name":"smoothed","access":"","virtual":false,"description":"Enable or disable texture smoothing for this Game Object.\r\rIt only takes effect if the Game Object is using an image based texture.\r\rSmoothing is enabled by default.","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.TilemapParser","description":"Phaser.TilemapParser parses data objects from Phaser.Loader that need more preparation before they can be inserted into a Tilemap.","constructor":{"name":"TilemapParser","description":"Phaser.TilemapParser parses data objects from Phaser.Loader that need more preparation before they can be inserted into a Tilemap.","parameters":[]},"functions":[{"name":"parse","description":"Parse tilemap data from the cache and creates data for a Tilemap object.","parameters":[{"name":"game","type":"Phaser.Game","description":"Game reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"key","type":"string","description":"The key of the tilemap in the Cache.","default":"","optional":"","nullable":""},{"name":"tileWidth","type":"number","description":"The pixel width of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data.","default":32,"optional":true,"nullable":""},{"name":"tileHeight","type":"number","description":"The pixel height of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data.","default":32,"optional":true,"nullable":""},{"name":"width","type":"number","description":"The width of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this.","default":10,"optional":true,"nullable":""},{"name":"height","type":"number","description":"The height of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this.","default":10,"optional":true,"nullable":""}],"returns":{"type":"object","description":"The parsed map object."}},{"name":"parseCSV","description":"Parses a CSV file into valid map data.","parameters":[{"name":"key","type":"string","description":"The name you want to give the map data.","default":"","optional":"","nullable":""},{"name":"data","type":"string","description":"The CSV file data.","default":"","optional":"","nullable":""},{"name":"tileWidth","type":"number","description":"The pixel width of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data.","default":32,"optional":true,"nullable":""},{"name":"tileHeight","type":"number","description":"The pixel height of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data.","default":32,"optional":true,"nullable":""}],"returns":{"type":"object","description":"Generated map data."}},{"name":"getEmptyData","description":"Returns an empty map data object.","parameters":[],"returns":{"type":"object","description":"Generated map data."}},{"name":"parseJSON","description":"Parses a Tiled JSON file into valid map data.","parameters":[{"name":"json","type":"object","description":"The JSON map data.","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"Generated and parsed map data."}}],"members":[{"name":"INSERT_NULL","access":"","virtual":false,"description":"When scanning the Tiled map data the TilemapParser can either insert a null value (true) or\ra Phaser.Tile instance with an index of -1 (false, the default). Depending on your game type\rdepends how this should be configured. If you've a large sparsely populated map and the tile\rdata doesn't need to change then setting this value to `true` will help with memory consumption.\rHowever if your map is small, or you need to update the tiles (perhaps the map dynamically changes\rduring the game) then leave the default value set.","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.Tileset","description":"A Tile set is a combination of an image containing the tiles and collision data per tile.\r\rTilesets are normally created automatically when Tiled data is loaded.","constructor":{"name":"Tileset","description":"A Tile set is a combination of an image containing the tiles and collision data per tile.\r\rTilesets are normally created automatically when Tiled data is loaded.","parameters":[{"name":"name","type":"string","description":"The name of the tileset in the map data.","default":"","optional":"","nullable":""},{"name":"firstgid","type":"integer","description":"The first tile index this tileset contains.","default":"","optional":"","nullable":""},{"name":"width","type":"integer","description":"Width of each tile (in pixels).","default":32,"optional":true,"nullable":""},{"name":"height","type":"integer","description":"Height of each tile (in pixels).","default":32,"optional":true,"nullable":""},{"name":"margin","type":"integer","description":"The margin around all tiles in the sheet (in pixels).","default":"","optional":true,"nullable":""},{"name":"spacing","type":"integer","description":"The spacing between each tile in the sheet (in pixels).","default":"","optional":true,"nullable":""},{"name":"properties","type":"object","description":"Custom Tileset properties.","default":"{}","optional":true,"nullable":""}]},"functions":[{"name":"draw","description":"Draws a tile from this Tileset at the given coordinates on the context.","parameters":[{"name":"context","type":"CanvasRenderingContext2D","description":"The context to draw the tile onto.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"The x coordinate to draw to.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"The y coordinate to draw to.","default":"","optional":"","nullable":""},{"name":"index","type":"integer","description":"The index of the tile within the set to draw.","default":"","optional":"","nullable":""}]},{"name":"containsTileIndex","description":"Returns true if and only if this tileset contains the given tile index.","parameters":[],"returns":{"type":"boolean","description":"True if this tileset contains the given index."}},{"name":"setImage","description":"Set the image associated with this Tileset and update the tile data.","parameters":[{"name":"image","type":"Image","description":"The image that contains the tiles.","default":"","optional":"","nullable":""}]},{"name":"setSpacing","description":"Sets tile spacing and margins.","parameters":[{"name":"margin","type":"integer","description":"The margin around the tiles in the sheet (in pixels).","default":"","optional":true,"nullable":""},{"name":"spacing","type":"integer","description":"The spacing between the tiles in the sheet (in pixels).","default":"","optional":true,"nullable":""}]},{"name":"updateTileData","description":"Updates tile coordinates and tileset data.","parameters":[{"name":"imageWidth","type":"integer","description":"The (expected) width of the image to slice.","default":"","optional":"","nullable":""},{"name":"imageHeight","type":"integer","description":"The (expected) height of the image to slice.","default":"","optional":"","nullable":""}]}],"members":[{"name":"name","access":"","virtual":false,"description":"The name of the Tileset.","type":{"names":["string"]},"default":""},{"name":"firstgid","access":"","virtual":false,"description":"The Tiled firstgid value.\rThis is the starting index of the first tile index this Tileset contains.","type":{"names":["integer"]},"default":""},{"name":"tileWidth","access":"","virtual":false,"description":"The width of each tile (in pixels).","type":{"names":["integer"]},"default":""},{"name":"tileHeight","access":"","virtual":false,"description":"The height of each tile (in pixels).","type":{"names":["integer"]},"default":""},{"name":"tileMargin","access":"","virtual":false,"description":"The margin around the tiles in the sheet (in pixels).\rUse `setSpacing` to change.","type":"","default":""},{"name":"tileSpacing","access":"","virtual":false,"description":"The spacing between each tile in the sheet (in pixels).\rUse `setSpacing` to change.","type":{"names":["integer"]},"default":""},{"name":"properties","access":"","virtual":false,"description":"Tileset-specific properties that are typically defined in the Tiled editor.","type":{"names":["object"]},"default":""},{"name":"image","access":"","virtual":false,"description":"The cached image that contains the individual tiles. Use {@link Phaser.Tileset.setImage setImage} to set.","type":{"names":["object"]},"default":""},{"name":"rows","access":"","virtual":false,"description":"The number of tile rows in the the tileset.","type":"","default":""},{"name":"columns","access":"","virtual":false,"description":"The number of tile columns in the tileset.","type":{"names":["integer"]},"default":""},{"name":"total","access":"","virtual":false,"description":"The total number of tiles in the tileset.","type":{"names":["integer"]},"default":""},{"name":"drawCoords","access":"private","virtual":false,"description":"The look-up table to specific tile image offsets.\rThe coordinates are interlaced such that it is [x0, y0, x1, y1 .. xN, yN] and the tile with the index of firstgid is found at indices 0/1.","type":{"names":["Array.<integer>"]},"default":""}]},{"name":"Phaser.Time","description":"This is the core internal game clock.\r\rIt manages the elapsed time and calculation of elapsed values, used for game object motion and tweens,\rand also handles the standard Timer pool.\r\rTo create a general timed event, use the master {@link Phaser.Timer} accessible through {@link Phaser.Time.events events}.\r\rThere are different *types* of time in Phaser:\r\r- ***Game time*** always runs at the speed of time in real life.\r\r  Unlike wall-clock time, *game time stops when Phaser is paused*.\r\r  Game time is used for {@link Phaser.Timer timer events}.\r\r- ***Physics time*** represents the amount of time given to physics calculations.\r\r  *When {@link Phaser.Time#slowMotion slowMotion} is in effect physics time runs slower than game time.*\r  Like game time, physics time stops when Phaser is paused.\r\r  Physics time is used for physics calculations and {@link Phaser.Tween tweens}.\r\r- {@link https://en.wikipedia.org/wiki/Wall-clock_time ***Wall-clock time***} represents the duration between two events in real life time.\r\r  This time is independent of Phaser and always progresses, regardless of if Phaser is paused.","constructor":{"name":"Time","description":"This is the core internal game clock.\r\rIt manages the elapsed time and calculation of elapsed values, used for game object motion and tweens,\rand also handles the standard Timer pool.\r\rTo create a general timed event, use the master {@link Phaser.Timer} accessible through {@link Phaser.Time.events events}.\r\rThere are different *types* of time in Phaser:\r\r- ***Game time*** always runs at the speed of time in real life.\r\r  Unlike wall-clock time, *game time stops when Phaser is paused*.\r\r  Game time is used for {@link Phaser.Timer timer events}.\r\r- ***Physics time*** represents the amount of time given to physics calculations.\r\r  *When {@link Phaser.Time#slowMotion slowMotion} is in effect physics time runs slower than game time.*\r  Like game time, physics time stops when Phaser is paused.\r\r  Physics time is used for physics calculations and {@link Phaser.Tween tweens}.\r\r- {@link https://en.wikipedia.org/wiki/Wall-clock_time ***Wall-clock time***} represents the duration between two events in real life time.\r\r  This time is independent of Phaser and always progresses, regardless of if Phaser is paused.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""}]},"functions":[{"name":"boot","description":"Called automatically by Phaser.Game after boot. Should not be called directly.","parameters":[]},{"name":"add","description":"Adds an existing Phaser.Timer object to the Timer pool.","parameters":[{"name":"timer","type":"Phaser.Timer","description":"An existing Phaser.Timer object.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Timer","description":"The given Phaser.Timer object."}},{"name":"create","description":"Creates a new stand-alone Phaser.Timer object.","parameters":[{"name":"autoDestroy","type":"boolean","description":"A Timer that is set to automatically destroy itself will do so after all of its events have been dispatched (assuming no looping events).","default":true,"optional":true,"nullable":""}],"returns":{"type":"Phaser.Timer","description":"The Timer object that was created."}},{"name":"removeAll","description":"Remove all Timer objects, regardless of their state and clears all Timers from the {@link Phaser.Time#events events} timer.","parameters":[]},{"name":"refresh","description":"Refreshes the Time.time and Time.elapsedMS properties from the system clock.","parameters":[]},{"name":"update","description":"Updates the game clock and if enabled the advanced timing data. This is called automatically by Phaser.Game.","parameters":[{"name":"time","type":"number","description":"The current relative timestamp; see {@link Phaser.Time#now now}.","default":"","optional":"","nullable":""}]},{"name":"updateTimers","description":"Handles the updating of the Phaser.Timers (if any)\rCalled automatically by Time.update.","parameters":[]},{"name":"updateAdvancedTiming","description":"Handles the updating of the advanced timing values (if enabled)\rCalled automatically by Time.update.","parameters":[]},{"name":"gamePaused","description":"Called when the game enters a paused state.","parameters":[]},{"name":"gameResumed","description":"Called when the game resumes from a paused state.","parameters":[]},{"name":"totalElapsedSeconds","description":"The number of seconds that have elapsed since the game was started.","parameters":[],"returns":{"type":"number","description":"The number of seconds that have elapsed since the game was started."}},{"name":"elapsedSince","description":"How long has passed since the given time.","parameters":[{"name":"since","type":"number","description":"The time you want to measure against.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The difference between the given time and now."}},{"name":"elapsedSecondsSince","description":"How long has passed since the given time (in seconds).","parameters":[{"name":"since","type":"number","description":"The time you want to measure (in seconds).","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"Duration between given time and now (in seconds)."}},{"name":"reset","description":"Resets the private _started value to now and removes all currently running Timers.","parameters":[]}],"members":[{"name":"game","access":"protected","virtual":false,"description":"Local reference to game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"time","access":"protected","virtual":false,"description":"The `Date.now()` value when the time was last updated.","type":{"names":["integer"]},"default":""},{"name":"prevTime","access":"protected","virtual":false,"description":"The `now` when the previous update occurred.","type":{"names":["number"]},"default":""},{"name":"now","access":"protected","virtual":false,"description":"An increasing value representing cumulative milliseconds since an undisclosed epoch.\r\rWhile this value is in milliseconds and can be used to compute time deltas,\rit must must _not_ be used with `Date.now()` as it may not use the same epoch / starting reference.\r\rThe source may either be from a high-res source (eg. if RAF is available) or the standard Date.now;\rthe value can only be relied upon within a particular game instance.","type":{"names":["number"]},"default":""},{"name":"elapsed","access":"protected","virtual":false,"description":"Elapsed time since the last time update, in milliseconds, based on `now`.\r\rThis value _may_ include time that the game is paused/inactive.\r\r_Note:_ This is updated only once per game loop - even if multiple logic update steps are done.\rUse {@link Phaser.Timer#physicsTime physicsTime} as a basis of game/logic calculations instead.","type":{"names":["number"]},"default":""},{"name":"elapsedMS","access":"protected","virtual":false,"description":"The time in ms since the last time update, in milliseconds, based on `time`.\r\rThis value is corrected for game pauses and will be \"about zero\" after a game is resumed.\r\r_Note:_ This is updated once per game loop - even if multiple logic update steps are done.\rUse {@link Phaser.Timer#physicsTime physicsTime} as a basis of game/logic calculations instead.","type":{"names":["integer"]},"default":""},{"name":"physicsElapsed","access":"","virtual":false,"description":"The physics update delta, in fractional seconds.\r\rThis should be used as an applicable multiplier by all logic update steps (eg. `preUpdate/postUpdate/update`)\rto ensure consistent game timing. Game/logic timing can drift from real-world time if the system\ris unable to consistently maintain the desired FPS.\r\rWith fixed-step updates this is normally equivalent to `1.0 / desiredFps`.","type":{"names":["number"]},"default":""},{"name":"physicsElapsedMS","access":"","virtual":false,"description":"The physics update delta, in milliseconds - equivalent to `physicsElapsed * 1000`.","type":{"names":["number"]},"default":""},{"name":"desiredFpsMult","access":"protected","virtual":false,"description":"The desiredFps multiplier as used by Game.update.","type":{"names":["integer"]},"default":""},{"name":"_desiredFps","access":"private","virtual":false,"description":"The desired frame rate of the game.\r\rThis is used is used to calculate the physic/logic multiplier and how to apply catch-up logic updates.","type":{"names":["number"]},"default":60},{"name":"suggestedFps","access":"","virtual":false,"description":"The suggested frame rate for your game, based on an averaged real frame rate.\rThis value is only populated if `Time.advancedTiming` is enabled.\r\r_Note:_ This is not available until after a few frames have passed; until then\rit's set to the same value as desiredFps.","type":{"names":["number"]},"default":""},{"name":"slowMotion","access":"","virtual":false,"description":"Scaling factor to make the game move smoothly in slow motion\r- 1.0 = normal speed\r- 2.0 = half speed","type":{"names":["number"]},"default":1},{"name":"advancedTiming","access":"","virtual":false,"description":"If true then advanced profiling, including the fps rate, fps min/max, suggestedFps and msMin/msMax are updated.","type":{"names":["boolean"]},"default":""},{"name":"frames","access":"","virtual":false,"description":"Advanced timing result: The number of render frames record in the last second.\r\rOnly calculated if {@link Phaser.Time#advancedTiming advancedTiming} is enabled.","type":{"names":["integer"]},"default":""},{"name":"fps","access":"","virtual":false,"description":"Advanced timing result: Frames per second.\r\rOnly calculated if {@link Phaser.Time#advancedTiming advancedTiming} is enabled.","type":{"names":["number"]},"default":""},{"name":"fpsMin","access":"","virtual":false,"description":"Advanced timing result: The lowest rate the fps has dropped to.\r\rOnly calculated if {@link Phaser.Time#advancedTiming advancedTiming} is enabled.\rThis value can be manually reset.","type":{"names":["number"]},"default":""},{"name":"fpsMax","access":"","virtual":false,"description":"Advanced timing result: The highest rate the fps has reached (usually no higher than 60fps).\r\rOnly calculated if {@link Phaser.Time#advancedTiming advancedTiming} is enabled.\rThis value can be manually reset.","type":{"names":["number"]},"default":""},{"name":"msMin","access":"","virtual":false,"description":"Advanced timing result: The minimum amount of time the game has taken between consecutive frames.\r\rOnly calculated if {@link Phaser.Time#advancedTiming advancedTiming} is enabled.\rThis value can be manually reset.","type":{"names":["number"]},"default":1000},{"name":"msMax","access":"","virtual":false,"description":"Advanced timing result: The maximum amount of time the game has taken between consecutive frames.\r\rOnly calculated if {@link Phaser.Time#advancedTiming advancedTiming} is enabled.\rThis value can be manually reset.","type":{"names":["number"]},"default":""},{"name":"pauseDuration","access":"","virtual":false,"description":"Records how long the game was last paused, in milliseconds.\r(This is not updated until the game is resumed.)","type":{"names":["number"]},"default":""},{"name":"timeToCall","access":"protected","virtual":false,"description":"The value that setTimeout needs to work out when to next update","type":{"names":["number"]},"default":""},{"name":"timeExpected","access":"protected","virtual":false,"description":"The time when the next call is expected when using setTimer to control the update loop","type":{"names":["number"]},"default":""},{"name":"events","access":"","virtual":false,"description":"A {@link Phaser.Timer} object bound to the master clock (this Time object) which events can be added to.","type":{"names":["Phaser.Timer"]},"default":""},{"name":"_frameCount","access":"private","virtual":false,"description":"count the number of calls to time.update since the last suggestedFps was calculated","type":{"names":["number"]},"default":""},{"name":"_elapsedAccumulator","access":"private","virtual":false,"description":"sum of the elapsed time since the last suggestedFps was calculated","type":"","default":""},{"name":"_started","access":"private","virtual":false,"description":"The time at which the Game instance started.","type":{"names":["number"]},"default":""},{"name":"_timeLastSecond","access":"private","virtual":false,"description":"The time (in ms) that the last second counter ticked over.","type":{"names":["number"]},"default":""},{"name":"_pauseStarted","access":"private","virtual":false,"description":"The time the game started being paused.","type":{"names":["number"]},"default":""},{"name":"_justResumed","access":"private","virtual":false,"description":"Internal value used to recover from the game pause state.","type":{"names":["boolean"]},"default":""},{"name":"_timers","access":"private","virtual":false,"description":"Internal store of Phaser.Timer objects.","type":{"names":["Array.<Phaser.Timer>"]},"default":""},{"name":"desiredFps","access":"","virtual":false,"description":"The desired frame rate of the game.\r\rThis is used is used to calculate the physic / logic multiplier and how to apply catch-up logic updates. The desired frame rate of the game. Defaults to 60.","type":{"names":["integer"]},"default":""}]},{"name":"Phaser.Timer","description":"A Timer is a way to create and manage {@link Phaser.TimerEvent timer events} that wait for a specific duration and then run a callback.\rMany different timer events, with individual delays, can be added to the same Timer.\r\rAll Timer delays are in milliseconds (there are 1000 ms in 1 second); so a delay value of 250 represents a quarter of a second.\r\rTimers are based on real life time, adjusted for game pause durations.\rThat is, *timer events are based on elapsed {@link Phaser.Time game time}* and do *not* take physics time or slow motion into account.","constructor":{"name":"Timer","description":"A Timer is a way to create and manage {@link Phaser.TimerEvent timer events} that wait for a specific duration and then run a callback.\rMany different timer events, with individual delays, can be added to the same Timer.\r\rAll Timer delays are in milliseconds (there are 1000 ms in 1 second); so a delay value of 250 represents a quarter of a second.\r\rTimers are based on real life time, adjusted for game pause durations.\rThat is, *timer events are based on elapsed {@link Phaser.Time game time}* and do *not* take physics time or slow motion into account.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"autoDestroy","type":"boolean","description":"If true, the timer will automatically destroy itself after all the events have been dispatched (assuming no looping events).","default":true,"optional":true,"nullable":""}]},"functions":[{"name":"create","description":"Creates a new TimerEvent on this Timer.\r\rUse {@link Phaser.Timer#add}, {@link Phaser.Timer#repeat}, or {@link Phaser.Timer#loop} methods to create a new event.","parameters":[{"name":"delay","type":"integer","description":"The number of milliseconds, in {@link Phaser.Time game time}, before the timer event occurs.","default":"","optional":"","nullable":""},{"name":"loop","type":"boolean","description":"Should the event loop or not?","default":"","optional":"","nullable":""},{"name":"repeatCount","type":"number","description":"The number of times the event will repeat.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"The callback that will be called when the timer event occurs.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the callback will be called.","default":"","optional":"","nullable":""},{"name":"arguments","type":"Array.<any>","description":"The values to be sent to your callback function when it is called.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.TimerEvent","description":"The Phaser.TimerEvent object that was created."}},{"name":"add","description":"Adds a new Event to this Timer.\r\rThe event will fire after the given amount of `delay` in milliseconds has passed, once the Timer has started running.\rThe delay is in relation to when the Timer starts, not the time it was added. If the Timer is already running the delay will be calculated based on the timers current time.\r\rMake sure to call {@link Phaser.Timer#start start} after adding all of the Events you require for this Timer.","parameters":[{"name":"delay","type":"integer","description":"The number of milliseconds, in {@link Phaser.Time game time}, before the timer event occurs.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"The callback that will be called when the timer event occurs.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the callback will be called.","default":"","optional":"","nullable":""},{"name":"arguments","type":"*","description":"Additional arguments that will be supplied to the callback.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.TimerEvent","description":"The Phaser.TimerEvent object that was created."}},{"name":"repeat","description":"Adds a new TimerEvent that will always play through once and then repeat for the given number of iterations.\r\rThe event will fire after the given amount of `delay` in milliseconds has passed, once the Timer has started running.\rThe delay is in relation to when the Timer starts, not the time it was added.\rIf the Timer is already running the delay will be calculated based on the timers current time.\r\rMake sure to call {@link Phaser.Timer#start start} after adding all of the Events you require for this Timer.","parameters":[{"name":"delay","type":"integer","description":"The number of milliseconds, in {@link Phaser.Time game time}, before the timer event occurs.","default":"","optional":"","nullable":""},{"name":"repeatCount","type":"number","description":"The number of times the event will repeat once is has finished playback. A repeatCount of 1 means it will repeat itself once, playing the event twice in total.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"The callback that will be called when the timer event occurs.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the callback will be called.","default":"","optional":"","nullable":""},{"name":"arguments","type":"*","description":"Additional arguments that will be supplied to the callback.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.TimerEvent","description":"The Phaser.TimerEvent object that was created."}},{"name":"loop","description":"Adds a new looped Event to this Timer that will repeat forever or until the Timer is stopped.\r\rThe event will fire after the given amount of `delay` in milliseconds has passed, once the Timer has started running.\rThe delay is in relation to when the Timer starts, not the time it was added. If the Timer is already running the delay will be calculated based on the timers current time.\r\rMake sure to call {@link Phaser.Timer#start start} after adding all of the Events you require for this Timer.","parameters":[{"name":"delay","type":"integer","description":"The number of milliseconds, in {@link Phaser.Time game time}, before the timer event occurs.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"The callback that will be called when the timer event occurs.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the callback will be called.","default":"","optional":"","nullable":""},{"name":"arguments","type":"*","description":"Additional arguments that will be supplied to the callback.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.TimerEvent","description":"The Phaser.TimerEvent object that was created."}},{"name":"start","description":"Starts this Timer running.","parameters":[{"name":"delay","type":"integer","description":"The number of milliseconds, in {@link Phaser.Time game time}, that should elapse before the Timer will start.","default":"","optional":true,"nullable":""}]},{"name":"stop","description":"Stops this Timer from running. Does not cause it to be destroyed if autoDestroy is set to true.","parameters":[{"name":"clearEvents","type":"boolean","description":"If true all the events in Timer will be cleared, otherwise they will remain.","default":true,"optional":true,"nullable":""}]},{"name":"remove","description":"Removes a pending TimerEvent from the queue.","parameters":[{"name":"event","type":"Phaser.TimerEvent","description":"The event to remove from the queue.","default":"","optional":"","nullable":""}]},{"name":"order","description":"Orders the events on this Timer so they are in tick order.\rThis is called automatically when new events are created.","parameters":[]},{"name":"sortHandler","description":"Sort handler used by Phaser.Timer.order.","parameters":[]},{"name":"clearPendingEvents","description":"Clears any events from the Timer which have pendingDelete set to true and then resets the private _len and _i values.","parameters":[]},{"name":"update","description":"The main Timer update event, called automatically by Phaser.Time.update.","parameters":[{"name":"time","type":"number","description":"The time from the core game clock.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if there are still events waiting to be dispatched, otherwise false if this Timer can be destroyed."}},{"name":"pause","description":"Pauses the Timer and all events in the queue.","parameters":[]},{"name":"_pause","description":"Internal pause/resume control - user code should use Timer.pause instead.","parameters":[]},{"name":"adjustEvents","description":"Adjusts the time of all pending events and the nextTick by the given baseTime.","parameters":[]},{"name":"resume","description":"Resumes the Timer and updates all pending events.","parameters":[]},{"name":"_resume","description":"Internal pause/resume control - user code should use Timer.resume instead.","parameters":[]},{"name":"removeAll","description":"Removes all Events from this Timer and all callbacks linked to onComplete, but leaves the Timer running.    \rThe onComplete callbacks won't be called.","parameters":[]},{"name":"destroy","description":"Destroys this Timer. Any pending Events are not dispatched.\rThe onComplete callbacks won't be called.","parameters":[]}],"members":[{"name":"game","access":"protected","virtual":false,"description":"Local reference to game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"running","access":"","virtual":false,"description":"True if the Timer is actively running.\r\rDo not modify this boolean - use {@link Phaser.Timer#pause pause} (and {@link Phaser.Timer#resume resume}) to pause the timer.","type":{"names":["boolean"]},"default":""},{"name":"autoDestroy","access":"","virtual":false,"description":"If true, the timer will automatically destroy itself after all the events have been dispatched (assuming no looping events).","type":{"names":["boolean"]},"default":""},{"name":"expired","access":"","virtual":false,"description":"An expired Timer is one in which all of its events have been dispatched and none are pending.","type":{"names":["boolean"]},"default":""},{"name":"elapsed","access":"protected","virtual":false,"description":"Elapsed time since the last frame (in ms).","type":{"names":["number"]},"default":""},{"name":"events","access":"","virtual":false,"description":"An array holding all of this timers Phaser.TimerEvent objects. Use the methods add, repeat and loop to populate it.","type":{"names":["Array.<Phaser.TimerEvent>"]},"default":""},{"name":"onComplete","access":"","virtual":false,"description":"This signal will be dispatched when this Timer has completed which means that there are no more events in the queue.\r\rThe signal is supplied with one argument, `timer`, which is this Timer object.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"nextTick","access":"protected","virtual":false,"description":"The time the next tick will occur.","type":{"names":["number"]},"default":""},{"name":"timeCap","access":"","virtual":false,"description":"If the difference in time between two frame updates exceeds this value, the event times are reset to avoid catch-up situations.","type":{"names":["number"]},"default":""},{"name":"paused","access":"","virtual":false,"description":"The paused state of the Timer. You can pause the timer by calling Timer.pause() and Timer.resume() or by the game pausing.","type":{"names":["boolean"]},"default":""},{"name":"_codePaused","access":"private","virtual":false,"description":"Was the Timer paused by code or by Game focus loss?","type":{"names":["boolean"]},"default":""},{"name":"_started","access":"private","virtual":false,"description":"The time at which this Timer instance started running.","type":{"names":["number"]},"default":""},{"name":"_pauseStarted","access":"private","virtual":false,"description":"The time the game started being paused.","type":{"names":["number"]},"default":""},{"name":"_pauseTotal","access":"private","virtual":false,"description":"Total paused time.","type":{"names":["number"]},"default":""},{"name":"_now","access":"private","virtual":false,"description":"The current start-time adjusted time.","type":{"names":["number"]},"default":""},{"name":"_len","access":"private","virtual":false,"description":"Temp. array length variable.","type":{"names":["number"]},"default":""},{"name":"_marked","access":"private","virtual":false,"description":"Temp. counter variable.","type":{"names":["number"]},"default":""},{"name":"_i","access":"private","virtual":false,"description":"Temp. array counter variable.","type":{"names":["number"]},"default":""},{"name":"_diff","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["number"]},"default":""},{"name":"_newTick","access":"private","virtual":false,"description":"Internal cache var.","type":{"names":["number"]},"default":""},{"name":"MINUTE","access":"","virtual":false,"description":"Number of milliseconds in a minute.","type":{"names":["integer"]},"default":""},{"name":"SECOND","access":"","virtual":false,"description":"Number of milliseconds in a second.","type":{"names":["integer"]},"default":""},{"name":"HALF","access":"","virtual":false,"description":"Number of milliseconds in half a second.","type":{"names":["integer"]},"default":""},{"name":"QUARTER","access":"","virtual":false,"description":"Number of milliseconds in a quarter of a second.","type":{"names":["integer"]},"default":""},{"name":"next","access":"","virtual":false,"description":"The time at which the next event will occur.","type":{"names":["number"]},"default":""},{"name":"duration","access":"","virtual":false,"description":"The duration in ms remaining until the next event will occur.","type":{"names":["number"]},"default":""},{"name":"length","access":"","virtual":false,"description":"The number of pending events in the queue.","type":{"names":["number"]},"default":""},{"name":"ms","access":"","virtual":false,"description":"The duration in milliseconds that this Timer has been running for.","type":{"names":["number"]},"default":""},{"name":"seconds","access":"","virtual":false,"description":"The duration in seconds that this Timer has been running for.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.TimerEvent","description":"A TimerEvent is a single event that is processed by a Phaser.Timer.\r\rIt consists of a delay, which is a value in milliseconds after which the event will fire.\rWhen the event fires it calls a specific callback with the specified arguments.\r\rTimerEvents are removed by their parent timer once finished firing or repeating.\r\rUse {@link Phaser.Timer#add}, {@link Phaser.Timer#repeat}, or {@link Phaser.Timer#loop} methods to create a new event.","constructor":{"name":"TimerEvent","description":"A TimerEvent is a single event that is processed by a Phaser.Timer.\r\rIt consists of a delay, which is a value in milliseconds after which the event will fire.\rWhen the event fires it calls a specific callback with the specified arguments.\r\rTimerEvents are removed by their parent timer once finished firing or repeating.\r\rUse {@link Phaser.Timer#add}, {@link Phaser.Timer#repeat}, or {@link Phaser.Timer#loop} methods to create a new event.","parameters":[{"name":"timer","type":"Phaser.Timer","description":"The Timer object that this TimerEvent belongs to.","default":"","optional":"","nullable":""},{"name":"delay","type":"number","description":"The delay in ms at which this TimerEvent fires.","default":"","optional":"","nullable":""},{"name":"tick","type":"number","description":"The tick is the next game clock time that this event will fire at.","default":"","optional":"","nullable":""},{"name":"repeatCount","type":"number","description":"If this TimerEvent repeats it will do so this many times.","default":"","optional":"","nullable":""},{"name":"loop","type":"boolean","description":"True if this TimerEvent loops, otherwise false.","default":"","optional":"","nullable":""},{"name":"callback","type":"function","description":"The callback that will be called when the TimerEvent occurs.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which the callback will be called.","default":"","optional":"","nullable":""},{"name":"arguments","type":"Array.<any>","description":"Additional arguments to be passed to the callback.","default":"","optional":"","nullable":""}]},"functions":[],"members":[{"name":"timer","access":"protected","virtual":false,"description":"The Timer object that this TimerEvent belongs to.","type":{"names":["Phaser.Timer"]},"default":""},{"name":"delay","access":"","virtual":false,"description":"The delay in ms at which this TimerEvent fires.","type":{"names":["number"]},"default":""},{"name":"tick","access":"","virtual":false,"description":"The tick is the next game clock time that this event will fire at.","type":{"names":["number"]},"default":""},{"name":"repeatCount","access":"","virtual":false,"description":"If this TimerEvent repeats it will do so this many times.","type":{"names":["number"]},"default":""},{"name":"loop","access":"","virtual":false,"description":"True if this TimerEvent loops, otherwise false.","type":{"names":["boolean"]},"default":""},{"name":"callback","access":"","virtual":false,"description":"The callback that will be called when the TimerEvent occurs.","type":{"names":["function"]},"default":""},{"name":"callbackContext","access":"","virtual":false,"description":"The context in which the callback will be called.","type":{"names":["object"]},"default":""},{"name":"args","access":"","virtual":false,"description":"Additional arguments to be passed to the callback.","type":"","default":""},{"name":"pendingDelete","access":"protected","virtual":false,"description":"A flag that controls if the TimerEvent is pending deletion.","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.Easing","description":"A collection of easing methods defining ease-in and ease-out curves.","constructor":{"name":"Easing","description":"A collection of easing methods defining ease-in and ease-out curves.","parameters":[]},"functions":[],"members":[]},{"name":"Phaser.Easing.Linear","description":"Linear easing.","constructor":{"name":"Linear","description":"Linear easing.","parameters":[]},"functions":[{"name":"None","description":"Linear Easing (no variation).","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"k."}}],"members":[]},{"name":"Phaser.Easing.Quadratic","description":"Quadratic easing.","constructor":{"name":"Quadratic","description":"Quadratic easing.","parameters":[]},"functions":[{"name":"In","description":"Ease-in.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"k^2."}},{"name":"Out","description":"Ease-out.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"k* (2-k)."}},{"name":"InOut","description":"Ease-in/out.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}}],"members":[]},{"name":"Phaser.Easing.Cubic","description":"Cubic easing.","constructor":{"name":"Cubic","description":"Cubic easing.","parameters":[]},"functions":[{"name":"In","description":"Cubic ease-in.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}},{"name":"Out","description":"Cubic ease-out.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}},{"name":"InOut","description":"Cubic ease-in/out.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}}],"members":[]},{"name":"Phaser.Easing.Quartic","description":"Quartic easing.","constructor":{"name":"Quartic","description":"Quartic easing.","parameters":[]},"functions":[{"name":"In","description":"Quartic ease-in.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}},{"name":"Out","description":"Quartic ease-out.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}},{"name":"InOut","description":"Quartic ease-in/out.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}}],"members":[]},{"name":"Phaser.Easing.Quintic","description":"Quintic easing.","constructor":{"name":"Quintic","description":"Quintic easing.","parameters":[]},"functions":[{"name":"In","description":"Quintic ease-in.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}},{"name":"Out","description":"Quintic ease-out.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}},{"name":"InOut","description":"Quintic ease-in/out.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}}],"members":[]},{"name":"Phaser.Easing.Sinusoidal","description":"Sinusoidal easing.","constructor":{"name":"Sinusoidal","description":"Sinusoidal easing.","parameters":[]},"functions":[{"name":"In","description":"Sinusoidal ease-in.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}},{"name":"Out","description":"Sinusoidal ease-out.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}},{"name":"InOut","description":"Sinusoidal ease-in/out.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}}],"members":[]},{"name":"Phaser.Easing.Exponential","description":"Exponential easing.","constructor":{"name":"Exponential","description":"Exponential easing.","parameters":[]},"functions":[{"name":"In","description":"Exponential ease-in.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}},{"name":"Out","description":"Exponential ease-out.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}},{"name":"InOut","description":"Exponential ease-in/out.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}}],"members":[]},{"name":"Phaser.Easing.Circular","description":"Circular easing.","constructor":{"name":"Circular","description":"Circular easing.","parameters":[]},"functions":[{"name":"In","description":"Circular ease-in.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}},{"name":"Out","description":"Circular ease-out.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}},{"name":"InOut","description":"Circular ease-in/out.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}}],"members":[]},{"name":"Phaser.Easing.Elastic","description":"Elastic easing.","constructor":{"name":"Elastic","description":"Elastic easing.","parameters":[]},"functions":[{"name":"In","description":"Elastic ease-in.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}},{"name":"Out","description":"Elastic ease-out.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}},{"name":"InOut","description":"Elastic ease-in/out.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}}],"members":[]},{"name":"Phaser.Easing.Back","description":"Back easing.","constructor":{"name":"Back","description":"Back easing.","parameters":[]},"functions":[{"name":"In","description":"Back ease-in.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}},{"name":"Out","description":"Back ease-out.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}},{"name":"InOut","description":"Back ease-in/out.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}}],"members":[]},{"name":"Phaser.Easing.Bounce","description":"Bounce easing.","constructor":{"name":"Bounce","description":"Bounce easing.","parameters":[]},"functions":[{"name":"In","description":"Bounce ease-in.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}},{"name":"Out","description":"Bounce ease-out.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}},{"name":"InOut","description":"Bounce ease-in/out.","parameters":[{"name":"k","type":"number","description":"The value to be tweened.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The tweened value."}}],"members":[]},{"name":"Phaser.Tween","description":"A Tween allows you to alter one or more properties of a target object over a defined period of time.\rThis can be used for things such as alpha fading Sprites, scaling them or motion.\rUse `Tween.to` or `Tween.from` to set-up the tween values. You can create multiple tweens on the same object\rby calling Tween.to multiple times on the same Tween. Additional tweens specified in this way become \"child\" tweens and\rare played through in sequence. You can use Tween.timeScale and Tween.reverse to control the playback of this Tween and all of its children.","constructor":{"name":"Tween","description":"A Tween allows you to alter one or more properties of a target object over a defined period of time.\rThis can be used for things such as alpha fading Sprites, scaling them or motion.\rUse `Tween.to` or `Tween.from` to set-up the tween values. You can create multiple tweens on the same object\rby calling Tween.to multiple times on the same Tween. Additional tweens specified in this way become \"child\" tweens and\rare played through in sequence. You can use Tween.timeScale and Tween.reverse to control the playback of this Tween and all of its children.","parameters":[{"name":"target","type":"object","description":"The target object, such as a Phaser.Sprite or Phaser.Sprite.scale.","default":"","optional":"","nullable":""},{"name":"game","type":"Phaser.Game","description":"Current game instance.","default":"","optional":"","nullable":""},{"name":"manager","type":"Phaser.TweenManager","description":"The TweenManager responsible for looking after this Tween.","default":"","optional":"","nullable":""}]},"functions":[{"name":"to","description":"Sets this tween to be a `to` tween on the properties given. A `to` tween starts at the current value and tweens to the destination value given.\rFor example a Sprite with an `x` coordinate of 100 could be tweened to `x` 200 by giving a properties object of `{ x: 200 }`.\rThe ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as \"Circ\".\r\".easeIn\", \".easeOut\" and \"easeInOut\" variants are all supported for all ease types.","parameters":[{"name":"properties","type":"object","description":"An object containing the properties you want to tween, such as `Sprite.x` or `Sound.volume`. Given as a JavaScript object.","default":"","optional":"","nullable":""},{"name":"duration","type":"number","description":"Duration of this tween in ms. Or if `Tween.frameBased` is true this represents the number of frames that should elapse.","default":1000,"optional":true,"nullable":""},{"name":"ease","type":["function","string"],"description":"Easing function. If not set it will default to Phaser.Easing.Default, which is Phaser.Easing.Linear.None by default but can be over-ridden.","default":"","optional":true,"nullable":""},{"name":"autoStart","type":"boolean","description":"Set to `true` to allow this tween to start automatically. Otherwise call Tween.start().","default":"","optional":true,"nullable":""},{"name":"delay","type":"number","description":"Delay before this tween will start in milliseconds. Defaults to 0, no delay.","default":"","optional":true,"nullable":""},{"name":"repeat","type":"number","description":"Should the tween automatically restart once complete? If you want it to run forever set as -1. This only effects this individual tween, not any chained tweens.","default":"","optional":true,"nullable":""},{"name":"yoyo","type":"boolean","description":"A tween that yoyos will reverse itself and play backwards automatically. A yoyo'd tween doesn't fire the Tween.onComplete event, so listen for Tween.onLoop instead.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Tween","description":"This Tween object."}},{"name":"from","description":"Sets this tween to be a `from` tween on the properties given. A `from` tween sets the target to the destination value and tweens to its current value.\rFor example a Sprite with an `x` coordinate of 100 tweened from `x` 500 would be set to `x` 500 and then tweened to `x` 100 by giving a properties object of `{ x: 500 }`.\rThe ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as \"Circ\".\r\".easeIn\", \".easeOut\" and \"easeInOut\" variants are all supported for all ease types.","parameters":[{"name":"properties","type":"object","description":"An object containing the properties you want to tween., such as `Sprite.x` or `Sound.volume`. Given as a JavaScript object.","default":"","optional":"","nullable":""},{"name":"duration","type":"number","description":"Duration of this tween in ms. Or if `Tween.frameBased` is true this represents the number of frames that should elapse.","default":1000,"optional":true,"nullable":""},{"name":"ease","type":["function","string"],"description":"Easing function. If not set it will default to Phaser.Easing.Default, which is Phaser.Easing.Linear.None by default but can be over-ridden.","default":"","optional":true,"nullable":""},{"name":"autoStart","type":"boolean","description":"Set to `true` to allow this tween to start automatically. Otherwise call Tween.start().","default":"","optional":true,"nullable":""},{"name":"delay","type":"number","description":"Delay before this tween will start in milliseconds. Defaults to 0, no delay.","default":"","optional":true,"nullable":""},{"name":"repeat","type":"number","description":"Should the tween automatically restart once complete? If you want it to run forever set as -1. This only effects this individual tween, not any chained tweens.","default":"","optional":true,"nullable":""},{"name":"yoyo","type":"boolean","description":"A tween that yoyos will reverse itself and play backwards automatically. A yoyo'd tween doesn't fire the Tween.onComplete event, so listen for Tween.onLoop instead.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Tween","description":"This Tween object."}},{"name":"start","description":"Starts the tween running. Can also be called by the autoStart parameter of `Tween.to` or `Tween.from`.\rThis sets the `Tween.isRunning` property to `true` and dispatches a `Tween.onStart` signal.\rIf the Tween has a delay set then nothing will start tweening until the delay has expired.","parameters":[{"name":"index","type":"number","description":"If this Tween contains child tweens you can specify which one to start from. The default is zero, i.e. the first tween created.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Tween","description":"This tween. Useful for method chaining."}},{"name":"stop","description":"Stops the tween if running and flags it for deletion from the TweenManager.\rIf called directly the `Tween.onComplete` signal is not dispatched and no chained tweens are started unless the complete parameter is set to `true`.\rIf you just wish to pause a tween then use Tween.pause instead.","parameters":[{"name":"complete","type":"boolean","description":"Set to `true` to dispatch the Tween.onComplete signal.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Tween","description":"This tween. Useful for method chaining."}},{"name":"updateTweenData","description":"Updates either a single TweenData or all TweenData objects properties to the given value.\rUsed internally by methods like Tween.delay, Tween.yoyo, etc. but can also be called directly if you know which property you want to tweak.\rThe property is not checked, so if you pass an invalid one you'll generate a run-time error.","parameters":[{"name":"property","type":"string","description":"The property to update.","default":"","optional":"","nullable":""},{"name":"value","type":["number","function"],"description":"The value to set the property to.","default":"","optional":"","nullable":""},{"name":"index","type":"number","description":"If this tween has more than one child this allows you to target a specific child. If set to -1 it will set the delay on all the children.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Tween","description":"This tween. Useful for method chaining."}},{"name":"delay","description":"Sets the delay in milliseconds before this tween will start. If there are child tweens it sets the delay before the first child starts.\rThe delay is invoked as soon as you call `Tween.start`. If the tween is already running this method doesn't do anything for the current active tween.\rIf you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to delay.\rIf you have child tweens and pass -1 as the index value it sets the delay across all of them.","parameters":[{"name":"duration","type":"number","description":"The amount of time in ms that the Tween should wait until it begins once started is called. Set to zero to remove any active delay.","default":"","optional":"","nullable":""},{"name":"index","type":"number","description":"If this tween has more than one child this allows you to target a specific child. If set to -1 it will set the delay on all the children.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Tween","description":"This tween. Useful for method chaining."}},{"name":"repeat","description":"Sets the number of times this tween will repeat.\rIf you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to repeat.\rIf you have child tweens and pass -1 as the index value it sets the number of times they'll repeat across all of them.\rIf you wish to define how many times this Tween and all children will repeat see Tween.repeatAll.","parameters":[{"name":"total","type":"number","description":"How many times a tween should repeat before completing. Set to zero to remove an active repeat. Set to -1 to repeat forever.","default":"","optional":"","nullable":""},{"name":"repeat","type":"number","description":"This is the amount of time to pause (in ms) before the repeat will start.","default":"","optional":true,"nullable":""},{"name":"index","type":"number","description":"If this tween has more than one child this allows you to target a specific child. If set to -1 it will set the repeat value on all the children.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Tween","description":"This tween. Useful for method chaining."}},{"name":"repeatDelay","description":"Sets the delay in milliseconds before this tween will repeat itself.\rThe repeatDelay is invoked as soon as you call `Tween.start`. If the tween is already running this method doesn't do anything for the current active tween.\rIf you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to set repeatDelay on.\rIf you have child tweens and pass -1 as the index value it sets the repeatDelay across all of them.","parameters":[{"name":"duration","type":"number","description":"The amount of time in ms that the Tween should wait until it repeats or yoyos once start is called. Set to zero to remove any active repeatDelay.","default":"","optional":"","nullable":""},{"name":"index","type":"number","description":"If this tween has more than one child this allows you to target a specific child. If set to -1 it will set the repeatDelay on all the children.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Tween","description":"This tween. Useful for method chaining."}},{"name":"yoyo","description":"A Tween that has yoyo set to true will run through from its starting values to its end values and then play back in reverse from end to start.\rUsed in combination with repeat you can create endless loops.\rIf you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to yoyo.\rIf you have child tweens and pass -1 as the index value it sets the yoyo property across all of them.\rIf you wish to yoyo this Tween and all of its children then see Tween.yoyoAll.","parameters":[{"name":"enable","type":"boolean","description":"Set to true to yoyo this tween, or false to disable an already active yoyo.","default":"","optional":"","nullable":""},{"name":"yoyoDelay","type":"number","description":"This is the amount of time to pause (in ms) before the yoyo will start.","default":"","optional":true,"nullable":""},{"name":"index","type":"number","description":"If this tween has more than one child this allows you to target a specific child. If set to -1 it will set yoyo on all the children.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Tween","description":"This tween. Useful for method chaining."}},{"name":"yoyoDelay","description":"Sets the delay in milliseconds before this tween will run a yoyo (only applies if yoyo is enabled).\rThe repeatDelay is invoked as soon as you call `Tween.start`. If the tween is already running this method doesn't do anything for the current active tween.\rIf you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to set repeatDelay on.\rIf you have child tweens and pass -1 as the index value it sets the repeatDelay across all of them.","parameters":[{"name":"duration","type":"number","description":"The amount of time in ms that the Tween should wait until it repeats or yoyos once start is called. Set to zero to remove any active yoyoDelay.","default":"","optional":"","nullable":""},{"name":"index","type":"number","description":"If this tween has more than one child this allows you to target a specific child. If set to -1 it will set the yoyoDelay on all the children.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Tween","description":"This tween. Useful for method chaining."}},{"name":"easing","description":"Set easing function this tween will use, i.e. Phaser.Easing.Linear.None.\rThe ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as \"Circ\".\r\".easeIn\", \".easeOut\" and \"easeInOut\" variants are all supported for all ease types.\rIf you have child tweens and pass -1 as the index value it sets the easing function defined here across all of them.","parameters":[{"name":"ease","type":["function","string"],"description":"The easing function this tween will use, i.e. Phaser.Easing.Linear.None.","default":"","optional":"","nullable":""},{"name":"index","type":"number","description":"If this tween has more than one child this allows you to target a specific child. If set to -1 it will set the easing function on all children.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Tween","description":"This tween. Useful for method chaining."}},{"name":"interpolation","description":"Sets the interpolation function the tween will use. By default it uses Phaser.Math.linearInterpolation.\rAlso available: Phaser.Math.bezierInterpolation and Phaser.Math.catmullRomInterpolation.\rThe interpolation function is only used if the target properties is an array.\rIf you have child tweens and pass -1 as the index value and it will set the interpolation function across all of them.","parameters":[{"name":"interpolation","type":"function","description":"The interpolation function to use (Phaser.Math.linearInterpolation by default)","default":"","optional":"","nullable":""},{"name":"context","type":"object","description":"The context under which the interpolation function will be run.","default":"","optional":true,"nullable":""},{"name":"index","type":"number","description":"If this tween has more than one child this allows you to target a specific child. If set to -1 it will set the interpolation function on all children.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Tween","description":"This tween. Useful for method chaining."}},{"name":"repeatAll","description":"Set how many times this tween and all of its children will repeat.\rA tween (A) with 3 children (B,C,D) with a `repeatAll` value of 2 would play as: ABCDABCD before completing.","parameters":[{"name":"total","type":"number","description":"How many times this tween and all children should repeat before completing. Set to zero to remove an active repeat. Set to -1 to repeat forever.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Tween","description":"This tween. Useful for method chaining."}},{"name":"chain","description":"This method allows you to chain tweens together. Any tween chained to this tween will have its `Tween.start` method called\ras soon as this tween completes. If this tween never completes (i.e. repeatAll or loop is set) then the chain will never progress.\rNote that `Tween.onComplete` will fire when *this* tween completes, not when the whole chain completes.\rFor that you should listen to `onComplete` on the final tween in your chain.\r\rIf you pass multiple tweens to this method they will be joined into a single long chain.\rFor example if this is Tween A and you pass in B, C and D then B will be chained to A, C will be chained to B and D will be chained to C.\rAny previously chained tweens that may have been set will be overwritten.","parameters":[{"name":"tweens","type":"Phaser.Tween","description":"One or more tweens that will be chained to this one.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Tween","description":"This tween. Useful for method chaining."}},{"name":"loop","description":"Enables the looping of this tween. The tween will loop forever, and onComplete will never fire.\r\rIf `value` is `true` then this is the same as setting `Tween.repeatAll(-1)`.\rIf `value` is `false` it is the same as setting `Tween.repeatAll(0)` and will reset the `repeatCounter` to zero.\r\rUsage:\rgame.add.tween(p).to({ x: 700 }, 1000, Phaser.Easing.Linear.None, true)\r.to({ y: 300 }, 1000, Phaser.Easing.Linear.None)\r.to({ x: 0 }, 1000, Phaser.Easing.Linear.None)\r.to({ y: 0 }, 1000, Phaser.Easing.Linear.None)\r.loop();","parameters":[{"name":"value","type":"boolean","description":"If `true` this tween will loop once it reaches the end. Set to `false` to remove an active loop.","default":true,"optional":true,"nullable":""}],"returns":{"type":"Phaser.Tween","description":"This tween. Useful for method chaining."}},{"name":"onUpdateCallback","description":"Sets a callback to be fired each time this tween updates.","parameters":[{"name":"callback","type":"function","description":"The callback to invoke each time this tween is updated. Set to `null` to remove an already active callback.","default":"","optional":"","nullable":""},{"name":"callbackContext","type":"object","description":"The context in which to call the onUpdate callback.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Tween","description":"This tween. Useful for method chaining."}},{"name":"pause","description":"Pauses the tween. Resume playback with Tween.resume.","parameters":[]},{"name":"_pause","description":"This is called by the core Game loop. Do not call it directly, instead use Tween.pause.","parameters":[]},{"name":"resume","description":"Resumes a paused tween.","parameters":[]},{"name":"_resume","description":"This is called by the core Game loop. Do not call it directly, instead use Tween.pause.","parameters":[]},{"name":"update","description":"Core tween update function called by the TweenManager. Does not need to be invoked directly.","parameters":[{"name":"time","type":"number","description":"A timestamp passed in by the TweenManager.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"false if the tween and all child tweens have completed and should be deleted from the manager, otherwise true (still active)."}},{"name":"generateData","description":"This will generate an array populated with the tweened object values from start to end.\rIt works by running the tween simulation at the given frame rate based on the values set-up in Tween.to and Tween.from.\rIt ignores delay and repeat counts and any chained tweens, but does include child tweens.\rJust one play through of the tween data is returned, including yoyo if set.","parameters":[{"name":"frameRate","type":"number","description":"The speed in frames per second that the data should be generated at. The higher the value, the larger the array it creates.","default":60,"optional":true,"nullable":""},{"name":"data","type":"array","description":"If given the generated data will be appended to this array, otherwise a new array will be returned.","default":"","optional":true,"nullable":""}],"returns":{"type":"array","description":"An array of tweened values."}}],"members":[{"name":"game","access":"","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"target","access":"","virtual":false,"description":"The target object, such as a Phaser.Sprite or property like Phaser.Sprite.scale.","type":{"names":["object"]},"default":""},{"name":"manager","access":"","virtual":false,"description":"Reference to the TweenManager responsible for updating this Tween.","type":{"names":["Phaser.TweenManager"]},"default":""},{"name":"timeline","access":"","virtual":false,"description":"An Array of TweenData objects that comprise the different parts of this Tween.","type":{"names":["Array"]},"default":""},{"name":"reverse","access":"","virtual":false,"description":"If set to `true` the current tween will play in reverse.\rIf the tween hasn't yet started this has no effect.\rIf there are child tweens then all child tweens will play in reverse from the current point.","type":{"names":["boolean"]},"default":""},{"name":"timeScale","access":"","virtual":false,"description":"The speed at which the tweens will run. A value of 1 means it will match the game frame rate. 0.5 will run at half the frame rate. 2 at double the frame rate, etc.\rIf a tweens duration is 1 second but timeScale is 0.5 then it will take 2 seconds to complete.","type":{"names":["number"]},"default":1},{"name":"repeatCounter","access":"","virtual":false,"description":"If the Tween and any child tweens are set to repeat this contains the current repeat count.","type":{"names":["number"]},"default":""},{"name":"pendingDelete","access":"","virtual":false,"description":"True if this Tween is ready to be deleted by the TweenManager.","type":{"names":["boolean"]},"default":""},{"name":"onStart","access":"","virtual":false,"description":"The onStart event is fired when the Tween begins. If there is a delay before the tween starts then onStart fires after the delay is finished.\rIt will be sent 2 parameters: the target object and this tween.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onLoop","access":"","virtual":false,"description":"The onLoop event is fired if the Tween, or any child tweens loop.\rIt will be sent 2 parameters: the target object and this tween.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onRepeat","access":"","virtual":false,"description":"The onRepeat event is fired if the Tween and all of its children repeats. If this tween has no children this will never be fired.\rIt will be sent 2 parameters: the target object and this tween.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onChildComplete","access":"","virtual":false,"description":"The onChildComplete event is fired when the Tween or any of its children completes.\rFires every time a child completes unless a child is set to repeat forever.\rIt will be sent 2 parameters: the target object and this tween.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"onComplete","access":"","virtual":false,"description":"The onComplete event is fired when the Tween and all of its children completes. Does not fire if the Tween is set to loop or repeatAll(-1).\rIt will be sent 2 parameters: the target object and this tween.","type":{"names":["Phaser.Signal"]},"default":""},{"name":"isRunning","access":"","virtual":false,"description":"If the tween is running this is set to true, otherwise false. Tweens that are in a delayed state or waiting to start are considered as being running.","type":{"names":["boolean"]},"default":""},{"name":"current","access":"","virtual":false,"description":"The current Tween child being run.","type":{"names":["number"]},"default":""},{"name":"properties","access":"","virtual":false,"description":"Target property cache used when building the child data values.","type":{"names":["object"]},"default":""},{"name":"chainedTween","access":"","virtual":false,"description":"If this Tween is chained to another this holds a reference to it.","type":{"names":["Phaser.Tween"]},"default":""},{"name":"isPaused","access":"","virtual":false,"description":"Is this Tween paused or not?","type":{"names":["boolean"]},"default":""},{"name":"frameBased","access":"","virtual":false,"description":"Is this Tween frame or time based? A frame based tween will use the physics elapsed timer when updating. This means\rit will retain the same consistent frame rate, regardless of the speed of the device. The duration value given should\rbe given in frames.\r\rIf the Tween uses a time based update (which is the default) then the duration is given in milliseconds.\rIn this situation a 2000ms tween will last exactly 2 seconds, regardless of the device and how many visual updates the tween\rhas actually been through. For very short tweens you may wish to experiment with a frame based update instead.\r\rThe default value is whatever you've set in TweenManager.frameBased.","type":{"names":["boolean"]},"default":""},{"name":"_onUpdateCallback","access":"private","virtual":false,"description":"An onUpdate callback.","type":{"names":["function"]},"default":"null"},{"name":"_onUpdateCallbackContext","access":"private","virtual":false,"description":"The context in which to call the onUpdate callback.","type":{"names":["object"]},"default":"null"},{"name":"_pausedTime","access":"private","virtual":false,"description":"Private pause timer.","type":{"names":["number"]},"default":""},{"name":"_codePaused","access":"private","virtual":false,"description":"Was the Tween paused by code or by Game focus loss?","type":{"names":["boolean"]},"default":""},{"name":"_hasStarted","access":"private","virtual":false,"description":"Internal var to track if the Tween has started yet or not.","type":{"names":["boolean"]},"default":""},{"name":"totalDuration","access":"","virtual":false,"description":"Gets the total duration of this Tween, including all child tweens, in milliseconds.","type":{"names":["Phaser.TweenData"]},"default":""}]},{"name":"Phaser.TweenData","description":"A Phaser.Tween contains at least one TweenData object. It contains all of the tween data values, such as the\rstarting and ending values, the ease function, interpolation and duration. The Tween acts as a timeline manager for\rTweenData objects and can contain multiple TweenData objects.","constructor":{"name":"TweenData","description":"A Phaser.Tween contains at least one TweenData object. It contains all of the tween data values, such as the\rstarting and ending values, the ease function, interpolation and duration. The Tween acts as a timeline manager for\rTweenData objects and can contain multiple TweenData objects.","parameters":[{"name":"parent","type":"Phaser.Tween","description":"The Tween that owns this TweenData object.","default":"","optional":"","nullable":""}]},"functions":[{"name":"to","description":"Sets this tween to be a `to` tween on the properties given. A `to` tween starts at the current value and tweens to the destination value given.\rFor example a Sprite with an `x` coordinate of 100 could be tweened to `x` 200 by giving a properties object of `{ x: 200 }`.","parameters":[{"name":"properties","type":"object","description":"The properties you want to tween, such as `Sprite.x` or `Sound.volume`. Given as a JavaScript object.","default":"","optional":"","nullable":""},{"name":"duration","type":"number","description":"Duration of this tween in ms.","default":1000,"optional":true,"nullable":""},{"name":"ease","type":"function","description":"Easing function. If not set it will default to Phaser.Easing.Default, which is Phaser.Easing.Linear.None by default but can be over-ridden at will.","default":"","optional":true,"nullable":""},{"name":"delay","type":"number","description":"Delay before this tween will start, defaults to 0 (no delay). Value given is in ms.","default":"","optional":true,"nullable":""},{"name":"repeat","type":"number","description":"Should the tween automatically restart once complete? If you want it to run forever set as -1. This ignores any chained tweens.","default":"","optional":true,"nullable":""},{"name":"yoyo","type":"boolean","description":"A tween that yoyos will reverse itself and play backwards automatically. A yoyo'd tween doesn't fire the Tween.onComplete event, so listen for Tween.onLoop instead.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.TweenData","description":"This Tween object."}},{"name":"from","description":"Sets this tween to be a `from` tween on the properties given. A `from` tween sets the target to the destination value and tweens to its current value.\rFor example a Sprite with an `x` coordinate of 100 tweened from `x` 500 would be set to `x` 500 and then tweened to `x` 100 by giving a properties object of `{ x: 500 }`.","parameters":[{"name":"properties","type":"object","description":"The properties you want to tween, such as `Sprite.x` or `Sound.volume`. Given as a JavaScript object.","default":"","optional":"","nullable":""},{"name":"duration","type":"number","description":"Duration of this tween in ms.","default":1000,"optional":true,"nullable":""},{"name":"ease","type":"function","description":"Easing function. If not set it will default to Phaser.Easing.Default, which is Phaser.Easing.Linear.None by default but can be over-ridden at will.","default":"","optional":true,"nullable":""},{"name":"delay","type":"number","description":"Delay before this tween will start, defaults to 0 (no delay). Value given is in ms.","default":"","optional":true,"nullable":""},{"name":"repeat","type":"number","description":"Should the tween automatically restart once complete? If you want it to run forever set as -1. This ignores any chained tweens.","default":"","optional":true,"nullable":""},{"name":"yoyo","type":"boolean","description":"A tween that yoyos will reverse itself and play backwards automatically. A yoyo'd tween doesn't fire the Tween.onComplete event, so listen for Tween.onLoop instead.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.TweenData","description":"This Tween object."}},{"name":"start","description":"Starts the Tween running.","parameters":[],"returns":{"type":"Phaser.TweenData","description":"This Tween object."}},{"name":"loadValues","description":"Loads the values from the target object into this Tween.","parameters":[],"returns":{"type":"Phaser.TweenData","description":"This Tween object."}},{"name":"update","description":"Updates this Tween. This is called automatically by Phaser.Tween.","parameters":[{"name":"time","type":"number","description":"A timestamp passed in by the Tween parent.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The current status of this Tween. One of the Phaser.TweenData constants: PENDING, RUNNING, LOOPED or COMPLETE."}},{"name":"generateData","description":"This will generate an array populated with the tweened object values from start to end.\rIt works by running the tween simulation at the given frame rate based on the values set-up in Tween.to and Tween.from.\rJust one play through of the tween data is returned, including yoyo if set.","parameters":[{"name":"frameRate","type":"number","description":"The speed in frames per second that the data should be generated at. The higher the value, the larger the array it creates.","default":60,"optional":true,"nullable":""}],"returns":{"type":"array","description":"An array of tweened values."}},{"name":"repeat","description":"Checks if this Tween is meant to repeat or yoyo and handles doing so.","parameters":[],"returns":{"type":"number","description":"Either Phaser.TweenData.LOOPED or Phaser.TweenData.COMPLETE."}}],"members":[{"name":"parent","access":"","virtual":false,"description":"The Tween which owns this TweenData.","type":{"names":["Phaser.Tween"]},"default":""},{"name":"game","access":"","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"vStart","access":"private","virtual":false,"description":"An object containing the values at the start of the tween.","type":{"names":["object"]},"default":""},{"name":"vStartCache","access":"private","virtual":false,"description":"Cached starting values.","type":{"names":["object"]},"default":""},{"name":"vEnd","access":"private","virtual":false,"description":"An object containing the values at the end of the tween.","type":{"names":["object"]},"default":""},{"name":"vEndCache","access":"private","virtual":false,"description":"Cached ending values.","type":{"names":["object"]},"default":""},{"name":"duration","access":"","virtual":false,"description":"The duration of the tween in ms.","type":{"names":["number"]},"default":1000},{"name":"percent","access":"","virtual":false,"description":"A value between 0 and 1 that represents how far through the duration this tween is.","type":{"names":["number"]},"default":""},{"name":"value","access":"","virtual":false,"description":"The current calculated value.","type":{"names":["number"]},"default":""},{"name":"repeatCounter","access":"","virtual":false,"description":"If the Tween is set to repeat this contains the current repeat count.","type":{"names":["number"]},"default":""},{"name":"repeatDelay","access":"","virtual":false,"description":"The amount of time in ms between repeats of this tween.","type":{"names":["number"]},"default":""},{"name":"repeatTotal","access":"","virtual":false,"description":"The total number of times this Tween will repeat.","type":{"names":["number"]},"default":""},{"name":"interpolate","access":"","virtual":false,"description":"True if the Tween will use interpolation (i.e. is an Array to Array tween)","type":{"names":["boolean"]},"default":""},{"name":"yoyo","access":"","virtual":false,"description":"True if the Tween is set to yoyo, otherwise false.","type":{"names":["boolean"]},"default":""},{"name":"yoyoDelay","access":"","virtual":false,"description":"The amount of time in ms between yoyos of this tween.","type":{"names":["number"]},"default":""},{"name":"inReverse","access":"","virtual":false,"description":"When a Tween is yoyoing this value holds if it's currently playing forwards (false) or in reverse (true).","type":{"names":["boolean"]},"default":""},{"name":"delay","access":"","virtual":false,"description":"The amount to delay by until the Tween starts (in ms). Only applies to the start, use repeatDelay to handle repeats.","type":{"names":["number"]},"default":""},{"name":"dt","access":"","virtual":false,"description":"Current time value.","type":{"names":["number"]},"default":""},{"name":"startTime","access":"","virtual":false,"description":"The time the Tween started or null if it hasn't yet started.","type":{"names":["number"]},"default":""},{"name":"easingFunction","access":"","virtual":false,"description":"The easing function used for the Tween.","type":{"names":["function"]},"default":"Phaser.Easing.Default"},{"name":"interpolationFunction","access":"","virtual":false,"description":"The interpolation function used for the Tween.","type":{"names":["function"]},"default":"Phaser.Math.linearInterpolation"},{"name":"interpolationContext","access":"","virtual":false,"description":"The interpolation function context used for the Tween.","type":{"names":["object"]},"default":"Phaser.Math"},{"name":"isRunning","access":"","virtual":false,"description":"If the tween is running this is set to `true`. Unless Phaser.Tween a TweenData that is waiting for a delay to expire is *not* considered as running.","type":{"names":["boolean"]},"default":""},{"name":"isFrom","access":"","virtual":false,"description":"Is this a from tween or a to tween?","type":{"names":["boolean"]},"default":""},{"name":"PENDING","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"RUNNING","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"LOOPED","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""},{"name":"COMPLETE","access":"","virtual":false,"description":"","type":{"names":["number"]},"default":""}]},{"name":"Phaser.TweenManager","description":"Phaser.Game has a single instance of the TweenManager through which all Tween objects are created and updated.\rTweens are hooked into the game clock and pause system, adjusting based on the game state.\r\rTweenManager is based heavily on tween.js by http://soledadpenades.com.\rThe difference being that tweens belong to a games instance of TweenManager, rather than to a global TWEEN object.\rIt also has callbacks swapped for Signals and a few issues patched with regard to properties and completion errors.\rPlease see https://github.com/sole/tween.js for a full list of contributors.","constructor":{"name":"TweenManager","description":"Phaser.Game has a single instance of the TweenManager through which all Tween objects are created and updated.\rTweens are hooked into the game clock and pause system, adjusting based on the game state.\r\rTweenManager is based heavily on tween.js by http://soledadpenades.com.\rThe difference being that tweens belong to a games instance of TweenManager, rather than to a global TWEEN object.\rIt also has callbacks swapped for Signals and a few issues patched with regard to properties and completion errors.\rPlease see https://github.com/sole/tween.js for a full list of contributors.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""}]},"functions":[{"name":"getAll","description":"Get all the tween objects in an array.","parameters":[],"returns":{"type":"Array.<Phaser.Tween>","description":"Array with all tween objects."}},{"name":"removeAll","description":"Remove all tweens running and in the queue. Doesn't call any of the tween onComplete events.","parameters":[]},{"name":"removeFrom","description":"Remove all tweens from a specific object, array of objects or Group.","parameters":[{"name":"obj","type":["object","Array.<object>","Phaser.Group"],"description":"The object you want to remove the tweens from.","default":"","optional":"","nullable":""},{"name":"children","type":"boolean","description":"If passing a group, setting this to true will remove the tweens from all of its children instead of the group itself.","default":true,"optional":true,"nullable":""}]},{"name":"add","description":"Add a new tween into the TweenManager.","parameters":[{"name":"tween","type":"Phaser.Tween","description":"The tween object you want to add.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Tween","description":"The tween object you added to the manager."}},{"name":"create","description":"Create a tween object for a specific object. The object can be any JavaScript object or Phaser object such as Sprite.","parameters":[{"name":"object","type":"object","description":"Object the tween will be run on.","default":"","optional":"","nullable":""}],"returns":{"type":"Phaser.Tween","description":"The newly created tween object."}},{"name":"remove","description":"Remove a tween from this manager.","parameters":[{"name":"tween","type":"Phaser.Tween","description":"The tween object you want to remove.","default":"","optional":"","nullable":""}]},{"name":"update","description":"Update all the tween objects you added to this manager.","parameters":[],"returns":{"type":"boolean","description":"Return false if there's no tween to update, otherwise return true."}},{"name":"isTweening","description":"Checks to see if a particular Sprite is currently being tweened.","parameters":[{"name":"object","type":"object","description":"The object to check for tweens against.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"Returns true if the object is currently being tweened, false if not."}},{"name":"_pauseAll","description":"Private. Called by game focus loss. Pauses all currently running tweens.","parameters":[]},{"name":"_resumeAll","description":"Private. Called by game focus loss. Resumes all currently paused tweens.","parameters":[]},{"name":"pauseAll","description":"Pauses all currently running tweens.","parameters":[]},{"name":"resumeAll","description":"Resumes all currently paused tweens.","parameters":[]}],"members":[{"name":"game","access":"","virtual":false,"description":"Local reference to game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"frameBased","access":"","virtual":false,"description":"Are all newly created Tweens frame or time based? A frame based tween will use the physics elapsed timer when updating. This means\rit will retain the same consistent frame rate, regardless of the speed of the device. The duration value given should\rbe given in frames.\r\rIf the Tween uses a time based update (which is the default) then the duration is given in milliseconds.\rIn this situation a 2000ms tween will last exactly 2 seconds, regardless of the device and how many visual updates the tween\rhas actually been through. For very short tweens you may wish to experiment with a frame based update instead.","type":{"names":["boolean"]},"default":""},{"name":"_tweens","access":"private","virtual":false,"description":"All of the currently running tweens.","type":{"names":["array.<Phaser.Tween>"]},"default":""},{"name":"_add","access":"private","virtual":false,"description":"All of the tweens queued to be added in the next update.","type":{"names":["array.<Phaser.Tween>"]},"default":""}]},{"name":"Phaser.ArraySet","description":"ArraySet is a Set data structure (items must be unique within the set) that also maintains order.\rThis allows specific items to be easily added or removed from the Set.\r\rItem equality (and uniqueness) is determined by the behavior of `Array.indexOf`.\r\rThis used primarily by the Input subsystem.","constructor":{"name":"ArraySet","description":"ArraySet is a Set data structure (items must be unique within the set) that also maintains order.\rThis allows specific items to be easily added or removed from the Set.\r\rItem equality (and uniqueness) is determined by the behavior of `Array.indexOf`.\r\rThis used primarily by the Input subsystem.","parameters":[{"name":"list","type":"Array.<any>","description":"The backing array: if specified the items in the list _must_ be unique, per `Array.indexOf`, and the ownership of the array _should_ be relinquished to the ArraySet.","default":"(new array)","optional":true,"nullable":""}]},"functions":[{"name":"add","description":"Adds a new element to the end of the list.\rIf the item already exists in the list it is not moved.","parameters":[{"name":"item","type":"any","description":"The element to add to this list.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The item that was added."}},{"name":"getIndex","description":"Gets the index of the item in the list, or -1 if it isn't in the list.","parameters":[{"name":"item","type":"any","description":"The element to get the list index for.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The index of the item or -1 if not found."}},{"name":"getByKey","description":"Gets an item from the set based on the property strictly equaling the value given.\rReturns null if not found.","parameters":[{"name":"property","type":"string","description":"The property to check against the value.","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value to check if the property strictly equals.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The item that was found, or null if nothing matched."}},{"name":"exists","description":"Checks for the item within this list.","parameters":[{"name":"item","type":"any","description":"The element to get the list index for.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the item is found in the list, otherwise false."}},{"name":"reset","description":"Removes all the items.","parameters":[]},{"name":"remove","description":"Removes the given element from this list if it exists.","parameters":[{"name":"item","type":"any","description":"The item to be removed from the list.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"item - The item that was removed."}},{"name":"setAll","description":"Sets the property `key` to the given value on all members of this list.","parameters":[{"name":"key","type":"any","description":"The property of the item to set.","default":"","optional":"","nullable":""},{"name":"value","type":"any","description":"The value to set the property to.","default":"","optional":"","nullable":""}]},{"name":"callAll","description":"Calls a function on all members of this list, using the member as the context for the callback.\r\rIf the `key` property is present it must be a function.\rThe function is invoked using the item as the context.","parameters":[{"name":"key","type":"string","description":"The name of the property with the function to call.","default":"","optional":"","nullable":""},{"name":"parameter","type":"*","description":"Additional parameters that will be passed to the callback.","default":"","optional":"","nullable":""}]},{"name":"removeAll","description":"Removes every member from this ArraySet and optionally destroys it.","parameters":[{"name":"destroy","type":"boolean","description":"Call `destroy` on each member as it's removed from this set.","default":"","optional":true,"nullable":""}]}],"members":[{"name":"position","access":"","virtual":false,"description":"Current cursor position as established by `first` and `next`.","type":{"names":["integer"]},"default":""},{"name":"list","access":"","virtual":false,"description":"The backing array.","type":{"names":["Array.<any>"]},"default":""},{"name":"total","access":"","virtual":false,"description":"Number of items in the ArraySet. Same as `list.length`.","type":{"names":["integer"]},"default":""},{"name":"first","access":"","virtual":false,"description":"Returns the first item and resets the cursor to the start.","type":{"names":["any"]},"default":""},{"name":"next","access":"","virtual":false,"description":"Returns the the next item (based on the cursor) and advances the cursor.","type":{"names":["any"]},"default":""}]},{"name":"Phaser.ArrayUtils","description":"Utility functions for dealing with Arrays.","constructor":{"name":"ArrayUtils","description":"Utility functions for dealing with Arrays.","parameters":[]},"functions":[{"name":"getRandomItem","description":"Fetch a random entry from the given array.\r\rWill return null if there are no array items that fall within the specified range\ror if there is no item for the randomly chosen index.","parameters":[{"name":"objects","type":"Array.<any>","description":"An array of objects.","default":"","optional":"","nullable":""},{"name":"startIndex","type":"integer","description":"Optional offset off the front of the array. Default value is 0, or the beginning of the array.","default":"","optional":"","nullable":""},{"name":"length","type":"integer","description":"Optional restriction on the number of values you want to randomly select from.","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"The random object that was selected."}},{"name":"removeRandomItem","description":"Removes a random object from the given array and returns it.\r\rWill return null if there are no array items that fall within the specified range\ror if there is no item for the randomly chosen index.","parameters":[{"name":"objects","type":"Array.<any>","description":"An array of objects.","default":"","optional":"","nullable":""},{"name":"startIndex","type":"integer","description":"Optional offset off the front of the array. Default value is 0, or the beginning of the array.","default":"","optional":"","nullable":""},{"name":"length","type":"integer","description":"Optional restriction on the number of values you want to randomly select from.","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"The random object that was removed."}},{"name":"shuffle","description":"A standard Fisher-Yates Array shuffle implementation which modifies the array in place.","parameters":[{"name":"array","type":"Array.<any>","description":"The array to shuffle.","default":"","optional":"","nullable":""}],"returns":{"type":"Array.<any>","description":"The original array, now shuffled."}},{"name":"transposeMatrix","description":"Transposes the elements of the given matrix (array of arrays).","parameters":[{"name":"array","type":"Array.<Array.<any>>","description":"The matrix to transpose.","default":"","optional":"","nullable":""}],"returns":{"type":"Array.<Array.<any>>","description":"A new transposed matrix"}},{"name":"rotateMatrix","description":"Rotates the given matrix (array of arrays).\r\rBased on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}.","parameters":[{"name":"matrix","type":"Array.<Array.<any>>","description":"The array to rotate; this matrix _may_ be altered.","default":"","optional":"","nullable":""},{"name":"direction","type":["number","string"],"description":"The amount to rotate: the rotation in degrees (90, -90, 270, -270, 180) or a string command ('rotateLeft', 'rotateRight' or 'rotate180').","default":"","optional":"","nullable":""}],"returns":{"type":"Array.<Array.<any>>","description":"The rotated matrix. The source matrix should be discarded for the returned matrix."}},{"name":"findClosest","description":"Snaps a value to the nearest value in an array.\rThe result will always be in the range `[first_value, last_value]`.","parameters":[{"name":"value","type":"number","description":"The search value","default":"","optional":"","nullable":""},{"name":"arr","type":"Array.<number>","description":"The input array which _must_ be sorted.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The nearest value found."}},{"name":"rotateRight","description":"Moves the element from the end of the array to the start, shifting all items in the process.\rThe \"rotation\" happens to the right.\r\rBefore: `[ A, B, C, D, E, F ]`\rAfter: `[ F, A, B, C, D, E ]`\r\rSee also Phaser.ArrayUtils.rotateLeft.","parameters":[{"name":"array","type":"Array.<any>","description":"The array to rotate. The array is modified.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The shifted value."}},{"name":"rotateLeft","description":"Moves the element from the start of the array to the end, shifting all items in the process.\rThe \"rotation\" happens to the left.\r\rBefore: `[ A, B, C, D, E, F ]`\rAfter: `[ B, C, D, E, F, A ]`\r\rSee also Phaser.ArrayUtils.rotateRight","parameters":[{"name":"array","type":"Array.<any>","description":"The array to rotate. The array is modified.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The rotated value."}},{"name":"rotate","description":"Moves the element from the start of the array to the end, shifting all items in the process.\rThe \"rotation\" happens to the left.\r\rBefore: `[ A, B, C, D, E, F ]`\rAfter: `[ B, C, D, E, F, A ]`\r\rSee also Phaser.ArrayUtils.rotateRight","parameters":[{"name":"array","type":"Array.<any>","description":"The array to rotate. The array is modified.","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The rotated value."}},{"name":"numberArray","description":"Create an array representing the inclusive range of numbers (usually integers) in `[start, end]`.\rThis is equivalent to `numberArrayStep(start, end, 1)`.","parameters":[{"name":"start","type":"number","description":"The minimum value the array starts with.","default":"","optional":"","nullable":""},{"name":"end","type":"number","description":"The maximum value the array contains.","default":"","optional":"","nullable":""}],"returns":{"type":"Array.<number>","description":"The array of number values."}},{"name":"numberArrayStep","description":"Create an array of numbers (positive and/or negative) progressing from `start`\rup to but not including `end` by advancing by `step`.\r\rIf `start` is less than `end` a zero-length range is created unless a negative `step` is specified.\r\rCertain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0;\rfor forward compatibility make sure to pass in actual numbers.","parameters":[{"name":"start","type":"number","description":"The start of the range.","default":"","optional":"","nullable":""},{"name":"end","type":"number","description":"The end of the range.","default":"","optional":true,"nullable":""},{"name":"step","type":"number","description":"The value to increment or decrement by.","default":1,"optional":true,"nullable":""}],"returns":{"type":"Array","description":"Returns the new array of numbers."}}],"members":[]},{"name":"Phaser.Canvas","description":"The Canvas class handles everything related to creating the `canvas` DOM tag that Phaser will use, \rincluding styles, offset and aspect ratio.","constructor":{"name":"Canvas","description":"The Canvas class handles everything related to creating the `canvas` DOM tag that Phaser will use, \rincluding styles, offset and aspect ratio.","parameters":[]},"functions":[{"name":"create","description":"Creates a `canvas` DOM element. The element is not automatically added to the document.","parameters":[{"name":"parent","type":"object","description":"The object that will own the canvas that is created.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The width of the canvas element.","default":256,"optional":true,"nullable":""},{"name":"height","type":"number","description":"The height of the canvas element..","default":256,"optional":true,"nullable":""},{"name":"id","type":"string","description":"If specified, and not the empty string, this will be set as the ID of the canvas element. Otherwise no ID will be set.","default":"(none)","optional":true,"nullable":""},{"name":"skipPool","type":"boolean","description":"If `true` the canvas will not be placed in the CanvasPool global.","default":"","optional":true,"nullable":""}],"returns":{"type":"HTMLCanvasElement","description":"The newly created canvas element."}},{"name":"setBackgroundColor","description":"Sets the background color behind the canvas. This changes the canvas style property.","parameters":[{"name":"canvas","type":"HTMLCanvasElement","description":"The canvas to set the background color on.","default":"","optional":"","nullable":""},{"name":"color","type":"string","description":"The color to set. Can be in the format 'rgb(r,g,b)', or '#RRGGBB' or any valid CSS color.","default":"'rgb(0,0,0)'","optional":true,"nullable":""}],"returns":{"type":"HTMLCanvasElement","description":"Returns the source canvas."}},{"name":"setTouchAction","description":"Sets the touch-action property on the canvas style. Can be used to disable default browser touch actions.","parameters":[{"name":"canvas","type":"HTMLCanvasElement","description":"The canvas to set the touch action on.","default":"","optional":"","nullable":""},{"name":"value","type":"string","description":"The touch action to set. Defaults to 'none'.","default":"","optional":true,"nullable":""}],"returns":{"type":"HTMLCanvasElement","description":"The source canvas."}},{"name":"setUserSelect","description":"Sets the user-select property on the canvas style. Can be used to disable default browser selection actions.","parameters":[{"name":"canvas","type":"HTMLCanvasElement","description":"The canvas to set the touch action on.","default":"","optional":"","nullable":""},{"name":"value","type":"string","description":"The touch action to set. Defaults to 'none'.","default":"","optional":true,"nullable":""}],"returns":{"type":"HTMLCanvasElement","description":"The source canvas."}},{"name":"addToDOM","description":"Adds the given canvas element to the DOM. The canvas will be added as a child of the given parent.\rIf no parent is given it will be added as a child of the document.body.","parameters":[{"name":"canvas","type":"HTMLCanvasElement","description":"The canvas to be added to the DOM.","default":"","optional":"","nullable":""},{"name":"parent","type":["string","HTMLElement"],"description":"The DOM element to add the canvas to.","default":"","optional":"","nullable":""},{"name":"overflowHidden","type":"boolean","description":"If set to true it will add the overflow='hidden' style to the parent DOM element.","default":true,"optional":true,"nullable":""}],"returns":{"type":"HTMLCanvasElement","description":"Returns the source canvas."}},{"name":"removeFromDOM","description":"Removes the given canvas element from the DOM.","parameters":[{"name":"canvas","type":"HTMLCanvasElement","description":"The canvas to be removed from the DOM.","default":"","optional":"","nullable":""}]},{"name":"setTransform","description":"Sets the transform of the given canvas to the matrix values provided.","parameters":[{"name":"context","type":"CanvasRenderingContext2D","description":"The context to set the transform on.","default":"","optional":"","nullable":""},{"name":"translateX","type":"number","description":"The value to translate horizontally by.","default":"","optional":"","nullable":""},{"name":"translateY","type":"number","description":"The value to translate vertically by.","default":"","optional":"","nullable":""},{"name":"scaleX","type":"number","description":"The value to scale horizontally by.","default":"","optional":"","nullable":""},{"name":"scaleY","type":"number","description":"The value to scale vertically by.","default":"","optional":"","nullable":""},{"name":"skewX","type":"number","description":"The value to skew horizontaly by.","default":"","optional":"","nullable":""},{"name":"skewY","type":"number","description":"The value to skew vertically by.","default":"","optional":"","nullable":""}],"returns":{"type":"CanvasRenderingContext2D","description":"Returns the source context."}},{"name":"setSmoothingEnabled","description":"Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\rBy default browsers have image smoothing enabled, which isn't always what you visually want, especially\rwhen using pixel art in a game. Note that this sets the property on the context itself, so that any image\rdrawn to the context will be affected. This sets the property across all current browsers but support is\rpatchy on earlier browsers, especially on mobile.","parameters":[{"name":"context","type":"CanvasRenderingContext2D","description":"The context to enable or disable the image smoothing on.","default":"","optional":"","nullable":""},{"name":"value","type":"boolean","description":"If set to true it will enable image smoothing, false will disable it.","default":"","optional":"","nullable":""}],"returns":{"type":"CanvasRenderingContext2D","description":"Returns the source context."}},{"name":"getSmoothingPrefix","description":"Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set.","parameters":[{"name":"context","type":"CanvasRenderingContext2D","description":"The context to enable or disable the image smoothing on.","default":"","optional":"","nullable":""}],"returns":{"type":["string","null"],"description":"Returns the smoothingEnabled vendor prefix, or null if not set on the context."}},{"name":"getSmoothingEnabled","description":"Returns `true` if the given context has image smoothing enabled, otherwise returns `false`.","parameters":[{"name":"context","type":"CanvasRenderingContext2D","description":"The context to check for smoothing on.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the given context has image smoothing enabled, otherwise false."}},{"name":"setImageRenderingCrisp","description":"Sets the CSS image-rendering property on the given canvas to be 'crisp' (aka 'optimize contrast' on webkit).\rNote that if this doesn't given the desired result then see the setSmoothingEnabled.","parameters":[{"name":"canvas","type":"HTMLCanvasElement","description":"The canvas to set image-rendering crisp on.","default":"","optional":"","nullable":""}],"returns":{"type":"HTMLCanvasElement","description":"Returns the source canvas."}},{"name":"setImageRenderingBicubic","description":"Sets the CSS image-rendering property on the given canvas to be 'bicubic' (aka 'auto').\rNote that if this doesn't given the desired result then see the CanvasUtils.setSmoothingEnabled method.","parameters":[{"name":"canvas","type":"HTMLCanvasElement","description":"The canvas to set image-rendering bicubic on.","default":"","optional":"","nullable":""}],"returns":{"type":"HTMLCanvasElement","description":"Returns the source canvas."}}],"members":[]},{"name":"Phaser.CanvasPool","description":"The CanvasPool is a global static object, that allows Phaser to recycle and pool Canvas DOM elements.","constructor":{"name":"CanvasPool","description":"The CanvasPool is a global static object, that allows Phaser to recycle and pool Canvas DOM elements.","parameters":[]},"functions":[{"name":"create","description":"Creates a new Canvas DOM element, or pulls one from the pool if free.","parameters":[{"name":"parent","type":"any","description":"The parent of the canvas element.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The width of the canvas element.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The height of the canvas element.","default":"","optional":"","nullable":""}],"returns":{"type":"HTMLCanvasElement","description":"The canvas element."}},{"name":"getFirst","description":"Gets the first free canvas index from the pool.","parameters":[],"returns":{"type":"number","description":""}},{"name":"remove","description":"Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use.\rThe canvas has its width and height set to 1, and its parent attribute nulled.","parameters":[{"name":"parent","type":"any","description":"The parent of the canvas element.","default":"","optional":"","nullable":""}]},{"name":"removeByCanvas","description":"Looks up a canvas based on its type, and if found puts it back in the pool, freeing it up for re-use.\rThe canvas has its width and height set to 1, and its parent attribute nulled.","parameters":[{"name":"canvas","type":"HTMLCanvasElement","description":"The canvas element to remove.","default":"","optional":"","nullable":""}]},{"name":"getTotal","description":"Gets the total number of used canvas elements in the pool.","parameters":[],"returns":{"type":"number","description":"The number of in-use (parented) canvas elements in the pool."}},{"name":"getFree","description":"Gets the total number of free canvas elements in the pool.","parameters":[],"returns":{"type":"number","description":"The number of free (un-parented) canvas elements in the pool."}}],"members":[{"name":"pool","access":"","virtual":false,"description":"The pool into which the canvas elements are placed.","type":{"names":["Array"]},"default":""}]},{"name":"Phaser.Color","description":"The Phaser.Color class is a set of static methods that assist in color manipulation and conversion.","constructor":{"name":"Color","description":"The Phaser.Color class is a set of static methods that assist in color manipulation and conversion.","parameters":[]},"functions":[{"name":"packPixel","description":"Packs the r, g, b, a components into a single integer, for use with Int32Array.\rIf device is little endian then ABGR order is used. Otherwise RGBA order is used.","parameters":[{"name":"r","type":"number","description":"The red color component, in the range 0 - 255.","default":"","optional":"","nullable":""},{"name":"g","type":"number","description":"The green color component, in the range 0 - 255.","default":"","optional":"","nullable":""},{"name":"b","type":"number","description":"The blue color component, in the range 0 - 255.","default":"","optional":"","nullable":""},{"name":"a","type":"number","description":"The alpha color component, in the range 0 - 255.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The packed color as uint32"}},{"name":"unpackPixel","description":"Unpacks the r, g, b, a components into the specified color object, or a new\robject, for use with Int32Array. If little endian, then ABGR order is used when\runpacking, otherwise, RGBA order is used. The resulting color object has the\r`r, g, b, a` properties which are unrelated to endianness.\r\rNote that the integer is assumed to be packed in the correct endianness. On little-endian\rthe format is 0xAABBGGRR and on big-endian the format is 0xRRGGBBAA. If you want a\rendian-independent method, use fromRGBA(rgba) and toRGBA(r, g, b, a).","parameters":[{"name":"rgba","type":"number","description":"The integer, packed in endian order by packPixel.","default":"","optional":"","nullable":""},{"name":"out","type":"object","description":"An object into which 3 properties will be created: r, g and b. If not provided a new object will be created.","default":"","optional":true,"nullable":""},{"name":"hsl","type":"boolean","description":"Also convert the rgb values into hsl?","default":"","optional":true,"nullable":""},{"name":"hsv","type":"boolean","description":"Also convert the rgb values into hsv?","default":"","optional":true,"nullable":""}],"returns":{"type":"object","description":"An object with the red, green and blue values set in the r, g and b properties."}},{"name":"fromRGBA","description":"A utility to convert an integer in 0xRRGGBBAA format to a color object.\rThis does not rely on endianness.","parameters":[{"name":"rgba","type":"number","description":"An RGBA hex","default":"","optional":"","nullable":""},{"name":"out","type":"object","description":"The object to use, optional.","default":"","optional":true,"nullable":""}],"returns":{"type":"object","description":"A color object."}},{"name":"toRGBA","description":"A utility to convert RGBA components to a 32 bit integer in RRGGBBAA format.","parameters":[{"name":"r","type":"number","description":"The red color component, in the range 0 - 255.","default":"","optional":"","nullable":""},{"name":"g","type":"number","description":"The green color component, in the range 0 - 255.","default":"","optional":"","nullable":""},{"name":"b","type":"number","description":"The blue color component, in the range 0 - 255.","default":"","optional":"","nullable":""},{"name":"a","type":"number","description":"The alpha color component, in the range 0 - 255.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"A RGBA-packed 32 bit integer"}},{"name":"toABGR","description":"Converts RGBA components to a 32 bit integer in AABBGGRR format.","parameters":[{"name":"r","type":"number","description":"The red color component, in the range 0 - 255.","default":"","optional":"","nullable":""},{"name":"g","type":"number","description":"The green color component, in the range 0 - 255.","default":"","optional":"","nullable":""},{"name":"b","type":"number","description":"The blue color component, in the range 0 - 255.","default":"","optional":"","nullable":""},{"name":"a","type":"number","description":"The alpha color component, in the range 0 - 255.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"A RGBA-packed 32 bit integer"}},{"name":"hexToRGBArray","description":"Converts a hex color value to an [R, G, B] array.","parameters":[{"name":"color","type":"number","description":"The color to convert to an RGB array. In the format 0xRRGGBB.","default":"","optional":"","nullable":""}],"returns":{"type":"array","description":"An array with element 0 containing the Red value, 1 containing Green, and 2 containing Blue."}},{"name":"RGBArrayToHex","description":"Converts an RGB color array, in the format: [R, G, B], to a hex color value.","parameters":[{"name":"rgb","type":"array","description":"An array with element 0 containing the Red value, 1 containing Green, and 2 containing Blue.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The color value, in the format 0xRRGGBB."}},{"name":"RGBtoHSL","description":"Converts an RGB color value to HSL (hue, saturation and lightness).\rConversion forumla from http://en.wikipedia.org/wiki/HSL_color_space.\rAssumes RGB values are contained in the set [0, 255] and returns h, s and l in the set [0, 1].\rBased on code by Michael Jackson (https://github.com/mjijackson)","parameters":[{"name":"r","type":"number","description":"The red color component, in the range 0 - 255.","default":"","optional":"","nullable":""},{"name":"g","type":"number","description":"The green color component, in the range 0 - 255.","default":"","optional":"","nullable":""},{"name":"b","type":"number","description":"The blue color component, in the range 0 - 255.","default":"","optional":"","nullable":""},{"name":"out","type":"object","description":"An object into which 3 properties will be created, h, s and l. If not provided a new object will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"object","description":"An object with the hue, saturation and lightness values set in the h, s and l properties."}},{"name":"HSLtoRGB","description":"Converts an HSL (hue, saturation and lightness) color value to RGB.\rConversion forumla from http://en.wikipedia.org/wiki/HSL_color_space.\rAssumes HSL values are contained in the set [0, 1] and returns r, g and b values in the set [0, 255].\rBased on code by Michael Jackson (https://github.com/mjijackson)","parameters":[{"name":"h","type":"number","description":"The hue, in the range 0 - 1.","default":"","optional":"","nullable":""},{"name":"s","type":"number","description":"The saturation, in the range 0 - 1.","default":"","optional":"","nullable":""},{"name":"l","type":"number","description":"The lightness, in the range 0 - 1.","default":"","optional":"","nullable":""},{"name":"out","type":"object","description":"An object into which 3 properties will be created: r, g and b. If not provided a new object will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"object","description":"An object with the red, green and blue values set in the r, g and b properties."}},{"name":"RGBtoHSV","description":"Converts an RGB color value to HSV (hue, saturation and value).\rConversion forumla from http://en.wikipedia.org/wiki/HSL_color_space.\rAssumes RGB values are contained in the set [0, 255] and returns h, s and v in the set [0, 1].\rBased on code by Michael Jackson (https://github.com/mjijackson)","parameters":[{"name":"r","type":"number","description":"The red color component, in the range 0 - 255.","default":"","optional":"","nullable":""},{"name":"g","type":"number","description":"The green color component, in the range 0 - 255.","default":"","optional":"","nullable":""},{"name":"b","type":"number","description":"The blue color component, in the range 0 - 255.","default":"","optional":"","nullable":""},{"name":"out","type":"object","description":"An object into which 3 properties will be created, h, s and v. If not provided a new object will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"object","description":"An object with the hue, saturation and value set in the h, s and v properties."}},{"name":"HSVtoRGB","description":"Converts an HSV (hue, saturation and value) color value to RGB.\rConversion forumla from http://en.wikipedia.org/wiki/HSL_color_space.\rAssumes HSV values are contained in the set [0, 1] and returns r, g and b values in the set [0, 255].\rBased on code by Michael Jackson (https://github.com/mjijackson)","parameters":[{"name":"h","type":"number","description":"The hue, in the range 0 - 1.","default":"","optional":"","nullable":""},{"name":"s","type":"number","description":"The saturation, in the range 0 - 1.","default":"","optional":"","nullable":""},{"name":"v","type":"number","description":"The value, in the range 0 - 1.","default":"","optional":"","nullable":""},{"name":"out","type":"object","description":"An object into which 3 properties will be created: r, g and b. If not provided a new object will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"object","description":"An object with the red, green and blue values set in the r, g and b properties."}},{"name":"hueToColor","description":"Converts a hue to an RGB color.\rBased on code by Michael Jackson (https://github.com/mjijackson)","parameters":[{"name":"p","type":"number","description":"","default":"","optional":"","nullable":""},{"name":"q","type":"number","description":"","default":"","optional":"","nullable":""},{"name":"t","type":"number","description":"","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The color component value."}},{"name":"createColor","description":"A utility function to create a lightweight 'color' object with the default components.\rAny components that are not specified will default to zero.\r\rThis is useful when you want to use a shared color object for the getPixel and getPixelAt methods.","parameters":[{"name":"r","type":"number","description":"The red color component, in the range 0 - 255.","default":"","optional":true,"nullable":""},{"name":"g","type":"number","description":"The green color component, in the range 0 - 255.","default":"","optional":true,"nullable":""},{"name":"b","type":"number","description":"The blue color component, in the range 0 - 255.","default":"","optional":true,"nullable":""},{"name":"a","type":"number","description":"The alpha color component, in the range 0 - 1.","default":1,"optional":true,"nullable":""},{"name":"h","type":"number","description":"The hue, in the range 0 - 1.","default":"","optional":true,"nullable":""},{"name":"s","type":"number","description":"The saturation, in the range 0 - 1.","default":"","optional":true,"nullable":""},{"name":"l","type":"number","description":"The lightness, in the range 0 - 1.","default":"","optional":true,"nullable":""},{"name":"v","type":"number","description":"The value, in the range 0 - 1.","default":"","optional":true,"nullable":""}],"returns":{"type":"object","description":"The resulting object with r, g, b, a properties and h, s, l and v."}},{"name":"updateColor","description":"Takes a color object and updates the rgba, color and color32 properties.","parameters":[{"name":"out","type":"object","description":"The color object to update.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"A native color value integer (format: 0xAARRGGBB)."}},{"name":"getColor32","description":"Given an alpha and 3 color values this will return an integer representation of it.","parameters":[{"name":"a","type":"number","description":"The alpha color component, in the range 0 - 255.","default":"","optional":"","nullable":""},{"name":"r","type":"number","description":"The red color component, in the range 0 - 255.","default":"","optional":"","nullable":""},{"name":"g","type":"number","description":"The green color component, in the range 0 - 255.","default":"","optional":"","nullable":""},{"name":"b","type":"number","description":"The blue color component, in the range 0 - 255.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"A native color value integer (format: 0xAARRGGBB)."}},{"name":"getColor","description":"Given 3 color values this will return an integer representation of it.","parameters":[{"name":"r","type":"number","description":"The red color component, in the range 0 - 255.","default":"","optional":"","nullable":""},{"name":"g","type":"number","description":"The green color component, in the range 0 - 255.","default":"","optional":"","nullable":""},{"name":"b","type":"number","description":"The blue color component, in the range 0 - 255.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"A native color value integer (format: 0xRRGGBB)."}},{"name":"RGBtoString","description":"Converts the given color values into a string.\rIf prefix was '#' it will be in the format `#RRGGBB` otherwise `0xAARRGGBB`.","parameters":[{"name":"r","type":"number","description":"The red color component, in the range 0 - 255.","default":"","optional":"","nullable":""},{"name":"g","type":"number","description":"The green color component, in the range 0 - 255.","default":"","optional":"","nullable":""},{"name":"b","type":"number","description":"The blue color component, in the range 0 - 255.","default":"","optional":"","nullable":""},{"name":"a","type":"number","description":"The alpha color component, in the range 0 - 255.","default":255,"optional":true,"nullable":""},{"name":"prefix","type":"string","description":"The prefix used in the return string. If '#' it will return `#RRGGBB`, else `0xAARRGGBB`.","default":"'#'","optional":true,"nullable":""}],"returns":{"type":"string","description":"A string containing the color values. If prefix was '#' it will be in the format `#RRGGBB` otherwise `0xAARRGGBB`."}},{"name":"hexToRGB","description":"Converts a hex string into an integer color value.","parameters":[{"name":"hex","type":"string","description":"The hex string to convert. Can be in the short-hand format `#03f` or `#0033ff`.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The rgb color value in the format 0xAARRGGBB."}},{"name":"hexToColor","description":"Converts a hex string into a Phaser Color object.\r\rThe hex string can supplied as `'#0033ff'` or the short-hand format of `'#03f'`; it can begin with an optional \"#\" or \"0x\", or be unprefixed.    \r\rAn alpha channel is _not_ supported.","parameters":[{"name":"hex","type":"string","description":"The color string in a hex format.","default":"","optional":"","nullable":""},{"name":"out","type":"object","description":"An object into which 3 properties will be created or set: r, g and b. If not provided a new object will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"object","description":"An object with the red, green and blue values set in the r, g and b properties."}},{"name":"webToColor","description":"Converts a CSS 'web' string into a Phaser Color object.\r\rThe web string can be in the format `'rgb(r,g,b)'` or `'rgba(r,g,b,a)'` where r/g/b are in the range [0..255] and a is in the range [0..1].","parameters":[{"name":"web","type":"string","description":"The color string in CSS 'web' format.","default":"","optional":"","nullable":""},{"name":"out","type":"object","description":"An object into which 4 properties will be created: r, g, b and a. If not provided a new object will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"object","description":"An object with the red, green, blue and alpha values set in the r, g, b and a properties."}},{"name":"valueToColor","description":"Converts a value - a \"hex\" string, a \"CSS 'web' string\", or a number - into red, green, blue, and alpha components.\r\rThe value can be a string (see `hexToColor` and `webToColor` for the supported formats) or a packed integer (see `getRGB`).\r\rAn alpha channel is _not_ supported when specifying a hex string.","parameters":[{"name":"value","type":["string","number"],"description":"The color expressed as a recognized string format or a packed integer.","default":"","optional":"","nullable":""},{"name":"out","type":"object","description":"The object to use for the output. If not provided a new object will be created.","default":"","optional":true,"nullable":""}],"returns":{"type":"object","description":"The (`out`) object with the red, green, blue, and alpha values set as the r/g/b/a properties."}},{"name":"componentToHex","description":"Return a string containing a hex representation of the given color component.","parameters":[{"name":"color","type":"number","description":"The color channel to get the hex value for, must be a value between 0 and 255.","default":"","optional":"","nullable":""}],"returns":{"type":"string","description":"A string of length 2 characters, i.e. 255 = ff, 100 = 64."}},{"name":"HSVColorWheel","description":"Get HSV color wheel values in an array which will be 360 elements in size.","parameters":[{"name":"s","type":"number","description":"The saturation, in the range 0 - 1.","default":1,"optional":true,"nullable":""},{"name":"v","type":"number","description":"The value, in the range 0 - 1.","default":1,"optional":true,"nullable":""}],"returns":{"type":"array","description":"An array containing 360 elements corresponding to the HSV color wheel."}},{"name":"HSLColorWheel","description":"Get HSL color wheel values in an array which will be 360 elements in size.","parameters":[{"name":"s","type":"number","description":"The saturation, in the range 0 - 1.","default":0.5,"optional":true,"nullable":""},{"name":"l","type":"number","description":"The lightness, in the range 0 - 1.","default":0.5,"optional":true,"nullable":""}],"returns":{"type":"array","description":"An array containing 360 elements corresponding to the HSL color wheel."}},{"name":"interpolateColor","description":"Interpolates the two given colours based on the supplied step and currentStep properties.","parameters":[{"name":"color1","type":"number","description":"The first color value.","default":"","optional":"","nullable":""},{"name":"color2","type":"number","description":"The second color value.","default":"","optional":"","nullable":""},{"name":"steps","type":"number","description":"The number of steps to run the interpolation over.","default":"","optional":"","nullable":""},{"name":"currentStep","type":"number","description":"The currentStep value. If the interpolation will take 100 steps, a currentStep value of 50 would be half-way between the two.","default":"","optional":"","nullable":""},{"name":"alpha","type":"number","description":"The alpha of the returned color.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The interpolated color value."}},{"name":"interpolateColorWithRGB","description":"Interpolates the two given colours based on the supplied step and currentStep properties.","parameters":[{"name":"color","type":"number","description":"The first color value.","default":"","optional":"","nullable":""},{"name":"r","type":"number","description":"The red color value, between 0 and 0xFF (255).","default":"","optional":"","nullable":""},{"name":"g","type":"number","description":"The green color value, between 0 and 0xFF (255).","default":"","optional":"","nullable":""},{"name":"b","type":"number","description":"The blue color value, between 0 and 0xFF (255).","default":"","optional":"","nullable":""},{"name":"steps","type":"number","description":"The number of steps to run the interpolation over.","default":"","optional":"","nullable":""},{"name":"currentStep","type":"number","description":"The currentStep value. If the interpolation will take 100 steps, a currentStep value of 50 would be half-way between the two.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The interpolated color value."}},{"name":"interpolateRGB","description":"Interpolates the two given colours based on the supplied step and currentStep properties.","parameters":[{"name":"r1","type":"number","description":"The red color value, between 0 and 0xFF (255).","default":"","optional":"","nullable":""},{"name":"g1","type":"number","description":"The green color value, between 0 and 0xFF (255).","default":"","optional":"","nullable":""},{"name":"b1","type":"number","description":"The blue color value, between 0 and 0xFF (255).","default":"","optional":"","nullable":""},{"name":"r2","type":"number","description":"The red color value, between 0 and 0xFF (255).","default":"","optional":"","nullable":""},{"name":"g2","type":"number","description":"The green color value, between 0 and 0xFF (255).","default":"","optional":"","nullable":""},{"name":"b2","type":"number","description":"The blue color value, between 0 and 0xFF (255).","default":"","optional":"","nullable":""},{"name":"steps","type":"number","description":"The number of steps to run the interpolation over.","default":"","optional":"","nullable":""},{"name":"currentStep","type":"number","description":"The currentStep value. If the interpolation will take 100 steps, a currentStep value of 50 would be half-way between the two.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The interpolated color value."}},{"name":"getRandomColor","description":"Returns a random color value between black and white\rSet the min value to start each channel from the given offset.\rSet the max value to restrict the maximum color used per channel.","parameters":[{"name":"min","type":"number","description":"The lowest value to use for the color.","default":"","optional":true,"nullable":""},{"name":"max","type":"number","description":"The highest value to use for the color.","default":255,"optional":true,"nullable":""},{"name":"alpha","type":"number","description":"The alpha value of the returning color (default 255 = fully opaque).","default":255,"optional":true,"nullable":""}],"returns":{"type":"number","description":"32-bit color value with alpha."}},{"name":"getRGB","description":"Return the component parts of a color as an Object with the properties alpha, red, green, blue.\r\rAlpha will only be set if it exist in the given color (0xAARRGGBB)","parameters":[{"name":"color","type":"number","description":"Color in RGB (0xRRGGBB) or ARGB format (0xAARRGGBB).","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"An Object with properties: alpha, red, green, blue (also r, g, b and a). Alpha will only be present if a color value > 16777215 was given."}},{"name":"getWebRGB","description":"Returns a CSS friendly string value from the given color.","parameters":[{"name":"color","type":["number","Object"],"description":"Color in RGB (0xRRGGBB), ARGB format (0xAARRGGBB) or an Object with r, g, b, a properties.","default":"","optional":"","nullable":""}],"returns":{"type":"string","description":"A string in the format: 'rgba(r,g,b,a)'"}},{"name":"getAlpha","description":"Given a native color value (in the format 0xAARRGGBB) this will return the Alpha component, as a value between 0 and 255.","parameters":[{"name":"color","type":"number","description":"In the format 0xAARRGGBB.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The Alpha component of the color, will be between 0 and 1 (0 being no Alpha (opaque), 1 full Alpha (transparent))."}},{"name":"getAlphaFloat","description":"Given a native color value (in the format 0xAARRGGBB) this will return the Alpha component as a value between 0 and 1.","parameters":[{"name":"color","type":"number","description":"In the format 0xAARRGGBB.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The Alpha component of the color, will be between 0 and 1 (0 being no Alpha (opaque), 1 full Alpha (transparent))."}},{"name":"getRed","description":"Given a native color value (in the format 0xAARRGGBB) this will return the Red component, as a value between 0 and 255.","parameters":[{"name":"color","type":"number","description":"In the format 0xAARRGGBB.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The Red component of the color, will be between 0 and 255 (0 being no color, 255 full Red)."}},{"name":"getGreen","description":"Given a native color value (in the format 0xAARRGGBB) this will return the Green component, as a value between 0 and 255.","parameters":[{"name":"color","type":"number","description":"In the format 0xAARRGGBB.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The Green component of the color, will be between 0 and 255 (0 being no color, 255 full Green)."}},{"name":"getBlue","description":"Given a native color value (in the format 0xAARRGGBB) this will return the Blue component, as a value between 0 and 255.","parameters":[{"name":"color","type":"number","description":"In the format 0xAARRGGBB.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The Blue component of the color, will be between 0 and 255 (0 being no color, 255 full Blue)."}},{"name":"blendNormal","description":"Blends the source color, ignoring the backdrop.","parameters":[{"name":"a","type":"integer","description":"The source color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""},{"name":"b","type":"integer","description":"The backdrop color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The blended color value, in the range 1 to 255."}},{"name":"blendLighten","description":"Selects the lighter of the backdrop and source colors.","parameters":[{"name":"a","type":"integer","description":"The source color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""},{"name":"b","type":"integer","description":"The backdrop color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The blended color value, in the range 1 to 255."}},{"name":"blendDarken","description":"Selects the darker of the backdrop and source colors.","parameters":[{"name":"a","type":"integer","description":"The source color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""},{"name":"b","type":"integer","description":"The backdrop color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The blended color value, in the range 1 to 255."}},{"name":"blendMultiply","description":"Multiplies the backdrop and source color values.\rThe result color is always at least as dark as either of the two constituent\rcolors. Multiplying any color with black produces black;\rmultiplying with white leaves the original color unchanged.","parameters":[{"name":"a","type":"integer","description":"The source color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""},{"name":"b","type":"integer","description":"The backdrop color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The blended color value, in the range 1 to 255."}},{"name":"blendAverage","description":"Takes the average of the source and backdrop colors.","parameters":[{"name":"a","type":"integer","description":"The source color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""},{"name":"b","type":"integer","description":"The backdrop color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The blended color value, in the range 1 to 255."}},{"name":"blendAdd","description":"Adds the source and backdrop colors together and returns the value, up to a maximum of 255.","parameters":[{"name":"a","type":"integer","description":"The source color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""},{"name":"b","type":"integer","description":"The backdrop color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The blended color value, in the range 1 to 255."}},{"name":"blendSubtract","description":"Combines the source and backdrop colors and returns their value minus 255.","parameters":[{"name":"a","type":"integer","description":"The source color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""},{"name":"b","type":"integer","description":"The backdrop color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The blended color value, in the range 1 to 255."}},{"name":"blendDifference","description":"Subtracts the darker of the two constituent colors from the lighter.\r\rPainting with white inverts the backdrop color; painting with black produces no change.","parameters":[{"name":"a","type":"integer","description":"The source color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""},{"name":"b","type":"integer","description":"The backdrop color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The blended color value, in the range 1 to 255."}},{"name":"blendNegation","description":"Negation blend mode.","parameters":[{"name":"a","type":"integer","description":"The source color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""},{"name":"b","type":"integer","description":"The backdrop color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The blended color value, in the range 1 to 255."}},{"name":"blendScreen","description":"Multiplies the complements of the backdrop and source color values, then complements the result.\rThe result color is always at least as light as either of the two constituent colors. \rScreening any color with white produces white; screening with black leaves the original color unchanged.","parameters":[{"name":"a","type":"integer","description":"The source color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""},{"name":"b","type":"integer","description":"The backdrop color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The blended color value, in the range 1 to 255."}},{"name":"blendExclusion","description":"Produces an effect similar to that of the Difference mode, but lower in contrast. \rPainting with white inverts the backdrop color; painting with black produces no change.","parameters":[{"name":"a","type":"integer","description":"The source color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""},{"name":"b","type":"integer","description":"The backdrop color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The blended color value, in the range 1 to 255."}},{"name":"blendOverlay","description":"Multiplies or screens the colors, depending on the backdrop color.\rSource colors overlay the backdrop while preserving its highlights and shadows. \rThe backdrop color is not replaced, but is mixed with the source color to reflect the lightness or darkness of the backdrop.","parameters":[{"name":"a","type":"integer","description":"The source color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""},{"name":"b","type":"integer","description":"The backdrop color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The blended color value, in the range 1 to 255."}},{"name":"blendSoftLight","description":"Darkens or lightens the colors, depending on the source color value. \r\rIf the source color is lighter than 0.5, the backdrop is lightened, as if it were dodged; \rthis is useful for adding highlights to a scene. \r\rIf the source color is darker than 0.5, the backdrop is darkened, as if it were burned in. \rThe degree of lightening or darkening is proportional to the difference between the source color and 0.5; \rif it is equal to 0.5, the backdrop is unchanged.\r\rPainting with pure black or white produces a distinctly darker or lighter area, but does not result in pure black or white. \rThe effect is similar to shining a diffused spotlight on the backdrop.","parameters":[{"name":"a","type":"integer","description":"The source color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""},{"name":"b","type":"integer","description":"The backdrop color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The blended color value, in the range 1 to 255."}},{"name":"blendHardLight","description":"Multiplies or screens the colors, depending on the source color value. \r\rIf the source color is lighter than 0.5, the backdrop is lightened, as if it were screened; \rthis is useful for adding highlights to a scene. \r\rIf the source color is darker than 0.5, the backdrop is darkened, as if it were multiplied; \rthis is useful for adding shadows to a scene. \r\rThe degree of lightening or darkening is proportional to the difference between the source color and 0.5; \rif it is equal to 0.5, the backdrop is unchanged.\r\rPainting with pure black or white produces pure black or white. The effect is similar to shining a harsh spotlight on the backdrop.","parameters":[{"name":"a","type":"integer","description":"The source color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""},{"name":"b","type":"integer","description":"The backdrop color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The blended color value, in the range 1 to 255."}},{"name":"blendColorDodge","description":"Brightens the backdrop color to reflect the source color. \rPainting with black produces no change.","parameters":[{"name":"a","type":"integer","description":"The source color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""},{"name":"b","type":"integer","description":"The backdrop color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The blended color value, in the range 1 to 255."}},{"name":"blendColorBurn","description":"Darkens the backdrop color to reflect the source color.\rPainting with white produces no change.","parameters":[{"name":"a","type":"integer","description":"The source color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""},{"name":"b","type":"integer","description":"The backdrop color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The blended color value, in the range 1 to 255."}},{"name":"blendLinearDodge","description":"An alias for blendAdd, it simply sums the values of the two colors.","parameters":[{"name":"a","type":"integer","description":"The source color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""},{"name":"b","type":"integer","description":"The backdrop color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The blended color value, in the range 1 to 255."}},{"name":"blendLinearBurn","description":"An alias for blendSubtract, it simply sums the values of the two colors and subtracts 255.","parameters":[{"name":"a","type":"integer","description":"The source color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""},{"name":"b","type":"integer","description":"The backdrop color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The blended color value, in the range 1 to 255."}},{"name":"blendLinearLight","description":"This blend mode combines Linear Dodge and Linear Burn (rescaled so that neutral colors become middle gray).\rDodge applies to values of top layer lighter than middle gray, and burn to darker values.\rThe calculation simplifies to the sum of bottom layer and twice the top layer, subtract 128. The contrast decreases.","parameters":[{"name":"a","type":"integer","description":"The source color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""},{"name":"b","type":"integer","description":"The backdrop color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The blended color value, in the range 1 to 255."}},{"name":"blendVividLight","description":"This blend mode combines Color Dodge and Color Burn (rescaled so that neutral colors become middle gray).\rDodge applies when values in the top layer are lighter than middle gray, and burn to darker values.\rThe middle gray is the neutral color. When color is lighter than this, this effectively moves the white point of the bottom \rlayer down by twice the difference; when it is darker, the black point is moved up by twice the difference. The perceived contrast increases.","parameters":[{"name":"a","type":"integer","description":"The source color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""},{"name":"b","type":"integer","description":"The backdrop color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The blended color value, in the range 1 to 255."}},{"name":"blendPinLight","description":"If the backdrop color (light source) is lighter than 50%, the blendDarken mode is used, and colors lighter than the backdrop color do not change.\rIf the backdrop color is darker than 50% gray, colors lighter than the blend color are replaced, and colors darker than the blend color do not change.","parameters":[{"name":"a","type":"integer","description":"The source color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""},{"name":"b","type":"integer","description":"The backdrop color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The blended color value, in the range 1 to 255."}},{"name":"blendHardMix","description":"Runs blendVividLight on the source and backdrop colors.\rIf the resulting color is 128 or more, it receives a value of 255; if less than 128, a value of 0.\rTherefore, all blended pixels have red, green, and blue channel values of either 0 or 255.\rThis changes all pixels to primary additive colors (red, green, or blue), white, or black.","parameters":[{"name":"a","type":"integer","description":"The source color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""},{"name":"b","type":"integer","description":"The backdrop color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The blended color value, in the range 1 to 255."}},{"name":"blendReflect","description":"Reflect blend mode. This mode is useful when adding shining objects or light zones to images.","parameters":[{"name":"a","type":"integer","description":"The source color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""},{"name":"b","type":"integer","description":"The backdrop color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The blended color value, in the range 1 to 255."}},{"name":"blendGlow","description":"Glow blend mode. This mode is a variation of reflect mode with the source and backdrop colors swapped.","parameters":[{"name":"a","type":"integer","description":"The source color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""},{"name":"b","type":"integer","description":"The backdrop color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The blended color value, in the range 1 to 255."}},{"name":"blendPhoenix","description":"Phoenix blend mode. This subtracts the lighter color from the darker color, and adds 255, giving a bright result.","parameters":[{"name":"a","type":"integer","description":"The source color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""},{"name":"b","type":"integer","description":"The backdrop color to blend, in the range 1 to 255.","default":"","optional":"","nullable":""}],"returns":{"type":"integer","description":"The blended color value, in the range 1 to 255."}}],"members":[]},{"name":"Phaser.Utils.Debug","description":"A collection of methods for displaying debug information about game objects.\r\rIf your game is running in Canvas mode, then you should invoke all of the Debug methods from\ryour games `render` function. This is because they are drawn directly onto the game canvas\ritself, so if you call any debug methods outside of `render` they are likely to be overwritten\rby the game itself.\r\rIf your game is running in WebGL then Debug will create a Sprite that is placed at the top of the Stage display list and bind a canvas texture\rto it, which must be uploaded every frame. Be advised: this is very expensive, especially in browsers like Firefox. So please only enable Debug\rin WebGL mode if you really need it (or your desktop can cope with it well) and disable it for production!","constructor":{"name":"Debug","description":"A collection of methods for displaying debug information about game objects.\r\rIf your game is running in Canvas mode, then you should invoke all of the Debug methods from\ryour games `render` function. This is because they are drawn directly onto the game canvas\ritself, so if you call any debug methods outside of `render` they are likely to be overwritten\rby the game itself.\r\rIf your game is running in WebGL then Debug will create a Sprite that is placed at the top of the Stage display list and bind a canvas texture\rto it, which must be uploaded every frame. Be advised: this is very expensive, especially in browsers like Firefox. So please only enable Debug\rin WebGL mode if you really need it (or your desktop can cope with it well) and disable it for production!","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""}]},"functions":[{"name":"boot","description":"Internal method that boots the debug displayer.","parameters":[]},{"name":"resize","description":"Internal method that resizes the BitmapData and Canvas.\rCalled by ScaleManager.onSizeChange only in WebGL mode.","parameters":[{"name":"scaleManager","type":"Phaser.ScaleManager","description":"The Phaser ScaleManager.","default":"","optional":"","nullable":""},{"name":"width","type":"number","description":"The new width of the game.","default":"","optional":"","nullable":""},{"name":"height","type":"number","description":"The new height of the game.","default":"","optional":"","nullable":""}]},{"name":"preUpdate","description":"Internal method that clears the canvas (if a Sprite) ready for a new debug session.","parameters":[]},{"name":"reset","description":"Clears the Debug canvas.","parameters":[]},{"name":"start","description":"Internal method that resets and starts the debug output values.","parameters":[{"name":"x","type":"number","description":"The X value the debug info will start from.","default":"","optional":true,"nullable":""},{"name":"y","type":"number","description":"The Y value the debug info will start from.","default":"","optional":true,"nullable":""},{"name":"color","type":"string","description":"The color the debug text will drawn in.","default":"'rgb(255,255,255)'","optional":true,"nullable":""},{"name":"columnWidth","type":"number","description":"The spacing between columns.","default":"","optional":true,"nullable":""}]},{"name":"stop","description":"Internal method that stops the debug output.","parameters":[]},{"name":"line","description":"Internal method that outputs a single line of text split over as many columns as needed, one per parameter.","parameters":[]},{"name":"soundInfo","description":"Render Sound information, including decoded state, duration, volume and more.","parameters":[{"name":"sound","type":"Phaser.Sound","description":"The sound object to debug.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"X position of the debug info to be rendered.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the debug info to be rendered.","default":"","optional":"","nullable":""},{"name":"color","type":"string","description":"color of the debug info to be rendered. (format is css color string).","default":"'rgb(255,255,255)'","optional":true,"nullable":""}]},{"name":"cameraInfo","description":"Render camera information including dimensions and location.","parameters":[{"name":"camera","type":"Phaser.Camera","description":"The Phaser.Camera to show the debug information for.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"X position of the debug info to be rendered.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the debug info to be rendered.","default":"","optional":"","nullable":""},{"name":"color","type":"string","description":"color of the debug info to be rendered. (format is css color string).","default":"'rgb(255,255,255)'","optional":true,"nullable":""}]},{"name":"timer","description":"Render Timer information.","parameters":[{"name":"timer","type":"Phaser.Timer","description":"The Phaser.Timer to show the debug information for.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"X position of the debug info to be rendered.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the debug info to be rendered.","default":"","optional":"","nullable":""},{"name":"color","type":"string","description":"color of the debug info to be rendered. (format is css color string).","default":"'rgb(255,255,255)'","optional":true,"nullable":""}]},{"name":"pointer","description":"Renders the Pointer.circle object onto the stage in green if down or red if up along with debug text.","parameters":[{"name":"pointer","type":"Phaser.Pointer","description":"The Pointer you wish to display.","default":"","optional":"","nullable":""},{"name":"hideIfUp","type":"boolean","description":"Doesn't render the circle if the pointer is up.","default":"","optional":true,"nullable":""},{"name":"downColor","type":"string","description":"The color the circle is rendered in if down.","default":"'rgba(0,255,0,0.5)'","optional":true,"nullable":""},{"name":"upColor","type":"string","description":"The color the circle is rendered in if up (and hideIfUp is false).","default":"'rgba(255,0,0,0.5)'","optional":true,"nullable":""},{"name":"color","type":"string","description":"color of the debug info to be rendered. (format is css color string).","default":"'rgb(255,255,255)'","optional":true,"nullable":""}]},{"name":"spriteInputInfo","description":"Render Sprite Input Debug information.","parameters":[{"name":"sprite","type":["Phaser.Sprite","Phaser.Image"],"description":"The sprite to display the input data for.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"X position of the debug info to be rendered.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the debug info to be rendered.","default":"","optional":"","nullable":""},{"name":"color","type":"string","description":"color of the debug info to be rendered. (format is css color string).","default":"'rgb(255,255,255)'","optional":true,"nullable":""}]},{"name":"key","description":"Renders Phaser.Key object information.","parameters":[{"name":"key","type":"Phaser.Key","description":"The Key to render the information for.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"X position of the debug info to be rendered.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the debug info to be rendered.","default":"","optional":"","nullable":""},{"name":"color","type":"string","description":"color of the debug info to be rendered. (format is css color string).","default":"'rgb(255,255,255)'","optional":true,"nullable":""}]},{"name":"inputInfo","description":"Render debug information about the Input object.","parameters":[{"name":"x","type":"number","description":"X position of the debug info to be rendered.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the debug info to be rendered.","default":"","optional":"","nullable":""},{"name":"color","type":"string","description":"color of the debug info to be rendered. (format is css color string).","default":"'rgb(255,255,255)'","optional":true,"nullable":""}]},{"name":"spriteBounds","description":"Renders the Sprites bounds. Note: This is really expensive as it has to calculate the bounds every time you call it!","parameters":[{"name":"sprite","type":["Phaser.Sprite","Phaser.Image"],"description":"The sprite to display the bounds of.","default":"","optional":"","nullable":""},{"name":"color","type":"string","description":"Color of the debug info to be rendered (format is css color string).","default":"","optional":true,"nullable":""},{"name":"filled","type":"boolean","description":"Render the rectangle as a fillRect (default, true) or a strokeRect (false)","default":true,"optional":true,"nullable":""}]},{"name":"ropeSegments","description":"Renders the Rope's segments. Note: This is really expensive as it has to calculate new segments every time you call it","parameters":[{"name":"rope","type":"Phaser.Rope","description":"The rope to display the segments of.","default":"","optional":"","nullable":""},{"name":"color","type":"string","description":"Color of the debug info to be rendered (format is css color string).","default":"","optional":true,"nullable":""},{"name":"filled","type":"boolean","description":"Render the rectangle as a fillRect (default, true) or a strokeRect (false)","default":true,"optional":true,"nullable":""}]},{"name":"spriteInfo","description":"Render debug infos (including name, bounds info, position and some other properties) about the Sprite.","parameters":[{"name":"sprite","type":"Phaser.Sprite","description":"The Sprite to display the information of.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"X position of the debug info to be rendered.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the debug info to be rendered.","default":"","optional":"","nullable":""},{"name":"color","type":"string","description":"color of the debug info to be rendered. (format is css color string).","default":"'rgb(255,255,255)'","optional":true,"nullable":""}]},{"name":"spriteCoords","description":"Renders the sprite coordinates in local, positional and world space.","parameters":[{"name":"sprite","type":["Phaser.Sprite","Phaser.Image"],"description":"The sprite to display the coordinates for.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"X position of the debug info to be rendered.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the debug info to be rendered.","default":"","optional":"","nullable":""},{"name":"color","type":"string","description":"color of the debug info to be rendered. (format is css color string).","default":"'rgb(255,255,255)'","optional":true,"nullable":""}]},{"name":"lineInfo","description":"Renders Line information in the given color.","parameters":[{"name":"line","type":"Phaser.Line","description":"The Line to display the data for.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"X position of the debug info to be rendered.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the debug info to be rendered.","default":"","optional":"","nullable":""},{"name":"color","type":"string","description":"color of the debug info to be rendered. (format is css color string).","default":"'rgb(255,255,255)'","optional":true,"nullable":""}]},{"name":"pixel","description":"Renders a single pixel at the given size.","parameters":[{"name":"x","type":"number","description":"X position of the pixel to be rendered.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the pixel to be rendered.","default":"","optional":"","nullable":""},{"name":"color","type":"string","description":"Color of the pixel (format is css color string).","default":"","optional":true,"nullable":""},{"name":"size","type":"number","description":"The 'size' to render the pixel at.","default":2,"optional":true,"nullable":""}]},{"name":"geom","description":"Renders a Phaser geometry object including Rectangle, Circle, Point or Line.","parameters":[{"name":"object","type":["Phaser.Rectangle","Phaser.Circle","Phaser.Point","Phaser.Line"],"description":"The geometry object to render.","default":"","optional":"","nullable":""},{"name":"color","type":"string","description":"Color of the debug info to be rendered (format is css color string).","default":"","optional":true,"nullable":""},{"name":"filled","type":"boolean","description":"Render the objected as a filled (default, true) or a stroked (false)","default":true,"optional":true,"nullable":""},{"name":"forceType","type":"number","description":"Force rendering of a specific type. If 0 no type will be forced, otherwise 1 = Rectangle, 2 = Circle, 3 = Point and 4 = Line.","default":"","optional":true,"nullable":""}]},{"name":"geom","description":"Renders a Rectangle.","parameters":[{"name":"object","type":["Phaser.Rectangle","object"],"description":"The geometry object to render.","default":"","optional":"","nullable":""},{"name":"color","type":"string","description":"Color of the debug info to be rendered (format is css color string).","default":"","optional":true,"nullable":""},{"name":"filled","type":"boolean","description":"Render the objected as a filled (default, true) or a stroked (false)","default":true,"optional":true,"nullable":""}]},{"name":"text","description":"Render a string of text.","parameters":[{"name":"text","type":"string","description":"The line of text to draw.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"X position of the debug info to be rendered.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the debug info to be rendered.","default":"","optional":"","nullable":""},{"name":"color","type":"string","description":"Color of the debug info to be rendered (format is css color string).","default":"","optional":true,"nullable":""},{"name":"font","type":"string","description":"The font of text to draw.","default":"","optional":true,"nullable":""}]},{"name":"quadTree","description":"Visually renders a QuadTree to the display.","parameters":[{"name":"quadtree","type":"Phaser.QuadTree","description":"The quadtree to render.","default":"","optional":"","nullable":""},{"name":"color","type":"string","description":"The color of the lines in the quadtree.","default":"","optional":"","nullable":""}]},{"name":"body","description":"Render a Sprites Physics body if it has one set. The body is rendered as a filled or stroked rectangle.\rThis only works for Arcade Physics, Ninja Physics (AABB and Circle only) and Box2D Physics bodies.\rTo display a P2 Physics body you should enable debug mode on the body when creating it.","parameters":[{"name":"sprite","type":"Phaser.Sprite","description":"The Sprite who's body will be rendered.","default":"","optional":"","nullable":""},{"name":"color","type":"string","description":"Color of the debug rectangle to be rendered. The format is a CSS color string such as '#ff0000' or 'rgba(255,0,0,0.5)'.","default":"'rgba(0,255,0,0.4)'","optional":true,"nullable":""},{"name":"filled","type":"boolean","description":"Render the body as a filled rectangle (true) or a stroked rectangle (false)","default":true,"optional":true,"nullable":""}]},{"name":"bodyInfo","description":"Render a Sprites Physic Body information.","parameters":[{"name":"sprite","type":"Phaser.Sprite","description":"The sprite to be rendered.","default":"","optional":"","nullable":""},{"name":"x","type":"number","description":"X position of the debug info to be rendered.","default":"","optional":"","nullable":""},{"name":"y","type":"number","description":"Y position of the debug info to be rendered.","default":"","optional":"","nullable":""},{"name":"color","type":"string","description":"color of the debug info to be rendered. (format is css color string).","default":"'rgb(255,255,255)'","optional":true,"nullable":""}]},{"name":"box2dWorld","description":"Renders 'debug draw' data for the Box2D world if it exists.\rThis uses the standard debug drawing feature of Box2D, so colors will be decided by\rthe Box2D engine.","parameters":[]},{"name":"box2dBody","description":"Renders 'debug draw' data for the given Box2D body.\rThis uses the standard debug drawing feature of Box2D, so colors will be decided by the Box2D engine.","parameters":[{"name":"sprite","type":"Phaser.Sprite","description":"The sprite whos body will be rendered.","default":"","optional":"","nullable":""},{"name":"color","type":"string","description":"color of the debug info to be rendered. (format is css color string).","default":"'rgb(0,255,0)'","optional":true,"nullable":""}]},{"name":"destroy","description":"Destroy this object.","parameters":[]}],"members":[{"name":"game","access":"","virtual":false,"description":"A reference to the currently running Game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"sprite","access":"","virtual":false,"description":"If debugging in WebGL mode we need this.","type":{"names":["Phaser.Image"]},"default":""},{"name":"bmd","access":"","virtual":false,"description":"In WebGL mode this BitmapData contains a copy of the debug canvas.","type":{"names":["Phaser.BitmapData"]},"default":""},{"name":"canvas","access":"","virtual":false,"description":"The canvas to which Debug calls draws.","type":{"names":["HTMLCanvasElement"]},"default":""},{"name":"context","access":"","virtual":false,"description":"The 2d context of the canvas.","type":{"names":["CanvasRenderingContext2D"]},"default":""},{"name":"font","access":"","virtual":false,"description":"The font that the debug information is rendered in.","type":{"names":["string"]},"default":"'14px Courier'"},{"name":"columnWidth","access":"","virtual":false,"description":"The spacing between columns.","type":{"names":["number"]},"default":""},{"name":"lineHeight","access":"","virtual":false,"description":"The line height between the debug text.","type":{"names":["number"]},"default":""},{"name":"renderShadow","access":"","virtual":false,"description":"Should the text be rendered with a slight shadow? Makes it easier to read on different types of background.","type":{"names":["boolean"]},"default":""},{"name":"currentX","access":"","virtual":false,"description":"The current X position the debug information will be rendered at.","type":{"names":["number"]},"default":""},{"name":"currentY","access":"","virtual":false,"description":"The current Y position the debug information will be rendered at.","type":{"names":["number"]},"default":""},{"name":"currentAlpha","access":"","virtual":false,"description":"The alpha of the Debug context, set before all debug information is rendered to it.","type":{"names":["number"]},"default":1},{"name":"dirty","access":"","virtual":false,"description":"Does the canvas need re-rendering?","type":{"names":["boolean"]},"default":""}]},{"name":"Phaser.Device","description":"Detects device support capabilities and is responsible for device initialization - see {@link Phaser.Device.whenReady whenReady}.\r\rThis class represents a singleton object that can be accessed directly as `game.device`\r(or, as a fallback, `Phaser.Device` when a game instance is not available) without the need to instantiate it.\r\rUnless otherwise noted the device capabilities are only guaranteed after initialization. Initialization\roccurs automatically and is guaranteed complete before {@link Phaser.Game} begins its \"boot\" phase.\rFeature detection can be modified in the {@link Phaser.Device.onInitialized onInitialized} signal.\r\rWhen checking features using the exposed properties only the *truth-iness* of the value should be relied upon\runless the documentation states otherwise: properties may return `false`, `''`, `null`, or even `undefined`\rwhen indicating the lack of a feature.\r\rUses elements from System.js by MrDoob and Modernizr","constructor":{"name":"Device","description":"It is not possible to instantiate the Device class manually.","parameters":[]},"functions":[{"name":"whenReady","description":"Add a device-ready handler and ensure the device ready sequence is started.\r\rPhaser.Device will _not_ activate or initialize until at least one `whenReady` handler is added,\rwhich is normally done automatically be calling `new Phaser.Game(..)`.\r\rThe handler is invoked when the device is considered \"ready\", which may be immediately\rif the device is already \"ready\". See {@link Phaser.Device#deviceReadyAt deviceReadyAt}.","parameters":[{"name":"handler","type":"function","description":"Callback to invoke when the device is ready. It is invoked with the given context the Phaser.Device object is supplied as the first argument.","default":"","optional":"","nullable":""},{"name":"context","type":"object","description":"Context in which to invoke the handler","default":"","optional":true,"nullable":""},{"name":"nonPrimer","type":"boolean","description":"If true the device ready check will not be started.","default":"","optional":true,"nullable":""}]},{"name":"_readyCheck","description":"Internal method used for checking when the device is ready.\rThis function is removed from Phaser.Device when the device becomes ready.","parameters":[]},{"name":"_initialize","description":"Internal method to initialize the capability checks.\rThis function is removed from Phaser.Device once the device is initialized.","parameters":[]},{"name":"canPlayAudio","description":"Check whether the host environment can play audio.","parameters":[{"name":"type","type":"string","description":"One of 'mp3, 'ogg', 'm4a', 'wav', 'webm' or 'opus'.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the given file type is supported by the browser, otherwise false."}},{"name":"canPlayVideo","description":"Check whether the host environment can play video files.","parameters":[{"name":"type","type":"string","description":"One of 'mp4, 'ogg', 'webm' or 'mpeg'.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the given file type is supported by the browser, otherwise false."}},{"name":"isConsoleOpen","description":"Check whether the console is open.\rNote that this only works in Firefox with Firebug and earlier versions of Chrome.\rIt used to work in Chrome, but then they removed the ability: {@link http://src.chromium.org/viewvc/blink?view=revision&revision=151136}","parameters":[]},{"name":"isAndroidStockBrowser","description":"Detect if the host is a an Android Stock browser.\rThis is available before the device \"ready\" event.\r\rAuthors might want to scale down on effects and switch to the CANVAS rendering method on those devices.","parameters":[]}],"members":[{"name":"deviceReadyAt","access":"protected","virtual":false,"description":"The time the device became ready.","type":{"names":["integer"]},"default":""},{"name":"initialized","access":"protected","virtual":false,"description":"The time as which initialization has completed.","type":{"names":["boolean"]},"default":""},{"name":"desktop","access":"","virtual":false,"description":"Is running on a desktop?","type":{"names":["boolean"]},"default":""},{"name":"iOS","access":"","virtual":false,"description":"Is running on iOS?","type":{"names":["boolean"]},"default":""},{"name":"iOSVersion","access":"","virtual":false,"description":"If running in iOS this will contain the major version number.","type":{"names":["number"]},"default":""},{"name":"cocoonJS","access":"","virtual":false,"description":"Is the game running under CocoonJS?","type":{"names":["boolean"]},"default":""},{"name":"cocoonJSApp","access":"","virtual":false,"description":"Is this game running with CocoonJS.App?","type":{"names":["boolean"]},"default":""},{"name":"cordova","access":"","virtual":false,"description":"Is the game running under Apache Cordova?","type":{"names":["boolean"]},"default":""},{"name":"node","access":"","virtual":false,"description":"Is the game running under Node.js?","type":{"names":["boolean"]},"default":""},{"name":"nodeWebkit","access":"","virtual":false,"description":"Is the game running under Node-Webkit?","type":{"names":["boolean"]},"default":""},{"name":"electron","access":"","virtual":false,"description":"Is the game running under GitHub Electron?","type":{"names":["boolean"]},"default":""},{"name":"ejecta","access":"","virtual":false,"description":"Is the game running under Ejecta?","type":{"names":["boolean"]},"default":""},{"name":"crosswalk","access":"","virtual":false,"description":"Is the game running under the Intel Crosswalk XDK?","type":{"names":["boolean"]},"default":""},{"name":"android","access":"","virtual":false,"description":"Is running on android?","type":{"names":["boolean"]},"default":""},{"name":"chromeOS","access":"","virtual":false,"description":"Is running on chromeOS?","type":{"names":["boolean"]},"default":""},{"name":"linux","access":"","virtual":false,"description":"Is running on linux?","type":{"names":["boolean"]},"default":""},{"name":"macOS","access":"","virtual":false,"description":"Is running on macOS?","type":{"names":["boolean"]},"default":""},{"name":"windows","access":"","virtual":false,"description":"Is running on windows?","type":{"names":["boolean"]},"default":""},{"name":"windowsPhone","access":"","virtual":false,"description":"Is running on a Windows Phone?","type":{"names":["boolean"]},"default":""},{"name":"canvas","access":"","virtual":false,"description":"Is canvas available?","type":{"names":["boolean"]},"default":""},{"name":"canvasBitBltShift","access":"","virtual":false,"description":"True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap.","type":{"names":["boolean"]},"default":""},{"name":"canHandleAlpha","access":"","virtual":false,"description":"If the browser isn't capable of handling tinting with alpha this will be false.","type":{"names":["boolean"]},"default":""},{"name":"canUseMultiply","access":"","virtual":false,"description":"Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method.","type":{"names":["boolean"]},"default":""},{"name":"webGL","access":"","virtual":false,"description":"Is webGL available?","type":{"names":["boolean"]},"default":""},{"name":"file","access":"","virtual":false,"description":"Is file available?","type":{"names":["boolean"]},"default":""},{"name":"fileSystem","access":"","virtual":false,"description":"Is fileSystem available?","type":{"names":["boolean"]},"default":""},{"name":"localStorage","access":"","virtual":false,"description":"Is localStorage available?","type":{"names":["boolean"]},"default":""},{"name":"worker","access":"","virtual":false,"description":"Is worker available?","type":{"names":["boolean"]},"default":""},{"name":"css3D","access":"","virtual":false,"description":"Is css3D available?","type":{"names":["boolean"]},"default":""},{"name":"pointerLock","access":"","virtual":false,"description":"Is Pointer Lock available?","type":{"names":["boolean"]},"default":""},{"name":"typedArray","access":"","virtual":false,"description":"Does the browser support TypedArrays?","type":{"names":["boolean"]},"default":""},{"name":"vibration","access":"","virtual":false,"description":"Does the device support the Vibration API?","type":{"names":["boolean"]},"default":""},{"name":"getUserMedia","access":"","virtual":false,"description":"Does the device support the getUserMedia API?","type":{"names":["boolean"]},"default":true},{"name":"quirksMode","access":"","virtual":false,"description":"Is the browser running in strict mode (false) or quirks mode? (true)","type":{"names":["boolean"]},"default":""},{"name":"touch","access":"","virtual":false,"description":"Is touch available?","type":{"names":["boolean"]},"default":""},{"name":"mspointer","access":"","virtual":false,"description":"Is mspointer available?","type":{"names":["boolean"]},"default":""},{"name":"wheelEvent","access":"protected","virtual":false,"description":"The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll'","type":"","default":""},{"name":"arora","access":"","virtual":false,"description":"Set to true if running in Arora.","type":{"names":["boolean"]},"default":""},{"name":"chrome","access":"","virtual":false,"description":"Set to true if running in Chrome.","type":{"names":["boolean"]},"default":""},{"name":"chromeVersion","access":"","virtual":false,"description":"If running in Chrome this will contain the major version number.","type":{"names":["number"]},"default":""},{"name":"epiphany","access":"","virtual":false,"description":"Set to true if running in Epiphany.","type":{"names":["boolean"]},"default":""},{"name":"firefox","access":"","virtual":false,"description":"Set to true if running in Firefox.","type":{"names":["boolean"]},"default":""},{"name":"firefoxVersion","access":"","virtual":false,"description":"If running in Firefox this will contain the major version number.","type":{"names":["number"]},"default":""},{"name":"ie","access":"","virtual":false,"description":"Set to true if running in Internet Explorer.","type":{"names":["boolean"]},"default":""},{"name":"ieVersion","access":"","virtual":false,"description":"If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Device.trident and Device.tridentVersion.","type":{"names":["number"]},"default":""},{"name":"trident","access":"","virtual":false,"description":"Set to true if running a Trident version of Internet Explorer (IE11+)","type":{"names":["boolean"]},"default":""},{"name":"tridentVersion","access":"","virtual":false,"description":"If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx}","type":{"names":["number"]},"default":""},{"name":"edge","access":"","virtual":false,"description":"Set to true if running in Microsoft Edge browser.","type":{"names":["boolean"]},"default":""},{"name":"mobileSafari","access":"","virtual":false,"description":"Set to true if running in Mobile Safari.","type":{"names":["boolean"]},"default":""},{"name":"midori","access":"","virtual":false,"description":"Set to true if running in Midori.","type":{"names":["boolean"]},"default":""},{"name":"opera","access":"","virtual":false,"description":"Set to true if running in Opera.","type":{"names":["boolean"]},"default":""},{"name":"safari","access":"","virtual":false,"description":"Set to true if running in Safari.","type":{"names":["boolean"]},"default":""},{"name":"safariVersion","access":"","virtual":false,"description":"If running in Safari this will contain the major version number.","type":{"names":["number"]},"default":""},{"name":"webApp","access":"","virtual":false,"description":"Set to true if running as a WebApp, i.e. within a WebView","type":{"names":["boolean"]},"default":""},{"name":"silk","access":"","virtual":false,"description":"Set to true if running in the Silk browser (as used on the Amazon Kindle)","type":{"names":["boolean"]},"default":""},{"name":"audioData","access":"","virtual":false,"description":"Are Audio tags available?","type":{"names":["boolean"]},"default":""},{"name":"webAudio","access":"","virtual":false,"description":"Is the WebAudio API available?","type":{"names":["boolean"]},"default":""},{"name":"ogg","access":"","virtual":false,"description":"Can this device play ogg files?","type":{"names":["boolean"]},"default":""},{"name":"opus","access":"","virtual":false,"description":"Can this device play opus files?","type":{"names":["boolean"]},"default":""},{"name":"mp3","access":"","virtual":false,"description":"Can this device play mp3 files?","type":{"names":["boolean"]},"default":""},{"name":"wav","access":"","virtual":false,"description":"Can this device play wav files?","type":{"names":["boolean"]},"default":""},{"name":"m4a","access":"","virtual":false,"description":"Can this device play m4a files? True if this device can play m4a files.","type":{"names":["boolean"]},"default":""},{"name":"webm","access":"","virtual":false,"description":"Can this device play webm files?","type":{"names":["boolean"]},"default":""},{"name":"dolby","access":"","virtual":false,"description":"Can this device play EC-3 Dolby Digital Plus files?","type":{"names":["boolean"]},"default":""},{"name":"oggVideo","access":"","virtual":false,"description":"Can this device play ogg video files?","type":{"names":["boolean"]},"default":""},{"name":"h264Video","access":"","virtual":false,"description":"Can this device play h264 mp4 video files?","type":{"names":["boolean"]},"default":""},{"name":"mp4Video","access":"","virtual":false,"description":"Can this device play h264 mp4 video files?","type":{"names":["boolean"]},"default":""},{"name":"webmVideo","access":"","virtual":false,"description":"Can this device play webm video files?","type":{"names":["boolean"]},"default":""},{"name":"vp9Video","access":"","virtual":false,"description":"Can this device play vp9 video files?","type":{"names":["boolean"]},"default":""},{"name":"hlsVideo","access":"","virtual":false,"description":"Can this device play hls video files?","type":{"names":["boolean"]},"default":""},{"name":"iPhone","access":"","virtual":false,"description":"Is running on iPhone?","type":{"names":["boolean"]},"default":""},{"name":"iPhone4","access":"","virtual":false,"description":"Is running on iPhone4?","type":{"names":["boolean"]},"default":""},{"name":"iPad","access":"","virtual":false,"description":"Is running on iPad?","type":{"names":["boolean"]},"default":""},{"name":"pixelRatio","access":"","virtual":false,"description":"PixelRatio of the host device?","type":{"names":["number"]},"default":""},{"name":"littleEndian","access":"","virtual":false,"description":"Is the device big or little endian? (only detected if the browser supports TypedArrays)","type":{"names":["boolean"]},"default":""},{"name":"LITTLE_ENDIAN","access":"","virtual":false,"description":"Same value as `littleEndian`.","type":{"names":["boolean"]},"default":""},{"name":"support32bit","access":"","virtual":false,"description":"Does the device context support 32bit pixel manipulation using array buffer views?","type":{"names":["boolean"]},"default":""},{"name":"fullscreen","access":"","virtual":false,"description":"Does the browser support the Full Screen API?","type":{"names":["boolean"]},"default":""},{"name":"requestFullscreen","access":"","virtual":false,"description":"If the browser supports the Full Screen API this holds the call you need to use to activate it.","type":{"names":["string"]},"default":""},{"name":"cancelFullscreen","access":"","virtual":false,"description":"If the browser supports the Full Screen API this holds the call you need to use to cancel it.","type":{"names":["string"]},"default":""},{"name":"fullscreenKeyboard","access":"","virtual":false,"description":"Does the browser support access to the Keyboard during Full Screen mode?","type":{"names":["boolean"]},"default":""},{"name":"onInitialized","access":"","virtual":false,"description":"This signal is dispatched after device initialization occurs but before any of the ready\rcallbacks (see {@link Phaser.Device.whenReady whenReady}) have been invoked.\r\rLocal \"patching\" for a particular device can/should be done in this event.\r\r_Note_: This signal is removed after the device has been readied; if a handler has not been\radded _before_ `new Phaser.Game(..)` it is probably too late.","type":{"names":["Phaser.Signal"]},"default":""}]},{"name":"Phaser.DOM","description":"DOM utility class.\r\rProvides a useful Window and Element functions as well as cross-browser compatibility buffer.\r\rSome code originally derived from {@link https://github.com/ryanve/verge verge}.\rSome parts were inspired by the research of Ryan Van Etten, released under MIT License 2013.","constructor":{"name":"DOM","description":"DOM utility class.\r\rProvides a useful Window and Element functions as well as cross-browser compatibility buffer.\r\rSome code originally derived from {@link https://github.com/ryanve/verge verge}.\rSome parts were inspired by the research of Ryan Van Etten, released under MIT License 2013.","parameters":[]},"functions":[{"name":"getOffset","description":"Get the [absolute] position of the element relative to the Document.\r\rThe value may vary slightly as the page is scrolled due to rounding errors.","parameters":[{"name":"element","type":"DOMElement","description":"The targeted element that we want to retrieve the offset.","default":"","optional":"","nullable":""},{"name":"point","type":"Phaser.Point","description":"The point we want to take the x/y values of the offset.","default":"","optional":true,"nullable":""}],"returns":{"type":"Phaser.Point","description":"- A point objet with the offsetX and Y as its properties."}},{"name":"getBounds","description":"A cross-browser element.getBoundingClientRect method with optional cushion.\r\rReturns a plain object containing the properties `top/bottom/left/right/width/height` with respect to the top-left corner of the current viewport.\rIts properties match the native rectangle.\rThe cushion parameter is an amount of pixels (+/-) to cushion the element.\rIt adjusts the measurements such that it is possible to detect when an element is near the viewport.","parameters":[{"name":"element","type":["DOMElement","Object"],"description":"The element or stack (uses first item) to get the bounds for.","default":"","optional":"","nullable":""},{"name":"cushion","type":"number","description":"A +/- pixel adjustment amount.","default":"","optional":true,"nullable":""}],"returns":{"type":["Object","boolean"],"description":"A plain object containing the properties `top/bottom/left/right/width/height` or `false` if a non-valid element is given."}},{"name":"calibrate","description":"Calibrates element coordinates for `inLayoutViewport` checks.","parameters":[{"name":"coords","type":"object","description":"An object containing the following properties: `{top: number, right: number, bottom: number, left: number}`","default":"","optional":"","nullable":""},{"name":"cushion","type":"number","description":"A value to adjust the coordinates by.","default":"","optional":true,"nullable":""}],"returns":{"type":"object","description":"The calibrated element coordinates"}},{"name":"getAspectRatio","description":"Get the Visual viewport aspect ratio (or the aspect ratio of an object or element)","parameters":[{"name":"object","type":["DOMElement","Object"],"description":"The object to determine the aspect ratio for. Must have public `width` and `height` properties or methods.","default":"(visualViewport)","optional":true,"nullable":""}],"returns":{"type":"number","description":"The aspect ratio."}},{"name":"inLayoutViewport","description":"Tests if the given DOM element is within the Layout viewport.\r\rThe optional cushion parameter allows you to specify a distance.\r\rinLayoutViewport(element, 100) is `true` if the element is in the viewport or 100px near it.\rinLayoutViewport(element, -100) is `true` if the element is in the viewport or at least 100px near it.","parameters":[{"name":"element","type":["DOMElement","Object"],"description":"The DOM element to check. If no element is given it defaults to the Phaser game canvas.","default":"","optional":"","nullable":""},{"name":"cushion","type":"number","description":"The cushion allows you to specify a distance within which the element must be within the viewport.","default":"","optional":true,"nullable":""}],"returns":{"type":"boolean","description":"True if the element is within the viewport, or within `cushion` distance from it."}},{"name":"getScreenOrientation","description":"Returns the device screen orientation.\r\rOrientation values: 'portrait-primary', 'landscape-primary', 'portrait-secondary', 'landscape-secondary'.\r\rOrder of resolving:\r- Screen Orientation API, or variation of - Future track. Most desktop and mobile browsers.\r- Screen size ratio check - If fallback is 'screen', suited for desktops.\r- Viewport size ratio check - If fallback is 'viewport', suited for mobile.\r- window.orientation - If fallback is 'window.orientation', works iOS and probably most Android; non-recommended track.\r- Media query\r- Viewport size ratio check (probably only IE9 and legacy mobile gets here..)\r\rSee\r- https://w3c.github.io/screen-orientation/ (conflicts with mozOrientation/msOrientation)\r- https://developer.mozilla.org/en-US/docs/Web/API/Screen.orientation (mozOrientation)\r- http://msdn.microsoft.com/en-us/library/ie/dn342934(v=vs.85).aspx\r- https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Testing_media_queries\r- http://stackoverflow.com/questions/4917664/detect-viewport-orientation\r- http://www.matthewgifford.com/blog/2011/12/22/a-misconception-about-window-orientation","parameters":[{"name":"primaryFallback","type":"string","description":"Specify 'screen', 'viewport', or 'window.orientation'.","default":"(none)","optional":true,"nullable":""}]}],"members":[{"name":"visualBounds","access":"","virtual":false,"description":"The bounds of the Visual viewport, as discussed in \r{@link http://www.quirksmode.org/mobile/viewports.html A tale of two viewports — part one}\rwith one difference: the viewport size _excludes_ scrollbars, as found on some desktop browsers.   \r\rSupported mobile:\r  iOS/Safari, Android 4, IE10, Firefox OS (maybe not Firefox Android), Opera Mobile 16\r\rThe properties change dynamically.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"layoutBounds","access":"","virtual":false,"description":"The bounds of the Layout viewport, as discussed in \r{@link http://www.quirksmode.org/mobile/viewports2.html A tale of two viewports — part two};\rbut honoring the constraints as specified applicable viewport meta-tag.\r\rThe bounds returned are not guaranteed to be fully aligned with CSS media queries (see\r{@link http://www.matanich.com/2013/01/07/viewport-size/ What size is my viewport?}).\r\rThis is _not_ representative of the Visual bounds: in particular the non-primary axis will\rgenerally be significantly larger than the screen height on mobile devices when running with a\rconstrained viewport.\r\rThe properties change dynamically.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"documentBounds","access":"","virtual":false,"description":"The size of the document / Layout viewport.\r\rThis incorrectly reports the dimensions in IE.\r\rThe properties change dynamically.","type":{"names":["Phaser.Rectangle"]},"default":""},{"name":"scrollX","access":"protected","virtual":false,"description":"A cross-browser window.scrollX.","type":{"names":["number"]},"default":""},{"name":"scrollY","access":"protected","virtual":false,"description":"A cross-browser window.scrollY.","type":{"names":["number"]},"default":""}]},{"name":"EarCut","description":"","constructor":{"name":"EarCut","description":"","parameters":[]},"functions":[],"members":[]},{"name":"Phaser.LinkedList","description":"A basic Linked List data structure.\r\rThis implementation _modifies_ the `prev` and `next` properties of each item added:\r- The `prev` and `next` properties must be writable and should not be used for any other purpose.\r- Items _cannot_ be added to multiple LinkedLists at the same time.\r- Only objects can be added.","constructor":{"name":"LinkedList","description":"A basic Linked List data structure.\r\rThis implementation _modifies_ the `prev` and `next` properties of each item added:\r- The `prev` and `next` properties must be writable and should not be used for any other purpose.\r- Items _cannot_ be added to multiple LinkedLists at the same time.\r- Only objects can be added.","parameters":[]},"functions":[{"name":"add","description":"Adds a new element to this linked list.","parameters":[{"name":"item","type":"object","description":"The element to add to this list. Can be a Phaser.Sprite or any other object you need to quickly iterate through.","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"The item that was added."}},{"name":"reset","description":"Resets the first, last, next and previous node pointers in this list.","parameters":[]},{"name":"remove","description":"Removes the given element from this linked list if it exists.","parameters":[{"name":"item","type":"object","description":"The item to be removed from the list.","default":"","optional":"","nullable":""}]},{"name":"callAll","description":"Calls a function on all members of this list, using the member as the context for the callback.\rThe function must exist on the member.","parameters":[{"name":"callback","type":"function","description":"The function to call.","default":"","optional":"","nullable":""}]}],"members":[{"name":"next","access":"","virtual":false,"description":"Next element in the list.","type":{"names":["object"]},"default":""},{"name":"prev","access":"","virtual":false,"description":"Previous element in the list.","type":{"names":["object"]},"default":""},{"name":"first","access":"","virtual":false,"description":"First element in the list.","type":{"names":["object"]},"default":""},{"name":"last","access":"","virtual":false,"description":"Last element in the list.","type":{"names":["object"]},"default":""},{"name":"total","access":"","virtual":false,"description":"Number of elements in the list.","type":{"names":["integer"]},"default":""}]},{"name":"Phaser.RequestAnimationFrame","description":"Abstracts away the use of RAF or setTimeOut for the core game update loop.","constructor":{"name":"RequestAnimationFrame","description":"Abstracts away the use of RAF or setTimeOut for the core game update loop.","parameters":[{"name":"game","type":"Phaser.Game","description":"A reference to the currently running game.","default":"","optional":"","nullable":""},{"name":"forceSetTimeOut","type":"boolean","description":"Tell Phaser to use setTimeOut even if raf is available.","default":"","optional":true,"nullable":""}]},"functions":[{"name":"start","description":"Starts the requestAnimationFrame running or setTimeout if unavailable in browser","parameters":[]},{"name":"updateRAF","description":"The update method for the requestAnimationFrame","parameters":[]},{"name":"updateSetTimeout","description":"The update method for the setTimeout.","parameters":[]},{"name":"stop","description":"Stops the requestAnimationFrame from running.","parameters":[]},{"name":"isSetTimeOut","description":"Is the browser using setTimeout?","parameters":[],"returns":{"type":"boolean","description":""}},{"name":"isRAF","description":"Is the browser using requestAnimationFrame?","parameters":[],"returns":{"type":"boolean","description":""}}],"members":[{"name":"game","access":"","virtual":false,"description":"The currently running game.","type":{"names":["Phaser.Game"]},"default":""},{"name":"isRunning","access":"","virtual":false,"description":"true if RequestAnimationFrame is running, otherwise false.","type":{"names":["boolean"]},"default":""},{"name":"forceSetTimeOut","access":"","virtual":false,"description":"Tell Phaser to use setTimeOut even if raf is available.","type":{"names":["boolean"]},"default":""},{"name":"_isSetTimeOut","access":"private","virtual":false,"description":"true if the browser is using setTimeout instead of raf.","type":{"names":["boolean"]},"default":""},{"name":"_onLoop","access":"private","virtual":false,"description":"The function called by the update.","type":{"names":["function"]},"default":""},{"name":"_timeOutID","access":"private","virtual":false,"description":"The callback ID used when calling cancel.","type":{"names":["number"]},"default":""}]},{"name":"Phaser.Utils","description":"","constructor":{"name":"Utils","description":"","parameters":[]},"functions":[{"name":"reverseString","description":"Takes the given string and reverses it, returning the reversed string.\rFor example if given the string `Atari 520ST` it would return `TS025 iratA`.","parameters":[{"name":"string","type":"string","description":"The string to be reversed.","default":"","optional":"","nullable":""}],"returns":{"type":"string","description":"The reversed string."}},{"name":"getProperty","description":"Gets an objects property by string.","parameters":[{"name":"obj","type":"object","description":"The object to traverse.","default":"","optional":"","nullable":""},{"name":"prop","type":"string","description":"The property whose value will be returned.","default":"","optional":"","nullable":""}],"returns":{"type":"*","description":"the value of the property or null if property isn't found ."}},{"name":"setProperty","description":"Sets an objects property by string.","parameters":[{"name":"obj","type":"object","description":"The object to traverse","default":"","optional":"","nullable":""},{"name":"prop","type":"string","description":"The property whose value will be changed","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"The object on which the property was set."}},{"name":"chanceRoll","description":"Generate a random bool result based on the chance value.\r\rReturns true or false based on the chance value (default 50%). For example if you wanted a player to have a 30% chance\rof getting a bonus, call chanceRoll(30) - true means the chance passed, false means it failed.","parameters":[{"name":"chance","type":"number","description":"The chance of receiving the value. A number between 0 and 100 (effectively 0% to 100%).","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"True if the roll passed, or false otherwise."}},{"name":"randomChoice","description":"Choose between one of two values randomly.","parameters":[{"name":"choice1","type":"any","description":"","default":"","optional":"","nullable":""},{"name":"choice2","type":"any","description":"","default":"","optional":"","nullable":""}],"returns":{"type":"any","description":"The randomly selected choice"}},{"name":"parseDimension","description":"Get a unit dimension from a string.","parameters":[{"name":"size","type":["string","number"],"description":"The size to parse.","default":"","optional":"","nullable":""},{"name":"dimension","type":"number","description":"The window dimension to check.","default":"","optional":"","nullable":""}],"returns":{"type":"number","description":"The parsed dimension."}},{"name":"pad","description":"Takes the given string and pads it out, to the length required, using the character\rspecified. For example if you need a string to be 6 characters long, you can call:\r\r`pad('bob', 6, '-', 2)`\r\rThis would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right.\r\rYou can also use it to pad numbers (they are always returned as strings):\r\r`pad(512, 6, '0', 1)`\r\rWould return: `000512` with the string padded to the left.\r\rIf you don't specify a direction it'll pad to both sides:\r\r`pad('c64', 7, '*')`\r\rWould return: `**c64**`","parameters":[{"name":"str","type":"string","description":"The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers.","default":"","optional":"","nullable":""},{"name":"len","type":"integer","description":"The number of characters to be added.","default":"","optional":true,"nullable":""},{"name":"pad","type":"string","description":"The string to pad it out with (defaults to a space).","default":"\" \"","optional":true,"nullable":""},{"name":"dir","type":"integer","description":"The direction dir = 1 (left), 2 (right), 3 (both).","default":3,"optional":true,"nullable":""}],"returns":{"type":"string","description":"The padded string."}},{"name":"isPlainObject","description":"This is a slightly modified version of jQuery.isPlainObject.\rA plain object is an object whose internal class property is [object Object].","parameters":[{"name":"obj","type":"object","description":"The object to inspect.","default":"","optional":"","nullable":""}],"returns":{"type":"boolean","description":"- true if the object is plain, otherwise false."}},{"name":"extend","description":"This is a slightly modified version of http://api.jquery.com/jQuery.extend/","parameters":[{"name":"deep","type":"boolean","description":"Perform a deep copy?","default":"","optional":"","nullable":""},{"name":"target","type":"object","description":"The target object to copy to.","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"The extended object."}},{"name":"mixinPrototype","description":"Mixes in an existing mixin object with the target.\r\rValues in the mixin that have either `get` or `set` functions are created as properties via `defineProperty`\r_except_ if they also define a `clone` method - if a clone method is defined that is called instead and\rthe result is assigned directly.","parameters":[{"name":"target","type":"object","description":"The target object to receive the new functions.","default":"","optional":"","nullable":""},{"name":"mixin","type":"object","description":"The object to copy the functions from.","default":"","optional":"","nullable":""},{"name":"replace","type":"boolean","description":"If the target object already has a matching function should it be overwritten or not?","default":"","optional":true,"nullable":""}]},{"name":"mixin","description":"Mixes the source object into the destination object, returning the newly modified destination object.\rBased on original code by @mudcube","parameters":[{"name":"from","type":"object","description":"The object to copy (the source object).","default":"","optional":"","nullable":""},{"name":"to","type":"object","description":"The object to copy to (the destination object).","default":"","optional":"","nullable":""}],"returns":{"type":"object","description":"The modified destination object."}}],"members":[]}]}