Packagealternativa.engine3d.materials
Classpublic class TextureMaterial
InheritanceTextureMaterial Inheritance Material Inheritance Object
Subclasses EnvironmentMaterial, LightMapMaterial, StandardMaterial, VertexLightTextureMaterial

The material fills surface with bitmap image in light-independent manner. Can draw a Skin with no more than 41 Joints per surface. See Skin.divide() for more details. To be drawn with this material, geometry shoud have UV coordinates.

See also

alternativa.engine3d.objects.Skin.divide()
alternativa.engine3d.core.VertexAttributes.TEXCOORDS


Public Properties
 PropertyDefined By
  alpha : Number = 1
Transparency.
TextureMaterial
  alphaThreshold : Number = 0
alphaThreshold defines starts from which value of alpha a fragment of the surface will get into transparent pass.
TextureMaterial
  diffuseMap : TextureResource
Diffuse map.
TextureMaterial
 Inheritedname : String
Name of the material
Material
  opacityMap : TextureResource
Opacity map.
TextureMaterial
  opaquePass : Boolean = true
If true, perform opaque pass.
TextureMaterial
  transparentPass : Boolean = true
If true, perform transparent pass.
TextureMaterial
Public Methods
 MethodDefined By
  
TextureMaterial(diffuseMap:TextureResource = null, opacityMap:TextureResource = null, alpha:Number = 1)
Creates a new TextureMaterial instance.
TextureMaterial
  
[override]
TextureMaterial
 Inherited
getResources(resourceType:Class = null):Vector.<Resource>
Gather resources used by material for uploading into context3D.
Material
Protected Methods
 MethodDefined By
  
[override]
TextureMaterial
Property Detail
alphaproperty
public var alpha:Number = 1

Transparency.

alphaThresholdproperty 
public var alphaThreshold:Number = 0

alphaThreshold defines starts from which value of alpha a fragment of the surface will get into transparent pass.

See also

diffuseMapproperty 
public var diffuseMap:TextureResource

Diffuse map.

opacityMapproperty 
public var opacityMap:TextureResource

Opacity map.

opaquePassproperty 
public var opaquePass:Boolean = true

If true, perform opaque pass. Parts of surface, cumulative alpha value of which is greater or equal than alphaThreshold will be drawn within opaque pass.

See also

transparentPassproperty 
public var transparentPass:Boolean = true

If true, perform transparent pass. Parts of surface, cumulative alpha value of which is below than alphaThreshold will be drawn within transparent pass.

See also

Constructor Detail
TextureMaterial()Constructor
public function TextureMaterial(diffuseMap:TextureResource = null, opacityMap:TextureResource = null, alpha:Number = 1)

Creates a new TextureMaterial instance.

Parameters
diffuseMap:TextureResource (default = null) — Diffuse map.
 
opacityMap:TextureResource (default = null) — Transparency.
 
alpha:Number (default = 1)
Method Detail
clone()method
override public function clone():Material

Returns
Material
clonePropertiesFrom()method 
override protected function clonePropertiesFrom(source:Material):void

Parameters

source:Material