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...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

1200 Part IV ■ <strong>Reference</strong>ambB (optional)—Blue component <strong>of</strong> the ambient light color (0.0 - 1.0); omitted ifambIntensity is 0 (number)dirIntensity (optional)—Intensity <strong>of</strong> the directional light (0.0 - 1.0) (number)dirR (optional)—Red component <strong>of</strong> the directional light color (0.0 - 1.0); omittedif dirIntensity is 0 (number)dirG (optional)—Green component <strong>of</strong> the directional light color (0.0 - 1.0); omittedif dirIntensity is 0 (number)dirB (optional)—Blue component <strong>of</strong> the directional light color (0.0 - 1.0); omittedif dirIntensity is 0 (number)SetModelSets the model file to be displayed.Model:SetModel(“filename“)Arguments:filename—Path to the model file to be displayed (string)SetModelScaleSets the scale factor determining the size at which the 3D model appears.Model:SetModelScale(scale)Arguments:scale—Scale factor determining the size at which the 3D model appears(number)SetPositionReturns the position <strong>of</strong> the 3D model within the frame.Model:SetPosition(x, y, z)Arguments:x—Position <strong>of</strong> the model on the axis perpendicular to the plane <strong>of</strong> the screen(positive values make the model appear closer to the viewer; negative valuesplace it further away) (number)y—Position <strong>of</strong> the model on the horizontal axis (positive values place the modelto the right <strong>of</strong> its default position; negative values place it to the left) (number)z—Position <strong>of</strong> the model on the vertical axis (positive values place themodel above its default position; negative values place it below) (number)SetSequenceSets the animation sequence to be used by the model.Model:SetSequence(sequence)The number <strong>of</strong> available sequences <strong>and</strong> behavior <strong>of</strong> each are defined within themodel files <strong>and</strong> not available to the scripting system.Arguments:sequence—Index <strong>of</strong> an animation sequence defined by the model file (number)SetSequenceTimeSets the animation sequence <strong>and</strong> time index to be used by the model.Model:SetSequenceTime(sequence, time)

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

Saved successfully!

Ooh no, something went wrong!