linearly v0.32.0Docs


linearly v0.32.0 / mat2d

Type Alias: mat2d

mat2d: readonly [number, number, number, number, number, number]

Represents 2D affine transformation (translation, rotation, scaling, skewing), omitting reduction thrid row which is always set to [0, 0, 1]. The order of six elements is the same as CSS transform matrix.

A mat2d contains six elements defined as:

[a, b,
 c, d,
 tx, ty]

This is a short form for the mat3:

[xx, xy, 0,
 yx, yy, 0,
 tx, ty, 1]

The last column is ignored so the array is shorter and operations are faster.

See

https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrixopen in new window

Defined in

src/mat2d.ts:26open in new window