Skip to content

anim-format (runtime format) / cardRotation

Function: cardRotation() ​

ts
function cardRotation(
   m, 
   rx, 
   ry
): number[];

The 3×3 linear part that turns parent-space offsets from the card's turning point: Rz(θ) · Ry · Rx · Rz(−θ), θ = the 2D matrix's rotation (so X / Y are the card's own axes). Row-major [9].

Parameters ​

ParameterType
mMatrix2D
rxnumber
rynumber

Returns ​

number[]

HereSplash — 2D animation for the web