Skip to main content

axis()

Creates an axis datum on a world axis.

Returns: Axis

Signatures​

axis(axis: AxisLike): Axis

Creates an axis datum on a world axis.

ParameterTypeDescription
axisAxisLikeThe world axis: "x", "y" or "z"

axis(axis: AxisLike, options: AxisTransformOptions): Axis

Creates an axis datum on a world axis, moved and tilted by the transform options.

ParameterTypeDescription
axisAxisLikeThe world axis: "x", "y" or "z"
optionsAxisTransformOptionsOffsets (offsetX, offsetY, offsetZ), applied first, then rotations (rotateX, rotateY, rotateZ) around the world axes

axis(source: SceneObject): Axis

Creates an axis from a scene object's edge.

ParameterTypeDescription
sourceSceneObjectThe scene object whose edge defines the axis

axis(source: SceneObject, options: AxisTransformOptions): Axis

Creates an axis from a scene object's edge with transform options.

ParameterTypeDescription
sourceSceneObjectThe scene object whose edge defines the axis
optionsAxisTransformOptionsOffsets (offsetX, offsetY, offsetZ), applied first, then rotations (rotateX, rotateY, rotateZ) around the world axes

axis(axis: Axis, options: AxisTransformOptions): Axis

Transforms an existing axis with options.

ParameterTypeDescription
axisAxisThe existing axis to transform
optionsAxisTransformOptionsOffsets (offsetX, offsetY, offsetZ), applied first, then rotations (rotateX, rotateY, rotateZ) around the world axes

axis(a1: AxisLike, a2: AxisLike, options?: AxisTransformOptions): Axis

Creates an axis midway between two world axes.

ParameterTypeDescription
a1AxisLikeThe first world axis: "x", "y" or "z"
a2AxisLikeThe second world axis: "x", "y" or "z"
optionsAxisTransformOptionsOffsets (offsetX, offsetY, offsetZ), applied first, then rotations (rotateX, rotateY, rotateZ) around the world axes (optional)

axis(a1: Axis, a2: Axis, options?: AxisTransformOptions): Axis

Creates an axis midway between two existing Axis objects.

ParameterTypeDescription
a1AxisThe first Axis object
a2AxisThe second Axis object
optionsAxisTransformOptionsOffsets (offsetX, offsetY, offsetZ), applied first, then rotations (rotateX, rotateY, rotateZ) around the world axes (optional)