generateTexture(resolution, scaleMode, padding) → {PIXI.Texture}
Useful function that returns a texture of the graphics object that can then be used to create sprites
This can be quite useful if your geometry is complicated and needs to be reused multiple times.
Parameters
Name | Type | Argument | Default | Description |
---|---|---|---|---|
resolution | Number | <optional> | 1 | The resolution of the texture being generated |
scaleMode | Number | <optional> | 0 | Should be one of the PIXI.scaleMode consts |
padding | Number | <optional> | 0 | Add optional extra padding to the generated texture (default 0) |
Returns
a texture of the graphics object
- Source code: pixi/primitives/Graphics.js (Line 654)
Please login to continue.