Packageaway3d.materials
Classpublic class ColorMaterial
InheritanceColorMaterial Inheritance flash.events.EventDispatcher
ImplementsIBillboardMaterial, IFogMaterial, ITriangleMaterial

Material for solid color drawing

Public Properties
 PropertyDefined by
  alpha : Number
ColorMaterial
  color : uint
ColorMaterial
  id : int
[read-only] Unique identifier
ColorMaterial
  visible : Boolean
[read-only] Indicates whether the material is visible
ColorMaterial
Protected Properties
 PropertyDefined by
  ini : Init
Instance of the Init object used to hold and parse default property values specified by the initialiser object in the 3d object constructor.
ColorMaterial
Public Methods
 MethodDefined by
  
ColorMaterial
(color:* = null, init:Object = null)
Creates a new ColorMaterial object.
ColorMaterial
  
addOnMaterialUpdate(listener:Function):void
Default method for adding a materialupdated event listener
ColorMaterial
  
Duplicates the material's properties to another IFogMaterial object
ColorMaterial
  
removeOnMaterialUpdate(listener:Function):void
Default method for removing a materialupdated event listener
ColorMaterial
  
Sends data from the material coupled with data from the DrawBillboard primitive to the render session.
ColorMaterial
  
renderFog(fog:DrawFog):void
Sends the material data coupled with data from the DrawFog primitive to the render session
ColorMaterial
  
Sends data from the material coupled with data from the DrawTriangle primitive to the render session.
ColorMaterial
  
updateMaterial(source:Object3D, view:View3D):void
Called once per render loop when material is visible.
ColorMaterial
Property detail
alphaproperty
alpha:Number  [read-write]Implementation
    public function get alpha():Number
    public function set alpha(value:Number):void
colorproperty 
color:uint  [read-write]Implementation
    public function get color():uint
    public function set color(value:uint):void
idproperty 
id:int  [read-only]

Unique identifier

Implementation
    public function get id():int
iniproperty 
protected var ini:Init

Instance of the Init object used to hold and parse default property values specified by the initialiser object in the 3d object constructor.

visibleproperty 
visible:Boolean  [read-only]

Indicates whether the material is visible

Implementation
    public function get visible():Boolean
Constructor detail
ColorMaterial()constructor
public function ColorMaterial(color:* = null, init:Object = null)Parameters
color:* (default = null) — A string, hex value or colorname representing the color of the material.
 
init:Object (default = null) — [optional] An initialisation object for specifying default instance properties.
Init Parameters
 alpha:Number (default = 1, min:0, max:1)
Method detail
addOnMaterialUpdate()method
public function addOnMaterialUpdate(listener:Function):void

Default method for adding a materialupdated event listener

Parameters
listener:Function — The listener function
clone()method 
public function clone():IFogMaterial

Duplicates the material's properties to another IFogMaterial object

Returns
IFogMaterial — The new object instance with duplicated properties applied
removeOnMaterialUpdate()method 
public function removeOnMaterialUpdate(listener:Function):void

Default method for removing a materialupdated event listener

Parameters
listener:Function — The listener function
renderBillboard()method 
public function renderBillboard(bill:DrawBillboard):void

Sends data from the material coupled with data from the DrawBillboard primitive to the render session.

Parameters
bill:DrawBillboard
renderFog()method 
public function renderFog(fog:DrawFog):void

Sends the material data coupled with data from the DrawFog primitive to the render session

Parameters
fog:DrawFog
renderTriangle()method 
public function renderTriangle(tri:DrawTriangle):void

Sends data from the material coupled with data from the DrawTriangle primitive to the render session.

Parameters
tri:DrawTriangle
updateMaterial()method 
public 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 'away3d.materials.ColorMaterial'

Code examples

Comments