Package | away3d.materials |
Class | public class ColorMaterial |
Inheritance | ColorMaterial ![]() |
Implements | IBillboardMaterial, IFogMaterial, ITriangleMaterial |
Property | Defined 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 |
Property | Defined 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 |
Method | Defined 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 | ||
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 | ||
Called once per render loop when material is visible.
| ColorMaterial |
alpha | property |
alpha:Number
[read-write]Implementation
public function get alpha():Number
public function set alpha(value:Number):void
color | property |
color:uint
[read-write]Implementation
public function get color():uint
public function set color(value:uint):void
id | property |
id:int
[read-only]Unique identifier
Implementation public function get id():int
ini | property |
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.
visible | property |
visible:Boolean
[read-only]Indicates whether the material is visible
Implementation public function get visible():Boolean
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.
|
alpha:Number (default = 1, min:0, max:1) |
addOnMaterialUpdate | () | method |
public function addOnMaterialUpdate(listener:Function):void
Default method for adding a materialupdated event listener
Parameterslistener:Function — The listener function
|
clone | () | method |
public function clone():IFogMaterial
Duplicates the material's properties to another IFogMaterial
object
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
Parameterslistener: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.
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
Parametersfog: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.
tri:DrawTriangle |
updateMaterial | () | method |
public function updateMaterial(source:Object3D, view:View3D):void
Called once per render loop when material is visible.
Parameterssource:Object3D |
|
view:View3D |