new XMaterials()
System for managing object's materials, affected by xlight. A system that managing object's material, plus environment effect, not material itself.
- Source:
Methods
change(e, vparas) → {XMaterials}
Update mesh material uniforms
Parameters:
Name | Type | Description |
---|---|---|
e |
Entity | entity's material to be changed. e must has an Obj3. |
vparas |
object | paras in the same structure of Visual.paras |
- Source:
Returns:
this
- Type
- XMaterials
changeLight(p) → {XMaterials}
Set scene light parameters.
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
p |
object | light parameters Properties
|
- Source:
Returns:
this
- Type
- XMaterials
update(tick, entities)
Dispatch x.light parameters to lightened objects (Obj3.lightened == true).
Parameters:
Name | Type | Description |
---|---|---|
tick |
int | |
entities |
array.<Entity> |
- Source: