Skip to content

Documentation / @ripl/3d / mat4Compose

Function: mat4Compose() ​

mat4Compose(translation, rotation, scale): Matrix4

Defined in: 3d/src/math/matrix.ts:342

Composes a transform from translation, per-axis rotation and scale, applied in that order.

Matches the order Shape3D builds its model matrix in, so a composed matrix and an element's own transform agree.

Parameters ​

ParameterTypeDescription
translationVector3Translation applied last.
rotationVector3Rotation around the X, Y and Z axes, in radians.
scaleVector3Per-axis scale applied first.

Returns ​

Matrix4

The composed matrix.