Package | away3d.materials.shaders |
Class | public class AbstractShader |
Inheritance | AbstractShader LayerMaterial ColorMaterial WireColorMaterial WireframeMaterial Material flash.events.EventDispatcher |
Subclasses | AmbientShader, DepthShader, DiffuseDot3Shader, DiffusePhongShader, EnviroShader, SpecularDot3Shader, SpecularPhongShader |
Property | Defined by | ||
---|---|---|---|
alpha : Number
Determines the alpha value of the material
| WireColorMaterial | ||
blendMode : String
Defines a blendMode value for the shader bitmap.
| AbstractShader | ||
color : uint
24 bit color value representing the material color
| WireColorMaterial | ||
debug : Boolean
Toggles debug mode: textured triangles are drawn with white outlines, precision correction triangles are drawn with blue outlines.
| ColorMaterial | ||
id : int
Unique identifier
| Material | ||
smooth : Boolean
Determines if the shader bitmap is smoothed (bilinearly filtered) when drawn to screen
| AbstractShader | ||
thickness : Number
Determines the thickness value of the wire
| WireframeMaterial | ||
visible : Boolean
Indicates whether the material is visible
| WireColorMaterial | ||
wireAlpha : Number
Determines the alpha value of the wire
| WireframeMaterial | ||
wireColor : uint
24 bit color value representing the wire color
| WireframeMaterial |
Method | Defined by | ||
---|---|---|---|
AbstractShader
(init:Object = null)
Creates a new
AbstractShader object. | AbstractShader | ||
addOnMaterialUpdate(listener:Function):void
Default method for adding a materialupdated event listener
| Material | ||
Duplicates the material properties to another material object.
| ColorMaterial | ||
removeOnMaterialUpdate(listener:Function):void
Default method for removing a materialupdated event listener
| Material |
Method | Defined by | ||
---|---|---|---|
AbstractShader | |||
AbstractShader | |||
getDefaultThickness():Number
| WireframeMaterial | ||
Calculates the mapping matrix required to draw the triangle texture to screen.
| AbstractShader | ||
AbstractShader | |||
Renders the shader to the specified face.
| AbstractShader |
blendMode | property |
public var blendMode:String
Defines a blendMode value for the shader bitmap.
smooth | property |
public var smooth:Boolean
Determines if the shader bitmap is smoothed (bilinearly filtered) when drawn to screen
AbstractShader | () | constructor |
public function AbstractShader(init:Object = null)
Parameters
init:Object (default = null ) — [optional] An initialisation object for specifying default instance properties.
|
smooth:Boolean (default = false) | |
blendMode:String (default = BlendMode.NORMAL) |
calcMapping | () | method |
protected function calcMapping(tri:DrawTriangle, map:Matrix):Matrix
Parameters
tri:DrawTriangle |
|
map:Matrix |
Matrix |
calcUVT | () | method |
protected function calcUVT(tri:DrawTriangle, uvt:Vector):Vector
Parameters
tri:DrawTriangle |
|
uvt:Vector |
Vector |
getMapping | () | method |
protected function getMapping(tri:DrawTriangle):Matrix
Calculates the mapping matrix required to draw the triangle texture to screen.
Parameterstri:DrawTriangle — The data object holding all information about the triangle to be drawn.
|
Matrix — The required matrix object.
|
getUVData | () | method |
renderShader | () | method |
protected function renderShader(tri:DrawTriangle):void
Renders the shader to the specified face.
Parameterstri:DrawTriangle — The face object being rendered.
|