Packageaway3d.extrusions
Classpublic class NormalUVModifier

Public Properties
 PropertyDefined by
  maxLevel : Number
NormalUVModifier
  source : BitmapData
[write-only] Set a new source bitmapdata for the class
NormalUVModifier
Public Methods
 MethodDefined by
  
NormalUVModifier
(mesh:Mesh, sourcebmd:BitmapData = null, maxlevel:Number = 255)
Class NormalUVModifier modifies the vertices of a mesh with a bitmap information along the face normal vector or rescale a model along the model faces normals.
NormalUVModifier
  
apply(refreshnormal:Boolean = false):void
Apply the actual displacement and sets it as new base for further displacements.
NormalUVModifier
  
multiply(factor:Number):void
Updates the vertexes alog the normal vectors according to a multiplier.
NormalUVModifier
  
resetVertices():void
Resets the vertexes to their original values
NormalUVModifier
  
update(factor:Number, channel:String = "r"):void
Updates the vertexes with the color value found at the uv's coordinates multiplied by a factor along the normal vector.
NormalUVModifier
Property detail
maxLevelproperty
maxLevel:Number  [read-write]Implementation
    public function get maxLevel():Number
    public function set maxLevel(value:Number):void
sourceproperty 
source:BitmapData  [write-only]

Set a new source bitmapdata for the class

Implementation
    public function set source(value:BitmapData):void
Constructor detail
NormalUVModifier()constructor
public function NormalUVModifier(mesh:Mesh, sourcebmd:BitmapData = null, maxlevel:Number = 255)Parameters
mesh:Mesh — Object3D. The mesh Object3D to be updated.
 
sourcebmd:BitmapData (default = null) — [optional] BitmapData. The bitmapdata used as source for the influence.
 
maxlevel:Number (default = 255)
Init Parameters
Method detail
apply()method
public function apply(refreshnormal:Boolean = false):void

Apply the actual displacement and sets it as new base for further displacements.

Parameters
refreshnormal:Boolean (default = false) — s [optional] Recalculates the normals of the Mesh. Default = false;
multiply()method 
public function multiply(factor:Number):void

Updates the vertexes alog the normal vectors according to a multiplier. The influence is applied on top of the original vertex values.

Parameters
factor:Number — Number. The multiplier.
resetVertices()method 
public function resetVertices():void

Resets the vertexes to their original values

update()method 
public function update(factor:Number, channel:String = "r"):void

Updates the vertexes with the color value found at the uv's coordinates multiplied by a factor along the normal vector.

Parameters
factor:Number — Number. The multiplier. (multiplier 0/255).
 
channel:String (default = "r") — [optional] The channel of the source bitmapdata. Possible values, red channel:"r", green channel:"g", blue channel:"b", average:"av". Default is "r".
Wiki link
Click to go to the wiki page for 'away3d.extrusions.NormalUVModifier'

Code examples

Comments