Packageaway3d.materials
Classpublic class TextureMaterial
InheritanceTextureMaterial Inheritance SinglePassMaterialBase Inheritance MaterialBase Inheritance NamedAssetBase Inheritance flash.events.EventDispatcher
Subclasses SpriteSheetMaterial

TextureMaterial is a single-pass material that uses a texture to define the surface's diffuse reflection colour (albedo).



Public Properties
 PropertyDefined By
  alpha : Number
The alpha of the surface.
TextureMaterial
 InheritedalphaBlending : Boolean
Indicates whether or not the material has transparency.
SinglePassMaterialBase
 InheritedalphaPremultiplied : Boolean
Indicates whether visible textures (or other pixels) used by this material have already been premultiplied.
MaterialBase
 InheritedalphaThreshold : Number
The minimum alpha value for which pixels should be drawn.
SinglePassMaterialBase
 Inheritedambient : Number
The strength of the ambient reflection.
SinglePassMaterialBase
 InheritedambientColor : uint
The colour of the ambient reflection.
SinglePassMaterialBase
 InheritedambientMethod : 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
 InheritedassetFullPath : Array
[read-only]
NamedAssetBase
 InheritedassetNamespace : String
[read-only]
NamedAssetBase
 InheritedassetType : String
[read-only] The type of the asset.
MaterialBase
 InheritedblendMode : String
[override] The blend mode to use when drawing this renderable.
SinglePassMaterialBase
 InheritedbothSides : Boolean
Defines whether or not the material should cull triangles facing away from the camera.
MaterialBase
 InheritedcolorTransform : ColorTransform
The ColorTransform object to transform the colour of the material with.
SinglePassMaterialBase
 InheriteddepthCompareMode : String
[override] The depth compare mode used to render the renderables using this material.
SinglePassMaterialBase
 InheriteddiffuseLightSources : uint
Define which light source types to use for diffuse reflections.
SinglePassMaterialBase
 InheriteddiffuseMethod : BasicDiffuseMethod
The method that provides the diffuse lighting contribution.
SinglePassMaterialBase
 InheritedenableLightFallOff : Boolean
Whether or not to use fallOff and radius properties for lights.
SinglePassMaterialBase
 Inheritedextra : Object
An object to contain any extra data.
MaterialBase
 Inheritedgloss : Number
The glossiness of the material (sharpness of the specular highlight).
SinglePassMaterialBase
 Inheritedid : String
NamedAssetBase
 InheritedlightPicker : LightPickerBase
[override] The light picker used by the material to provide lights to the material if it supports lighting.
SinglePassMaterialBase
 Inheritedmipmap : Boolean
[override] Indicates whether or not any used textures should use mipmapping.
SinglePassMaterialBase
 Inheritedname : String
NamedAssetBase
 InheritednormalMap : Texture2DBase
The normal map to modulate the direction of the surface for each texel.
SinglePassMaterialBase
 InheritednormalMethod : BasicNormalMethod
The method used to generate the per-pixel normals.
SinglePassMaterialBase
 InheritednumMethods : int
[read-only] The number of "effect" methods added to the material.
SinglePassMaterialBase
 InheritedoriginalName : String
[read-only] The original name used for this asset in the resource (e.g.
NamedAssetBase
 Inheritedrepeat : Boolean
Indicates whether or not any used textures should be tiled.
MaterialBase
 InheritedrequiresBlending : Boolean
[override] [read-only] Indicates whether or not the material requires alpha blending during rendering.
SinglePassMaterialBase
 InheritedshadowMethod : ShadowMapMethodBase
The method used to render shadows cast on this surface, or null if no shadows are to be rendered.
SinglePassMaterialBase
 Inheritedsmooth : Boolean
Indicates whether or not any used textures should use smoothing.
MaterialBase
 Inheritedspecular : Number
The overall strength of the specular reflection.
SinglePassMaterialBase
 InheritedspecularColor : uint
The colour of the specular reflection.
SinglePassMaterialBase
 InheritedspecularLightSources : uint
Define which light source types to use for specular reflections.
SinglePassMaterialBase
 InheritedspecularMap : 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
 InheritedspecularMethod : BasicSpecularMethod
The method that provides the specular lighting contribution.
SinglePassMaterialBase
  texture : Texture2DBase
The texture object to use for the albedo colour.
TextureMaterial
 InheriteduniqueId : 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
Protected Properties
 PropertyDefined By
 Inherited_depthPass : DepthMapPass
MaterialBase
 Inherited_distancePass : DistanceMapPass
MaterialBase
 Inherited_lightPicker : LightPickerBase
MaterialBase
 Inherited_mipmap : Boolean = true
MaterialBase
 Inherited_numPasses : uint
MaterialBase
 Inherited_passes : Vector.<MaterialPassBase>
MaterialBase
 Inherited_repeat : Boolean
MaterialBase
 Inherited_screenPass : SuperShaderPass
SinglePassMaterialBase
 Inherited_smooth : Boolean = true
MaterialBase
Public Methods
 MethodDefined By
  
TextureMaterial(texture:Texture2DBase = null, smooth:Boolean = true, repeat:Boolean = false, mipmap:Boolean = true)
Creates a new TextureMaterial.
TextureMaterial
 Inherited
Appends an "effect" shading method to the shader.
SinglePassMaterialBase
 Inherited
addMethodAt(method:EffectMethodBase, index:int):void
Adds an effect method at the specified index amongst the methods already added to the material.
SinglePassMaterialBase
 Inherited
assetPathEquals(name:String, ns:String):Boolean
NamedAssetBase
 Inherited
dispose():void
Cleans up resources owned by the material, including passes.
MaterialBase
 Inherited
Returns the method added at the given index.
SinglePassMaterialBase
 Inherited
hasMethod(method:EffectMethodBase):Boolean
Queries whether a given effect method was added to the material.
SinglePassMaterialBase
 Inherited
Removes an effect method from the material.
SinglePassMaterialBase
 Inherited
resetAssetPath(name:String, ns:String = null, overrideOriginal:Boolean = true):void
NamedAssetBase
Protected Methods
 MethodDefined By
 Inherited
Adds a pass to the material
MaterialBase
 Inherited
Removes all passes from the material
MaterialBase
 Inherited
Removes a pass from the material.
MaterialBase
Public Constants
 ConstantDefined By
 InheritedDEFAULT_NAMESPACE : String = default
[static]
NamedAssetBase
Property Detail
alphaproperty
alpha:Number

The alpha of the surface.


Implementation
    public function get alpha():Number
    public function set alpha(value:Number):void
ambientTextureproperty 
ambientTexture:Texture2DBase

The texture object to use for the ambient colour.


Implementation
    public function get ambientTexture():Texture2DBase
    public function set ambientTexture(value:Texture2DBase):void
animateUVsproperty 
animateUVs:Boolean

Specifies whether or not the UV coordinates should be animated using IRenderable's uvTransform matrix.


Implementation
    public function get animateUVs():Boolean
    public function set animateUVs(value:Boolean):void

See also

IRenderable.uvTransform
textureproperty 
texture:Texture2DBase

The texture object to use for the albedo colour.


Implementation
    public function get texture():Texture2DBase
    public function set texture(value:Texture2DBase):void
Constructor Detail
TextureMaterial()Constructor
public function TextureMaterial(texture:Texture2DBase = null, smooth:Boolean = true, repeat:Boolean = false, mipmap:Boolean = true)

Creates a new TextureMaterial.

Parameters
texture: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.