Light
Light class
Constructor Summary
Public Constructor | ||
public |
constructor |
Member Summary
Public Members | ||
public |
|
|
public |
ambient: * |
|
public |
diffuse: * |
|
public |
position: * |
|
public |
specular: * |
|
public |
|
Method Summary
Public Methods | ||
public |
get ambient value |
|
public |
get diffuse value |
|
public |
get position of light |
|
public |
get specular value |
|
public |
getType(): int get type of light |
|
public |
setAmbient(r: float, g: float, b: float, a: float): void set ambient value |
|
public |
setDiffuse(r: float, g: float, b: float, a: float): void set diffuse value |
|
public |
setPosition(x: float, y: float, z: float): void set position of Light |
|
public |
setSpecular(r: float, g: float, b: float, a: float): void set specular value |
|
public |
setType(type: int): void set type of light |
Public Constructors
Public Members
public ambient: * source
public diffuse: * source
public position: * source
public specular: * source
Public Methods
public setAmbient(r: float, g: float, b: float, a: float): void source
set ambient value
Params:
Name | Type | Attribute | Description |
r | float | red value (0.0 - 1.0) |
|
g | float | green value (0.0 - 1.0) |
|
b | float | blue value (0.0 - 1.0) |
|
a | float | alpha value (0.0 - 1.0) |
Return:
void |
public setDiffuse(r: float, g: float, b: float, a: float): void source
set diffuse value
Params:
Name | Type | Attribute | Description |
r | float | red value (0.0 - 1.0) |
|
g | float | green value (0.0 - 1.0) |
|
b | float | blue value (0.0 - 1.0) |
|
a | float | alpha value (0.0 - 1.0) |
Return:
void |
public setPosition(x: float, y: float, z: float): void source
set position of Light
Params:
Name | Type | Attribute | Description |
x | float | X value |
|
y | float | Y value |
|
z | float | Z value |
Return:
void |
public setSpecular(r: float, g: float, b: float, a: float): void source
set specular value
Params:
Name | Type | Attribute | Description |
r | float | red value (0.0 - 1.0) |
|
g | float | green value (0.0 - 1.0) |
|
b | float | blue value (0.0 - 1.0) |
|
a | float | alpha value (0.0 - 1.0) |
Return:
void |
public setType(type: int): void source
set type of light
Params:
Name | Type | Attribute | Description |
type | int | type of light |
Return:
void |