Packageaway3d.materials.shaders
Classpublic class AbstractShader
InheritanceAbstractShader Inheritance flash.events.EventDispatcher
ImplementsILayerMaterial, IUpdatingMaterial
SubclassesAmbientShader, DiffuseDot3Shader, DiffusePhongShader, EnviroShader, SpecularPhongShader

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

Public Properties
 PropertyDefined by
  blendMode : String
Defines a blendMode value for the shader bitmap.
AbstractShader
  debug : Boolean
Determines if faces with the shader applied are drawn with outlines
AbstractShader
  smooth : Boolean
Determines if the shader bitmap is smoothed (bilinearly filtered) when drawn to screen
AbstractShader
  visible : Boolean
[read-only] Indicates whether the material is visible
AbstractShader
Protected Properties
 PropertyDefined by
  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.
AbstractShader
Public Methods
 MethodDefined by
  
AbstractShader
(init:Object = null)
Creates a new AbstractShader object.
AbstractShader
  
renderFace(face:Face, containerRect:Rectangle, parentFaceVO:FaceVO):FaceVO
Renders a bitmapData surface object for the speficied face.
AbstractShader
  
renderLayer(tri:DrawTriangle, layer:Sprite, level:int):void
Renders a material layer for the specified triangle.
AbstractShader
  
updateMaterial(source:Object3D, view:View3D):void
Called once per render loop when material is visible.
AbstractShader
Protected Methods
 MethodDefined by
  
clearFaceDictionary(source:Object3D, view:View3D):void
Clears face value objects when shader requires updating
AbstractShader
  
getLightingShape(layer:Sprite, light:LightPrimitive):Shape
Returns a shape object for use by light shaders
AbstractShader
  
getShape(layer:Sprite):Shape
Returns a shape object for use by environment shaders.
AbstractShader
  
renderShader(face:Face):void
Renders the shader to the specified face.
AbstractShader
Property detail
blendModeproperty
public var blendMode:String

Defines a blendMode value for the shader bitmap.

debugproperty 
public var debug:Boolean

Determines if faces with the shader applied are drawn with outlines

iniproperty 
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.

smoothproperty 
public var smooth:Boolean

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

visibleproperty 
visible:Boolean  [read-only]

Indicates whether the material is visible

Implementation
    public function get visible():Boolean
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####
Method detail
clearFaceDictionary()method
protected function clearFaceDictionary(source:Object3D, view:View3D):void

Clears face value objects when shader requires updating

Parameters
source:Object3D — The parent 3d object of the face.
 
view:View3D — The view rendering the draw triangle.

See also

getLightingShape()method 
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.
getShape()method 
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
renderFace()method 
public function renderFace(face:Face, containerRect:Rectangle, parentFaceVO:FaceVO):FaceVO

Renders a bitmapData surface object for the speficied face.

Parameters
face:Face — The face object onto which the rendered sufrace is applied.
 
containerRect:Rectangle — The rectangle object defining the bounds of the face in uv-space.
 
parentFaceVO:FaceVO — The value object of the preceeding surface.

Returns
FaceVO
renderLayer()method 
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.
renderShader()method 
protected function renderShader(face:Face):void

Renders the shader to the specified face.

Parameters
face:Face — The face object being rendered.
updateMaterial()method 
public function updateMaterial(source:Object3D, view:View3D):void

Called once per render loop when material is visible.

Parameters
source:Object3D
 
view:View3D
Wiki link
Click to go to the wiki page for ####WIKI####

Code examples

Comments