Packageaway3d.materials
Classpublic class MultiPassMaterialBase
InheritanceMultiPassMaterialBase Inheritance MaterialBase Inheritance NamedAssetBase Inheritance flash.events.EventDispatcher
Subclasses ColorMultiPassMaterial, TextureMultiPassMaterial

DefaultMaterialBase forms an abstract base class for the default materials provided by Away3D and use methods to define their appearance.



Public Properties
 PropertyDefined By
 InheritedalphaPremultiplied : Boolean
Indicates whether visible textures (or other pixels) used by this material have already been premultiplied.
MaterialBase
  alphaThreshold : Number
The minimum alpha value for which pixels should be drawn.
MultiPassMaterialBase
  ambient : Number
The strength of the ambient reflection.
MultiPassMaterialBase
  ambientColor : uint
The colour of the ambient reflection.
MultiPassMaterialBase
  ambientMethod : BasicAmbientMethod
The method to perform ambient shading.
MultiPassMaterialBase
 InheritedassetFullPath : Array
[read-only]
NamedAssetBase
 InheritedassetNamespace : String
[read-only]
NamedAssetBase
 InheritedassetType : String
[read-only]
MaterialBase
  blendMode : String
[override]
MultiPassMaterialBase
 InheritedbothSides : Boolean
Defines whether or not the material should perform backface culling.
MaterialBase
  depthCompareMode : String
[override]
MultiPassMaterialBase
  diffuseLightSources : uint
MultiPassMaterialBase
  diffuseMethod : BasicDiffuseMethod
The method to perform diffuse shading.
MultiPassMaterialBase
 Inheritedextra : Object
An object to contain any extra data
MaterialBase
  gloss : Number
The sharpness of the specular highlight.
MultiPassMaterialBase
  lightPicker : LightPickerBase
[override]
MultiPassMaterialBase
  mipmap : Boolean
[override] Indicates whether or not any used textures should use mipmapping.
MultiPassMaterialBase
 Inheritedname : String
[override]
MaterialBase
  normalMap : Texture2DBase
The tangent space normal map to influence the direction of the surface for each texel.
MultiPassMaterialBase
  normalMethod : BasicNormalMethod
The method to generate the (tangent-space) normal.
MultiPassMaterialBase
  numMethods : int
[read-only]
MultiPassMaterialBase
 InheritedoriginalName : String
