Package | away3d.materials |
Class | public class MaterialBase |
Inheritance | MaterialBase NamedAssetBase flash.events.EventDispatcher |
Implements | IAsset |
Subclasses | MultiPassMaterialBase, SegmentMaterial, SinglePassMaterialBase, SkyBoxMaterial |
Property | Defined By | ||
---|---|---|---|
alphaPremultiplied : Boolean
Indicates whether visible textures (or other pixels) used by this material have
already been premultiplied. | MaterialBase | ||
assetFullPath : Array [read-only] | NamedAssetBase | ||
assetNamespace : String [read-only] | NamedAssetBase | ||
assetType : String [read-only]
The type of the asset. | MaterialBase | ||
blendMode : String
The blend mode to use when drawing this renderable. | MaterialBase | ||
bothSides : Boolean
Defines whether or not the material should cull triangles facing away from the camera. | MaterialBase | ||
depthCompareMode : String
The depth compare mode used to render the renderables using this material. | MaterialBase | ||
extra : Object
An object to contain any extra data. | MaterialBase | ||
id : String | NamedAssetBase | ||
lightPicker : LightPickerBase
The light picker used by the material to provide lights to the material if it supports lighting. | MaterialBase | ||
mipmap : Boolean
Indicates whether or not any used textures should use mipmapping. | MaterialBase | ||
name : String | NamedAssetBase | ||
originalName : String [read-only]
The original name used for this asset in the resource (e.g. | NamedAssetBase | ||
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]
An id for this material used to sort the renderables by material, which reduces render state changes across
materials using the same Program3D. | MaterialBase |
Property | Defined By | ||
---|---|---|---|
_depthPass : DepthMapPass | MaterialBase | ||
_distancePass : DistanceMapPass | MaterialBase | ||
_lightPicker : LightPickerBase | MaterialBase | ||
_mipmap : Boolean = true | MaterialBase | ||
_numPasses : uint | MaterialBase | ||
_passes : Vector.<MaterialPassBase> | MaterialBase | ||
_repeat : Boolean | MaterialBase | ||
_smooth : Boolean = true | MaterialBase |
Method | Defined By | ||
---|---|---|---|
Creates a new MaterialBase object. | MaterialBase | ||
assetPathEquals(name:String, ns:String):Boolean | NamedAssetBase | ||
dispose():void
Cleans up resources owned by the material, including passes. | MaterialBase | ||
resetAssetPath(name:String, ns:String = null, overrideOriginal:Boolean = true):void | NamedAssetBase |
Method | Defined By | ||
---|---|---|---|
addPass(pass:MaterialPassBase):void
Adds a pass to the material
| MaterialBase | ||
clearPasses():void
Removes all passes from the material
| MaterialBase | ||
removePass(pass:MaterialPassBase):void
Removes a pass from the material. | MaterialBase |
_depthPass | property |
protected var _depthPass:DepthMapPass
_distancePass | property |
protected var _distancePass:DistanceMapPass
_lightPicker | property |
protected var _lightPicker:LightPickerBase
_mipmap | property |
protected var _mipmap:Boolean = true
_numPasses | property |
protected var _numPasses:uint
_passes | property |
protected var _passes:Vector.<MaterialPassBase>
_repeat | property |
protected var _repeat:Boolean
_smooth | property |
protected var _smooth:Boolean = true
alphaPremultiplied | property |
alphaPremultiplied:Boolean
Indicates whether visible textures (or other pixels) used by this material have already been premultiplied. Toggle this if you are seeing black halos around your blended alpha edges.
public function get alphaPremultiplied():Boolean
public function set alphaPremultiplied(value:Boolean):void
assetType | property |
assetType:String
[read-only] The type of the asset.
public function get assetType():String
blendMode | property |
blendMode:String
The blend mode to use when drawing this renderable. The following blend modes are supported:
public function get blendMode():String
public function set blendMode(value:String):void
bothSides | property |
bothSides:Boolean
Defines whether or not the material should cull triangles facing away from the camera.
public function get bothSides():Boolean
public function set bothSides(value:Boolean):void
depthCompareMode | property |
depthCompareMode:String
The depth compare mode used to render the renderables using this material.
public function get depthCompareMode():String
public function set depthCompareMode(value:String):void
See also
extra | property |
public var extra:Object
An object to contain any extra data.
lightPicker | property |
lightPicker:LightPickerBase
The light picker used by the material to provide lights to the material if it supports lighting.
public function get lightPicker():LightPickerBase
public function set lightPicker(value:LightPickerBase):void
See also
mipmap | property |
mipmap:Boolean
Indicates whether or not any used textures should use mipmapping. Defaults to true.
public function get mipmap():Boolean
public function set mipmap(value:Boolean):void
repeat | property |
repeat:Boolean
Indicates whether or not any used textures should be tiled. If set to false, texture samples are clamped to the texture's borders when the uv coordinates are outside the [0, 1] interval.
public function get repeat():Boolean
public function set repeat(value:Boolean):void
requiresBlending | property |
requiresBlending:Boolean
[read-only] Indicates whether or not the material requires alpha blending during rendering.
public function get requiresBlending():Boolean
smooth | property |
smooth:Boolean
Indicates whether or not any used textures should use smoothing.
public function get smooth():Boolean
public function set smooth(value:Boolean):void
uniqueId | property |
uniqueId:uint
[read-only] An id for this material used to sort the renderables by material, which reduces render state changes across materials using the same Program3D.
public function get uniqueId():uint
MaterialBase | () | Constructor |
public function MaterialBase()
Creates a new MaterialBase object.
addPass | () | method |
protected function addPass(pass:MaterialPassBase):void
Adds a pass to the material
Parameters
pass:MaterialPassBase |
clearPasses | () | method |
protected function clearPasses():void
Removes all passes from the material
dispose | () | method |
public function dispose():void
Cleans up resources owned by the material, including passes. Textures are not owned by the material since they could be used by other materials and will not be disposed.
removePass | () | method |
protected function removePass(pass:MaterialPassBase):void
Removes a pass from the material.
Parameters
pass:MaterialPassBase — The pass to be removed.
|
renderPass | () | method |
arcane function renderPass(index:uint, renderable:IRenderable, stage3DProxy:Stage3DProxy, entityCollector:EntityCollector, viewProjection:Matrix3D):void
Renders the current pass. Before calling renderPass, activatePass needs to be called with the same index.
Parameters
index:uint — The index of the pass used to render the renderable.
| |
renderable:IRenderable — The IRenderable object to draw.
| |
stage3DProxy:Stage3DProxy — The Stage3DProxy object used for rendering.
| |
entityCollector:EntityCollector — The EntityCollector object that contains the visible scene data.
| |
viewProjection:Matrix3D — The view-projection matrix used to project to the screen. This is not the same as
camera.viewProjection as it includes the scaling factors when rendering to textures.
|