UNPKG

warpvas

Version:

This JavaScript library enables fast and efficient image distortion transformations using Canvas 2D.

13 lines (12 loc) 389 B
### 2. Update Vertex Coordinates ```typescript // Move the top-left vertex of region (0,0) to (50,50) const warpvas = new Warpvas(canvas); warpvas.updateVertexCoord( 0, // row index 0, // column index 'tl', // vertex position (top-left) { x: 50, y: 50 }, // new position true // recalculate curve ); ```