openscad-playground/README.md

55 lines
1.6 KiB
Markdown
Raw Normal View History

2023-03-24 01:02:41 +00:00
# OpenSCAD Playground
2023-03-24 00:50:43 +00:00
2023-03-25 19:39:22 +00:00
[Open the Demo](https://ochafik.com/openscad2)
2023-03-24 00:50:43 +00:00
2023-03-25 19:39:22 +00:00
This is a WIP revamp of https://ochafik.com/openscad.
2023-03-25 19:39:22 +00:00
Licenses: see [LICENSES](./LICENSE).
2023-03-25 19:30:34 +00:00
2023-03-25 19:39:22 +00:00
## Features & Roadmap
Should work:
- Automatic preview on edit (F5), and full rendering on Ctrl+Enter (or F6). Currently using a trick to force $preview=true, it's not perfect.
2023-03-25 19:30:34 +00:00
- Syntax highlighting
- Ships with many standard SCAD libraries
- Autocomplete of imports
- Autocomplete of symbols / function calls (pseudo-parses file and its transitive imports)
2023-03-25 19:39:22 +00:00
Planned:
2023-03-25 19:30:34 +00:00
2023-03-26 07:48:04 +01:00
- Open any file in the VFS. Setup [OPENSCADPATH](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Libraries#Setting_OPENSCADPATH)
2023-03-25 19:39:22 +00:00
- Customizer support. Probably by adding --export-json or --export-format=customizer-json to OpenSCAD.
- Mobile (iOS) editing support: switch to https://www.npmjs.com/package/react-codemirror ?
- Preview rendering: have OpenSCAD export the preview scene to a rich format (e.g. glTF, with some parts being translucent when prefixed w/ % modifier) and display it using https://modelviewer.dev/ maybe)
Prerequisites:
* wget
* GNU make
* npm
* deno
2023-03-25 19:30:34 +00:00
Local dev:
2023-03-25 19:30:34 +00:00
```bash
make public
npm start
2023-03-25 19:30:34 +00:00
# http://localhost:4000/
```
2023-03-25 19:34:07 +00:00
Local prod (test both the different inlining and serving under a prefix):
```bash
2023-03-25 19:30:34 +00:00
make public
npm run start:prod
# http://localhost:3000/dist/
Deployment (edit "homepage" in `package.json` to match your deployment root!):
```bash
make public
npm build
2023-03-25 19:30:34 +00:00
rm -fR ../ochafik.github.io/openscad2 && cp -R dist ../ochafik.github.io/openscad2
# Now commit and push changes, wait for site update and enjoy!
```