Resizes the Render Texture to the new dimensions given.
In WebGL it will destroy and then re-create the frame buffer being used by the Render Texture. In Canvas it will resize the underlying canvas element.
Both approaches will erase everything currently drawn to the Render Texture.
If the dimensions given are the same as those already being used, calling this method will do nothing.
name | type | arguments | Default | description |
---|---|---|---|---|
width | number |
The new width of the Render Texture. |
||
height | number | <optional> | width |
The new height of the Render Texture. If not specified, will be set the same as the |
This Render Texture.