Skip to main content

axis()

Creates an axis from a direction vector.

Returns: Axis

Signatures

axis(axis: AxisLike): Axis

Creates an axis from a direction vector.

ParameterTypeDescription
axisAxisLikeThe direction vector or standard axis

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

Creates an axis from a direction vector with transform options.

ParameterTypeDescription
axisAxisLikeThe direction vector or standard axis
optionsAxisTransformOptionsTransform options (offset, flip, etc.)

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
optionsAxisTransformOptionsTransform options (offset, flip, etc.)

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

Transforms an existing axis with options.

ParameterTypeDescription
axisAxisThe existing axis to transform
optionsAxisTransformOptionsTransform options (offset, flip, etc.)

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

Creates an axis midway between two direction vectors.

ParameterTypeDescription
a1AxisLikeThe first direction vector or standard axis
a2AxisLikeThe second direction vector or standard axis
optionsAxisTransformOptionsTransform options (offset, flip, etc.) (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
optionsAxisTransformOptionsTransform options (offset, flip, etc.) (optional)