Packagesandy.materials.attributes
Classpublic final class MediumAttributes
InheritanceMediumAttributes Inheritance AAttributes

This attribute provides very basic simulation of partially opaque medium. You can use this attribute to achieve wide range of effects (e.g., fog, Rayleigh scattering, light attached to camera, etc).



Public Properties
 PropertyDefined by
  blurAmount : Number
Maximum amount of blur to add.
MediumAttributes
  color : uint
Medium color (32-bit value) at the point given by fadeFrom + fadeTo.
MediumAttributes
  fadeFrom : Vector
Transparent point in wx, wy and wz coordinates.
MediumAttributes
  fadeTo : Vector
Attenuation vector.
MediumAttributes
 Inheritedflags : uint
Returns the specific flags of this attribute.
AAttributes
Public Methods
 MethodDefined by
  
MediumAttributes(p_nColor:uint = 0xFFFFFFFF, p_oFadeFrom:Vector = null, p_oFadeTo:Vector = null, p_nBlurAmount:Number = 0)
Creates a new MediumAttributes object.
MediumAttributes
 Inherited
begin(p_oScene:Scene3D):void
Method called before the display list rendering.
AAttributes
 Inherited
draw(p_oGraphics:Graphics, p_oPolygon:Polygon, p_oMaterial:Material, p_oScene:Scene3D):void
Draws attribute to the graphics object.
AAttributes
 Inherited
drawOnSprite(p_oSprite:Sprite2D, p_oMaterial:Material, p_oScene:Scene3D):void
Applies attribute to a sprite.
AAttributes
 Inherited
finish(p_oScene:Scene3D):void
Method called right after the display list rendering.
AAttributes
 Inherited
init(p_oPolygon:Polygon):void
Allows to proceed to an initialization to know when the polyon isn't lined to the material.
AAttributes
 Inherited
unlink(p_oPolygon:Polygon):void
Remove all the initialization (opposite of init).
AAttributes
Property detail
blurAmountproperty
public var blurAmount:Number

Maximum amount of blur to add. Warning: this feature is very expensive when shape useSingleContainer is false.

colorproperty 
color:uint  [read-write]

Medium color (32-bit value) at the point given by fadeFrom + fadeTo. If this value is transparent, color gradient will be extrapolated beyond that point.

Implementation
    public function get color():uint
    public function set color(value:uint):void
fadeFromproperty 
public var fadeFrom:Vector

Transparent point in wx, wy and wz coordinates.

See also

fadeToproperty 
fadeTo:Vector  [read-write]

Attenuation vector. This is the vector from transparent point to opaque point.

Implementation
    public function get fadeTo():Vector
    public function set fadeTo(value:Vector):void

See also

Constructor detail
MediumAttributes()constructor
public function MediumAttributes(p_nColor:uint = 0xFFFFFFFF, p_oFadeFrom:Vector = null, p_oFadeTo:Vector = null, p_nBlurAmount:Number = 0)

Creates a new MediumAttributes object.

Parameters
p_nColor:uint (default = 0xFFFFFFFF) — Medium color
 
p_oFadeFrom:Vector (default = null) — Attenuation vector (500 pixels beyond the screen by default).
 
p_oFadeTo:Vector (default = null) — Transparent point (at the screen by default).
 
p_nBlurAmount:Number (default = 0) — Maximum amount of blur to add

See also