SinglePassMaterialBase forms an abstract base object for the default single-pass materials provided by Away3D, using material methods to define their appearance.


Inherited from MaterialBase -> NamedAssetBase -> EventDispatcher.


Created SinglePassMaterialBase object has properties:

alphaBlending

Indicates whether or not the material has transparency. Boolean

alphaThreshold

The minimum alpha value for which pixels should be drawn.

ambient

The strength of the ambient reflection.

ambientColor

The colour of the ambient reflection.

ambientMethod

The method that provides the ambient lighting contribution. (BasicAmbientMethod)

blendMode

[override] The blend mode to use when drawing this renderable. (BlendMode)

colorTransform

The ColorTransform object to transform the colour of the material with. (ColorTransform)

depthCompareMode

[override] The depth compare mode used to render the renderables using this material. (Context3DCompareMode)

diffuseLightSources

Define which light source types to use for diffuse reflections.

diffuseMethod

The method that provides the diffuse lighting contribution. (BasicDiffuseMethod)

enableLightFallOff

Whether or not to use fallOff and radius properties for lights. Boolean

gloss

The glossiness of the material (sharpness of the specular highlight).

lightPicker

[override] The light picker used by the material to provide lights to the material if it supports lighting. (LightPickerBase)

mipmap

[override] Indicates whether or not any used textures should use mipmapping. Boolean

normalMap

The normal map to modulate the direction of the surface for each texel. (Texture2DBase)

normalMethod

The method used to generate the per-pixel normals. (BasicNormalMethod)

numMethods

[read-only] The number of "effect" methods added to the material.

requiresBlending

[override] [read-only] Indicates whether or not the material requires alpha blending during rendering. Boolean

shadowMethod

The method used to render shadows cast on this surface, or null if no shadows are to be rendered. (ShadowMapMethodBase) not supported

specular

The overall strength of the specular reflection.

specularColor

The colour of the specular reflection.

specularLightSources

Define which light source types to use for specular reflections.

specularMap

A specular map that defines the strength of specular reflections for each texel in the red channel, and the gloss factor in the green channel.  (Texture2DBase)

specularMethod

The method that provides the specular lighting contribution. (BasicSpecularMethod)


methods:

addMethod(method)

Appends an "effect" shading method to the shader.

method - (EffectMethodBase)


addMethodAt(method, index)

Adds an effect method at the specified index amongst the methods already added to the material.

method - (EffectMethodBase)

index - Int

getMethodAt(index)

Returns the method added at the given index. returns (EffectMethodBase)

index - The index of the method to retrieve. Int

hasMethod(method)

Queries whether a given effect method was added to the material. returns Boolean

method - (EffectMethodBase) The method to be queried.

removeMethod(method)

Removes an effect method from the material.

method - (EffectMethodBase) The method to be removed.


Created with the Personal Edition of HelpNDoc: Full-featured Documentation generator