mirror of
https://github.com/photonstorm/phaser
synced 2024-12-22 11:03:23 +00:00
1 line
11 KiB
JSON
1 line
11 KiB
JSON
|
{"class":{"name":"Phaser.RenderTexture","extends":"PIXI.RenderTexture","static":false,"constructor":true,"parameters":[{"name":"game","type":["Phaser.Game"],"help":"Current game instance.","optional":false,"default":null},{"name":"key","type":["string"],"help":"Internal Phaser reference key for the render texture.","optional":false,"default":null},{"name":"width","type":["number"],"help":"The width of the render texture.","optional":true,"default":"100"},{"name":"height","type":["number"],"help":"The height of the render texture.","optional":true,"default":"100"},{"name":"key","type":["string"],"help":"The key of the RenderTexture in the Cache, if stored there.","optional":true,"default":"''"},{"name":"scaleMode","type":["number"],"help":"One of the Phaser.scaleModes consts.","optional":true,"default":"Phaser.scaleModes.DEFAULT"},{"name":"resolution","type":["number"],"help":"The resolution of the texture being generated.","optional":true,"default":"1"}],"help":"A RenderTexture is a special texture that allows any displayObject to be rendered to it. It allows you to take many complex objects and\\nrender 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."},"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":"clear","static":false,"returns":null,"help":"Clears the RenderTexture.","line":176,"public":true,"protected":false,"private":false,"parameters":[],"inherited":true,"inheritedFrom":"Phaser.RenderTexture"},{"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":"getBase64","static":false,"r
|