API / geotoolkit / webgl / Texture / Texture
This class create a texture for WebGL.
Constructors
Methods
▸ getAttributes(): Attributes
Return the attributes of the texture
The attributes
▸ getImage(): ArrayBufferView | HTMLCanvasElement | HTMLImageElement
Return the pixel source of this texture
ArrayBufferView | HTMLCanvasElement | HTMLImageElement
the pixel source
▸ getName(): string
Return the name of the texture
string
the name of the texture
▸ setFilter(magFilter?, minFilter?): Texture
Set how this texture is sampled when a texel covers more or less than a pixel
| Name | Type | Description |
|---|---|---|
Optional magFilter | number | texel covers more than a pixel |
Optional minFilter | number | texel covers less than a pixel |
this
▸ setFlipY(flag): Texture
Set whether to flip texture along vertical axis
| Name | Type | Description |
|---|---|---|
flag | boolean | the flag |
this
▸ setFormat(format): Texture
Set the format of texel data
| Name | Type | Description |
|---|---|---|
format | number | the format |
this
▸ setImage(image): Texture
Set image for this texture
| Name | Type | Description |
|---|---|---|
image | ArrayBufferView | HTMLCanvasElement | HTMLImageElement | the pixel source |
this
▸ setName(name): Texture
Set name for this texture
| Name | Type | Description |
|---|---|---|
name | string | the attribute name |
this
▸ setType(type): Texture
Set the data type oof texel data
| Name | Type | Description |
|---|---|---|
type | number | the data type |
this
▸ setWrap(U?, V?): Texture
Set how this texture is wrapped in UV mapping.
| Name | Type | Description |
|---|---|---|
Optional U | number | the U in UV mapping |
Optional V | number | the V in UV mapping |
this