[read-only] The original name used for this asset in the resource (e.g.
NamedAssetBase
 Inheritedrepeat : Boolean
Indicates whether or not any used textures should be tiled.
MaterialBase
  requiresBlending : Boolean
[override] [read-only] Indicates whether or not the material requires alpha blending during rendering.
MultiPassMaterialBase
  shadowMethod : ShadowMapMethodBase
The method to render shadows cast on this surface.
MultiPassMaterialBase
 Inheritedsmooth : Boolean
Indicates whether or not any used textures should use smoothing.
MaterialBase
  specular : Number
The overall strength of the specular reflection.
MultiPassMaterialBase
  specularColor : uint
The colour of the specular reflection.
MultiPassMaterialBase
  specularLightSources : uint
MultiPassMaterialBase
  specularMap : Texture2DBase
A specular map that defines the strength of specular reflections for each texel in the red channel, and the gloss factor in the green channel.
MultiPassMaterialBase
  specularMethod : BasicSpecularMethod
The method to perform specular shading.
MultiPassMaterialBase
 InheriteduniqueId : uint
[read-only] The unique id assigned to the material by the MaterialLibrary.
MaterialBase
Protected Properties
 PropertyDefined By
  _casterLightPass : ShadowCasterPass
MultiPassMaterialBase
 Inherited_depthPass : DepthMapPass
MaterialBase
 Inherited_distancePass : DistanceMapPass
MaterialBase
  _effectsPass : SuperShaderPass
MultiPassMaterialBase
 Inherited_lightPicker : LightPickerBase
MaterialBase
 Inherited_mipmap : Boolean = true
MaterialBase
  _nonCasterLightPasses : Vector.<LightingPass>
MultiPassMaterialBase
 Inherited_numPasses : uint
MaterialBase
 Inherited_passes : Vector.<MaterialPassBase>
MaterialBase
 Inherited_repeat : Boolean
MaterialBase
 Inherited_smooth : Boolean = true
MaterialBase
Public Methods
 MethodDefined By
  
Creates a new DefaultMaterialBase object.
MultiPassMaterialBase
  
Adds a shading method to the end of the shader.
MultiPassMaterialBase
  
addMethodAt(method:EffectMethodBase, index:int):void
Adds a shading method to the end of a shader, at the specified index amongst the methods in that section of the shader.
MultiPassMaterialBase
 Inherited
assetPathEquals(name:String, ns:String):Boolean
NamedAssetBase
 Inherited
dispose():void
Cleans up any resources used by the current object.
MaterialBase
  
MultiPassMaterialBase
  
hasMethod(method:EffectMethodBase):Boolean
MultiPassMaterialBase
  
MultiPassMaterialBase
 Inherited
resetAssetPath(name:String, ns:String = null, overrideOriginal:Boolean = true):void
NamedAssetBase
Protected Methods
 MethodDefined By
 Inherited
Adds a pass to the material
MaterialBase
 Inherited
Clears all passes in the material.
MaterialBase
  
MultiPassMaterialBase
 Inherited
MaterialBase
  
MultiPassMaterialBase
Public Constants
 ConstantDefined By
 InheritedDEFAULT_NAMESPACE : String = default
[static]
NamedAssetBase
Property Detail
_casterLightPassproperty
protected var _casterLightPass:ShadowCasterPass

_effectsPassproperty 
protected var _effectsPass:SuperShaderPass

_nonCasterLightPassesproperty 
protected var _nonCasterLightPasses:Vector.<LightingPass>

alphaThresholdproperty 
alphaThreshold:Number

The minimum alpha value for which pixels should be drawn. This is used for transparency that is either invisible or entirely opaque, often used with textures for foliage, etc. Recommended values are 0 to disable alpha, or 0.5 to create smooth edges. Default value is 0 (disabled).


Implementation
    public function get alphaThreshold():Number
    public function set alphaThreshold(value:Number):void
ambientproperty 
ambient:Number

The strength of the ambient reflection.


Implementation
    public function get ambient():Number
    public function set ambient(value:Number):void
ambientColorproperty 
ambientColor:uint

The colour of the ambient reflection.


Implementation
    public function get ambientColor():uint
    public function set ambientColor(value:uint):void
ambientMethodproperty 
ambientMethod:BasicAmbientMethod

The method to perform ambient shading. Note that shading methods cannot be reused across materials.


Implementation
    public function get ambientMethod():BasicAmbientMethod
    public function set ambientMethod(value:BasicAmbientMethod):void
blendModeproperty 
blendMode:String[override]


Implementation
    public function get blendMode():String
    public function set blendMode(value:String):void
depthCompareModeproperty 
depthCompareMode:String[override]


Implementation
    public function get depthCompareMode():String
    public function set depthCompareMode(value:String):void
diffuseLightSourcesproperty 
diffuseLightSources:uint


Implementation
    public function get diffuseLightSources():uint
    public function set diffuseLightSources(value:uint):void
diffuseMethodproperty 
diffuseMethod:BasicDiffuseMethod

The method to perform diffuse shading. Note that shading methods can not be reused across materials.


Implementation
    public function get diffuseMethod():BasicDiffuseMethod
    public function set diffuseMethod(value:BasicDiffuseMethod):void
glossproperty 
gloss:Number

The sharpness of the specular highlight.


Implementation
    public function get gloss():Number
    public function set gloss(value:Number):void
lightPickerproperty 
lightPicker:LightPickerBase[override]


Implementation
    public function get lightPicker():LightPickerBase
    public function set lightPicker(value:LightPickerBase):void
mipmapproperty 
mipmap:Boolean[override]

Indicates whether or not any used textures should use mipmapping.


Implementation
    public function get mipmap():Boolean
    public function set mipmap(value:Boolean):void
normalMapproperty 
normalMap:Texture2DBase

The tangent space normal map to influence the direction of the surface for each texel.


Implementation
    public function get normalMap():Texture2DBase
    public function set normalMap(value:Texture2DBase):void
normalMethodproperty 
normalMethod:BasicNormalMethod

The method to generate the (tangent-space) normal. Note that shading methods can not be reused across materials.


Implementation
    public function get normalMethod():BasicNormalMethod
    public function set normalMethod(value:BasicNormalMethod):void
numMethodsproperty 
numMethods:int  [read-only]


Implementation
    public function get numMethods():int
requiresBlendingproperty 
requiresBlending:Boolean  [read-only] [override]

Indicates whether or not the material requires alpha blending during rendering.


Implementation
    public function get requiresBlending():Boolean
shadowMethodproperty 
shadowMethod:ShadowMapMethodBase

The method to render shadows cast on this surface. Note that shading methods can not be reused across materials.


Implementation
    public function get shadowMethod():ShadowMapMethodBase
    public function set shadowMethod(value:ShadowMapMethodBase):void
specularproperty 
specular:Number

The overall strength of the specular reflection.


Implementation
    public function get specular():Number
    public function set specular(value:Number):void
specularColorproperty 
specularColor:uint

The colour of the specular reflection.


Implementation
    public function get specularColor():uint
    public function set specularColor(value:uint):void
specularLightSourcesproperty 
specularLightSources:uint


Implementation
    public function get specularLightSources():uint
    public function set specularLightSources(value:uint):void
specularMapproperty 
specularMap:Texture2DBase

A specular map that defines the strength of specular reflections for each texel in the red channel, and the gloss factor in the green channel. You can use SpecularBitmapTexture if you want to easily set specular and gloss maps from greyscale images, but prepared images are preffered.


Implementation
    public function get specularMap():Texture2DBase
    public function set specularMap(value:Texture2DBase):void
specularMethodproperty 
specularMethod:BasicSpecularMethod

The method to perform specular shading. Note that shading methods can not be reused across materials.


Implementation
    public function get specularMethod():BasicSpecularMethod
    public function set specularMethod(value:BasicSpecularMethod):void
Constructor Detail
MultiPassMaterialBase()Constructor
public function MultiPassMaterialBase()

Creates a new DefaultMaterialBase object.

Method Detail
activateForDepth()method
override arcane function activateForDepth(stage3DProxy:Stage3DProxy, camera:Camera3D, distanceBased:Boolean = false, textureRatioX:Number = 1, textureRatioY:Number = 1):void

Parameters

stage3DProxy:Stage3DProxy
 
camera:Camera3D
 
distanceBased:Boolean (default = false)
 
textureRatioX:Number (default = 1)
 
textureRatioY:Number (default = 1)

activatePass()method 
override arcane function activatePass(index:uint, stage3DProxy:Stage3DProxy, camera:Camera3D, textureRatioX:Number, textureRatioY:Number):void

Parameters

index:uint
 
stage3DProxy:Stage3DProxy
 
camera:Camera3D
 
textureRatioX:Number
 
textureRatioY:Number

addMethod()method 
public function addMethod(method:EffectMethodBase):void

Adds a shading method to the end of the shader. Note that shading methods can not be reused across materials.

Parameters

method:EffectMethodBase

addMethodAt()method 
public function addMethodAt(method:EffectMethodBase, index:int):void

Adds a shading method to the end of a shader, at the specified index amongst the methods in that section of the shader. Note that shading methods can not be reused across materials.

Parameters

method:EffectMethodBase
 
index:int

deactivate()method 
override arcane function deactivate(stage3DProxy:Stage3DProxy):void

Parameters

stage3DProxy:Stage3DProxy

getMethodAt()method 
public function getMethodAt(index:int):EffectMethodBase

Parameters

index:int

Returns
EffectMethodBase
hasMethod()method 
public function hasMethod(method:EffectMethodBase):Boolean

Parameters

method:EffectMethodBase

Returns
Boolean
invalidateScreenPasses()method 
protected function invalidateScreenPasses():void

removeMethod()method 
public function removeMethod(method:EffectMethodBase):void

Parameters

method:EffectMethodBase

updateMaterial()method 
override arcane function updateMaterial(context:Context3D):void

Parameters

context:Context3D

updateScreenPasses()method 
protected function updateScreenPasses():void