Class Index | File Index

Classes


Class JSC3D.Texture

Texture This class implements texture which describes the surface details for a mesh.
Defined in: jsc3d.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
JSC3D.Texture(name, onready)
Method Summary
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.
 
See if this texture contains texel data.
 
See if this texture has mip-maps.
Class Detail
JSC3D.Texture(name, onready)
Parameters:
name
onready
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.

Documentation generated by JsDoc Toolkit 2.1.0 on Thu Nov 28 2013 14:35:14 GMT+0800 (CST)