mirror of
https://github.com/photonstorm/phaser
synced 2024-12-28 14:03:40 +00:00
1 line
No EOL
11 KiB
JSON
Executable file
1 line
No EOL
11 KiB
JSON
Executable file
{"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,"returns":{"types":["string"],"help":"A base64 encoded string of the texture."},"help":"Will return a a base64 encoded string of this texture. It works by calling RenderTexture.getCanvas and then running toDataURL on that.","line":294,"public":true,"protected":false,"private":false,"parameters":[],"inherited":true,"inheritedFrom":"Phaser.RenderTexture"},{"name":"getCanvas","static":false,"returns":{"types":["HTMLCanvasElement"],"help":"A Canvas element with the texture rendered on."},"help":"Creates a Canvas element, renders this RenderTexture to it and then returns it.","line":305,"public":true,"protected":false,"private":false,"parameters":[],"inherited":true,"inheritedFrom":"Phaser.RenderTexture"},{"name":"getImage","static":false,"returns":{"types":["Image"],"help":""},"help":"Will return a HTML Image of the texture","line":281,"public":true,"protected":false,"private":false,"parameters":[],"inherited":true,"inheritedFrom":"Phaser.RenderTexture"},{"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":"render","static":false,"returns":null,"help":"This function will draw the display object to the texture.","line":90,"public":true,"protected":false,"private":false,"parameters":[{"name":"displayObject","type":["Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Group"],"help":" The display object to render to this texture.","optional":false,"default":null},{"name":"position","type":["Phaser.Point"],"help":"A Point object containing the position to render the display object at.","optional":false,"default":null},{"name":"clear","type":["boolean"],"help":"If true the texture will be cleared before the display object is drawn.","optional":false,"default":null}],"inherited":true,"inheritedFrom":"Phaser.RenderTexture"},{"name":"renderXY","static":false,"returns":null,"help":"This function will draw the display object to the texture.","line":66,"public":true,"protected":false,"private":false,"parameters":[{"name":"displayObject","type":["Phaser.Sprite","Phaser.Image","Phaser.Text","Phaser.BitmapText","Phaser.Group"],"help":" The display object to render to this texture.","optional":false,"default":null},{"name":"x","type":["number"],"help":"The x position to render the object at.","optional":false,"default":null},{"name":"y","type":["number"],"help":"The y position to render the object at.","optional":false,"default":null},{"name":"clear","type":["boolean"],"help":"If true the texture will be cleared before the display object is drawn.","optional":false,"default":null}],"inherited":true,"inheritedFrom":"Phaser.RenderTexture"},{"name":"resize","static":false,"returns":null,"help":"Resizes the RenderTexture.","line":145,"public":true,"protected":false,"private":false,"parameters":[{"name":"width","type":["number"],"help":"The width to resize to.","optional":false,"default":null},{"name":"height","type":["number"],"help":"The height to resize to.","optional":false,"default":null},{"name":"updateBase","type":["boolean"],"help":"Should the baseTexture.width and height values be resized as well?","optional":false,"default":null}],"inherited":true,"inheritedFrom":"Phaser.RenderTexture"},{"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 the texture to set it to","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Texture"}],"protected":[],"private":[],"static":[]},"properties":{"public":[{"name":"baseTexture","type":["PIXI.BaseTexture"],"help":"The base texture object that this texture uses","inlineHelp":"","line":84,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"crop","type":["Phaser.Rectangle"],"help":"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)","inlineHelp":"","line":76,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"frame","type":["Phaser.Rectangle"],"help":"The framing rectangle of the render texture","inlineHelp":"","line":67,"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":31,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"height","type":["number"],"help":"The height of the render texture","inlineHelp":"","line":51,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"key","type":["string"],"help":"","inlineHelp":"The key of the RenderTexture in the Cache, if stored there.","line":36,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"matrix","type":["PIXI.Matrix"],"help":"","inlineHelp":"The matrix that is applied when display objects are rendered to this RenderTexture.","line":46,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"noFrame","type":["boolean"],"help":"Does this Texture have any frame data assigned to it?","inlineHelp":"","line":30,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"renderer","type":["PIXI.CanvasRenderer","PIXI.WebGLRenderer"],"help":"The renderer this RenderTexture uses. A RenderTexture can only belong to one renderer at the moment if its webGL.","inlineHelp":"","line":105,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"requiresUpdate","type":["boolean"],"help":"This will let a renderer know that a texture has been updated (used mainly for webGL uv updates)","inlineHelp":"","line":81,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"resolution","type":["number"],"help":"The Resolution of the texture.","inlineHelp":"","line":59,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"trim","type":["Phaser.Rectangle"],"help":"The texture trim data.","inlineHelp":"","line":65,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"type","type":["number"],"help":"","inlineHelp":"Base Phaser object type.","line":41,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"valid","type":["boolean"],"help":"","inlineHelp":"","line":129,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"width","type":["number"],"help":"The with of the render texture","inlineHelp":"","line":43,"default":null,"public":true,"protected":false,"private":false,"readOnly":false}],"protected":[],"private":[]}} |