Package | away3d.materials |
Class | public class CompositeMaterial |
Inheritance | CompositeMaterial BitmapMaterial LayerMaterial ColorMaterial WireColorMaterial WireframeMaterial Material flash.events.EventDispatcher |
Subclasses | DepthBitmapMaterial, Dot3BitmapMaterial, Dot3MovieMaterial, EnviroBitmapMaterial, PhongBitmapMaterial, PhongColorMaterial, PhongMovieMaterial |
CompositeMaterial
.
See also
Property | Defined by | ||
---|---|---|---|
alpha : Number
Defines an alpha value for the texture bitmap.
| BitmapMaterial | ||
bitmap : BitmapData
Defines the bitmapData object being used as the material texture.
| BitmapMaterial | ||
blendMode : String
Defines a blendMode value for the texture bitmap.
| BitmapMaterial | ||
color : uint
Defines a colored tint for the texture bitmap.
| BitmapMaterial | ||
colorTransform : ColorTransform
Defines a colortransform for the texture bitmap.
| BitmapMaterial | ||
debug : Boolean
Toggles debug mode: textured triangles are drawn with white outlines, precision correction triangles are drawn with blue outlines.
| ColorMaterial | ||
height : Number
Returns the height of the bitmapData being used as the material texture.
| CompositeMaterial | ||
id : int
Unique identifier
| Material | ||
precision : Number
Corrects distortion caused by the affine transformation (non-perspective) of textures.
| BitmapMaterial | ||
repeat : Boolean
Determines if texture bitmap will tile in uv-space
| BitmapMaterial | ||
showNormals : Boolean
Displays the normals per face in pink lines.
| BitmapMaterial | ||
smooth : Boolean
Determines if texture bitmap is smoothed (bilinearly filtered) when drawn to screen.
| BitmapMaterial | ||
surfaceCache : Boolean | CompositeMaterial | ||
thickness : Number
Determines the thickness value of the wire
| WireframeMaterial | ||
transparent : Boolean
Defines whether the caching bitmapData objects are transparent
| CompositeMaterial | ||
visible : Boolean
Indicates whether the material is visible
| WireColorMaterial | ||
width : Number
Returns the width of the bitmapData being used as the material texture.
| CompositeMaterial | ||
wireAlpha : Number
Determines the alpha value of the wire
| WireframeMaterial | ||
wireColor : uint
24 bit color value representing the wire color
| WireframeMaterial |
Property | Defined by | ||
---|---|---|---|
_alpha : Number | WireColorMaterial | ||
_color : uint | WireColorMaterial | ||
_commands : Array | BitmapMaterial | ||
_debug : Boolean | ColorMaterial | ||
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.
| WireframeMaterial | ||
_invtexmapping : Matrix | BitmapMaterial | ||
materials : Array
An array of bitmapmaterial objects to be overlayed sequentially.
| CompositeMaterial | ||
_screenIndices : Array | BitmapMaterial | ||
_screenVertices : Array | BitmapMaterial | ||
_thickness : Number | WireframeMaterial | ||
_u0 : Number | BitmapMaterial | ||
_u1 : Number | BitmapMaterial | ||
_u2 : Number | BitmapMaterial | ||
_v0 : Number | BitmapMaterial | ||
_v1 : Number | BitmapMaterial | ||
_v2 : Number | BitmapMaterial | ||
_wireAlpha : Number | WireframeMaterial | ||
_wireColor : uint = 0x0 | WireframeMaterial |
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
| Material | ||
clearMaterials():void
| CompositeMaterial | ||
Duplicates the material properties to another material object.
| ColorMaterial | ||
getPixel32(u:Number, v:Number):uint
Returns the argb value of the bitmapData pixel at the given u v coordinate.
| BitmapMaterial | ||
CompositeMaterial | |||
removeOnMaterialUpdate(listener:Function):void
Default method for removing a materialupdated event listener
| Material |
Method | Defined by | ||
---|---|---|---|
getDefaultThickness():Number
| WireframeMaterial | ||
Calculates the mapping matrix required to draw the triangle texture to screen.
| CompositeMaterial | ||
BitmapMaterial | |||
BitmapMaterial | |||
CompositeMaterial | |||
updateColorTransform():void
Updates the colortransform object applied to the texture from the
color and alpha properties. | BitmapMaterial | ||
BitmapMaterial | |||
updateRenderBitmap():void
Updates the texture bitmapData with the colortransform determined from the
color and alpha properties. | CompositeMaterial |
height | property |
height:Number
[read-write]Returns the height of the bitmapData being used as the material texture.
Implementation public function get height():Number
public function set height(value:Number):void
materials | property |
protected var materials:Array
An array of bitmapmaterial objects to be overlayed sequentially.
surfaceCache | property |
surfaceCache:Boolean
[read-write]Implementation
public function get surfaceCache():Boolean
public function set surfaceCache(value:Boolean):void
transparent | property |
public var transparent:Boolean
Defines whether the caching bitmapData objects are transparent
width | property |
width:Number
[read-write]Returns the width of the bitmapData being used as the material texture.
Implementation public function get width():Number
public function set width(value:Number):void
CompositeMaterial | () | constructor |
public function CompositeMaterial(init:Object = null)
Parameters
init:Object (default = null ) — [optional] An initialisation object for specifying default instance properties.
|
width:Number (default = 128) | |
height:Number (default = 128) | |
materials:Array | |
transparent:Boolean (default = true) | |
surfaceCache:Boolean (default = false) |
addMaterial | () | method |
clearMaterials | () | method |
public function clearMaterials():void
getMapping | () | method |
protected override function getMapping(priIndex:uint, viewSourceObject:ViewSourceObject, renderer:Renderer):Matrix
Calculates the mapping matrix required to draw the triangle texture to screen.
ParameterspriIndex:uint — The data object holding all information about the triangle to be drawn.
|
|
viewSourceObject:ViewSourceObject |
|
renderer:Renderer |
Matrix — The required matrix object.
|
removeMaterial | () | method |
transformUV | () | method |
protected override function transformUV(faceVO:FaceVO):Matrix
Parameters
faceVO:FaceVO |
Matrix |
updateRenderBitmap | () | method |
protected override function updateRenderBitmap():void
Updates the texture bitmapData with the colortransform determined from the color
and alpha
properties.