3D modeling PWA using OpenSCAD WASM port
Hey all,
Just thought I'd share a fun FOSS PWA project I've been working on the last month and a half. It's a 3D modeling PWA that utilizes the OpenSCAD WASM port. I have it available at scadlite.com and my GitHub page for it is https://github.com/myoung8223/scadlite. Yeah, it's vibe-coded with genAI, so understandable demerit points there. I'm not much of a JS programmer. C is more my poison, and even then, undoubtedly quite mediocre there as well.
I got into 3D printing and modeling about 11 years ago and soon found an absolutely awesome free and open source 3D design program called OpenSCAD. If unfamiliar with it, it's known as the "programmer's 3D modeller", where you specify OpenSCAD code, a C-like language, in building your 3D models with primitive 3D geometry. It sounds limiting on the surface, but the rabbit hole is deep! Some users of more serious commercial 3D modeling programs might look down on it as not a serious tool or a tedious way to 3D model. Though for modeling parts, and modeling them parametrically, I find it to be an awesome program. I've designed probably a hundred useful things over the years, from printed objects to even some 3D assets for a WebXR VR game I made. I find it to be an enjoyable computer programming meets 3D modeling meets math meets LEGOs mix!
One issue with it is that it's Windows, macOS, and Linux only, or at least was until a WebAssembly port was made for it back in 2019. Even with the port, I couldn't find any fully-featured OpenSCAD implementations I much cared for. Some had many features but weren't PWAs, relying on an Internet connection. Others were PWAs missing important features. Admittedly, even my implementation isn't fully featured, but it covers vanilla OpenSCAD well. I tried forking one of the more polished projects to add some critical features and that turned into a total mess. Then I tried my hand at building one from the ground-up, teaming-up with Gemini, then later paying for Claude when I seemed to hit a wall with Gemini's capabilities. Well, "ground-up" probably doesn't give enough credit to the critical pieces that existed for this project -- the WASM port being key, the awesomeness that is the Three.js project, and the incredibly impressive capabilities of Gemini, and especially Claude. I wanted my project to be able to function completely standalone and application-like -- no server, no Internet needed once installed, the whole compiler running client-side via WASM -- one of the great selling points of PWAs in my opinion.
I see someone posted on how PWAs are a boon for free and open source software. Totally agree there! I guess I'll also add "genAI" into that FOSS boon. Maybe it's a double-edged sword with AI slop and devolving of programming skills. Wait, triple-edged sword? I've been biased toward native applications for a while, but the platform agnostic nature of PWAs is quite cool, coupled with this dawn of rapid prototyping capabilities of genAI. My motivation for this project was actually to try and get OpenSCAD in (more) use in K-12 education (the sector I work in), considering that landscape is seriously dominated by ChromeOS with 1:1 device programs. OpenSCAD, with its multidisciplinary approach to 3D modeling -- copious 3D math and spatial reasoning and troubleshooting, plus many computer programming concepts -- totally belongs in STEM classrooms and on student Chromebooks as an alternative/augmentation to traditional, mouse-driven, commercial 3D modeling programs.
The PWA I created with genAI isn't meant to be a replacement for OpenSCAD, hence "lite" being in the name. I'll probably still be using OpenSCAD for serious projects on my desktop. But as an avenue for getting K-12 students using OpenSCAD on their Chromebooks, that's my hope! Looking forward to making more PWAs that strike as useful!