Class Aligns an arrays of Object3Ds, Vector3D's or Vertexes compaired to each other.Align
Static variables
Static methods
staticalign(aObjs:Array<Dynamic>, 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. In case elements are meshes only their positions is affected. Method doesn't take in account their respective bounds 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. An array with elements with x,y and z public properties such as Mesh, Object3D, ObjectContainer3D,Vector3D or Vertex |
|---|---|
axis | String. Represent the axis to align on. |
condition | [optional]. String. Can be '+", "-", "av" or "", Default is "", aligns to given axis at 0. |
staticalignMeshes(meshes:Vector<Mesh>, axis:String, condition:String = POSITIVE):Void
Aligns a series of meshes to their bounds along a given axis.
Parameters:
meshes | A Vector of Mesh objects |
|---|---|
axis | Represent the axis to align on. |
condition | Can be POSITIVE ('+') or NEGATIVE ('-'), Default is POSITIVE ('+') |
staticdistribute(aObjs:Array<Dynamic>, axis:String):Void
Applies to array elements a distributed alignment according to axis, x,y or z. In case elements are meshes only their positions is affected. Method doesn't take in account their respective bounds each element must have public x,y and z properties
Parameters:
aObjs | Array. An array with elements with x,y and z public properties such as Mesh, Object3D, ObjectContainer3D,Vector3D or Vertex |
|---|---|
axis | String. Represent the axis to align on. |