Class enchant.gl.Texture
- Defined in: gl.enchant.js
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
enchant.gl.Texture(src, opt)
テクスチャ情報を格納するクラス.
|
| Field Attributes | Field Name and Description |
|---|---|
|
環境光のパラメータ
|
|
|
拡散光のパラメータ
|
|
|
光の発光量
|
|
|
鏡面計数
|
|
|
光の反射量
|
|
|
テクスチャ画像のソース.
|
Class Detail
enchant.gl.Texture(src, opt)
テクスチャ情報を格納するクラス.
var sprite = new Sprite3D();
var texture = new Texture();
texture.src = "http://example.com/texture.png";
// 以下のようにも宣言できる.
// var texture = new Texture("http://example.com/texture.png");
sprite.texture = texture;
- Parameters:
- src
- opt
Field Detail
{Number[]}
ambient
環境光のパラメータ
{Number[]}
diffuse
拡散光のパラメータ
{Number[]}
emission
光の発光量
{Number}
shininess
鏡面計数
{Number[]}
specular
光の反射量
{String}
src
テクスチャ画像のソース.
URLかcore.assets内のデータを指定できる.