Package | away3d.tools.commands |
Class | public class Align |
Inheritance | Align Object |
Align
Method | Defined 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 | ||
alignMeshes(meshes:Vector.<Mesh>, axis:String, condition:String):void [static]
Aligns a series of meshes to their bounds along a given axis. | Align | ||
alignToFloor(meshes:Vector.<Mesh>):void [static]
Place one or more meshes at y 0 using their min bounds
| Align | ||
distribute(aObjs:Array, axis:String):void [static]
Applies to array elements a distributed alignment according to axis, x,y or z. | Align |
Constant | Defined By | ||
---|---|---|---|
AVERAGE : String = av [static] | Align | ||
NEGATIVE : String = - [static] | Align | ||
POSITIVE : String = + [static] | Align | ||
X_AXIS : String = x [static] | Align | ||
Y_AXIS : String = y [static] | Align | ||
Z_AXIS : String = z [static] | Align |
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. 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 — 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.
|
alignMeshes | () | method |
public static function alignMeshes(meshes:Vector.<Mesh>, axis:String, condition:String):void
Aligns a series of meshes to their bounds along a given axis.
Parameters
meshes:Vector.<Mesh> — A Vector of Mesh objects
| |
axis:String — Represent the axis to align on.
| |
condition:String (default = NaN ) — Can be POSITIVE ('+') or NEGATIVE ('-'), Default is POSITIVE ('+')
|
alignToFloor | () | method |
public static function alignToFloor(meshes:Vector.<Mesh>):void
Place one or more meshes at y 0 using their min bounds
Parameters
meshes:Vector.<Mesh> |
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. 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 — 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.
|
AVERAGE | Constant |
public static const AVERAGE:String = av
NEGATIVE | Constant |
public static const NEGATIVE:String = -
POSITIVE | Constant |
public static const POSITIVE:String = +
X_AXIS | Constant |
public static const X_AXIS:String = x
Y_AXIS | Constant |
public static const Y_AXIS:String = y
Z_AXIS | Constant |
public static const Z_AXIS:String = z