Packageaway3d.materials.shaders
Classpublic class AbstractShader
InheritanceAbstractShader Inheritance LayerMaterial Inheritance ColorMaterial Inheritance WireColorMaterial Inheritance WireframeMaterial Inheritance Material Inheritance flash.events.EventDispatcher
SubclassesAmbientShader, 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
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
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
 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
 Inherited_thickness : Number
WireframeMaterial
 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
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(tri:DrawTriangle, map:Matrix):Matrix
AbstractShader
  
calcUVT(tri:DrawTriangle, uvt:Vector):Vector
AbstractShader
 Inherited
WireframeMaterial
  
getMapping(tri:DrawTriangle):Matrix
Calculates the mapping matrix required to draw the triangle texture to screen.
AbstractShader
  
getUVData(tri:DrawTriangle):Vector
AbstractShader
  
Renders the shader to the specified face.
AbstractShader
Events
 EventSummaryDefined by
 Inherited Dispatched when the any visual aspect of the material changes.Material
Property detail
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)Parameters
init:Object (default = null) — [optional] An initialisation object for specifying default instance properties.
Init Parameters
 smooth:Boolean (default = false)
 blendMode:String (default = BlendMode.NORMAL)
Method detail
calcMapping()method
protected function calcMapping(tri:DrawTriangle, map:Matrix):Matrix Parameters
tri:DrawTriangle
 
map:Matrix

Returns
Matrix
calcUVT()method 
protected function calcUVT(tri:DrawTriangle, uvt:Vector):Vector Parameters
tri:DrawTriangle
 
uvt:Vector

Returns
Vector
getMapping()method 
protected function getMapping(tri:DrawTriangle):Matrix

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

Parameters
tri:DrawTriangle — The data object holding all information about the triangle to be drawn.

Returns
Matrix — The required matrix object.
getUVData()method 
protected function getUVData(tri:DrawTriangle):Vector Parameters
tri:DrawTriangle

Returns
Vector
renderShader()method 
protected function renderShader(tri:DrawTriangle):void

Renders the shader to the specified face.

Parameters
tri:DrawTriangle — The face object being rendered.
Wiki link
Click to go to the wiki page for 'away3d.materials.shaders.AbstractShader'

Code examples

Comments