Implements
Methods
A Useful function that returns a texture of the display object that can then be used to create sprites This can be quite useful if your container is complicated and needs to be reused multiple times.
Name | Type | Attributes | Description |
---|---|---|---|
options |
GenerateTextureOptions | Container |
Generate texture options. |
|
options.container |
Container |
<optional> |
If not given, the renderer's resolution is used. |
options.region |
Rectangle |
The region of the container, that shall be rendered, if no region is specified, defaults to the local bounds of the container. |
|
options.textureSourceOptions |
GenerateTextureSourceOptions |
<optional> |
Texture options for GPU. |
Returns:
Type | Description |
---|---|
Texture | a shiny new texture of the container passed in |