axisOrderToAxis MethodStatic

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

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

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

Parameter Type Description
order AxisOrder  
index number  

Returns - number

Defined in

Last Updated: 30 November, 2023