Packageaway3d.materials
Classpublic class DefaultMaterialBase
InheritanceDefaultMaterialBase Inheritance MaterialBase
SubclassesBitmapMaterial, ColorMaterial

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

Public Properties
 PropertyDefined by
  ambient : Number
The strength of the ambient reflection.
DefaultMaterialBase
  ambientColor : uint
The colour of the ambient reflection.
DefaultMaterialBase
  ambientMethod : BasicAmbientMethod
The method to perform diffuse shading.
DefaultMaterialBase
 InheritedblendMode : String
The blend mode to use when drawing this renderable.
MaterialBase
 InheritedbothSides : Boolean
Defines whether or not the material should perform backface culling.
MaterialBase
  colorTransform : ColorTransform
The ColorTransform object to transform the colour of the material with.
DefaultMaterialBase
  diffuseMethod : BasicDiffuseMethod
The method to perform diffuse shading.
DefaultMaterialBase
 Inheritedextra : Object
An object to contain any extra data
MaterialBase
  gloss : Number
The sharpness of the specular highlight.
DefaultMaterialBase
 Inheritedlights : Array
MaterialBase
 InheritedmaterialNamespace : String
The namespace of the material, used by the MaterialLibrary.
MaterialBase
  mipmap : Boolean
[write-only]
DefaultMaterialBase
 Inheritedname : String
The name of the material.
MaterialBase
  normalMap : BitmapData
The tangent space normal map to influence the direction of the surface for each texel.
DefaultMaterialBase
 Inheritedrepeat : Boolean
Indicates whether or not any used textures should be tiled.
MaterialBase
  requiresBlending : Boolean
[read-only] Indicates whether or not the material requires alpha blending during rendering.
DefaultMaterialBase
  shadowMethod : ShadingMethodBase
The method to perform diffuse shading.
DefaultMaterialBase
 Inheritedsmooth : Boolean
Indicates whether or not any used textures should use smoothing.
MaterialBase
  specular : Number
The overall strength of the specular reflection.
DefaultMaterialBase
  specularColor : uint
The colour of the specular reflection.
DefaultMaterialBase
  specularMap : BitmapData
A specular map that defines the strength of specular reflections for each texel.
DefaultMaterialBase
  specularMethod : BasicSpecularMethod
The method to perform specular shading.
DefaultMaterialBase
 InheriteduniqueId : uint
The unique id assigned to the material by the MaterialLibrary.
MaterialBase
Protected Properties
 PropertyDefined by
 Inherited_mipmap : Boolean
MaterialBase
 Inherited_numPasses : uint
MaterialBase
  _screenPass : DefaultScreenPass
DefaultMaterialBase
Public Methods
 MethodDefined by
  
Creates a new DefaultMaterialBase object.
DefaultMaterialBase
  
DefaultMaterialBase
  
addMethodAt(method:ShadingMethodBase, index:int):void
DefaultMaterialBase
  
dispose(deep:Boolean):void
DefaultMaterialBase
  
isBitmapDataValid(bitmapData:BitmapData, id:uint = 0):Boolean
DefaultMaterialBase
  
DefaultMaterialBase
 Inherited
setNameAndSpace(name:String, materialNameSpace:String):void
Sets the materials name and namespace.
MaterialBase
Protected Methods
 MethodDefined by
 Inherited
Adds a pass to the material
MaterialBase
 Inherited
clearPasses():void
Clears all passes in the material.
MaterialBase
Property detail
ambientproperty
ambient:Number  [read-write]

The strength of the ambient reflection.

Implementation
    public function get ambient():Number
    public function set ambient(value:Number):void
ambientColorproperty 
ambientColor:uint  [read-write]

The colour of the ambient reflection.

Implementation
    public function get ambientColor():uint
    public function set ambientColor(value:uint):void
ambientMethodproperty 
ambientMethod:BasicAmbientMethod  [read-write]

The method to perform diffuse shading.

Implementation
    public function get ambientMethod():BasicAmbientMethod
    public function set ambientMethod(value:BasicAmbientMethod):void
colorTransformproperty 
colorTransform:ColorTransform  [read-write]

The ColorTransform object to transform the colour of the material with.

Implementation
    public function get colorTransform():ColorTransform
    public function set colorTransform(value:ColorTransform):void
diffuseMethodproperty 
diffuseMethod:BasicDiffuseMethod  [read-write]

The method to perform diffuse shading.

Implementation
    public function get diffuseMethod():BasicDiffuseMethod
    public function set diffuseMethod(value:BasicDiffuseMethod):void
glossproperty 
gloss:Number  [read-write]

The sharpness of the specular highlight.

Implementation
    public function get gloss():Number
    public function set gloss(value:Number):void
mipmapproperty 
mipmap:Boolean  [write-only]

Implementation
    public function set mipmap(value:Boolean):void
normalMapproperty 
normalMap:BitmapData  [read-write]

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

Implementation
    public function get normalMap():BitmapData
    public function set normalMap(value:BitmapData):void
requiresBlendingproperty 
requiresBlending:Boolean  [read-only]

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

Implementation
    public function get requiresBlending():Boolean
_screenPassproperty 
protected var _screenPass:DefaultScreenPass
shadowMethodproperty 
shadowMethod:ShadingMethodBase  [read-write]

The method to perform diffuse shading.

Implementation
    public function get shadowMethod():ShadingMethodBase
    public function set shadowMethod(value:ShadingMethodBase):void
specularproperty 
specular:Number  [read-write]

The overall strength of the specular reflection.

Implementation
    public function get specular():Number
    public function set specular(value:Number):void
specularColorproperty 
specularColor:uint  [read-write]

The colour of the specular reflection.

Implementation
    public function get specularColor():uint
    public function set specularColor(value:uint):void
specularMapproperty 
specularMap:BitmapData  [read-write]

A specular map that defines the strength of specular reflections for each texel.

Implementation
    public function get specularMap():BitmapData
    public function set specularMap(value:BitmapData):void
specularMethodproperty 
specularMethod:BasicSpecularMethod  [read-write]

The method to perform specular shading.

Implementation
    public function get specularMethod():BasicSpecularMethod
    public function set specularMethod(value:BasicSpecularMethod):void
Constructor detail
DefaultMaterialBase()constructor
public function DefaultMaterialBase() Init Parameters
Method detail
addMethod()method
public function addMethod(method:ShadingMethodBase):void Parameters
method:ShadingMethodBase
addMethodAt()method 
public function addMethodAt(method:ShadingMethodBase, index:int):void Parameters
method:ShadingMethodBase
 
index:int
dispose()method 
public override function dispose(deep:Boolean):void Parameters
deep:Boolean
isBitmapDataValid()method 
public function isBitmapDataValid(bitmapData:BitmapData, id:uint = 0):Boolean Parameters
bitmapData:BitmapData
 
id:uint (default = 0)

Returns
Boolean
removeMethod()method 
public function removeMethod(method:ShadingMethodBase):void Parameters
method:ShadingMethodBase
updateMaterial()method 
arcane override function updateMaterial(context:Context3D):void

Updates the material

Parameters
context:Context3D
Wiki link
Click to go to the wiki page for 'away3d.materials.DefaultMaterialBase'

Code examples

Comments