12.07.2015 Views

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 29 ■ Widget <strong>Reference</strong> 1199Arguments:red—Red component <strong>of</strong> the color (0.0 - 1.0) (number)green—Green component <strong>of</strong> the color (0.0 - 1.0) (number)blue—Blue component <strong>of</strong> the color (0.0 - 1.0) (number)SetFogFarSets the far clipping distance <strong>for</strong> the model’s fog.Model:SetFogFar(distance)This sets how far from the camera the fog ends.Arguments:distance—The distance to the fog far clipping plane (number)SetFogNearSets the near clipping distance <strong>for</strong> the model’s fog.Model:SetFogNear(distance)This sets how close to the camera the fog begins.Arguments:distance—The distance to the fog near clipping plane (number)SetGlowSets the model’s glow amount.Model:SetGlow(amount)Arguments:amount—Glowamount<strong>for</strong>themodel(number)SetLightSets properties <strong>of</strong> the light sources used when rendering the model.Model:SetLight(enabled, omni, dirX, dirY, dirZ, ambIntensity i[, ambR [, ambG [, ambB [, dirIntensity [, dirR [, dirG [, dirB]]]]]]])Arguments:enabled—1 if lighting is enabled; otherwise nil (1nil)omni—1 if omnidirectional lighting is enabled; otherwise 0 (number)dirX—Coordinate <strong>of</strong> the directional light in the axis perpendicular to the screen(negative values place the light in front <strong>of</strong> the model, positive values behind)(number)dirY—Coordinate <strong>of</strong> the directional light in the horizontal axis (negative valuesplace the light to the left <strong>of</strong> the model, positive values to the right) (number)dirZ—Coordinate <strong>of</strong> the directional light in the vertical axis(negative values place the light below the model, positive values above (number)ambIntensity—Intensity <strong>of</strong> the ambient light (0.0 - 1.0) (number)ambR (optional)—Red component <strong>of</strong> the ambient light color (0.0 - 1.0); omitted ifambIntensity is 0 (number)ambG (optional)—Green component <strong>of</strong> the ambient light color (0.0 - 1.0); omittedif ambIntensity is 0 (number)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!