Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

iangoegebuer
Copy link

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

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
@iangoegebuer
Copy link
Author

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

  • Open local file
  • Autosave edit to the browser
  • Nice toolbar buttons
  • SCAD linter/syntax hilighting
  • View changing toolbar
  • OpenSCAD run output

@iangoegebuer iangoegebuer marked this pull request as ready for review April 24, 2022 01:09
@t-paul
Copy link
Member

t-paul commented Apr 24, 2022

Just noting there's https://ochafik.com/openscad/# ...

Copy link
Collaborator

@DSchroer DSchroer left a 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({
Copy link
Collaborator

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?

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