Skip to content

Function: decomposePartAffine() ​

decomposePartAffine(a): SSDecomposedTransform

Defined in: src/PartTransform.ts:81

Decompose a 2D part affine [m00, m01, m10, m11, tx, ty] into translation, rotation and scale, assuming a translaterotatescale composition. Rotation is taken from the X basis and each scale from its basis length, with scaleY signed by the affine's determinant so a mirrored (negatively scaled) part survives the round-trip. A sheared affine cannot be represented this way and is approximated — prefer the raw SSPartAffine when the shear must be exact. A part's own Skew never produces that shear here: it is a non-inheriting local-vertex deform the runtime keeps out of the world matrix, so it does not reach a follower (matching SpriteStudio, where skew does not propagate). A rotated part under a non-uniform parent scale still can.

Parameters ​

a ​

ArrayLike<number>

Returns ​

SSDecomposedTransform