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
 Inheritedid : int
Unique identifier
AbstractShader
 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
 Inherited
addOnMaterialUpdate(listener:Function):void
Default method for adding a materialupdated event listener
AbstractShader
  
clearFaces(source:Object3D = null, view:View3D = null):void
Clears facematerial value objects when bitmap requires updating
DiffuseDot3Shader
 Inherited
getFaceMaterialVO(faceVO:FaceVO, source:Object3D = null, view:View3D = null):FaceMaterialVO
AbstractShader
  
getPixel32(u:Number, v:Number):uint
Returns the argb value of the bitmapData pixel at the given u v coordinate.
DiffuseDot3Shader
  
invalidateFaces(source:Object3D = null, view:View3D = null):void
Invalidates facematerial value objects when texturemapping requires updating
DiffuseDot3Shader
 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.
DiffuseDot3Shader
  
updateMaterial(source:Object3D, view:View3D):void
Called once per render loop when material is visible.
DiffuseDot3Shader
Protected Methods
 MethodDefined by
  
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 Parameters
 tangentSpace:Boolean (default = false)
Method detail
clearFaces()method
public function clearFaces(source:Object3D = null, view:View3D = null):void

Clears facematerial value objects when bitmap requires updating

Parameters
source:Object3D (default = null) — [optional] The parent 3d object of the face.
 
view:View3D (default = null) — [optional] 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.
invalidateFaces()method 
public function invalidateFaces(source:Object3D = null, view:View3D = null):void

Invalidates facematerial value objects when texturemapping requires updating

Parameters
source:Object3D (default = null) — [optional] The parent 3d object of the face.
 
view:View3D (default = null) — [optional] The view rendering the draw triangle.
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.
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.DiffuseDot3Shader'

Code examples

Comments