WoW:API Model SetLight: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (Move page script moved page API Model SetLight to API Model SetLight without leaving a redirect) |
||
(4 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{widgetmethod}} | |||
---- | ---- | ||
;''Example'' | ;''Example'' | ||
myModel:SetLight( | myModel:SetLight(true, false, 0, -0.707, -0.707, 0.7, 1.0, 1.0, 1.0, 0.8, 1.0, 1.0, 0.8); | ||
Model:SetLight(enabled[,omni,dirX,dirY,dirZ,ambIntensity[,ambR,ambG,ambB[,dirIntensity[,dirR,dirG,dirB]]]])]] | Model:SetLight(enabled[,omni,dirX,dirY,dirZ,ambIntensity[,ambR,ambG,ambB[,dirIntensity[,dirR,dirG,dirB]]]])]] | ||
---- | ---- | ||
;''Arguments'' | ;''Arguments'' | ||
* enabled: ''' | * enabled: '''boolean '''- appears to be true for lit and false for unlit | ||
* omni: ''' | * omni: '''boolean '''- if the light is omnidirectional [lighting in all directions] (default of 0) | ||
* dirX, dirY, dirZ: '''number'''s - vector from the origin to | * dirX, dirY, dirZ: '''number'''s - vector from the origin to where the light source should face | ||
* ambIntensity: '''number''' - intensity of the ambient component of the light source | * ambIntensity: '''number''' - intensity of the ambient component of the light source | ||
* ambR, ambG, ambB: '''number'''s - color of the ambient component of the light source | * ambR, ambG, ambB: '''number'''s - color of the ambient component of the light source | ||
Line 20: | Line 23: | ||
:It seems that the direct component only influences the specularity. | :It seems that the direct component only influences the specularity. | ||
:The dir-vector is | :The dir-vector is only used to determine the direction that the light source faces; its distance from the mesh does not affect the light level. | ||
Latest revision as of 04:46, 15 August 2023
← Widget API ← Model < SetLight
- Example
myModel:SetLight(true, false, 0, -0.707, -0.707, 0.7, 1.0, 1.0, 1.0, 0.8, 1.0, 1.0, 0.8);
Model:SetLight(enabled[,omni,dirX,dirY,dirZ,ambIntensity[,ambR,ambG,ambB[,dirIntensity[,dirR,dirG,dirB]]]])]]
- Arguments
- enabled: boolean - appears to be true for lit and false for unlit
- omni: boolean - if the light is omnidirectional [lighting in all directions] (default of 0)
- dirX, dirY, dirZ: numbers - vector from the origin to where the light source should face
- ambIntensity: number - intensity of the ambient component of the light source
- ambR, ambG, ambB: numbers - color of the ambient component of the light source
- dirIntensity: number - intensity of the direct component of the light source
- dirR, dirG, dirB: numbers - color of the direct component of the light source
- Details
- It seems that the direct component only influences the specularity.
- The dir-vector is only used to determine the direction that the light source faces; its distance from the mesh does not affect the light level.