Creates a texture from an image source. If the source is not valid it creates an empty texture.
name | type | arguments | Default | 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. |
||
forceClamp | boolean | <optional> | false |
Force the texture to use the CLAMP_TO_EDGE wrap mode, even if a power of two? |
The WebGL Texture that was created, or null
if it couldn't be created.