-
Notifications
You must be signed in to change notification settings - Fork 25
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
Quick hack on the example for web rendering #8
base: master
Are you sure you want to change the base?
Conversation
This let's the user essentially have the ability to edit and render from the browser. The user can also download the STL
Pushed the previous commit a little too early
I think this is good to go as a base example of using three.js and OpenSCAD-wasm. Let me know what you think. I tried to mimic the OpenSCAD GUI a little bit. It has room to improve. Some nice todos would be
|
Just noting there's https://ochafik.com/openscad/# ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey. Sorry about the late reply. I am happy to add the example. Just one small comment on the code. My only question is if this is the right spot for these project. I see this as a building block for other sites and not so much as a place to put implementations around it. What do you think?
@@ -14,14 +51,162 @@ | |||
link.remove(); | |||
}; | |||
|
|||
const instance = await OpenScad({ noInitialRun: true }); | |||
// const material = new THREE.MeshPhysicalMaterial({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind removing the commented out code before I merge?
Still needs a bit of work to optimize and make cleaner. This allows a user of the web example to render the generated model and download it.
Additionally I added a textbox so users can edit in the browser and render as they go.
A JS linter will be needed to make this useful and not just "not work" on bad scad files