linearly v0.32.0Docs


linearly v0.32.0 / mat2d / fromTRS

Function: fromTRS()

fromTRS(t, r, s): mat2d

Creates a matrix from given translation, rotation, and scaling. The order of the transformations is translation, rotation, and scaling, like most of the graphics software.

Parameters

t: null | vec2 = null

Translation vector

r: null | number = null

Rotation angle in degrees

s: null | number | vec2 = null

Scaling vector or a number

Returns

mat2d

The matrix that represents the transformation

Shorthands

Defined in

src/mat2d.ts:579open in new window