Packageaway3d.materials.methods
Classpublic class RimLightMethod
InheritanceRimLightMethod Inheritance EffectMethodBase Inheritance ShadingMethodBase Inheritance NamedAssetBase Inheritance flash.events.EventDispatcher

RimLightMethod provides a method to add rim lighting to a material. This adds a glow-like effect to edges of objects.



Public Properties
 PropertyDefined By
 InheritedassetFullPath : Array
[read-only]
NamedAssetBase
 InheritedassetNamespace : String
[read-only]
NamedAssetBase
 InheritedassetType : String
[read-only] The type of the asset.
EffectMethodBase
  blendMode : String
The blend mode with which to add the light to the object.
RimLightMethod
  color : uint
The color of the rim light.
RimLightMethod
 Inheritedid : String
NamedAssetBase
 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
  power : Number
The power of the rim light.
RimLightMethod
  strength : Number
The strength of the rim light.
RimLightMethod
Protected Properties
 PropertyDefined By
 Inherited_passes : Vector.<MaterialPassBase>
ShadingMethodBase
 Inherited_sharedRegisters : ShaderRegisterData
ShadingMethodBase
Public Methods
 MethodDefined By
  
RimLightMethod(color:uint = 0xffffff, strength:Number = .4, power:Number = 2, blend:String = mix)
Creates a new RimLightMethod.
RimLightMethod
 Inherited
assetPathEquals(name:String, ns:String):Boolean
NamedAssetBase
 Inherited
Copies the state from a ShadingMethodBase object into the current object.
ShadingMethodBase
 Inherited
dispose():void
Cleans up any resources used by the current object.
ShadingMethodBase
 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
  ADD : String = add
[static]
RimLightMethod
 InheritedDEFAULT_NAMESPACE : String = default
[static]
NamedAssetBase
  MIX : String = mix
[static]
RimLightMethod
  MULTIPLY : String = multiply
[static]
RimLightMethod
Property Detail
blendModeproperty
blendMode:String

The blend mode with which to add the light to the object. RimLightMethod.MULTIPLY multiplies the rim light with the material's colour. RimLightMethod.ADD adds the rim light with the material's colour. RimLightMethod.MIX provides normal alpha blending.


Implementation
    public function get blendMode():String
    public function set blendMode(value:String):void
colorproperty 
color:uint

The color of the rim light.


Implementation
    public function get color():uint
    public function set color(value:uint):void
powerproperty 
power:Number

The power of the rim light. Higher values will result in a higher edge fall-off.


Implementation
    public function get power():Number
    public function set power(value:Number):void
strengthproperty 
strength:Number

The strength of the rim light.


Implementation
    public function get strength():Number
    public function set strength(value:Number):void
Constructor Detail
RimLightMethod()Constructor
public function RimLightMethod(color:uint = 0xffffff, strength:Number = .4, power:Number = 2, blend:String = mix)

Creates a new RimLightMethod.

Parameters
color:uint (default = 0xffffff) — The colour of the rim light.
 
strength:Number (default = .4) — The strength of the rim light.
 
power:Number (default = 2) — The power of the rim light. Higher values will result in a higher edge fall-off.
 
blend:String (default = mix) — The blend mode with which to add the light to the object.
Method Detail
activate()method
override arcane function activate(vo:MethodVO, stage3DProxy:Stage3DProxy):void

Parameters

vo:MethodVO
 
stage3DProxy:Stage3DProxy

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.

Constant Detail
ADDConstant
public static const ADD:String = add

MIXConstant 
public static const MIX:String = mix

MULTIPLYConstant 
public static const MULTIPLY:String = multiply