Class JSC3D.Texture
Texture
This class implements texture which describes the surface details for a mesh.
Defined in: jsc3d.js.
Constructor Attributes | Constructor Name and Description |
---|---|
JSC3D.Texture(name, onready)
|
Method Attributes | Method Name and Description |
---|---|
createFromImage(image, useMipmap)
Extract texture data from an exsisting image.
|
|
createFromUrl(imageUrl, useMipmap)
Load an image and extract texture data from it.
|
|
Generate mip-map pyramid for the texture.
|
|
hasData()
See if this texture contains texel data.
|
|
See if this texture has mip-maps.
|
Method Detail
createFromImage(image, useMipmap)
Extract texture data from an exsisting image.
- Parameters:
- {Image} image
- image as datasource of the texture.
- {Boolean} useMipmap
- set true to generate mip-maps; false(default) not to generate mip-maps.
createFromUrl(imageUrl, useMipmap)
Load an image and extract texture data from it.
- Parameters:
- {String} imageUrl
- where to load the image.
- {Boolean} useMipmap
- set true to generate mip-maps; false(default) not to generate mip-maps.
generateMipmaps()
Generate mip-map pyramid for the texture.
{Boolean}
hasData()
See if this texture contains texel data.
- Returns:
- {Boolean} true if it has texel data; false if not.
{Boolean}
hasMipmap()
See if this texture has mip-maps.
- Returns:
- {Boolean} true if it has mip-maps; false if not.