Packageflare.materials
Classpublic class Material3D
InheritanceMaterial3D Inheritance flash.events.EventDispatcher
Subclasses Shader3D

The Material3D class represents a base for all materials.



Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined 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(pivot:Pivot3D, surf:Surface3D, firstIndex:int = 0, count:int = -1):void
Draw a mesh surface using the current material.
Material3D
  
upload(scene:Scene3D):void
Uploads the necesary data to the graphics card.
Material3D
Property Detail
cullFaceproperty
public var cullFace:String

The culling mode. One of Context3DTriangleFace values.

depthCompareproperty 
public var depthCompare:String = lessEqual

The test comparasion to be used when depthWrite is 'true'. Should be one of the values of Context3DCompareMode.

depthWriteproperty 
public var depthWrite:Boolean = true

Gets or sets whatever the material writes into the z-buffer.

destFactorproperty 
public var destFactor:String

The factor with which to multiply the destination color. Souldd be one of Context3DBlendFactor values.

nameproperty 
public var name:String

The name of the material.

sceneproperty 
scene:Scene3D  [read-only]

Gets a reference to the scene that the material is associated.


Implementation
    public function get scene():Scene3D
sourceFactorproperty 
public var sourceFactor:String

The factor with which to multiply the source color. Souldd be one of Context3DBlendFactor values.

transparentproperty 
transparent:Boolean

Sets or gets if the material should use alpha blending. This property changes the source and dest factor propertys.


Implementation
    public function get transparent():Boolean
    public function set transparent(value:Boolean):void
twoSidedproperty 
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.


Implementation
    public function get twoSided():Boolean
    public function set twoSided(value:Boolean):void
Constructor Detail
Material3D()Constructor
public function Material3D(name:String)

Creates a new Material3D.

Parameters
name:String — Name of the material.
Method Detail
clone()method
public function clone():Material3D

Clones the material.

Returns
Material3D — 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