Open jbroll opened 1 year ago
@jbroll welcome
yeah. The web Ui is still work in progress, as some of the dependencies cannot be used with standard import/export.
will post back when something is working again
I made an attempt to make this work by converting the build commands in the remaining packages to rollup, but I could not get the code to be recognized as modules. Ideas about what direction might work for this?
Thanks for trying. The problem is webworkify. The internals accumulate code into a single JS block, which gets injected into the webworked. (For those weak in health, avoid looking at the code.)
The trick will be creating a webworker which loads the required packages using imports. I think @hrgdavor might have this functionality in the new prototype, which he has been working on for the last year.
@z3dev yes I have a worker that now can work with folder projects and load imports from unpkg/jsdelivr and node workspaces. There are few bits to test and tune, but it works well and I use it frequently to run my jscad scripts. It also handles TypeScript and ESM modules by converting them on the fly to csj/require.
Anyway, I hate those automatic/automagic worker code generators. That is why I am making the worker as standalone package. When creating a page you need to put it proper location and call it.
I finally have different bits ready for people to produce their own websites. Example here a standalone web page that has jscad with worker.
included in that demo is also my camera gizmo https://github.com/hrgdavor/jscadui/tree/main/packages/html-gizmo that I am very proud of.
Expected Behavior
git clone git@github.com:jbroll/OpenJSCAD.org.git cd OpenJSCAD.org git checkout V3 pnpm install pnpm test cd pacakges/web pnpm run dev ...