Packageaway3d.materials.shaders
Classpublic class DepthShader
InheritanceDepthShader Inheritance AbstractShader Inheritance LayerMaterial Inheritance ColorMaterial Inheritance WireColorMaterial Inheritance WireframeMaterial Inheritance Material Inheritance flash.events.EventDispatcher

Shader class for environment lighting.

Public Properties
 PropertyDefined by
 Inheritedalpha : Number
Determines the alpha value of the material
WireColorMaterial
 InheritedblendMode : String
Defines a blendMode value for the shader bitmap.
AbstractShader
  color : uint
Coefficient for the color shading at maxZ.
DepthShader
 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
  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
 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
 Inherited_endIndex : uint
AbstractShader
 Inherited_generated : Boolean
AbstractShader
 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_screenIndices : Vector
AbstractShader
 Inherited_screenUVTs : Vector
AbstractShader
 Inherited_screenVertices : Vector
AbstractShader
 Inherited_startIndex : uint
AbstractShader
 Inherited_thickness : Number
WireframeMaterial
 Inherited_uvs : Vector
AbstractShader
 Inherited_wireAlpha : Number
WireframeMaterial
 Inherited_wireColor : uint = 0x0
WireframeMaterial
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
Material
 Inherited
clone(material:Material = null):Material
Duplicates the material properties to another material object.
ColorMaterial
  
invalidateFaces(source:Object3D = null, view:View3D = null):void
DepthShader
 Inherited
removeOnMaterialUpdate(listener:Function):void
Default method for removing a materialupdated event listener
Material
Protected Methods
 MethodDefined by
  
calcMapping(priIndex:uint, map:Matrix):Matrix
DepthShader
  
calcUVT(priIndex:uint, uvt:Vector):Vector
DepthShader
 Inherited
WireframeMaterial
 Inherited
getMapping(priIndex:uint):Matrix
Calculates the mapping matrix required to draw the triangle texture to screen.
AbstractShader
 Inherited
getUVData(priIndex:uint):Vector
AbstractShader
  
renderShader(priIndex:uint):void
Renders the shader to the specified face.
DepthShader
  
updateFaces(source:Object3D, view:View3D):void
DepthShader
  
updateFilter():void
DepthShader
Events
 EventSummaryDefined by
 Inherited Dispatched when the any visual aspect of the material changes.Material
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
calcMapping()method
protected override function calcMapping(priIndex:uint, map:Matrix):Matrix Parameters
priIndex:uint
 
map:Matrix

Returns
Matrix
calcUVT()method 
protected override function calcUVT(priIndex:uint, uvt:Vector):Vector Parameters
priIndex:uint
 
uvt:Vector

Returns
Vector
invalidateFaces()method 
public function invalidateFaces(source:Object3D = null, view:View3D = null):void

Parameters
source:Object3D (default = null)
 
view:View3D (default = null)
renderShader()method 
protected override function renderShader(priIndex:uint):void

Renders the shader to the specified face.

Parameters
priIndex:uint — The index of the primitive being rendered.
updateFaces()method 
protected function updateFaces(source:Object3D, view:View3D):void

Parameters
source:Object3D
 
view:View3D
updateFilter()method 
protected function updateFilter():void
Wiki link
Click to go to the wiki page for 'away3d.materials.shaders.DepthShader'

Code examples

Comments