Packageaway3d.materials.shaders
Classpublic class EnviroShader
InheritanceEnviroShader Inheritance AbstractShader Inheritance LayerMaterial Inheritance ColorMaterial Inheritance WireColorMaterial Inheritance WireframeMaterial Inheritance Material Inheritance flash.events.EventDispatcher
SubclassesEnviroColorMaterial

Shader class for environment lighting.

Public Properties
 PropertyDefined by
 Inheritedalpha : Number
Determines the alpha value of the material
WireColorMaterial
  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
 Inheritedcolor : uint
24 bit color value representing the material color
WireColorMaterial
 Inheriteddebug : Boolean
Toggles debug mode: textured triangles are drawn with white outlines, precision correction triangles are drawn with blue outlines.
ColorMaterial
  height : Number
[read-only] Returns the width of the bitmapData being used as the shader environment map.
EnviroShader
 Inheritedid : int
Unique identifier
Material
  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
 Inheritedthickness : Number
Determines the thickness value of the wire
WireframeMaterial
 Inheritedvisible : Boolean
Indicates whether the material is visible
WireColorMaterial
  width : Number
[read-only] Returns the height of the bitmapData being used as the shader environment map.
EnviroShader
 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
 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_thickness : Number
WireframeMaterial
 Inherited_wireAlpha : Number
WireframeMaterial
 Inherited_wireColor : uint = 0x0
WireframeMaterial
Public Methods
 MethodDefined by
  
EnviroShader
(bitmap:BitmapData, init:Object = null)
Creates a new EnviroShader object.
EnviroShader
 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
 Inherited
removeOnMaterialUpdate(listener:Function):void
Default method for removing a materialupdated event listener
Material
Protected Methods
 MethodDefined by
  
calcMapping(tri:DrawTriangle, mapping:Matrix):Matrix
Calculates the mapping matrix required to draw the triangle texture to screen.
EnviroShader
  
calcUVT(tri:DrawTriangle, uvt:Vector):Vector
EnviroShader
 Inherited
WireframeMaterial
 Inherited
getMapping(tri:DrawTriangle):Matrix
Calculates the mapping matrix required to draw the triangle texture to screen.
AbstractShader
 Inherited
getUVData(tri:DrawTriangle):Vector
AbstractShader
  
Renders the shader to the specified face.
EnviroShader
  
updateFaces(source:Object3D, view:View3D):void
EnviroShader
Events
 EventSummaryDefined by
 Inherited Dispatched when the any visual aspect of the material changes.Material
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 Parameters
 mode:String (default = "linear")
 reflectiveness:Number (default = 0.5, min:0, max:1)
Method detail
calcMapping()method
protected override function calcMapping(tri:DrawTriangle, mapping:Matrix):Matrix

Calculates the mapping matrix required to draw the triangle texture to screen.

Parameters
tri:DrawTriangle — The source object of the material.
 
mapping:Matrix — The face object of the material.

Returns
Matrix — The required matrix object.
calcUVT()method 
protected override function calcUVT(tri:DrawTriangle, uvt:Vector):Vector Parameters
tri:DrawTriangle
 
uvt:Vector

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

Renders the shader to the specified face.

Parameters
tri:DrawTriangle — The face object being rendered.
updateFaces()method 
protected function updateFaces(source:Object3D, view:View3D):void

Parameters
source:Object3D
 
view:View3D
Wiki link
Click to go to the wiki page for 'away3d.materials.shaders.EnviroShader'

Code examples

Comments