Package | away3d.materials |
Class | public class TextureMaterial |
Inheritance | TextureMaterial SinglePassMaterialBase MaterialBase NamedAssetBase flash.events.EventDispatcher |
Subclasses | SpriteSheetMaterial |
Property | Defined By | ||
---|---|---|---|
alpha : Number
The alpha of the surface. | TextureMaterial | ||
alphaBlending : Boolean
Indicates whether or not the material has transparency. | SinglePassMaterialBase | ||
alphaPremultiplied : Boolean
Indicates whether visible textures (or other pixels) used by this material have
already been premultiplied. | MaterialBase | ||
alphaThreshold : Number
The minimum alpha value for which pixels should be drawn. | SinglePassMaterialBase | ||
ambient : Number
The strength of the ambient reflection. | SinglePassMaterialBase | ||
ambientColor : uint
The colour of the ambient reflection. | SinglePassMaterialBase | ||
ambientMethod : BasicAmbientMethod
The method that provides the ambient lighting contribution. | SinglePassMaterialBase | ||
ambientTexture : Texture2DBase
The texture object to use for the ambient colour. | TextureMaterial | ||
animateUVs : Boolean
Specifies whether or not the UV coordinates should be animated using IRenderable's uvTransform matrix. | TextureMaterial | ||
assetFullPath : Array [read-only] | NamedAssetBase | ||
assetNamespace : String [read-only] | NamedAssetBase | ||
assetType : String [read-only]
The type of the asset. | MaterialBase | ||
blendMode : String [override]
The blend mode to use when drawing this renderable. | SinglePassMaterialBase | ||
bothSides : Boolean
Defines whether or not the material should cull triangles facing away from the camera. | MaterialBase | ||
colorTransform : ColorTransform
The ColorTransform object to transform the colour of the material with. | SinglePassMaterialBase | ||
depthCompareMode : String [override]
The depth compare mode used to render the renderables using this material. | SinglePassMaterialBase | ||
diffuseLightSources : uint
Define which light source types to use for diffuse reflections. | SinglePassMaterialBase | ||
diffuseMethod : BasicDiffuseMethod
The method that provides the diffuse lighting contribution. | SinglePassMaterialBase | ||
enableLightFallOff : Boolean
Whether or not to use fallOff and radius properties for lights. | SinglePassMaterialBase | ||
extra : Object
An object to contain any extra data. | MaterialBase | ||
gloss : Number
The glossiness of the material (sharpness of the specular highlight). | SinglePassMaterialBase | ||
id : String | NamedAssetBase | ||
lightPicker : LightPickerBase [override]
The light picker used by the material to provide lights to the material if it supports lighting. | SinglePassMaterialBase | ||
mipmap : Boolean [override]
Indicates whether or not any used textures should use mipmapping. | SinglePassMaterialBase | ||
name : String | NamedAssetBase | ||
normalMap : Texture2DBase
The normal map to modulate the direction of the surface for each texel. | SinglePassMaterialBase | ||
normalMethod : BasicNormalMethod
The method used to generate the per-pixel normals. | SinglePassMaterialBase | ||
numMethods : int [read-only]
The number of "effect" methods added to the material. | SinglePassMaterialBase | ||
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 [override] [read-only]
Indicates whether or not the material requires alpha blending during rendering. | SinglePassMaterialBase | ||
shadowMethod : ShadowMapMethodBase
The method used to render shadows cast on this surface, or null if no shadows are to be rendered. | SinglePassMaterialBase | ||
smooth : Boolean
Indicates whether or not any used textures should use smoothing. | MaterialBase | ||
specular : Number
The overall strength of the specular reflection. | SinglePassMaterialBase | ||
specularColor : uint
The colour of the specular reflection. | SinglePassMaterialBase | ||
specularLightSources : uint
Define which light source types to use for specular reflections. | SinglePassMaterialBase | ||
specularMap : Texture2DBase
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. | SinglePassMaterialBase | ||
specularMethod : BasicSpecularMethod
The method that provides the specular lighting contribution. | SinglePassMaterialBase | ||
texture : Texture2DBase
The texture object to use for the albedo colour. | TextureMaterial | ||
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 |
Method | Defined By | ||
---|---|---|---|
TextureMaterial(texture:Texture2DBase = null, smooth:Boolean = true, repeat:Boolean = false, mipmap:Boolean = true)
Creates a new TextureMaterial. | TextureMaterial | ||
addMethod(method:EffectMethodBase):void
Appends an "effect" shading method to the shader. | SinglePassMaterialBase | ||
addMethodAt(method:EffectMethodBase, index:int):void
Adds an effect method at the specified index amongst the methods already added to the material. | SinglePassMaterialBase | ||
assetPathEquals(name:String, ns:String):Boolean | NamedAssetBase | ||
dispose():void
Cleans up resources owned by the material, including passes. | MaterialBase | ||
getMethodAt(index:int):EffectMethodBase
Returns the method added at the given index. | SinglePassMaterialBase | ||
hasMethod(method:EffectMethodBase):Boolean
Queries whether a given effect method was added to the material. | SinglePassMaterialBase | ||
removeMethod(method:EffectMethodBase):void
Removes an effect method from the material. | SinglePassMaterialBase | ||
resetAssetPath(name:String, ns:String = null, overrideOriginal:Boolean = true):void | NamedAssetBase |
alpha | property |
alpha:Number
The alpha of the surface.
public function get alpha():Number
public function set alpha(value:Number):void
ambientTexture | property |
ambientTexture:Texture2DBase
The texture object to use for the ambient colour.
public function get ambientTexture():Texture2DBase
public function set ambientTexture(value:Texture2DBase):void
animateUVs | property |
animateUVs:Boolean
Specifies whether or not the UV coordinates should be animated using IRenderable's uvTransform matrix.
public function get animateUVs():Boolean
public function set animateUVs(value:Boolean):void
See also
texture | property |
texture:Texture2DBase
The texture object to use for the albedo colour.
public function get texture():Texture2DBase
public function set texture(value:Texture2DBase):void
TextureMaterial | () | Constructor |
public function TextureMaterial(texture:Texture2DBase = null, smooth:Boolean = true, repeat:Boolean = false, mipmap:Boolean = true)
Creates a new TextureMaterial.
Parameterstexture:Texture2DBase (default = null ) — The texture used for the material's albedo color.
| |
smooth:Boolean (default = true ) — Indicates whether the texture should be filtered when sampled. Defaults to true.
| |
repeat:Boolean (default = false ) — Indicates whether the texture should be tiled when sampled. Defaults to true.
| |
mipmap:Boolean (default = true ) — Indicates whether or not any used textures should use mipmapping. Defaults to true.
|