OpenSCAD compiled to WASM in a Web Worker + R3F: a hologram-style assembly viewer with proportional explode — fully client-side
Built a viewer where you upload OpenSCAD source files and they compile + render into one sci-fi hologram scene, with a slider that explodes the assembly apart:
https://scad-hologram.vercel.app
Pipeline, for the curious:
- openscad-wasm runs in a module Web Worker (fresh instance per compile — callMain is single-shot), STL out
- STL -> BufferGeometry, cached in IndexedDB keyed by SHA-256 of the source so reloads never recompile
- react-three-fiber + drei: TransformControls gizmo writes into a placement layer (stored in OpenSCAD's Z-up coords; one wrapper group does the Y-up conversion exactly once)
- Hologram look: custom ShaderMaterial with fresnel rim + EdgesGeometry overlay + modest Bloom
- Explode = home + t \* explodeVector, vectors distance-proportional from the assembly centroid, damped in useFrame
Zero backend — static hosting, everything stays in the browser.
Disclosure: idea mine, \~all code written by Claude (Fable 5) in about 40 min from spec to deploy. Repo available if anyone wants to dig in.