Skip to content

anim-format (runtime format) / homography

Function: homography() ​

ts
function homography(src, dst): number[] | null;

The homography (row-major 3×3, h[8] = 1) taking the 4 points src ([x0,y0, …, x3,y3]) to dst; null when degenerate.

Parameters ​

ParameterType
srcreadonly number[]
dstreadonly number[]

Returns ​

number[] | null

HereSplash — 2D animation for the web