openscad / openscad-playground

OpenSCAD Web Playground
https://ochafik.com/openscad2
Other
91 stars 27 forks source link
3d 3d-graphics cad react wasm

OpenSCAD Playground

Open the Demo

This is wrapping the headless WASM build of OpenSCAD (done by @DSchroer) into a lots of pretty PrimeReact components, slapping in a React Monaco editor (VS Codesque power!), a React STL viewer and a few tricks (of course, it's using the experimental Manifold support we've added recently, to make it super fast).

Enjoy!

An earlier iteration of this offered more control over the features that are enabled. This will come soon too.

Licenses: see LICENSES.

Features

Roadmap

Building

Prerequisites:

Local dev:

make public
npm start
# http://localhost:4000/

Local prod (test both the different inlining and serving under a prefix):

make public
npm run start:prod
# http://localhost:3000/dist/

Deployment (edit "homepage" in package.json to match your deployment root!):

make public
npm run build

rm -fR ../ochafik.github.io/openscad2 && cp -R dist ../ochafik.github.io/openscad2 
# Now commit and push changes, wait for site update and enjoy!

Adding OpenSCAD libraries

You'll need to update 3 files (search for BOSL2 for an example):

Send us a PR, then once it's merged request an update to the hosted https://ochafik.com/openscad2 demo.