WoW:API Model SetLight: Difference between revisions

Changed 'enabled' and 'omni' arguments to reflect their change to boolean instead of 1 or 0, and added slight description for what omni is for.
(Added default value for "omni" parameter, and clarified the use of dir-vector.)
(Changed 'enabled' and 'omni' arguments to reflect their change to boolean instead of 1 or 0, and added slight description for what omni is for.)
Line 3: Line 3:
----
----
;''Example''
;''Example''
  myModel:SetLight(1, 0, 0, -0.707, -0.707, 0.7, 1.0, 1.0, 1.0, 0.8, 1.0, 1.0, 0.8);
  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]]]])]]  
Line 11: Line 11:
;''Arguments''
;''Arguments''


* enabled: '''number''' - appears to be 1 for lit and 0 for unlit
* enabled: '''boolean '''- appears to be true for lit and false for unlit
* omni: '''number''' - ?? (default of 0)
* omni: '''boolean '''- if the light is omnidirectional [lighting in all directions] (default of 0)
* dirX, dirY, dirZ: '''number'''s - vector from the origin to where the light source should face
* 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