Packageaway3d.tools
Classpublic class Align
InheritanceAlign Inheritance Object

Class Aligns arrays of Object3Ds, Vector3D'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 — Array. An array with elements with x,y and z public properties such as Mesh, Object3D, ObjectContainer3D,Vector3D or Vertex
 
axis:String — String. Represent the axis to align on.
 
condition:String — [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 — Array. An array with elements with x,y and z public properties such as Mesh, Object3D, ObjectContainer3D,Vector3D or Vertex
 
axis:String — String. Represent the axis to align on.