Packageaway3d.tools
Classpublic class Align

Class Aligns arrays of Object3Ds, Number3d's or Vertexes compared to each other.Align

Public Methods
 MethodDefined by
  
align(aObjs:Array, axis:String, condition:String = ""):void
[static] Applies to array elements the alignment according to axis, x, y or z and a condition.
Align
  
distribute(aObjs:Array, axis:String):void
[static] Applies to array elements a distributed alignment according to axis, x,y or z.
Align
Method detail
align()method
public static function align(aObjs:Array, axis:String, condition:String = ""):void

Applies to array elements the alignment according to axis, x, y or z and a condition. each element must have public x,y and z properties String condition: "+" align to highest value on a given axis "-" align to lowest value on a given axis "" align to a given axis on 0; This is the default. "av" align to average of all values on a given axis

Parameters
aObjs:Array — aObjs Array. An array with elements with x,y and z public properties such as Mesh, Object3D, ObjectContainer3D,Number3D or Vertex
 
axis:String — axis String. Represent the axis to align on.
 
condition:String (default = "") — condition [optional]. String. Can be '+", "-", "av" or "", Default is "", aligns to given axis at 0.
distribute()method 
public static function distribute(aObjs:Array, axis:String):void

Applies to array elements a distributed alignment according to axis, x,y or z. each element must have public x,y and z properties

Parameters
aObjs:Array — aObjs Array. An array with elements with x,y and z public properties such as Mesh, Object3D, ObjectContainer3D,Number3D or Vertex
 
axis:String — axis String. Represent the axis to align on.
Wiki link
Click to go to the wiki page for 'away3d.tools.Align'

Code examples

Comments