renderTexture(width, height, key, addToCache) → {Phaser.RenderTexture}
A dynamic initially blank canvas to which images can be drawn.
Parameters
Name | Type | Argument | Default | Description |
---|---|---|---|---|
width | number | <optional> | 100 | the width of the RenderTexture. |
height | number | <optional> | 100 | the height of the RenderTexture. |
key | string | <optional> | '' | Asset key for the RenderTexture when stored in the Cache (see addToCache parameter). |
addToCache | boolean | <optional> | false | Should this RenderTexture be added to the Game.Cache? If so you can retrieve it with Cache.getTexture(key) |
Returns
The newly created RenderTexture object.
- Source code: gameobjects/GameObjectCreator.js (Line 353)
Please login to continue.