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.
| Parameter | Type | Description |
|---|---|---|
value | string | The 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.
| Parameter | Type | Description |
|---|---|---|
matrix | Matrix4 |
translate()
translate(x: NumberParam): this
Translate along X.
| Parameter | Type | Description |
|---|---|---|
x | NumberParam | Distance along world X. |
translate()
translate(x: NumberParam, y: NumberParam): this
Translate along X and Y.
| Parameter | Type | Description |
|---|---|---|
x | NumberParam | |
y | NumberParam |
translate()
translate(x: NumberParam, y: NumberParam, z: NumberParam): this
Translate along X, Y, and Z.
| Parameter | Type | Description |
|---|---|---|
x | NumberParam | |
y | NumberParam | |
z | NumberParam |
translate()
translate(offset: PointLike): this
Translate by a point-like offset in world space.
| Parameter | Type | Description |
|---|---|---|
offset | PointLike |
rotate()
rotate(angle: NumberParam): this
Rotate by an angle around world Z through the origin.
| Parameter | Type | Description |
|---|---|---|
angle | NumberParam | Rotation in degrees. |
rotate()
rotate(axis: AxisLike, angle: NumberParam): this
Rotate around an axis by an angle.
| Parameter | Type | Description |
|---|---|---|
axis | AxisLike | The axis to rotate around. |
angle | NumberParam | Rotation in degrees. |
mirror()
mirror(plane: PlaneLike): this
Mirror across a plane.
| Parameter | Type | Description |
|---|---|---|
plane | PlaneLike |
mirror()
mirror(axis: AxisLike): this
Mirror across an axis (primarily useful for 2D geometry).
| Parameter | Type | Description |
|---|---|---|
axis | AxisLike |