The live demo starts when it’s in view.Pick an icon · drag to turn it · set depth and bevel in Controls · paste your own SVG
Any stroke icon (or filled one) as a solid you can light and turn.
What it costs a frame
GPU
0.18 ms
CPU
0.28 ms
02468101216.7 ms
GPU
0.18 ms
CPU, median
0.28 ms
CPU, 95th pct
0.40 ms
Draw calls
4
Weight
Light
Measured 13 November 2026 on RTX 4060 Laptop, 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 157, 1920×1080 at 1×. 600 frames × 3 rounds, median kept (rounds ranged GPU 0.18–0.28, CPU 0.17–0.28 ms). What ran: Measured turning the star (about 1,900 triangles, enamel with clearcoat, image-based light from a room environment) and rebuilding it from the SVG twice a second, at stroke weights that change each time. Phones: tiers are being measured next.
apple · Apple A19 Proin a browser tab · 16 November 2026
1.55
0.10
0.34
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 2026
0.52
0.45
0.62
Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.
What it needs
Renders with
WebGPUNeeds WebGPU: current Chrome and Edge, Safari 26+, Firefox 141+ on Windows.
Your browser
Checking…Looking for WebGPU
Depends on
three.js 0.187.0No other packages
What it’s for
A logo or icon as a 3D object in a scene or a title
Letting people drop in their own SVG without trusting it
Stroke icon sets (24-unit grid, round caps) turned into solids at any weight
A stroke icon as filled outlines, for a cutter, an embroidery file or a font
Badges, trophies and buttons extruded from a 2D mark
Checking a pasted SVG before anything renders it
Pitfalls, in brief
Never put the pasted SVG into the page, not even as an <img>: draw previews from the parsed numbers (outlinesPath gives a d of numbers only).
Refuse what changes the picture, drop what does not: a <script>, <text>, <image>, <use>, mask or <style> sheet is refused with a reason (the solid would be wrong or unsafe), while event handlers, links, ids, classes, url() fills and an editor’s own elements are dropped and listed.
Caps and joins are always round, whatever stroke-linecap says: the outline is a union of round-ended capsules.
Stroke icons say fill="none" on the root and filled ones say nothing (SVG’s default fill is black): the reader follows the cascade, so a stroke icon’s filled dots (fill="currentColor" on the dot) join the strokes and a filled icon works as it is.
The outline’s precision is the field’s cell (detail 512: 1/20 of a unit on a 24-unit icon).
3 more in brief
A bevel cut inward from both sides of a stroke meets in the middle at half the stroke’s width and turns the solid inside out: extrudeOutlines caps it at 0.4 of the thinnest stroke (pass minStroke when you call it yourself) and at under half the depth.
Conversion is synchronous: 5–20 ms for a 24-unit icon at detail 512, more for a big pasted drawing.
Dispose the old geometry when you swap in a new one, or every slider move leaks a mesh’s worth of GPU buffers.
8 pitfalls in full, the hook-up guide, the module source and its tests come with the part.
Where it comes from
From My other apps. Fully custom code.
Marching squares (Lorensen & Cline’s marching cubes, in two dimensions): tracing the outline from the distance field; saddles split by the cell’s mean
Ramer–Douglas–Peucker line simplification (Ramer 1972; Douglas & Peucker 1973): thinning each traced ring to the detail it needs
SVG 1.1, Implementation Notes F.6 (W3C): converting an arc from its endpoints to its centre, and scaling up radii that are too small
svgiconsextrudebevelstroke to outlineoffsetpolygon uniondistance fieldmarching squaressanitiseuntrusted inputdetail budgetExtrudeGeometrythree.jsno dependencies