-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A completely new playground, in React #1
Conversation
…he bottom optimistically
…olders, just copy all files to /. Breaks autocomplete
This looks great! I don't think it makes too much sense to review an initial batch of code like this, so I'd say let's focus on making it easy/repeatable to build/deploy for now. Once initial dev slows down, reviews are nice as that could let other contributors in as well. |
@kintel something I forgot to mention in the README is you need to update the homepage field in package.json to match the prod deployment (domain And root path of the app), or else the Emscripten worker would fail with cryptic errors (there’s logic to inline it with its dependencies and replace its meta.url; oh, the hoops I had to go through to make it work on Firefox 🤣) |
I test-published it to my own github pages. Worked perfectly, just needed a tiny tweak to the README. |
I accidentally pushed it to main (forgot to fork first). Hope I didn't jump the gun on anything.. |
With OpenSCAD now much faster thanks to the experimental Manifold integration, I thought it's time to revamp last year's playground to maybe make it actually useful.
New Demo: https://ochafik.com/openscad2
It's in React (uses @primefaces's primereact's neat widgets and icons, @gabotechs's react-stl-viewer for visualization and @react-monaco-editor's react-monaco-editor to wrap the Monaco editor, although I might switch to another editor to fix mobile editing. Otherwise it's more or lest just porting the JS code from my earlier prototype (https://github.com/ochafik/openscad-wasm/tree/editor-ochafik.com) into TypeScript.
Code completion is substantially better than last year: it actually pseudo parses the file and its transitive includes/uses, so it should be pretty (auto)complete!
It's quite a lot to review, maybe I can just keep beautifying it (and add some tests) and squash/merge it as it is at some point. @t-paul @kintel WDYT?