Skip to content

@modoki/engine / index / compose2D

Function: compose2D()

compose2D(x, y, rot, sx, sy): Mat2D

Compose a local affine from a TRS tuple: translate (x,y), rotate rot (radians), scale (sx,sy). Order is T · R · S — scale first, then rotate, then translate — matching how Transform composes a node's local matrix.

Parameters

x

number

y

number

rot

number

sx

number

sy

number

Returns

Mat2D

Built with Modoki.