Packageaway3d.materials
Classpublic class ColorMaterial
InheritanceColorMaterial Inheritance DefaultMaterialBase Inheritance MaterialBase

BitmapMaterial is a material that uses a flat colour as the surfaces diffuse.

Public Properties
 PropertyDefined by
  alpha : Number
The alpha of the surface.
ColorMaterial
 Inheritedambient : Number
The strength of the ambient reflection.
DefaultMaterialBase
 InheritedambientColor : uint
The colour of the ambient reflection.
DefaultMaterialBase
 InheritedambientMethod : 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
  color : uint
The diffuse color of the surface.
ColorMaterial
 InheritedcolorTransform : ColorTransform
The ColorTransform object to transform the colour of the material with.
DefaultMaterialBase
 InheriteddiffuseMethod : BasicDiffuseMethod
The method to perform diffuse shading.
DefaultMaterialBase
 Inheritedextra : Object
An object to contain any extra data
MaterialBase
 Inheritedgloss : Number
The sharpness of the specular highlight.
DefaultMaterialBase
 Inheritedlights : Array
MaterialBase
 InheritedmaterialNamespace : String
The namespace of the material, used by the MaterialLibrary.
MaterialBase
 Inheritedmipmap : Boolean
DefaultMaterialBase
 Inheritedname : String
The name of the material.
MaterialBase
 InheritednormalMap : 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.
ColorMaterial
 InheritedshadowMethod : ShadingMethodBase
The method to perform diffuse shading.
DefaultMaterialBase
 Inheritedsmooth : Boolean
Indicates whether or not any used textures should use smoothing.
MaterialBase
 Inheritedspecular : Number
The overall strength of the specular reflection.
DefaultMaterialBase
 InheritedspecularColor : uint
The colour of the specular reflection.
DefaultMaterialBase
 InheritedspecularMap : BitmapData
A specular map that defines the strength of specular reflections for each texel.
DefaultMaterialBase
 InheritedspecularMethod : 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
 Inherited_screenPass : DefaultScreenPass
DefaultMaterialBase
Public Methods
 MethodDefined by
  
ColorMaterial
(color:uint, alpha:Number = 1)
Creates a new ColorMaterial object.
ColorMaterial
 Inherited
DefaultMaterialBase
 Inherited
addMethodAt(method:ShadingMethodBase, index:int):void
DefaultMaterialBase
 Inherited
dispose(deep:Boolean):void
DefaultMaterialBase
 Inherited
isBitmapDataValid(bitmapData:BitmapData, id:uint = 0):Boolean
DefaultMaterialBase
 Inherited
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
alphaproperty
alpha:Number  [read-write]

The alpha of the surface.

Implementation
    public function get alpha():Number
    public function set alpha(value:Number):void
colorproperty 
color:uint  [read-write]

The diffuse color of the surface.

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

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

Implementation
    public function get requiresBlending():Boolean
Constructor detail
ColorMaterial()constructor
public function ColorMaterial(color:uint, alpha:Number = 1)Parameters
color:uint — The material's diffuse surface color.
 
alpha:Number (default = 1) — The material's surface alpha.
Init Parameters
Wiki link
Click to go to the wiki page for 'away3d.materials.ColorMaterial'

Code examples

Comments