Creates a texture from an image source. If the source is not valid it creates an empty texture.
name | type | description |
---|---|---|
source | object |
The source of the texture. |
width | number |
The width of the texture. |
height | number |
The height of the texture. |
scaleMode | number |
The scale mode to be used by the texture. |
The WebGL Texture that was created, or null
if it couldn't be created.