Package | away3d.materials |
Class | public class CompositeMaterial |
Inheritance | CompositeMaterial ![]() |
Implements | ILayerMaterial, ITriangleMaterial |
Subclasses | Dot3BitmapMaterial, Dot3MovieMaterial, EnviroBitmapMaterial, PhongBitmapMaterial, PhongColorMaterial, PhongMovieMaterial |
BitmapMaterialContainer
.
See also
Property | Defined by | ||
---|---|---|---|
alpha : Number
Defines an alpha value for the layer container.
| CompositeMaterial | ||
blendMode : String
Defines a blendMode value for the layer container.
| CompositeMaterial | ||
color : uint
Defines a colored tint for the layer container.
| CompositeMaterial | ||
visible : Boolean [read-only]
Indicates whether the material is visible
| CompositeMaterial |
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.
| CompositeMaterial | ||
materials : Array
An array of bitmapmaterial objects to be overlayed sequentially.
| CompositeMaterial |
Method | Defined by | ||
---|---|---|---|
CompositeMaterial
(init:Object = null)
Creates a new
CompositeMaterial object. | CompositeMaterial | ||
CompositeMaterial | |||
addOnMaterialUpdate(listener:Function):void
Default method for adding a materialupdated event listener
| CompositeMaterial | ||
CompositeMaterial | |||
removeOnMaterialUpdate(listener:Function):void
Default method for removing a materialupdated event listener
| CompositeMaterial | ||
Renders a material layer for the specified triangle.
| CompositeMaterial | ||
Sends data from the material coupled with data from the
DrawTriangle primitive to the render session. | CompositeMaterial | ||
Called once per render loop when material is visible.
| CompositeMaterial |
Method | Defined by | ||
---|---|---|---|
setColorTransform():void
Updates the colortransform object applied to the texture from the
color and alpha properties. | CompositeMaterial |
alpha | property |
alpha:Number
[read-write]Defines an alpha value for the layer container.
Implementation public function get alpha():Number
public function set alpha(value:Number):void
blendMode | property |
public var blendMode:String
Defines a blendMode value for the layer container.
color | property |
color:uint
[read-write]Defines a colored tint for the layer container.
Implementation public function get color():uint
public function set color(value:uint):void
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.
materials | property |
protected var materials:Array
An array of bitmapmaterial objects to be overlayed sequentially.
visible | property |
visible:Boolean
[read-only]Indicates whether the material is visible
Implementation public function get visible():Boolean
CompositeMaterial | () | constructor |
public function CompositeMaterial(init:Object = null)
Parameters
init:Object (default = null ) — [optional] An initialisation object for specifying default instance properties.
|
materials:Array | |
blendMode:String (default = BlendMode.NORMAL) | |
alpha:Number (default = 1, min:0, max:1) | |
color:Color (default = 0xFFFFFF) |
addMaterial | () | method |
addOnMaterialUpdate | () | method |
public function addOnMaterialUpdate(listener:Function):void
Default method for adding a materialupdated event listener
Parameterslistener:Function — The listener function
|
removeMaterial | () | method |
removeOnMaterialUpdate | () | method |
public function removeOnMaterialUpdate(listener:Function):void
Default method for removing a materialupdated event listener
Parameterslistener:Function — The listener function
|
renderLayer | () | method |
public function renderLayer(tri:DrawTriangle, layer:Sprite, level:int):void
Renders a material layer for the specified triangle.
Parameterstri:DrawTriangle — The drawtriangle used for render information.
|
|
layer:Sprite — The parent layer into which the triangle is drawn.
|
|
level:int — Defines the sprite level for the layer.
|
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 |
setColorTransform | () | method |
protected function setColorTransform():void
Updates the colortransform object applied to the texture from the color
and alpha
properties.
See also
updateMaterial | () | method |
public function updateMaterial(source:Object3D, view:View3D):void
Called once per render loop when material is visible.
Parameterssource:Object3D |
|
view:View3D |