Skip to content

@ue-too/board / decomposeTRS

Function: decomposeTRS()

decomposeTRS(matrix): object

Defined in: packages/board/src/camera/utils/matrix.ts:439

Decomposes a 2D transformation matrix into Translation, Rotation, and Scale (TRS)

Parameters

matrix

TransformationMatrix

The transformation matrix to decompose

Returns

object

Object containing translation, rotation (in radians), and scale components

rotation

rotation: number

scale

scale: object

scale.x

x: number

scale.y

y: number

translation

translation: object

translation.x

x: number

translation.y

y: number