Base class for shaders.
Not intended for direct use - use one of the shading materials in the materials package.
public var blendMode:String
Defines a blendMode value for the shader bitmap.
public var debug:Boolean
Determines if faces with the shader applied are drawn with outlines
protected var ini:Init
Instance of the Init object used to hold and parse default property values
specified by the initialiser object in the 3d object constructor.
public var smooth:Boolean
Determines if the shader bitmap is smoothed (bilinearly filtered) when drawn to screen
visible:Boolean
[read-only]
Indicates whether the material is visible
Implementation
public function get visible():Boolean
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) |
| debug:Boolean (default = false) |
| blendMode:String (default = BlendMode.NORMAL) |
public function addOnMaterialUpdate(listener:Function):void
Default method for adding a materialupdated event listener
Parameters
| listener:Function — The listener function
|
public function getFaceMaterialVO(faceVO:FaceVO, source:Object3D = null, view:View3D = null):FaceMaterialVO
Parameters
Returns
protected function getLightingShape(layer:Sprite, light:LightPrimitive):Shape
Returns a shape object for use by light shaders
Parameters
| layer:Sprite — The parent layer of the triangle.
|
|
| light:LightPrimitive — The light primitive.
|
Returns
| Shape — The resolved shape object to use for drawing.
|
protected function getShape(layer:Sprite):Shape
Returns a shape object for use by environment shaders.
Parameters
| layer:Sprite — The parent layer of the triangle
|
Returns
| Shape — The resolved shape object to use for drawing
|
public function removeOnMaterialUpdate(listener:Function):void
Default method for removing a materialupdated event listener
Parameters
| listener:Function — The listener function
|
public function renderBitmapLayer(tri:DrawTriangle, containerRect:Rectangle, parentFaceMaterialVO:FaceMaterialVO):FaceMaterialVO
Renders a bitmapData surface object for the speficied face.
Parameters
| tri:DrawTriangle — The face object onto which the rendered sufrace is applied.
|
|
| containerRect:Rectangle — The rectangle object defining the bounds of the face in uv-space.
|
|
| parentFaceMaterialVO:FaceMaterialVO — The value object of the preceeding surface.
|
Returns
public function renderLayer(tri:DrawTriangle, layer:Sprite, level:int):void
Renders a material layer for the specified triangle.
Parameters
| tri:DrawTriangle — The drawtriangle used for render information.
|
|
| layer:Sprite — The parent layer into which the triangle is drawn.
|
|
| level:int — Defines the sprite level for the layer.
|
protected function renderShader(tri:DrawTriangle):void
Renders the shader to the specified face.
Parameters
public function updateMaterial(source:Object3D, view:View3D):void
Called once per render loop when material is visible.
Parameters