Packagesandy.materials.attributes
Classpublic final class LightAttributes
InheritanceLightAttributes Inheritance ALightAttributes

Realize a flat shading effect when associated to a material.

To make this material attribute use by the Material object, the material must have :myMAterial.lightingEnable = true.
This attributes contains some parameters



Public Properties
 PropertyDefined by
 Inheritedambient : Number
Ambient reflection factor.
ALightAttributes
 Inheriteddiffuse : Number
Diffuse reflection factor.
ALightAttributes
 Inheritedflags : uint
Flags for the attribute.
ALightAttributes
 Inheritedgloss : Number
Specular exponent.
ALightAttributes
 Inheritedspecular : Number
Specular reflection factor.
ALightAttributes
  useBright : Boolean = false
Flag for lighting mode.
LightAttributes
Public Methods
 MethodDefined by
  
LightAttributes(p_bBright:Boolean = false, p_nAmbient:Number = 0.3)
Creates a new LightAttributes object.
LightAttributes
 Inherited
draw(p_oGraphics:Graphics, p_oPolygon:Polygon, p_oMaterial:Material, p_oScene:Scene3D):void
Draws light on shape.
ALightAttributes
 Inherited
drawOnSprite(p_oSprite:Sprite2D, p_oMaterial:Material, p_oScene:Scene3D):void
Draws light on sprite.
ALightAttributes
Property detail
useBrightproperty
public var useBright:Boolean = false

Flag for lighting mode.

If true, the lit objects use full light range from black to white. If false (the default) they range from black to their normal appearance.

Constructor detail
LightAttributes()constructor
public function LightAttributes(p_bBright:Boolean = false, p_nAmbient:Number = 0.3)

Creates a new LightAttributes object.

Parameters
p_bBright:Boolean (default = false) — The brightness (value for useBright).
 
p_nAmbient:Number (default = 0.3) — The ambient light value. A value between O and 1 is expected.