Skip to content

@emile/engine


@emile/engine / math/mat2d / decomposeMat2d

Function: decomposeMat2d()

decomposeMat2d(matrix): WorldTransform

Defined in: src/math/mat2d.ts:16

Converts the given matrix to a transform.

Assumes the given matrix is a 2D transformation matrix, as defined by the W3C CSS Transforms specification. (this is the default from the scene graph)

Parameters

matrix

mat4

The matrix to convert to a transform.

Returns

WorldTransform

The transform represented by the matrix.

Note

Algorithm taken from W3 CSS Transforms - Decompsing a 2D Matrix