axisOrderToAxis MethodStatic

Given an axisOrder (e.g. XYZ, YZX, etc) and an index, return the axis at the given index.

  • For example, if axisOrder = XYZ, then for index 0 return X (or axis 0), for index 1 return Y (or axis 1), and for index 2 return Z (or axis 2).
  • Another example: if axisOrder = ZXY, then for index 0 return Z (or axis 2), for index 1 return X (or axis 0), and for index 2 return Y (or axis 1).
  • For indexes greater than 2 or smaller than 0, it return cyclic axis. See cyclic3dAxis for more info.

axisOrderToAxis(order: AxisOrder, index: number): number

Parameter Type Description
order AxisOrder  
index number  

Returns - number

Defined in

Last Updated: 23 November, 2024