@motion-script/core / coordsMatrix
Function: coordsMatrix()
coordsMatrix(
coords,bounds):number[]
Defined in: attributes/shape/sksl-uniforms.ts:321
The local matrix that turns a paint shader's shape-local fragCoord into the
requested coordinate space, as a row-major 3×3 (the same 9-tuple convention
computeImageMatrix produces).
A shader is evaluated at M⁻¹ · p, so the matrix maps shader space onto the
shape — normalized therefore scales by the bounds size rather than by its
reciprocal. centered scales both axes by the height so the shorter axis
is the unit one, which is what makes an u_aspect-corrected circle round.
Parameters
coords
bounds
Returns
number[]