Constructor
new TextureInfo(image, useWebGLopt)
Create a TextureInfo, called automatically by the engine
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
image | HTMLImageElement | | |||
useWebGL | boolean | <optional> | true | Should use WebGL if available? |
- Source
Members
glTexture
PropertiesType | Description |
---|---|
WebGLTexture | WebGL texture |
- Source
image
PropertiesType | Description |
---|---|
HTMLImageElement | | image source |
- Source
size
PropertiesType | Description |
---|---|
Vector2 | size of the image |
- Source
sizeInverse
PropertiesType | Description |
---|---|
Vector2 | inverse of the size, cached for rendering |
- Source
Methods
createWebGLTexture()
Creates the WebGL texture, updates if already created
- Source
destroyWebGLTexture()
Destroys the WebGL texture
- Source
hasWebGL() → {boolean}
Check if the texture is webgl enabled
- Source
Returns:
- Type:
- boolean