Generate a texture from this Graphics object.
key is a string it'll generate a new texture using it and add it into the
Texture Manager (assuming no key conflict happens).
key is a Canvas it will draw the texture to that canvas context. Note that it will NOT
automatically upload it to the GPU in WebGL mode.
Please understand that the texture is created via the Canvas API of the browser, therefore some
Graphics features, such as
fillGradientStyle, will not appear on the resulting texture,
as they're unsupported by the Canvas API.
|string | HTMLCanvasElement
The key to store the texture with in the Texture Manager, or a Canvas to draw to.
The width of the graphics to generate.
The height of the graphics to generate.
This Game Object.