Methods
fromData(width, height, dataArray) → {Texture}
update texture from dataArray
- Source:
Parameters:
Name | Type | Description |
---|---|---|
width |
number
|
|
height |
number
|
|
dataArray |
Float32Array
|
Float64Array
|
Returns:
- Type:
-
Texture
fromImage(image, width, height)
update data fro texture with image
- Source:
Parameters:
Name | Type | Description |
---|---|---|
image |
Image
|
|
width |
number
|
|
height |
number
|
Returns:
Texture
fromSize(width, height) → {Texture}
update texture with width and height and emptyData
- Source:
Parameters:
Name | Type | Description |
---|---|---|
width |
number
|
|
height |
number
|
Returns:
- Type:
-
Texture
isActiveTexture(unit) → {boolean}
confirm texture is active
- Source:
Parameters:
Name | Type | Description |
---|---|---|
unit |
GLenum
|
Returns:
- Type:
-
boolean
setFilter(filter) → {Texture}
https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/texParameter
https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getTexParameter
https://webglfundamentals.org/webgl/lessons/webgl-3d-textures.html
- Source:
Parameters:
Name | Type | Description |
---|---|---|
filter |
GLenum
|
Returns:
- Type:
-
Texture
setFormat(format, internalFormat, type)
update format for texture
- Source:
Parameters:
Name | Type | Description |
---|---|---|
format |
GLenum
|
|
internalFormat |
GLenum
|
|
type |
Glenum
|
setMagFilter(filter) → {Texture}
set mag filter to texture
- Source:
Parameters:
Name | Type | Description |
---|---|---|
filter |
GLenum
|
Returns:
- Type:
-
Texture
setMinFilter(filter) → {Texture}
set min filter to texture
- Source:
Parameters:
Name | Type | Description |
---|---|---|
filter |
GLenum
|
Returns:
- Type:
-
Texture
setPixelStore(pname, params)
specify the pixel storage mode
- Source:
Parameters:
Name | Type | Description |
---|---|---|
pname |
GLenum
|
|
params |
object
|