Packageaway3d.materials.shaders
Classpublic class AbstractShader
InheritanceAbstractShader Inheritance LayerMaterial Inheritance ColorMaterial Inheritance WireColorMaterial Inheritance WireframeMaterial Inheritance Material Inheritance flash.events.EventDispatcher
Subclasses AmbientShader, DepthShader, DiffuseDot3Shader, DiffusePhongShader, EnviroShader, SpecularDot3Shader, SpecularPhongShader

Base class for shaders. Not intended for direct use - use one of the shading materials in the materials package.



Public Properties
 PropertyDefined By
 Inheritedalpha : Number
Determines the alpha value of the material
WireColorMaterial
  blendMode : String
Defines a blendMode value for the shader bitmap.
AbstractShader
 Inheritedcolor : uint
24 bit color value representing the material color
WireColorMaterial
 Inheriteddebug : Boolean
Toggles debug mode: textured triangles are drawn with white outlines, precision correction triangles are drawn with blue outlines.
ColorMaterial
 Inheritedid : int
[read-only] Unique identifier
Material
  smooth : Boolean
Determines if the shader bitmap is smoothed (bilinearly filtered) when drawn to screen
AbstractShader
 Inheritedthickness : Number
Determines the thickness value of the wire
WireframeMaterial
 Inheritedvisible : Boolean
[override] [read-only] Indicates whether the material is visible
WireColorMaterial
 InheritedwireAlpha : Number
Determines the alpha value of the wire
WireframeMaterial
 InheritedwireColor : uint
24 bit color value representing the wire color
WireframeMaterial
Protected Properties
 PropertyDefined By
 Inherited_alpha : Number
WireColorMaterial
 Inherited_color : uint
WireColorMaterial
 Inherited_debug : Boolean
ColorMaterial
  _endIndex : uint
AbstractShader
  _generated : Boolean
AbstractShader
 Inheritedini : Init
Instance of the Init object used to hold and parse default property values specified by the initialiser object in the 3d object constructor.
WireframeMaterial
  _screenIndices : Vector.<int>
AbstractShader
  _screenUVTs : Vector.<Number>
AbstractShader
  _screenVertices : Vector.<Number>
AbstractShader
  _startIndex : uint
AbstractShader
 Inherited_thickness : Number
WireframeMaterial
  _uvs : Vector.<UV>
AbstractShader
 Inherited_wireAlpha : Number
WireframeMaterial
 Inherited_wireColor : uint = 0x0
WireframeMaterial
Public Methods
 MethodDefined By
  
AbstractShader(init:Object = null)
Creates a new AbstractShader object.
AbstractShader
 Inherited
addOnMaterialUpdate(listener:Function):void
Default method for adding a materialupdated event listener
Material
 Inherited
clone(material:Material = null):Material
[override] Duplicates the material properties to another material object.
ColorMaterial
 Inherited
removeOnMaterialUpdate(listener:Function):void
Default method for removing a materialupdated event listener
Material
Protected Methods
 MethodDefined By
  
calcMapping(priIndex:uint, map:Matrix):Matrix
AbstractShader
  
calcUVT(priIndex:uint, uvt:Vector.<Number>):Vector.<Number>
AbstractShader
 Inherited
WireframeMaterial
  
getMapping(priIndex:uint):Matrix
Calculates the mapping matrix required to draw the triangle texture to screen.
AbstractShader
  
getUVData(priIndex:uint):Vector.<Number>
AbstractShader
  
renderShader(priIndex:uint):void
Renders the shader to the specified face.
AbstractShader
Events
 Event Summary Defined By
 InheritedDispatched when the any visual aspect of the material changes.Material
Property Detail
_endIndexproperty
protected var _endIndex:uint

_generatedproperty 
protected var _generated:Boolean

_screenIndicesproperty 
protected var _screenIndices:Vector.<int>

_screenUVTsproperty 
protected var _screenUVTs:Vector.<Number>

_screenVerticesproperty 
protected var _screenVertices:Vector.<Number>

_startIndexproperty 
protected var _startIndex:uint

_uvsproperty 
protected var _uvs:Vector.<UV>

blendModeproperty 
public var blendMode:String

Defines a blendMode value for the shader bitmap.

smoothproperty 
public var smooth:Boolean

Determines if the shader bitmap is smoothed (bilinearly filtered) when drawn to screen

Constructor Detail
AbstractShader()Constructor
public function AbstractShader(init:Object = null)

Creates a new AbstractShader object.

Parameters
init:Object (default = null) — [optional] An initialisation object for specifying default instance properties.
####INIT####
Method Detail
calcMapping()method
protected function calcMapping(priIndex:uint, map:Matrix):Matrix

Parameters

priIndex:uint
 
map:Matrix

Returns
Matrix
calcUVT()method 
protected function calcUVT(priIndex:uint, uvt:Vector.<Number>):Vector.<Number>

Parameters

priIndex:uint
 
uvt:Vector.<Number>

Returns
Vector.<Number>
getMapping()method 
protected function getMapping(priIndex:uint):Matrix

Calculates the mapping matrix required to draw the triangle texture to screen.

Parameters

priIndex:uint — The data object holding all information about the triangle to be drawn.

Returns
Matrix — The required matrix object.
getUVData()method 
protected function getUVData(priIndex:uint):Vector.<Number>

Parameters

priIndex:uint

Returns
Vector.<Number>
renderShader()method 
protected function renderShader(priIndex:uint):void

Renders the shader to the specified face.

Parameters

priIndex:uint — The index of the primitive being rendered.