mirror of
https://github.com/photonstorm/phaser
synced 2024-12-22 11:03:23 +00:00
1 line
No EOL
52 KiB
JSON
1 line
No EOL
52 KiB
JSON
{"class":{"name":"Phaser.Button","extends":"Phaser.Image","static":false,"constructor":true,"parameters":[{"name":"game","type":["Phaser.Game"],"help":" Current game instance.","optional":false,"default":null},{"name":"x","type":["number"],"help":"X position of the Button.","optional":true,"default":"0"},{"name":"y","type":["number"],"help":"Y position of the Button.","optional":true,"default":"0"},{"name":"key","type":["string"],"help":"The image key as defined in the Game.Cache to use as the texture for this Button.","optional":true,"default":null},{"name":"callback","type":["function"],"help":"The function to call when this Button is pressed.","optional":true,"default":null},{"name":"callbackContext","type":["object"],"help":"The context in which the callback will be called (usually 'this').","optional":true,"default":null},{"name":"overFrame","type":["string","number"],"help":"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.","optional":true,"default":null},{"name":"outFrame","type":["string","number"],"help":"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.","optional":true,"default":null},{"name":"downFrame","type":["string","number"],"help":"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.","optional":true,"default":null},{"name":"upFrame","type":["string","number"],"help":"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.","optional":true,"default":null}],"help":"Create a new `Button` object. A Button is a special type of Sprite that is set-up to handle Pointer events automatically. The four states a Button responds to are:\\n\\n* 'Over' - when the Pointer moves over the Button. This is also commonly known as 'hover'.\\n* 'Out' - when the Pointer that was previously over the Button moves out of it.\\n* 'Down' - when the Pointer is pressed down on the Button. I.e. touched on a touch enabled device or clicked with the mouse.\\n* 'Up' - when the Pointer that was pressed down on the Button is released again.\\n\\nYou can set a unique texture frame and Sound for any of these states."},"consts":[],"methods":{"public":[{"name":"addChild","static":false,"returns":{"types":["PIXI.DisplayObject"],"help":"The child that was added."},"help":"Adds a child to the container.","line":93,"public":true,"protected":false,"private":false,"parameters":[{"name":"child","type":["PIXI.DisplayObject"],"help":"The DisplayObject to add to the container","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"addChildAt","static":false,"returns":{"types":["PIXI.DisplayObject"],"help":"The child that was added."},"help":"Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown","line":106,"public":true,"protected":false,"private":false,"parameters":[{"name":"child","type":["PIXI.DisplayObject"],"help":"The child to add","optional":false,"default":null},{"name":"index","type":["number"],"help":"The index to place the child in","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"bringToTop","static":false,"returns":{"types":["Phaser.Image"],"help":"This instance."},"help":"Brings the Image to the top of the display list it is a child of. Images that are members of a Phaser.Group are only\\nbought to the top of that Group, not the entire display list.","line":619,"public":true,"protected":false,"private":false,"parameters":[],"inherited":true,"inheritedFrom":"Phaser.Image"},{"name":"clearFrames","static":false,"returns":null,"help":"Clears all of the frames set on this Button.","line":215,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"click","static":false,"returns":null,"help":"A callback that is used when the users clicks on the displayObject with their mouse's left button","line":238,"public":true,"protected":false,"private":false,"parameters":[{"name":"interactionData","type":["PIXI.InteractionData"],"help":"","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"crop","static":false,"returns":null,"help":"Crop allows you to crop the texture used to display this Image.\\nCropping takes place from the top-left of the Image and can be modified in real-time by providing an updated rectangle object.\\nThe rectangle object given to this method can be either a Phaser.Rectangle or any object so long as it has public x, y, width and height properties.\\nPlease note that the rectangle object given is not duplicated by this method, but rather the Image uses a reference to the rectangle.\\nKeep this in mind if assigning a rectangle in a for-loop, or when cleaning up for garbage collection.","line":393,"public":true,"protected":false,"private":false,"parameters":[{"name":"rect","type":["Phaser.Rectangle"],"help":"The Rectangle used during cropping. Pass null or no parameters to clear a previously set crop rectangle.","optional":false,"default":null},{"name":"copy","type":["boolean"],"help":"If false Sprite.cropRect will be a reference to the given rect. If true it will copy the rect values into a local Sprite.cropRect object.","optional":true,"default":"false"}],"inherited":true,"inheritedFrom":"Phaser.Image"},{"name":"destroy","static":false,"returns":null,"help":"Destroys the Image. This removes it from its parent group, destroys the input, event and animation handlers if present\\nand nulls its reference to game, freeing it up for garbage collection.","line":519,"public":true,"protected":false,"private":false,"parameters":[{"name":"destroyChildren","type":["boolean"],"help":"Should every child of this object have its destroy method called?","optional":true,"default":"true"}],"inherited":true,"inheritedFrom":"Phaser.Image"},{"name":"fromFrame","static":true,"returns":{"types":["PIXI.Sprite"],"help":"A new Sprite using a texture from the texture cache matching the frameId"},"help":"\\nHelper function that creates a sprite that will contain a texture from the TextureCache based on the frameId\\nThe frame ids are created when a Texture packer file has been loaded","line":429,"public":true,"protected":false,"private":false,"parameters":[{"name":"frameId","type":["string"],"help":"The frame Id of the texture in the cache","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"fromImage","static":true,"returns":{"types":["PIXI.Sprite"],"help":"A new Sprite using a texture from the texture cache matching the image id"},"help":"\\nHelper function that creates a sprite that will contain a texture based on an image url\\nIf the image is not in the texture cache it will be loaded","line":446,"public":true,"protected":false,"private":false,"parameters":[{"name":"imageId","type":["string"],"help":"The image url of the texture","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"generateTexture","static":false,"returns":{"types":["PIXI.Texture"],"help":"a texture of the graphics object"},"help":"Useful function that returns a texture of the displayObject object that can then be used to create sprites\\nThis can be quite useful if your displayObject is static \/ complicated and needs to be reused multiple times.","line":565,"public":true,"protected":false,"private":false,"parameters":[{"name":"resolution","type":["number"],"help":"The resolution of the texture being generated","optional":false,"default":null},{"name":"scaleMode","type":["number"],"help":"Should be one of the PIXI.scaleMode consts","optional":false,"default":null},{"name":"renderer","type":["PIXI.CanvasRenderer","PIXI.WebGLRenderer"],"help":"The renderer used to generate the texture.","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"getBounds","static":false,"returns":{"types":["Phaser.Rectangle"],"help":"the framing rectangle"},"help":"Returns the bounds of the Sprite as a rectangle. The bounds calculation takes the worldTransform into account.","line":171,"public":true,"protected":false,"private":false,"parameters":[{"name":"matrix","type":["PIXI.Matrix"],"help":"the transformation matrix of the sprite","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"getChildAt","static":false,"returns":{"types":["PIXI.DisplayObject"],"help":"The child at the given index, if any."},"help":"Returns the child at the specified index","line":196,"public":true,"protected":false,"private":false,"parameters":[{"name":"index","type":["number"],"help":"The index to get the child from","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"getChildIndex","static":false,"returns":{"types":["number"],"help":"The index position of the child display object to identify"},"help":"Returns the index position of a child DisplayObject instance","line":161,"public":true,"protected":false,"private":false,"parameters":[{"name":"child","type":["PIXI.DisplayObject"],"help":"The DisplayObject instance to identify","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"getLocalBounds","static":false,"returns":{"types":["Phaser.Rectangle"],"help":"The rectangular bounding area"},"help":"Retrieves the non-global local bounds of the displayObjectContainer as a rectangle. The calculation takes all visible children into consideration.","line":359,"public":true,"protected":false,"private":false,"parameters":[],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"kill","static":false,"returns":{"types":["Phaser.Image"],"help":"This instance."},"help":"Kills a Image. A killed Image has its alive, exists and visible properties all set to false.\\nIt will dispatch the onKilled event, you can listen to Image.events.onKilled for the signal.\\nNote that killing a Image is a way for you to quickly recycle it in a Image pool, it doesn't free it up from memory.\\nIf you don't need this Image any more you should call Image.destroy instead.","line":496,"public":true,"protected":false,"private":false,"parameters":[],"inherited":true,"inheritedFrom":"Phaser.Image"},{"name":"loadTexture","static":false,"returns":null,"help":"Changes the Texture the Image is using entirely. The old texture is removed and the new one is referenced or fetched from the Cache.\\nThis causes a WebGL texture update, so use sparingly or in low-intensity portions of your game.","line":248,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","PIXI.Texture"],"help":"This is the image or 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.","optional":false,"default":null},{"name":"frame","type":["string","number"],"help":"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.","optional":false,"default":null}],"inherited":true,"inheritedFrom":"Phaser.Image"},{"name":"mousedown","static":false,"returns":null,"help":"A callback that is used when the user clicks the mouse's left button down over the sprite","line":244,"public":true,"protected":false,"private":false,"parameters":[{"name":"interactionData","type":["PIXI.InteractionData"],"help":"","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"mouseout","static":false,"returns":null,"help":"A callback that is used when the users mouse leaves the displayObject","line":231,"public":true,"protected":false,"private":false,"parameters":[{"name":"interactionData","type":["PIXI.InteractionData"],"help":"","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"mouseover","static":false,"returns":null,"help":"A callback that is used when the users mouse rolls over the displayObject","line":225,"public":true,"protected":false,"private":false,"parameters":[{"name":"interactionData","type":["PIXI.InteractionData"],"help":"","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"mouseup","static":false,"returns":null,"help":"A callback that is used when the user releases the mouse's left button that was over the displayObject\\nfor this callback to be fired, the mouse's left button must have been pressed down over the displayObject","line":251,"public":true,"protected":false,"private":false,"parameters":[{"name":"interactionData","type":["PIXI.InteractionData"],"help":"","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"mouseupoutside","static":false,"returns":null,"help":"A callback that is used when the user releases the mouse's left button that was over the displayObject but is no longer over the displayObject\\nfor this callback to be fired, the mouse's left button must have been pressed down over the displayObject","line":258,"public":true,"protected":false,"private":false,"parameters":[{"name":"interactionData","type":["PIXI.InteractionData"],"help":"","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"postUpdate","static":false,"returns":null,"help":"Internal function called by the World postUpdate cycle.","line":217,"public":true,"protected":false,"private":false,"parameters":[],"inherited":true,"inheritedFrom":"Phaser.Image"},{"name":"preUpdate","static":false,"returns":null,"help":"Automatically called by World.preUpdate.","line":164,"public":true,"protected":false,"private":false,"parameters":[],"inherited":true,"inheritedFrom":"Phaser.Image"},{"name":"removeChild","static":false,"returns":{"types":["PIXI.DisplayObject"],"help":"The child that was removed."},"help":"Removes a child from the container.","line":213,"public":true,"protected":false,"private":false,"parameters":[{"name":"child","type":["PIXI.DisplayObject"],"help":"The DisplayObject to remove","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"removeChildAt","static":false,"returns":{"types":["PIXI.DisplayObject"],"help":"The child that was removed."},"help":"Removes a child from the specified index position.","line":228,"public":true,"protected":false,"private":false,"parameters":[{"name":"index","type":["number"],"help":"The index to get the child from","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"removeChildren","static":false,"returns":null,"help":"Removes all children from this container that are within the begin and end indexes.","line":246,"public":true,"protected":false,"private":false,"parameters":[{"name":"beginIndex","type":["number"],"help":"The beginning position. Default value is 0.","optional":false,"default":null},{"name":"endIndex","type":["number"],"help":"The ending position. Default value is size of the container.","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"removeStageReference","static":false,"returns":null,"help":"Removes the current stage reference from the container and all of its children.","line":400,"public":true,"protected":false,"private":false,"parameters":[],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"reset","static":false,"returns":{"types":["Phaser.Image"],"help":"This instance."},"help":"Resets the Image. This places the Image at the given x\/y world coordinates and then sets alive, exists, visible and renderable all to true.","line":597,"public":true,"protected":false,"private":false,"parameters":[{"name":"x","type":["number"],"help":"The x coordinate (in world space) to position the Image at.","optional":false,"default":null},{"name":"y","type":["number"],"help":"The y coordinate (in world space) to position the Image at.","optional":false,"default":null}],"inherited":true,"inheritedFrom":"Phaser.Image"},{"name":"resetFrame","static":false,"returns":null,"help":"Resets the Texture frame dimensions that the Image uses for rendering.","line":372,"public":true,"protected":false,"private":false,"parameters":[],"inherited":true,"inheritedFrom":"Phaser.Image"},{"name":"revive","static":false,"returns":{"types":["Phaser.Image"],"help":"This instance."},"help":"Brings a 'dead' Image back to life, optionally giving it the health value specified.\\nA resurrected Image has its alive, exists and visible properties all set to true.\\nIt will dispatch the onRevived event, you can listen to Image.events.onRevived for the signal.","line":471,"public":true,"protected":false,"private":false,"parameters":[],"inherited":true,"inheritedFrom":"Phaser.Image"},{"name":"rightclick","static":false,"returns":null,"help":"A callback that is used when the users clicks on the displayObject with their mouse's right button","line":265,"public":true,"protected":false,"private":false,"parameters":[{"name":"interactionData","type":["PIXI.InteractionData"],"help":"","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"rightdown","static":false,"returns":null,"help":"A callback that is used when the user clicks the mouse's right button down over the sprite","line":271,"public":true,"protected":false,"private":false,"parameters":[{"name":"interactionData","type":["PIXI.InteractionData"],"help":"","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"rightup","static":false,"returns":null,"help":"A callback that is used when the user releases the mouse's right button that was over the displayObject\\nfor this callback to be fired the mouse's right button must have been pressed down over the displayObject","line":278,"public":true,"protected":false,"private":false,"parameters":[{"name":"interactionData","type":["PIXI.InteractionData"],"help":"","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"rightupoutside","static":false,"returns":null,"help":"A callback that is used when the user releases the mouse's right button that was over the displayObject but is no longer over the displayObject\\nfor this callback to be fired, the mouse's right button must have been pressed down over the displayObject","line":285,"public":true,"protected":false,"private":false,"parameters":[{"name":"interactionData","type":["PIXI.InteractionData"],"help":"","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"setChildIndex","static":false,"returns":null,"help":"Changes the position of an existing child in the display object container","line":178,"public":true,"protected":false,"private":false,"parameters":[{"name":"child","type":["PIXI.DisplayObject"],"help":"The child DisplayObject instance for which you want to change the index number","optional":false,"default":null},{"name":"index","type":["number"],"help":"The resulting index number for the child display object","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"setDownSound","static":false,"returns":null,"help":"The Sound to be played when a Pointer presses down on this Button.","line":413,"public":true,"protected":false,"private":false,"parameters":[{"name":"sound","type":["Phaser.Sound","Phaser.AudioSprite"],"help":"The Sound that will be played.","optional":false,"default":null},{"name":"marker","type":["string"],"help":"A Sound Marker that will be used in the playback.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"setFrame","static":false,"returns":null,"help":"Sets the Texture frame the Image uses for rendering.\\nThis is primarily an internal method used by Image.loadTexture, although you may call it directly.","line":319,"public":true,"protected":false,"private":false,"parameters":[{"name":"frame","type":["Phaser.Frame"],"help":"The Frame to be used by the Image texture.","optional":false,"default":null}],"inherited":true,"inheritedFrom":"Phaser.Image"},{"name":"setFrames","static":false,"returns":null,"help":"Used to manually set the frames that will be used for the different states of the Button.","line":240,"public":true,"protected":false,"private":false,"parameters":[{"name":"overFrame","type":["string","number"],"help":"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.","optional":true,"default":null},{"name":"outFrame","type":["string","number"],"help":"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.","optional":true,"default":null},{"name":"downFrame","type":["string","number"],"help":"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.","optional":true,"default":null},{"name":"upFrame","type":["string","number"],"help":"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.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"setOutSound","static":false,"returns":null,"help":"The Sound to be played when a Pointer moves out of this Button.","line":389,"public":true,"protected":false,"private":false,"parameters":[{"name":"sound","type":["Phaser.Sound","Phaser.AudioSprite"],"help":"The Sound that will be played.","optional":false,"default":null},{"name":"marker","type":["string"],"help":"A Sound Marker that will be used in the playback.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"setOverSound","static":false,"returns":null,"help":"The Sound to be played when a Pointer moves over this Button.","line":365,"public":true,"protected":false,"private":false,"parameters":[{"name":"sound","type":["Phaser.Sound","Phaser.AudioSprite"],"help":"The Sound that will be played.","optional":false,"default":null},{"name":"marker","type":["string"],"help":"A Sound Marker that will be used in the playback.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"setSounds","static":false,"returns":null,"help":"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.\\nThe most common forms of sounds are 'hover' effects and 'click' effects, which is why the order of the parameters is overSound then downSound.\\nCall this function with no parameters at all to reset all sounds on this Button.","line":349,"public":true,"protected":false,"private":false,"parameters":[{"name":"overSound","type":["Phaser.Sound","Phaser.AudioSprite"],"help":"Over Button Sound.","optional":true,"default":null},{"name":"overMarker","type":["string"],"help":"Over Button Sound Marker.","optional":true,"default":null},{"name":"downSound","type":["Phaser.Sound","Phaser.AudioSprite"],"help":"Down Button Sound.","optional":true,"default":null},{"name":"downMarker","type":["string"],"help":"Down Button Sound Marker.","optional":true,"default":null},{"name":"outSound","type":["Phaser.Sound","Phaser.AudioSprite"],"help":"Out Button Sound.","optional":true,"default":null},{"name":"outMarker","type":["string"],"help":"Out Button Sound Marker.","optional":true,"default":null},{"name":"upSound","type":["Phaser.Sound","Phaser.AudioSprite"],"help":"Up Button Sound.","optional":true,"default":null},{"name":"upMarker","type":["string"],"help":"Up Button Sound Marker.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"setStageReference","static":false,"returns":null,"help":"Sets the containers Stage reference. This is the Stage that this object, and all of its children, is connected to.","line":383,"public":true,"protected":false,"private":false,"parameters":[{"name":"stage","type":["PIXI.Stage"],"help":"the stage that the container will have as its current stage reference","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"setTexture","static":false,"returns":null,"help":"Sets the texture of the sprite","line":142,"public":true,"protected":false,"private":false,"parameters":[{"name":"texture","type":["PIXI.Texture"],"help":"The PIXI texture that is displayed by the sprite","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"setUpSound","static":false,"returns":null,"help":"The Sound to be played when a Pointer has pressed down and is released from this Button.","line":437,"public":true,"protected":false,"private":false,"parameters":[{"name":"sound","type":["Phaser.Sound","Phaser.AudioSprite"],"help":"The Sound that will be played.","optional":false,"default":null},{"name":"marker","type":["string"],"help":"A Sound Marker that will be used in the playback.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"swapChildren","static":false,"returns":null,"help":"Swaps the position of 2 Display Objects within this container.","line":136,"public":true,"protected":false,"private":false,"parameters":[{"name":"child","type":["PIXI.DisplayObject"],"help":"","optional":false,"default":null},{"name":"child2","type":["PIXI.DisplayObject"],"help":"","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"tap","static":false,"returns":null,"help":"A callback that is used when the users taps on the sprite with their finger\\nbasically a touch version of click","line":296,"public":true,"protected":false,"private":false,"parameters":[{"name":"interactionData","type":["PIXI.InteractionData"],"help":"","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"toGlobal","static":false,"returns":{"types":["Phaser.Point"],"help":"A point object representing the position of this object"},"help":"Calculates the global position of the display object","line":592,"public":true,"protected":false,"private":false,"parameters":[{"name":"position","type":["Phaser.Point"],"help":"The world origin to calculate from","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"toLocal","static":false,"returns":{"types":["Phaser.Point"],"help":"A point object representing the position of this object"},"help":"Calculates the local position of the display object relative to another point","line":606,"public":true,"protected":false,"private":false,"parameters":[{"name":"position","type":["Phaser.Point"],"help":"The world origin to calculate from","optional":false,"default":null},{"name":"[from]","type":["PIXI.DisplayObject"],"help":"The DisplayObject to calculate the global position from","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"touchend","static":false,"returns":null,"help":"A callback that is used when the user releases a touch over the displayObject","line":308,"public":true,"protected":false,"private":false,"parameters":[{"name":"interactionData","type":["PIXI.InteractionData"],"help":"","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"touchendoutside","static":false,"returns":null,"help":"A callback that is used when the user releases the touch that was over the displayObject\\nfor this callback to be fired, The touch must have started over the sprite","line":315,"public":true,"protected":false,"private":false,"parameters":[{"name":"interactionData","type":["PIXI.InteractionData"],"help":"","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"touchstart","static":false,"returns":null,"help":"A callback that is used when the user touches over the displayObject","line":302,"public":true,"protected":false,"private":false,"parameters":[{"name":"interactionData","type":["PIXI.InteractionData"],"help":"","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"update","static":false,"returns":null,"help":"Override and use this function in your own custom objects to handle any update requirements you may have.","line":207,"public":true,"protected":false,"private":false,"parameters":[],"inherited":true,"inheritedFrom":"Phaser.Image"},{"name":"updateCache","static":false,"returns":null,"help":"Generates and updates the cached sprite for this object.","line":580,"public":true,"protected":false,"private":false,"parameters":[],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"updateCrop","static":false,"returns":null,"help":"If you have set a crop rectangle on this Image via Image.crop and since modified the Image.cropRect property (or the rectangle it references)\\nthen you need to update the crop frame by calling this method.","line":431,"public":true,"protected":false,"private":false,"parameters":[],"inherited":true,"inheritedFrom":"Phaser.Image"}],"protected":[{"name":"onInputDownHandler","static":false,"returns":null,"help":"Internal function that handles input events.","line":526,"public":false,"protected":true,"private":false,"parameters":[{"name":"sprite","type":["Phaser.Button"],"help":"The Button that the event occured on.","optional":false,"default":null},{"name":"pointer","type":["Phaser.Pointer"],"help":"The Pointer that activated the Button.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"onInputOutHandler","static":false,"returns":null,"help":"Internal function that handles input events.","line":500,"public":false,"protected":true,"private":false,"parameters":[{"name":"sprite","type":["Phaser.Button"],"help":"The Button that the event occured on.","optional":false,"default":null},{"name":"pointer","type":["Phaser.Pointer"],"help":"The Pointer that activated the Button.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"onInputOverHandler","static":false,"returns":null,"help":"Internal function that handles input events.","line":462,"public":false,"protected":true,"private":false,"parameters":[{"name":"sprite","type":["Phaser.Button"],"help":"The Button that the event occured on.","optional":false,"default":null},{"name":"pointer","type":["Phaser.Pointer"],"help":"The Pointer that activated the Button.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"onInputUpHandler","static":false,"returns":null,"help":"Internal function that handles input events.","line":552,"public":false,"protected":true,"private":false,"parameters":[{"name":"sprite","type":["Phaser.Button"],"help":"The Button that the event occured on.","optional":false,"default":null},{"name":"pointer","type":["Phaser.Pointer"],"help":"The Pointer that activated the Button.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"setState","static":false,"returns":null,"help":"Internal function that handles Button state changes.","line":602,"public":false,"protected":true,"private":false,"parameters":[{"name":"newState","type":["number"],"help":"The new State of the Button.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""}],"private":[],"static":[]},"properties":{"public":[{"name":"alive","type":["boolean"],"help":"","inlineHelp":"A useful boolean to control if the Image is alive or dead (in terms of your gameplay, it doesn't effect rendering).","line":83,"default":"true","public":true,"protected":false,"private":false,"readOnly":false},{"name":"alpha","type":["number"],"help":"The opacity of the object.","inlineHelp":"","line":52,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"anchor","type":["Phaser.Point"],"help":"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","inlineHelp":"","line":31,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"angle","type":["number"],"help":"Indicates the rotation of the Image, in degrees, from its original orientation. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.\\nValues outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.\\nIf you wish to work in radians instead of degrees use the property Image.rotation instead. Working in radians is also a little faster as it doesn't have to convert the angle.","inlineHelp":"The angle of this Image in degrees.","line":638,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"animations","type":["Phaser.AnimationManager"],"help":"","inlineHelp":"This manages animations of the sprite. You can modify animations through it (see Phaser.AnimationManager)","line":63,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"autoCull","type":["boolean"],"help":"Should this Image be automatically culled if out of range of the camera?\\nA culled sprite has its renderable property set to 'false'.\\nBe advised this is quite an expensive operation, as it has to calculate the bounds of the object every frame, so only enable it if you really need it.","inlineHelp":"A flag indicating if the Image should be automatically camera culled or not.","line":93,"default":"false","public":true,"protected":false,"private":false,"readOnly":false},{"name":"blendMode","type":["number"],"help":"The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.","inlineHelp":"","line":75,"default":"PIXI.blendModes.NORMAL;","public":true,"protected":false,"private":false,"readOnly":false},{"name":"buttonMode","type":["boolean"],"help":"This is used to indicate if the displayObject should display a mouse hand cursor on rollover","inlineHelp":"","line":77,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"cacheAsBitmap","type":["boolean"],"help":"Set if this display object is cached as a bitmap.\\nThis basically takes a snap shot of the display object as it is at that moment. It can provide a performance benefit for complex static displayObjects.\\nTo remove simply set this property to 'null'","inlineHelp":"","line":424,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"cameraOffset","type":["Phaser.Point"],"help":"","inlineHelp":"If this object is fixedToCamera then this stores the x\/y offset that its drawn at, from the top-left of the camera view.","line":109,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"children","type":["array PIXI.DisplayObject"],"help":"[read-only] The array of children of this container.","inlineHelp":"","line":24,"default":null,"public":true,"protected":false,"private":false,"readOnly":true},{"name":"cropRect","type":["Phaser.Rectangle"],"help":"","inlineHelp":"The Rectangle used to crop the texture. Set this via Sprite.crop. Any time you modify this property directly you must call Sprite.updateCrop.","line":115,"default":"null","public":true,"protected":false,"private":false,"readOnly":false},{"name":"debug","type":["boolean"],"help":"","inlineHelp":"Handy flag to use with Game.enableStep","line":104,"default":"false","public":true,"protected":false,"private":false,"readOnly":false},{"name":"defaultCursor","type":["string"],"help":"This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true\\n","inlineHelp":"","line":131,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"deltaX","type":["number"],"help":"Returns the delta x value. The difference between world.x now and in the previous step.","inlineHelp":"The delta value. Positive if the motion was to the right, negative if to the left.","line":661,"default":null,"public":true,"protected":false,"private":false,"readOnly":true},{"name":"deltaY","type":["number"],"help":"Returns the delta y value. The difference between world.y now and in the previous step.","inlineHelp":"The delta value. Positive if the motion was downwards, negative if upwards.","line":678,"default":null,"public":true,"protected":false,"private":false,"readOnly":true},{"name":"deltaZ","type":["number"],"help":"Returns the delta z value. The difference between rotation now and in the previous step.","inlineHelp":"The delta value.","line":695,"default":null,"public":true,"protected":false,"private":false,"readOnly":true},{"name":"destroyPhase","type":["boolean"],"help":"","inlineHelp":"True if this object is currently being destroyed.","line":921,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"events","type":["Phaser.Events"],"help":"","inlineHelp":"The Events you can subscribe to that are dispatched when certain things happen on this Image or its components.","line":58,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"exists","type":["boolean"],"help":"","inlineHelp":"If exists = false then the Image isn't updated by the core game loop.","line":36,"default":"true","public":true,"protected":false,"private":false,"readOnly":false},{"name":"filterArea","type":["Phaser.Rectangle"],"help":"The area the filter is applied to like the hitArea this is used as more of an optimisation\\nrather than figuring out the dimensions of the displayObject each frame you can set this rectangle","inlineHelp":"","line":168,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"filters","type":["array"],"help":"Sets the filters for the displayObject.\\n* IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer.\\nTo remove filters simply set this property to 'null'","inlineHelp":"","line":388,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"fixedToCamera","type":["boolean"],"help":"An Image that is fixed to the camera uses its x\/y coordinates as offsets from the top left of the camera. These are stored in Image.cameraOffset.\\nNote that the cameraOffset values are in addition to any parent in the display list.\\nSo if this Image was in a Group that has x: 200, then this will be added to the cameraOffset.x","inlineHelp":"Set to true to fix this Image to the Camera at its current world coordinates.","line":860,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"forceOut","type":["boolean"],"help":"When the Button is touched \/ clicked and then released you can force it to enter a state of \"out\" instead of \"up\".","inlineHelp":"","line":186,"default":"false","public":true,"protected":false,"private":false,"readOnly":false},{"name":"frame","type":["number"],"help":"","inlineHelp":"Gets or sets the current frame index and updates the Texture for display.","line":743,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"frameName","type":["string"],"help":"","inlineHelp":"Gets or sets the current frame by name and updates the Texture for display.","line":772,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"freezeFrames","type":["boolean"],"help":"","inlineHelp":"When true the Button will cease to change texture frame on all events (over, out, up, down).","line":179,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"game","type":["Phaser.Game"],"help":"","inlineHelp":"A reference to the currently running Game.","line":30,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"height","type":["number"],"help":"The height of the sprite, setting this will actually modify the scale to achieve the value set","inlineHelp":"","line":126,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"hitArea","type":["Phaser.Rectangle","Phaser.Circle","Phaser.Ellipse","Phaser.Polygon"],"help":"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)","inlineHelp":"","line":69,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"inCamera","type":["boolean"],"help":"Checks if the Image bounds are within the game camera, otherwise false if fully outside of it.","inlineHelp":"True if the Image bounds is within the game camera, even if only partially. Otherwise false if fully outside of it.","line":729,"default":null,"public":true,"protected":false,"private":false,"readOnly":true},{"name":"inWorld","type":["boolean"],"help":"Checks if the Image bounds are within the game world, otherwise false if fully outside of it.","inlineHelp":"True if the Image bounds is within the game world, even if only partially. Otherwise false if fully outside of it.","line":712,"default":null,"public":true,"protected":false,"private":false,"readOnly":true},{"name":"input","type":["Phaser.InputHandler","null"],"help":"","inlineHelp":"The Input Handler for this object. Needs to be enabled with image.inputEnabled = true before you can use it.","line":98,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"inputEnabled","type":["boolean"],"help":"By default an Image won't process any input events at all. By setting inputEnabled to true the Phaser.InputHandler is\\nactivated for this object and it will then start to process click\/touch events and more.","inlineHelp":"Set to true to allow this object to receive input events.","line":819,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"interactive","type":["boolean"],"help":"Indicates if the sprite will have touch and mouse interactivity. It is false by default","inlineHelp":"","line":327,"default":"false","public":true,"protected":false,"private":false,"readOnly":false},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","PIXI.Texture"],"help":"","inlineHelp":"This is the image or 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.","line":68,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"mask","type":["PIXI.Graphics"],"help":"Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it.\\nIn PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping.\\nTo remove a mask, set this property to null.","inlineHelp":"","line":369,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"name","type":["string"],"help":"","inlineHelp":"The user defined name given to this Image.","line":42,"default":"''","public":true,"protected":false,"private":false,"readOnly":false},{"name":"onDownSound","type":["Phaser.Sound"],"help":"","inlineHelp":"The Sound to be played when this Buttons Down state is activated.","line":124,"default":"null","public":true,"protected":false,"private":false,"readOnly":false},{"name":"onDownSoundMarker","type":["string"],"help":"","inlineHelp":"The Sound Marker used in conjunction with the onDownSound.","line":148,"default":"''","public":true,"protected":false,"private":false,"readOnly":false},{"name":"onInputDown","type":["Phaser.Signal"],"help":"","inlineHelp":"The Signal (or event) dispatched when this Button is in an Down state.","line":169,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onInputOut","type":["Phaser.Signal"],"help":"","inlineHelp":"The Signal (or event) dispatched when this Button is in an Out state.","line":164,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onInputOver","type":["Phaser.Signal"],"help":"","inlineHelp":"The Signal (or event) dispatched when this Button is in an Over state.","line":159,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onInputUp","type":["Phaser.Signal"],"help":"","inlineHelp":"The Signal (or event) dispatched when this Button is in an Up state.","line":174,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onOutSound","type":["Phaser.Sound"],"help":"","inlineHelp":"The Sound to be played when this Buttons Out state is activated.","line":118,"default":"null","public":true,"protected":false,"private":false,"readOnly":false},{"name":"onOutSoundMarker","type":["string"],"help":"","inlineHelp":"The Sound Marker used in conjunction with the onOutSound.","line":142,"default":"''","public":true,"protected":false,"private":false,"readOnly":false},{"name":"onOverMouseOnly","type":["boolean"],"help":"","inlineHelp":"If true then onOver events (such as onOverSound) will only be triggered if the Pointer object causing them was the Mouse Pointer.","line":106,"default":"false","public":true,"protected":false,"private":false,"readOnly":false},{"name":"onOverSound","type":["Phaser.Sound"],"help":"","inlineHelp":"The Sound to be played when this Buttons Over state is activated.","line":112,"default":"null","public":true,"protected":false,"private":false,"readOnly":false},{"name":"onOverSoundMarker","type":["string"],"help":"","inlineHelp":"The Sound Marker used in conjunction with the onOverSound.","line":136,"default":"''","public":true,"protected":false,"private":false,"readOnly":false},{"name":"onUpSound","type":["Phaser.Sound"],"help":"","inlineHelp":"The Sound to be played when this Buttons Up state is activated.","line":130,"default":"null","public":true,"protected":false,"private":false,"readOnly":false},{"name":"onUpSoundMarker","type":["string"],"help":"","inlineHelp":"The Sound Marker used in conjunction with the onUpSound.","line":154,"default":"''","public":true,"protected":false,"private":false,"readOnly":false},{"name":"parent","type":["PIXI.DisplayObjectContainer"],"help":"[read-only] The display object container that contains this display object.","inlineHelp":"","line":94,"default":null,"public":true,"protected":false,"private":false,"readOnly":true},{"name":"pivot","type":["Phaser.Point"],"help":"The pivot point of the displayObject that it rotates around","inlineHelp":"","line":36,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"position","type":["Phaser.Point"],"help":"The coordinate of the object relative to the local coordinates of the parent.","inlineHelp":"","line":20,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"renderOrderID","type":["number"],"help":"","inlineHelp":"The render order ID, reset every frame.","line":802,"default":null,"public":true,"protected":false,"private":false,"readOnly":true},{"name":"renderable","type":["boolean"],"help":"Can this object be rendered","inlineHelp":"","line":85,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"rotation","type":["number"],"help":"The rotation of the object in radians.","inlineHelp":"","line":44,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"scale","type":["Phaser.Point"],"help":"The scale factor of the object.","inlineHelp":"","line":28,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"shader","type":["PIXI.AbstractFilter"],"help":"The shader that will be used to render the texture to the stage. Set to null to remove a current shader.","inlineHelp":"","line":84,"default":"null","public":true,"protected":false,"private":false,"readOnly":false},{"name":"smoothed","type":["boolean"],"help":"Enable or disable texture smoothing for this Image. Only works for bitmap\/image textures. Smoothing is enabled by default.","inlineHelp":"Set to true to smooth the texture of this Image, or false to disable smoothing (great for pixel art)","line":889,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"stage","type":["PIXI.Stage"],"help":"[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.","inlineHelp":"","line":103,"default":null,"public":true,"protected":false,"private":false,"readOnly":true},{"name":"texture","type":["PIXI.Texture"],"help":"The texture that the sprite is using","inlineHelp":"","line":39,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"tint","type":["number"],"help":"The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.","inlineHelp":"","line":66,"default":"0xFFFFFF","public":true,"protected":false,"private":false,"readOnly":false},{"name":"type","type":["number"],"help":"","inlineHelp":"The Phaser Object Type.","line":44,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"visible","type":["boolean"],"help":"The visibility of the object.","inlineHelp":"","line":60,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"width","type":["number"],"help":"The width of the sprite, setting this will actually modify the scale to achieve the value set","inlineHelp":"","line":110,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"world","type":["Phaser.Point"],"help":"","inlineHelp":"The world coordinates of this Image. This differs from the x\/y coordinates which are relative to the Images container.","line":77,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"worldAlpha","type":["number"],"help":"[read-only] The multiplied alpha of the displayObject","inlineHelp":"","line":112,"default":null,"public":true,"protected":false,"private":false,"readOnly":true},{"name":"worldVisible","type":["boolean"],"help":"[read-only] Indicates if the sprite is globally visible.","inlineHelp":"","line":346,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"x","type":["number"],"help":"The position of the displayObject on the x axis relative to the local coordinates of the parent.","inlineHelp":"","line":734,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"y","type":["number"],"help":"The position of the displayObject on the y axis relative to the local coordinates of the parent.","inlineHelp":"","line":749,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"z","type":["number"],"help":"","inlineHelp":"The z-depth value of this object within its Group (remember the World is a Group as well). No two objects in a Group can have the same z value.","line":53,"default":null,"public":true,"protected":false,"private":false,"readOnly":false}],"protected":[],"private":[{"name":"_onDownFrameID","type":["number"],"help":"","inlineHelp":"Internal variable.","line":93,"default":"null","public":false,"protected":false,"private":true,"readOnly":false},{"name":"_onDownFrameName","type":["string"],"help":"","inlineHelp":"Internal variable.","line":65,"default":"null","public":false,"protected":false,"private":true,"readOnly":false},{"name":"_onOutFrameID","type":["number"],"help":"","inlineHelp":"Internal variable.","line":86,"default":"null","public":false,"protected":false,"private":true,"readOnly":false},{"name":"_onOutFrameName","type":["string"],"help":"","inlineHelp":"Internal variable.","line":58,"default":"null","public":false,"protected":false,"private":true,"readOnly":false},{"name":"_onOverFrameID","type":["number"],"help":"","inlineHelp":"Internal variable.","line":79,"default":"null","public":false,"protected":false,"private":true,"readOnly":false},{"name":"_onOverFrameName","type":["string"],"help":"","inlineHelp":"Internal variable.","line":51,"default":"null","public":false,"protected":false,"private":true,"readOnly":false},{"name":"_onUpFrameID","type":["number"],"help":"","inlineHelp":"Internal variable.","line":100,"default":"null","public":false,"protected":false,"private":true,"readOnly":false},{"name":"_onUpFrameName","type":["string"],"help":"","inlineHelp":"Internal variable.","line":72,"default":"null","public":false,"protected":false,"private":true,"readOnly":false}]}} |