Packageaway3d.materials.shaders
Classpublic class DepthShader
InheritanceDepthShader Inheritance AbstractShader Inheritance flash.events.EventDispatcher

Shader class for environment lighting.

Public Properties
 PropertyDefined by
 InheritedblendMode : String
Defines a blendMode value for the shader bitmap.
AbstractShader
  color : uint
Coefficient for the color shading at maxZ.
DepthShader
 Inheriteddebug : Boolean
Determines if faces with the shader applied are drawn with outlines
AbstractShader
 Inheritedid : int
Unique identifier
AbstractShader
  maxZ : Number
Coefficient for the maximum Z of the depth map.
DepthShader
  minZ : Number
Coefficient for the minimum Z of the depth map.
DepthShader
 Inheritedsmooth : Boolean
Determines if the shader bitmap is smoothed (bilinearly filtered) when drawn to screen
AbstractShader
 Inheritedvisible : Boolean
Indicates whether the material is visible
AbstractShader
Protected Properties
 PropertyDefined by
 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.
AbstractShader
Public Methods
 MethodDefined by
  
DepthShader
(init:Object = null)
Creates a new DepthShader object.
DepthShader
 Inherited
addOnMaterialUpdate(listener:Function):void
Default method for adding a materialupdated event listener
AbstractShader
 Inherited
getFaceMaterialVO(faceVO:FaceVO, source:Object3D = null, view:View3D = null):FaceMaterialVO
AbstractShader
  
invalidateFaces(source:Object3D = null, view:View3D = null):void
DepthShader
 Inherited
removeOnMaterialUpdate(listener:Function):void
Default method for removing a materialupdated event listener
AbstractShader
 Inherited
renderBitmapLayer(tri:DrawTriangle, containerRect:Rectangle, parentFaceMaterialVO:FaceMaterialVO):FaceMaterialVO
Renders a bitmapData surface object for the speficied face.
AbstractShader
  
renderLayer(tri:DrawTriangle, layer:Sprite, level:int):int
Renders a material layer for the specified triangle.
DepthShader
  
updateMaterial(source:Object3D, view:View3D):void
Called once per render loop when material is visible.
DepthShader
Protected Methods
 MethodDefined by
  
clearFaces(source:Object3D, view:View3D):void
DepthShader
  
getMapping(tri:DrawTriangle):Matrix
Calculates the mapping matrix required to draw the triangle texture to screen.
DepthShader
  
Renders the shader to the specified face.
DepthShader
  
updateFilter():void
DepthShader
Property detail
colorproperty
color:uint  [read-write]

Coefficient for the color shading at maxZ.

Implementation
    public function get color():uint
    public function set color(value:uint):void
maxZproperty 
maxZ:Number  [read-write]

Coefficient for the maximum Z of the depth map.

Implementation
    public function get maxZ():Number
    public function set maxZ(value:Number):void
minZproperty 
minZ:Number  [read-write]

Coefficient for the minimum Z of the depth map.

Implementation
    public function get minZ():Number
    public function set minZ(value:Number):void
Constructor detail
DepthShader()constructor
public function DepthShader(init:Object = null)Parameters
init:Object (default = null) — [optional] An initialisation object for specifying default instance properties.
Init Parameters
 minZ:Number (default = 500)
 maxZ:Number (default = 2000)
 color:Number (default = 0x000000)
Method detail
clearFaces()method
protected function clearFaces(source:Object3D, view:View3D):void

Parameters
source:Object3D
 
view:View3D
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.
invalidateFaces()method 
public function invalidateFaces(source:Object3D = null, view:View3D = null):void

Parameters
source:Object3D (default = null)
 
view:View3D (default = null)
renderLayer()method 
public override function renderLayer(tri:DrawTriangle, layer:Sprite, level:int):int

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.

Returns
int
renderShader()method 
protected override function renderShader(tri:DrawTriangle):void

Renders the shader to the specified face.

Parameters
tri:DrawTriangle — The face object being rendered.
updateFilter()method 
protected function updateFilter():void
updateMaterial()method 
public override 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 'away3d.materials.shaders.DepthShader'

Code examples

Comments