H3DU.TextureInfo
H3DU.TextureInfo([params])
Specifies information about a texture, which can serve as image data applied to the surface of a shape, or even a 2-dimensional array of pixels used for some other purpose, such as a depth map, a height map, a bump map, a specular map, and so on.
By default, texture coordinates go from (0,0) at the lower-left corner to (1,1) at the upper-right corner (because the "topDown" property is false by default).
For best results, any textures to be used in WebGL should have width and height each equal to a power of 2, such as 2, 4, 8, 16, and 32.
Parameters
params
(Type: Object) (optional)
An object as described in H3DU.TextureInfo.setParams.
Methods
- copyFrom
Copies the parameters from another texture information object to this object. - setParams
Sets parameters for this texture information object.
H3DU.TextureInfo#copyFrom([other])
Copies the parameters from another texture information object to this object.
Parameters
other
(Type: H3DU.TextureInfo) (optional)
Texture information object to copy.
Return Value
This object. (Type: H3DU.TextureInfo)
H3DU.TextureInfo#setParams(params)
Sets parameters for this texture information object.
Parameters
params
(Type: Object)
An object whose keys have the possibilities given later, and whose values are those allowed for each key.uri
- URI (Internet address) of the texture's data.format
- Specifies the kind of data stored in each pixel of the texture. Can be 6406, 6407, 6408 (RGBA), 6409, 6410.internalFormat
- Specifies the format of the texture. Can be one of the values for "format".target
- Specifies the texture target. Can be 3553 (TEXTURE_2D).type
- Specifies the data type used to encode each pixel component in the texture. Can be 5121, 33635, 32819, 32820.magFilter
- Specifies the filter to use when enlarging the texture. Can be 9728 (NEAREST) or 9729 (LINEAR).minFilter
- Specifies the filter to use when shrinking the texture. Can be one of the values for "magFilter" or 9984, 9985, 9986 (NEAREST_MIPMAP_LINEAR), 9987.wrapS
- Specifies the wrapping mode in the S (horizontal) axis. Can be 10497 (REPEAT), 33071, 33648.wrapT
-Specifies the wrapping mode in the T (horizontal) axis. Can be one of the values for "wrapS".topDown
- If true, the image's data will be stored starting from the top row and proceeding downwards.
Return Value
This object. (Type: H3DU.TextureInfo)