Skip to main content

Transformable

Extends SceneObject

Inherited from SceneObject

name()​

name(value: string): this

Sets a custom display name for this object, overriding the default type-based name.

ParameterTypeDescription
valuestringThe display name to assign.

Methods​

transform()​

transform(matrix: Matrix4): this

Composes a 4x4 transformation matrix onto this object. Applied to the object's own shapes after build. Chained calls compose left-to-right: .translate(T).rotate(R) applies translation first, then rotation.

ParameterTypeDescription
matrixMatrix4

translate()​

translate(x: NumberParam): this

Translate along X.

ParameterTypeDescription
xNumberParamDistance along world X.

translate()​

translate(x: NumberParam, y: NumberParam): this

Translate along X and Y.

ParameterTypeDescription
xNumberParam
yNumberParam

translate()​

translate(x: NumberParam, y: NumberParam, z: NumberParam): this

Translate along X, Y, and Z.

ParameterTypeDescription
xNumberParam
yNumberParam
zNumberParam

translate()​

translate(offset: PointLike): this

Translate by a point-like offset in world space.

ParameterTypeDescription
offsetPointLike

rotate()​

rotate(angle: NumberParam): this

Rotate by an angle around world Z through the origin.

ParameterTypeDescription
angleNumberParamRotation in degrees.

rotate()​

rotate(axis: AxisLike, angle: NumberParam): this

Rotate around an axis by an angle.

ParameterTypeDescription
axisAxisLikeThe axis to rotate around.
angleNumberParamRotation in degrees.

mirror()​

mirror(plane: PlaneLike): this

Mirror across a plane.

ParameterTypeDescription
planePlaneLike

mirror()​

mirror(axis: AxisLike): this

Mirror across an axis (primarily useful for 2D geometry).

ParameterTypeDescription
axisAxisLike