Packagesandy.materials
Classpublic final class CelShadeMaterial
InheritanceCelShadeMaterial Inheritance OutlineMaterial Inheritance Material

Displays the faces of a 3D shape as a Cel Shaded Material (polygon based cel shading).

Material which draws in CelShading style using a lighting map and outlines.

Please note that this material does not handle the lightAttributes!



Public Properties
 PropertyDefined by
  alpha : Number
CelShadeMaterial
 Inheritedattributes : MaterialAttributes
The attributes of this material.
Material
  color : Number
CelShadeMaterial
 Inheritedfilters : Array
The array of filters for this material.
Material
 Inheritedid : Number
The unique id of this material
Material
 InheritedlightingEnable : Boolean = false
Specify is the material can receive light and apply the lightAttributes if specified.
Material
 Inheritedmodified : Boolean
The modified state of this material.
Material
 Inheritedrepeat : Boolean
The repeat property (?).
Material
 Inheritedtype : MaterialType
The material type of this material.
Material
 InheriteduseVertexNormal : Boolean = false
Specify if the material use the vertex normal information Default value is set to false.
Material
Protected Properties
 PropertyDefined by
 Inheritedm_bModified : Boolean
Material
 Inheritedm_oType : MaterialType
Material
 Inherited_useLight : Boolean = false
Material
Public Methods
 MethodDefined by
  
CelShadeMaterial(p_nColor:uint = 0, p_nAlpha:Number = 1, p_nOutlineThickness:uint = 1, p_nOutlineColor:uint = 0, p_nOutlineAlpha:Number = 1, p_aColorMap:Array = null)
CelShadeMaterial is still an experimental material.
CelShadeMaterial
 Inherited
init(f:Polygon):void
Not used in this version of Sandy.
Material
  
renderPolygon(p_oScene:Scene3D, p_oPolygon:Polygon, p_mcContainer:Sprite):void
Renders this material on the face it dresses.
CelShadeMaterial
Property detail
alphaproperty
alpha:Number  [read-write]Implementation
    public function get alpha():Number
    public function set alpha(value:Number):void
colorproperty 
color:Number  [read-write]Implementation
    public function get color():Number
    public function set color(value:Number):void
Constructor detail
CelShadeMaterial()constructor
public function CelShadeMaterial(p_nColor:uint = 0, p_nAlpha:Number = 1, p_nOutlineThickness:uint = 1, p_nOutlineColor:uint = 0, p_nOutlineAlpha:Number = 1, p_aColorMap:Array = null)

CelShadeMaterial is still an experimental material. You should not use it unless you perfectly know what you are doing. This material may change in the future version of the library. CelShadeMaterial does not supper MaterialAttributes!

Parameters
p_nColor:uint (default = 0) — The color of the fills - Default 0
 
p_nAlpha:Number (default = 1) — The alpha of the fills - Default 1, value range ( 0 - 1 )
 
p_nOutlineThickness:uint (default = 1) — The thickness of the outline - Default 1
 
p_nOutlineColor:uint (default = 0) — The color of the outline - Default 0
 
p_nOutlineAlpha:Number (default = 1) — The alpha of the outline - Default 1, value range ( 0 - 1 )
 
p_aColorMap:Array (default = null) — The color map of the fills. Must be an array of 11 values. Fractional numbers from (0 - 2) work best. - Default null
Method detail
renderPolygon()method
public override function renderPolygon(p_oScene:Scene3D, p_oPolygon:Polygon, p_mcContainer:Sprite):void

Renders this material on the face it dresses.

Parameters
p_oScene:Scene3D — The current scene
 
p_oPolygon:Polygon — The face to be rendered
 
p_mcContainer:Sprite — The container to draw on