Render SVG markup with WebGPU, or compile it into typed, GPU-ready geometry.
Website · Playground · Guide · API reference · npm
- Basic CodePen — the smallest complete browser example.
- Romania map CodePen — a larger real-world SVG.
- Interactive playground — edit SVG and compare native SVG with WebGPU output.
npm install svg2gpuimport { Svg2GPU } from "svg2gpu";
const renderer = new Svg2GPU("preview", {
svg: `<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
<circle cx="50" cy="50" r="40" fill="#2e9dfe" />
</svg>`,
fit: "contain",
antialias: true,
});
await renderer.ready;For plain HTML, React integration, every renderer option, and embedded examples, read the getting-started guide. For exact classes and types, open the TypeDoc API reference.
git clone https://github.com/Vascool14/Svg2GPU.git
cd Svg2GPU/svg2gpu
npm install
npm test
npm run buildThe library is in svg2gpu/, the website is in client/, and the standalone examples are in codepen/.
| Playground | TypeDoc |
|---|---|
![]() |
![]() |

