Class Index | File Index

## Classes

- _global_
- JSC3D
- JSC3D.AABB
- JSC3D.BinaryStream
- JSC3D.LoaderSelector
- JSC3D.Material
- JSC3D.Math3D
- JSC3D.Matrix3x4
- JSC3D.Mesh
- JSC3D.ObjLoader
- JSC3D.PickInfo
- JSC3D.Scene
- JSC3D.StlLoader
- JSC3D.Texture
- JSC3D.Viewer

# 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.
| generateMipmaps() Generate mip-map pyramid for the texture.
| hasData() See if this texture contains texel data.
| hasMipmap() 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)