| Package | sandy.materials.attributes |
| Class | public final class LightAttributes |
| Implements | IAttributes |
To make this material attribute use by the Material object, the material must have :myMAterial.lighteningEnable = true.
This attributes contains some parameters
| Property | Defined by | ||
|---|---|---|---|
| ambient : Number = 0.3
Level of ambient light, added to the scene if lighting is enabled.
| LightAttributes | ||
| modified : Boolean | LightAttributes | ||
| useBright : Boolean = false
Flag for lightening mode.
| LightAttributes | ||
| Method | Defined by | ||
|---|---|---|---|
|
LightAttributes(p_bBright:Boolean = false, p_nAmbient:Number = 0.3)
Creates a new LineAttributes object.
| LightAttributes | ||
|
Draw the attribute onto the graphics object to simulate the flat shading.
| LightAttributes | ||
| ambient | property |
public var ambient:Number = 0.3Level of ambient light, added to the scene if lighting is enabled.
| modified | property |
public var modified:Boolean
| useBright | property |
public var useBright:Boolean = falseFlag for lightening mode.
If true, the lit objects use full light range from black to white. If false (the default) they just range from black to their normal appearance.
| LightAttributes | () | constructor |
public function LightAttributes(p_bBright:Boolean = false, p_nAmbient:Number = 0.3)Creates a new LineAttributes object.
Parametersp_bBright:Boolean (default = false) — - default false - The brightness
|
|
p_nAmbient:Number (default = 0.3) — - default 0 - The ambiant light value. Value must be between 0 and 1
|
| draw | () | method |
public function draw(p_oGraphics:Graphics, p_oPolygon:Polygon, p_oMaterial:Material, p_oScene:Scene3D):voidDraw the attribute onto the graphics object to simulate the flat shading.
Parametersp_oGraphics:Graphics — the Graphics object to draw attributes into
|
|
p_oPolygon:Polygon — the polygon which is going o be drawn
|
|
p_oMaterial:Material — the refering material
|
|
p_oScene:Scene3D — the scene
|