mirror of
https://github.com/photonstorm/phaser
synced 2024-12-20 18:14:13 +00:00
1 line
6.8 KiB
JSON
1 line
6.8 KiB
JSON
|
{"class":{"name":"PIXI.Texture","extends":"","static":false,"constructor":true,"parameters":[{"name":"baseTexture","type":["PIXI.BaseTexture"],"help":"The base texture source to create the texture from","optional":false,"default":null},{"name":"frame","type":["Phaser.Rectangle"],"help":"The rectangle frame of the texture to show","optional":false,"default":null},{"name":"[crop]","type":["Phaser.Rectangle"],"help":"The area of original texture","optional":false,"default":null},{"name":"[trim]","type":["Phaser.Rectangle"],"help":"Trimmed texture rectangle","optional":false,"default":null}],"help":"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."},"consts":[],"methods":{"public":[{"name":"addTextureToCache","static":true,"returns":null,"help":"Adds a texture to the global PIXI.TextureCache. This cache is shared across the whole PIXI object.","line":292,"public":true,"protected":false,"private":false,"parameters":[{"name":"texture","type":["PIXI.Texture"],"help":"The Texture to add to the cache.","optional":false,"default":null},{"name":"id","type":["string"],"help":"The id that the texture will be stored against.","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Texture"},{"name":"destroy","static":false,"returns":null,"help":"Destroys this texture","line":155,"public":true,"protected":false,"private":false,"parameters":[{"name":"destroyBase","type":["boolean"],"help":"Whether to destroy the base texture as well","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Texture"},{"name":"fromCanvas","static":true,"returns":{"types":[],"help":[]},"help":"Helper function that creates a new a Texture based on the given canvas element.","line":276,"public":true,"protected":false,"private":false,"parameters":[{"name":"canvas","type":["PIXI.Canvas"],"help":"The canvas element source of the texture","optional":false,"default":null},{"name":"scaleMode","type":["number"],"help":"Should be one of the PIXI.scaleMode consts","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Texture"},{"name":"fromFrame","static":true,"returns":{"types":[],"help":[]},"help":"Helper function that returns a Texture objected based on the given frame id.\\nIf the frame id is not in the texture cache an error will be thrown.","line":260,"public":true,"protected":false,"private":false,"parameters":[{"name":"frameId","type":["string"],"help":"The frame id of the texture","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Texture"},{"name":"fromImage","static":true,"returns":{"types":[],"help":[]},"help":"Helper function that creates a Texture object from the given image url.\\nIf the image is not in the texture cache it will be created and loaded.","line":238,"public":true,"protected":false,"private":false,"parameters":[{"name":"imageUrl","type":["string"],"help":"The image url of the texture","optional":false,"default":null},{"name":"crossorigin","type":["boolean"],"help":"Whether requests should be treated as crossorigin","optional":false,"default":null},{"name":"scaleMode","type":["number"],"help":"Should be one of the PIXI.scaleMode consts","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Texture"},{"name":"removeTextureFromCache","static":true,"returns":{"types":["PIXI.Texture"],"help":"The texture that was removed"},"help":"Remove a texture from the global PIXI.TextureCache.","line":305,"public":true,"protected":false,"private":false,"parameters":[{"name":"id","type":["string"],"help":"The id of the texture to be removed","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Texture"},{"name":"setFrame","static":false,"returns":null,"help":"Specifies the region of the baseTexture that this texture will use.","line":168,"public":true,"protected":false,"private":false,"parameters":[{"name":"frame","type":["Phaser.Rectangle"],"help":"The frame of t
|