path-rite

API Reference

path-rite exposes all functions on window.pathRite after WASM initialization. Listen for the path-rite-ready event before calling any function.

window.addEventListener('path-rite-ready', () => {
  const { linePath, scaleLinearMap } = window.pathRite;
  // ready to use
});

TypeScript definitions are included in the npm package (path_rite.d.ts).


Modules

Shapes — Line, area, arc, and pie/stack/sankey layout generators.

Scales — Linear and band scale mapping for data visualization.

Springs — Physics-based spring animation primitives.

Path — SVG path parsing, transforms, analysis, and corner rounding.