Packageaway3d.materials
Classpublic class MaterialBase
ImplementsIResource
SubclassesDefaultMaterialBase, SkyBoxMaterial, WireframeMaterial

MaterialBase forms an abstract base class for any material. Vertex stream index 0 is reserved for vertex positions. Vertex shader constants index 0-3 are reserved for projections

Public Properties
 PropertyDefined by
  blendMode : String
The blend mode to use when drawing this renderable.
MaterialBase
  bothSides : Boolean
Defines whether or not the material should perform backface culling.
MaterialBase
  extra : Object
An object to contain any extra data
MaterialBase
  lights : Array
MaterialBase
  materialNamespace : String
The namespace of the material, used by the MaterialLibrary.
MaterialBase
  mipmap : Boolean
Indicates whether or not any used textures should use mipmapping.
MaterialBase
  name : String
The name of the material.
MaterialBase
  repeat : Boolean
Indicates whether or not any used textures should be tiled.
MaterialBase
  requiresBlending : Boolean
[read-only] Indicates whether or not the material requires alpha blending during rendering.
MaterialBase
  smooth : Boolean
Indicates whether or not any used textures should use smoothing.
MaterialBase
  uniqueId : uint
[read-only] The unique id assigned to the material by the MaterialLibrary.
MaterialBase
Protected Properties
 PropertyDefined by
  _mipmap : Boolean
MaterialBase
  _numPasses : uint
MaterialBase
Public Methods
 MethodDefined by
  
Creates a new MaterialBase object.
MaterialBase
  
dispose(deep:Boolean):void
Cleans up any resources used by the current object.
MaterialBase
  
setNameAndSpace(name:String, materialNameSpace:String):void
Sets the materials name and namespace.
MaterialBase
Protected Methods
 MethodDefined by
  
Adds a pass to the material
MaterialBase
  
clearPasses():void
Clears all passes in the material.
MaterialBase
Property detail
blendModeproperty
blendMode:String  [read-write]

The blend mode to use when drawing this renderable. The following blend modes are supported:

Implementation
    public function get blendMode():String
    public function set blendMode(value:String):void
bothSidesproperty 
bothSides:Boolean  [read-write]

Defines whether or not the material should perform backface culling.

Implementation
    public function get bothSides():Boolean
    public function set bothSides(value:Boolean):void
extraproperty 
public var extra:Object

An object to contain any extra data

lightsproperty 
lights:Array  [read-write]Implementation
    public function get lights():Array
    public function set lights(value:Array):void
materialNamespaceproperty 
materialNamespace:String  [read-write]

The namespace of the material, used by the MaterialLibrary.

Implementation
    public function get materialNamespace():String
    public function set materialNamespace(value:String):void
_mipmapproperty 
protected var _mipmap:Boolean
mipmapproperty 
mipmap:Boolean  [read-write]

Indicates whether or not any used textures should use mipmapping.

Implementation
    public function get mipmap():Boolean
    public function set mipmap(value:Boolean):void
_nameproperty 
arcane var _name:String = "material"
nameproperty 
name:String  [read-write]

The name of the material.

Implementation
    public function get name():String
    public function set name(value:String):void
_numPassesproperty 
protected var _numPasses:uint
repeatproperty 
repeat:Boolean  [read-write]

Indicates whether or not any used textures should be tiled.

Implementation
    public function get repeat():Boolean
    public function set repeat(value:Boolean):void
requiresBlendingproperty 
requiresBlending:Boolean  [read-only]

Indicates whether or not the material requires alpha blending during rendering.

Implementation
    public function get requiresBlending():Boolean
smoothproperty 
smooth:Boolean  [read-write]

Indicates whether or not any used textures should use smoothing.

Implementation
    public function get smooth():Boolean
    public function set smooth(value:Boolean):void
uniqueIdproperty 
uniqueId:uint  [read-only]

The unique id assigned to the material by the MaterialLibrary.

Implementation
    public function get uniqueId():uint
Constructor detail
MaterialBase()constructor
public function MaterialBase() Init Parameters
Method detail
addPass()method
protected function addPass(pass:MaterialPassBase):void

Adds a pass to the material

Parameters
pass:MaterialPassBase
clearPasses()method 
protected function clearPasses():void

Clears all passes in the material.

dispose()method 
public function dispose(deep:Boolean):void

Cleans up any resources used by the current object.

Parameters
deep:Boolean — Indicates whether other resources should be cleaned up, that could potentially be shared across different instances.
setNameAndSpace()method 
public function setNameAndSpace(name:String, materialNameSpace:String):void

Sets the materials name and namespace.

Parameters
name:String — The name of the material.
 
materialNameSpace:String — The name space of the material.
Wiki link
Click to go to the wiki page for 'away3d.materials.MaterialBase'

Code examples

Comments