Appearance
anim-format (runtime format) / mapThroughMesh
Function: mapThroughMesh()
ts
function mapThroughMesh(
from,
to,
tris,
x,
y
):
| {
x: number;
y: number;
}
| null;Maps a point through the mesh: from points → to points (same triangles). Returns null when no triangle of from holds it. When several overlap (a folded warp) the topmost (last) triangle wins, as drawn.
Parameters
| Parameter | Type |
|---|---|
from | readonly number[] |
to | readonly number[] |
tris | readonly number[] |
x | number |
y | number |
Returns
| { x: number; y: number; } | null