Package | flare.materials |
Class | public class Material3D |
Inheritance | Material3D ![]() |
Subclasses | Shader3D |
Property | Defined By | ||
---|---|---|---|
cullFace : String
The culling mode. | Material3D | ||
depthCompare : String = lessEqual
The test comparasion to be used when depthWrite is 'true'. | Material3D | ||
depthWrite : Boolean = true
Gets or sets whatever the material writes into the z-buffer. | Material3D | ||
destFactor : String
The factor with which to multiply the destination color. | Material3D | ||
name : String
The name of the material. | Material3D | ||
scene : Scene3D [read-only]
Gets a reference to the scene that the material is associated. | Material3D | ||
sourceFactor : String
The factor with which to multiply the source color. | Material3D | ||
transparent : Boolean
Sets or gets if the material should use alpha blending. | Material3D | ||
twoSided : Boolean
Sets or gets if the material should be drawn useing both sides of the surfaces. | Material3D |
Method | Defined By | ||
---|---|---|---|
Material3D(name:String)
Creates a new Material3D. | Material3D | ||
Clones the material. | Material3D | ||
dispose():void
Eliminates all the resources associated to the material. | Material3D | ||
download():void
Downloads all the data uploaded to the graphics card. | Material3D | ||
Draw a mesh surface using the current material. | Material3D | ||
Uploads the necesary data to the graphics card. | Material3D |
cullFace | property |
public var cullFace:String
The culling mode. One of Context3DTriangleFace values.
depthCompare | property |
public var depthCompare:String = lessEqual
The test comparasion to be used when depthWrite is 'true'. Should be one of the values of Context3DCompareMode.
depthWrite | property |
public var depthWrite:Boolean = true
Gets or sets whatever the material writes into the z-buffer.
destFactor | property |
public var destFactor:String
The factor with which to multiply the destination color. Souldd be one of Context3DBlendFactor values.
name | property |
public var name:String
The name of the material.
scene | property |
scene:Scene3D
[read-only] Gets a reference to the scene that the material is associated.
public function get scene():Scene3D
sourceFactor | property |
public var sourceFactor:String
The factor with which to multiply the source color. Souldd be one of Context3DBlendFactor values.
transparent | property |
transparent:Boolean
Sets or gets if the material should use alpha blending. This property changes the source and dest factor propertys.
public function get transparent():Boolean
public function set transparent(value:Boolean):void
twoSided | property |
twoSided:Boolean
Sets or gets if the material should be drawn useing both sides of the surfaces. This proeprty affects the cullFace property of the material.
public function get twoSided():Boolean
public function set twoSided(value:Boolean):void
Material3D | () | Constructor |
public function Material3D(name:String)
Creates a new Material3D.
Parametersname:String — Name of the material.
|
clone | () | method |
public function clone():Material3D
Clones the material.
ReturnsMaterial3D — The new cloned material.
|
dispose | () | method |
public function dispose():void
Eliminates all the resources associated to the material.
download | () | method |
public function download():void
Downloads all the data uploaded to the graphics card.
draw | () | method |
public function draw(pivot:Pivot3D, surf:Surface3D, firstIndex:int = 0, count:int = -1):void
Draw a mesh surface using the current material.
Parameters
pivot:Pivot3D — Pivot3D to be drawn.
| |
surf:Surface3D — Surface3D to be drawn.
| |
firstIndex:int (default = 0 ) — First triangle index to be drawn.
| |
count:int (default = -1 ) — Number of triangles to be drawn.
|
upload | () | method |
public function upload(scene:Scene3D):void
Uploads the necesary data to the graphics card.
Parameters
scene:Scene3D |