Packageaway3d.materials.shaders
Classpublic class DiffuseDot3Shader
InheritanceDiffuseDot3Shader Inheritance AbstractShader Inheritance flash.events.EventDispatcher
ImplementsIUVMaterial

Diffuse Dot3 shader class for directional lighting.

See also

away3d.lights.DirectionalLight3D
Public Properties
 PropertyDefined by
  bitmap : BitmapData
[read-only] Returns the bitmapData object being used as the shader DOT3 map.
DiffuseDot3Shader
 InheritedblendMode : String
Defines a blendMode value for the shader bitmap.
AbstractShader
 Inheriteddebug : Boolean
Determines if faces with the shader applied are drawn with outlines
AbstractShader
  height : Number
[read-only] Returns the height of the bitmapData being used as the shader DOT3 map.
DiffuseDot3Shader
 Inheritedsmooth : Boolean
Determines if the shader bitmap is smoothed (bilinearly filtered) when drawn to screen
AbstractShader
  tangentSpace : Boolean
Determines if the DOT3 mapping is rendered in tangent space (true) or object space (false).
DiffuseDot3Shader
 Inheritedvisible : Boolean
Indicates whether the material is visible
AbstractShader
  width : Number
[read-only] Returns the width of the bitmapData being used as the shader DOT3 map.
DiffuseDot3Shader
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
  
DiffuseDot3Shader
(bitmap:BitmapData, init:Object = null)
Creates a new DiffuseDot3Shader object.
DiffuseDot3Shader
  
addOnResize(listener:Function):void
Default method for adding a materialresize event listener
DiffuseDot3Shader
  
getPixel32(u:Number, v:Number):uint
Returns the argb value of the bitmapData pixel at the given u v coordinate.
DiffuseDot3Shader
  
removeOnResize(listener:Function):void
Default method for removing a materialresize event listener
DiffuseDot3Shader
 Inherited
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.
DiffuseDot3Shader
  
updateMaterial(source:Object3D, view:View3D):void
Called once per render loop when material is visible.
DiffuseDot3Shader
Protected Methods
 MethodDefined by
  
clearFaceDictionary(source:Object3D, view:View3D):void
Clears face value objects when shader requires updating
DiffuseDot3Shader
 Inherited
getLightingShape(layer:Sprite, light:LightPrimitive):Shape
Returns a shape object for use by light shaders
AbstractShader
 Inherited
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.
DiffuseDot3Shader
Property detail
bitmapproperty
bitmap:BitmapData  [read-only]

Returns the bitmapData object being used as the shader DOT3 map.

Implementation
    public function get bitmap():BitmapData
heightproperty 
height:Number  [read-only]

Returns the height of the bitmapData being used as the shader DOT3 map.

Implementation
    public function get height():Number
tangentSpaceproperty 
public var tangentSpace:Boolean

Determines if the DOT3 mapping is rendered in tangent space (true) or object space (false).

widthproperty 
width:Number  [read-only]

Returns the width of the bitmapData being used as the shader DOT3 map.

Implementation
    public function get width():Number
Constructor detail
DiffuseDot3Shader()constructor
public function DiffuseDot3Shader(bitmap:BitmapData, init:Object = null)Parameters
bitmap:BitmapData — The bitmapData object to be used as the material's DOT3 map.
 
init:Object (default = null) — [optional] An initialisation object for specifying default instance properties.
####INIT####
Method detail
addOnResize()method
public function addOnResize(listener:Function):void

Default method for adding a materialresize event listener

Parameters
listener:Function — The listener function
clearFaceDictionary()method 
protected override 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.
getPixel32()method 
public function getPixel32(u:Number, v:Number):uint

Returns the argb value of the bitmapData pixel at the given u v coordinate.

Parameters
u:Number — The u (horizontal) texture coordinate.
 
v:Number — The v (verical) texture coordinate.

Returns
uint — The argb pixel value.
removeOnResize()method 
public function removeOnResize(listener:Function):void

Default method for removing a materialresize event listener

Parameters
listener:Function — The listener function
renderLayer()method 
public override 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 override function renderShader(face:Face):void

Renders the shader to the specified face.

Parameters
face:Face — The face object being rendered.
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 ####WIKI####

Code examples

Comments