Packageaway3d.materials.methods
Classpublic class SimpleWaterNormalMethod
InheritanceSimpleWaterNormalMethod Inheritance BasicNormalMethod Inheritance ShadingMethodBase Inheritance NamedAssetBase Inheritance flash.events.EventDispatcher

SimpleWaterNormalMethod provides a basic normal map method to create water ripples by translating two wave normal maps.



Public Properties
 PropertyDefined By
 InheritedassetFullPath : Array
[read-only]
NamedAssetBase
 InheritedassetNamespace : String
[read-only]
NamedAssetBase
 Inheritedid : String
NamedAssetBase
 Inheritedname : String
NamedAssetBase
  normalMap : Texture2DBase
[override] The texture containing the normals per pixel.
SimpleWaterNormalMethod
 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
  secondaryNormalMap : Texture2DBase
A second normal map that will be combined with the first to create a wave-like animation pattern.
SimpleWaterNormalMethod
  water1OffsetX : Number
The translation of the first wave layer along the X-axis.
SimpleWaterNormalMethod
  water1OffsetY : Number
The translation of the first wave layer along the Y-axis.
SimpleWaterNormalMethod
  water2OffsetX : Number
The translation of the second wave layer along the X-axis.
SimpleWaterNormalMethod
  water2OffsetY : Number
The translation of the second wave layer along the Y-axis.
SimpleWaterNormalMethod
Protected Properties
 PropertyDefined By
 Inherited_normalTextureRegister : ShaderRegisterElement
BasicNormalMethod
 Inherited_passes : Vector.<MaterialPassBase>
ShadingMethodBase
 Inherited_sharedRegisters : ShaderRegisterData
ShadingMethodBase
Public Methods
 MethodDefined By
  
Creates a new SimpleWaterNormalMethod object.
SimpleWaterNormalMethod
 Inherited
assetPathEquals(name:String, ns:String):Boolean
NamedAssetBase
 Inherited
[override] Copies the state from a ShadingMethodBase object into the current object.
BasicNormalMethod
  
dispose():void
[override] Cleans up any resources used by the current object.
SimpleWaterNormalMethod
 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
normalMapproperty
normalMap:Texture2DBase[override]

The texture containing the normals per pixel.


Implementation
    public function get normalMap():Texture2DBase
    public function set normalMap(value:Texture2DBase):void
secondaryNormalMapproperty 
secondaryNormalMap:Texture2DBase

A second normal map that will be combined with the first to create a wave-like animation pattern.


Implementation
    public function get secondaryNormalMap():Texture2DBase
    public function set secondaryNormalMap(value:Texture2DBase):void
water1OffsetXproperty 
water1OffsetX:Number

The translation of the first wave layer along the X-axis.


Implementation
    public function get water1OffsetX():Number
    public function set water1OffsetX(value:Number):void
water1OffsetYproperty 
water1OffsetY:Number

The translation of the first wave layer along the Y-axis.


Implementation
    public function get water1OffsetY():Number
    public function set water1OffsetY(value:Number):void
water2OffsetXproperty 
water2OffsetX:Number

The translation of the second wave layer along the X-axis.


Implementation
    public function get water2OffsetX():Number
    public function set water2OffsetX(value:Number):void
water2OffsetYproperty 
water2OffsetY:Number

The translation of the second wave layer along the Y-axis.


Implementation
    public function get water2OffsetY():Number
    public function set water2OffsetY(value:Number):void
Constructor Detail
SimpleWaterNormalMethod()Constructor
public function SimpleWaterNormalMethod(waveMap1:Texture2DBase, waveMap2:Texture2DBase)

Creates a new SimpleWaterNormalMethod object.

Parameters
waveMap1:Texture2DBase — A normal map containing one layer of a wave structure.
 
waveMap2:Texture2DBase — A normal map containing a second layer of a wave structure.
Method Detail
activate()method
override arcane function activate(vo:MethodVO, stage3DProxy:Stage3DProxy):void

Parameters

vo:MethodVO
 
stage3DProxy:Stage3DProxy

cleanCompilationData()method 
override arcane function cleanCompilationData():void

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

Cleans up any resources used by the current object.

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

Parameters

vo:MethodVO
 
regCache:ShaderRegisterCache
 
targetReg:ShaderRegisterElement

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

Initializes unchanging shader constants using the data from a MethodVO.

Parameters

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

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.