mirror of
https://github.com/photonstorm/phaser
synced 2024-12-19 09:34:02 +00:00
1 line
40 KiB
JSON
1 line
40 KiB
JSON
|
{"class":{"name":"Phaser.Image","extends":"PIXI.Sprite","static":false,"constructor":true,"parameters":[{"name":"game","type":["Phaser.Game"],"help":"A reference to the currently running game.","optional":false,"default":null},{"name":"x","type":["number"],"help":"The x coordinate of the Image. The coordinate is relative to any parent container this Image may be in.","optional":false,"default":null},{"name":"y","type":["number"],"help":"The y coordinate of the Image. The coordinate is relative to any parent container this Image may be in.","optional":false,"default":null},{"name":"key","type":["string","Phaser.RenderTexture","Phaser.BitmapData","PIXI.Texture"],"help":"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.","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}],"help":"An Image is a light-weight object you can use to display anything that doesn't need physics or animation.\\nIt can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics."},"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":"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
|