Packageaway3d.materials.methods
Classpublic class EnvMapMethod
InheritanceEnvMapMethod Inheritance EffectMethodBase Inheritance ShadingMethodBase Inheritance NamedAssetBase Inheritance flash.events.EventDispatcher

EnvMapMethod provides a material method to perform reflection mapping using cube maps.



Public Properties
 PropertyDefined By
  alpha : Number
The reflectivity of the surface.
EnvMapMethod
 InheritedassetFullPath : Array
[read-only]
NamedAssetBase
 InheritedassetNamespace : String
[read-only]
NamedAssetBase
 InheritedassetType : String
[read-only] The type of the asset.
EffectMethodBase
  envMap : CubeTextureBase
The cubic environment map containing the reflected scene.
EnvMapMethod
 Inheritedid : String
NamedAssetBase
  mask : Texture2DBase
An optional texture to modulate the reflectivity of the surface.
EnvMapMethod
 Inheritedname : String
NamedAssetBase
 InheritedoriginalName : String
[read-only] The original name used for this asset in the resource (e.g.
NamedAssetBase
 Inheritedpasses : Vector.<MaterialPassBase>
[read-only] Any passes required that render to a texture used by this method.
ShadingMethodBase
Protected Properties
 PropertyDefined By
 Inherited_passes : Vector.<MaterialPassBase>
ShadingMethodBase
 Inherited_sharedRegisters : ShaderRegisterData
ShadingMethodBase
Public Methods
 MethodDefined By
  
EnvMapMethod(envMap:CubeTextureBase, alpha:Number = 1)
Creates an EnvMapMethod object.
EnvMapMethod
 Inherited
assetPathEquals(name:String, ns:String):Boolean
NamedAssetBase
 Inherited
Copies the state from a ShadingMethodBase object into the current object.
ShadingMethodBase
  
dispose():void
[override] Cleans up resources used by this asset.
EnvMapMethod
 Inherited
resetAssetPath(name:String, ns:String = null, overrideOriginal:Boolean = true):void
NamedAssetBase
Protected Methods
 MethodDefined By
 Inherited
getTex2DSampleCode(vo:MethodVO, targetReg:ShaderRegisterElement, inputReg:ShaderRegisterElement, texture:TextureProxyBase, uvReg:ShaderRegisterElement = null, forceWrap:String = null):String
A helper method that generates standard code for sampling from a texture using the normal uv coordinates.
ShadingMethodBase
 Inherited
A helper method that generates standard code for sampling from a cube texture.
ShadingMethodBase
 Inherited
Marks the shader program as invalid, so it will be recompiled before the next render.
ShadingMethodBase
Public Constants
 ConstantDefined By
 InheritedDEFAULT_NAMESPACE : String = default
[static]
NamedAssetBase
Property Detail
alphaproperty
alpha:Number

The reflectivity of the surface.


Implementation
    public function get alpha():Number
    public function set alpha(value:Number):void
envMapproperty 
envMap:CubeTextureBase

The cubic environment map containing the reflected scene.


Implementation
    public function get envMap():CubeTextureBase
    public function set envMap(value:CubeTextureBase):void
maskproperty 
mask:Texture2DBase

An optional texture to modulate the reflectivity of the surface.


Implementation
    public function get mask():Texture2DBase
    public function set mask(value:Texture2DBase):void
Constructor Detail
EnvMapMethod()Constructor
public function EnvMapMethod(envMap:CubeTextureBase, alpha:Number = 1)

Creates an EnvMapMethod object.

Parameters
envMap:CubeTextureBase — The environment map containing the reflected scene.
 
alpha:Number (default = 1) — The reflectivity of the surface.
Method Detail
activate()method
override arcane function activate(vo:MethodVO, stage3DProxy:Stage3DProxy):void

Parameters

vo:MethodVO
 
stage3DProxy:Stage3DProxy

dispose()method 
override public function dispose():void

Cleans up resources used by this asset.

getFragmentCode()method 
override arcane function getFragmentCode(vo:MethodVO, regCache:ShaderRegisterCache, targetReg:ShaderRegisterElement):String

Parameters

vo:MethodVO
 
regCache:ShaderRegisterCache
 
targetReg:ShaderRegisterElement

Returns
String
initVO()method 
override arcane function initVO(vo:MethodVO):void

Initializes the properties for a MethodVO, including register and texture indices.

Parameters

vo:MethodVO — The MethodVO object linking this method with the pass currently being compiled.