Packageaway3d.materials.shaders
Classpublic class EnviroShader
InheritanceEnviroShader Inheritance AbstractShader Inheritance flash.events.EventDispatcher
SubclassesEnviroColorMaterial

Shader class for environment lighting.

Public Properties
 PropertyDefined by
  bitmap : BitmapData
[read-only] Returns the bitmapData object being used as the shader environment map.
EnviroShader
 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 width of the bitmapData being used as the shader environment map.
EnviroShader
  mode : String
Setting for possible mapping methods.
EnviroShader
  reflectiveness : Number
Coefficient for the reflectiveness of the environment map.
EnviroShader
 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
  width : Number
[read-only] Returns the height of the bitmapData being used as the shader environment map.
EnviroShader
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
  
EnviroShader
(bitmap:BitmapData, init:Object = null)
Creates a new EnviroShader object.
EnviroShader
  
getMapping(source:Mesh, face:Face):Matrix
EnviroShader
 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.
EnviroShader
  
updateMaterial(source:Object3D, view:View3D):void
Called once per render loop when material is visible.
EnviroShader
Protected Methods
 MethodDefined by
  
clearFaceDictionary(source:Object3D, view:View3D):void
Clears face value objects when shader requires updating
EnviroShader
 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.
EnviroShader
Property detail
bitmapproperty
bitmap:BitmapData  [read-only]

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

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

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

Implementation
    public function get height():Number
modeproperty 
public var mode:String

Setting for possible mapping methods.

reflectivenessproperty 
reflectiveness:Number  [read-write]

Coefficient for the reflectiveness of the environment map.

Implementation
    public function get reflectiveness():Number
    public function set reflectiveness(value:Number):void
widthproperty 
width:Number  [read-only]

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

Implementation
    public function get width():Number
Constructor detail
EnviroShader()constructor
public function EnviroShader(bitmap:BitmapData, init:Object = null)Parameters
bitmap:BitmapData — The bitmapData object to be used as the material's environment map.
 
init:Object (default = null) — [optional] An initialisation object for specifying default instance properties.
####INIT####
Method detail
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.
getMapping()method 
public function getMapping(source:Mesh, face:Face):Matrix

Parameters
source:Mesh
 
face:Face

Returns
Matrix
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