Skip to content

Conversation

@ochafik
Copy link
Collaborator

@ochafik ochafik commented Mar 26, 2023

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

image

image

image

image

image

image

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?

@kintel
Copy link
Member

kintel commented Mar 27, 2023

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.
I'll give local build&deploy a shot.

@ochafik
Copy link
Collaborator Author

ochafik commented Mar 27, 2023

I'll give local build&deploy a shot.

@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 🤣)

@kintel kintel merged commit 8c23204 into main Mar 27, 2023
@kintel
Copy link
Member

kintel commented Mar 27, 2023

I test-published it to my own github pages. Worked perfectly, just needed a tiny tweak to the README.

@kintel
Copy link
Member

kintel commented Mar 27, 2023

I accidentally pushed it to main (forgot to fork first). Hope I didn't jump the gun on anything..

@t-paul t-paul deleted the rewrite1 branch September 5, 2023 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants