Class enchant.gl.Texture
- Defined in: gl.enchant.js
Constructor Attributes | Constructor Name and Description |
---|---|
enchant.gl.Texture(src, opt)
Class to store Sprite3D texture information.
|
Field Attributes | Field Name and Description |
---|---|
Ambient light parameter
|
|
Light scattering parameter
|
|
Amount of luminescence
|
|
Specular figures
|
|
Amount of light reflection
|
|
Texture image source.
|
Class Detail
enchant.gl.Texture(src, opt)
Class to store Sprite3D texture information.
var sprite = new Sprite3D(); var texture = new Texture(); texture.src = "http://example.com/texture.png"; // Can also be declared as below. // var texture = new Texture("http://example.com/texture.png"); sprite.texture = texture;
- Parameters:
- src
- opt
Field Detail
{Number[]}
ambient
Ambient light parameter
{Number[]}
diffuse
Light scattering parameter
{Number[]}
emission
Amount of luminescence
{Number}
shininess
Specular figures
{Number[]}
specular
Amount of light reflection
{String}
src
Texture image source.
You can set URL or core.assets data.