Build a specialized graphical editor
-
Hello, years ago I made an editor that used pre V1 JSCAD to help me build structures and I'm wondering whether it is now possible to do the same using V2 JSCAD.
This editor is a little like a polyhedron editor except that there's no control on Z axis. The structure consist of a net of shelves using a common array of vertices, so that when a vertice is moved, it also moves all shelves that are using it.
The editor is made of a JSCAD script that uses an hidden parameter and a js/html UI where the vertices and the shelves are created and moved, synced to the hidden JSCAD paramter. Rendering is done by clicking "Update" on JSCAD UI. I also added load/save of data (vertices and shelves).
Do you have an entry point I can use to do the same using V2 JSCAD ?
At least I could try to make a simpler JSCAD script that loads a data file, but how can I achieve this ? Using require ? or JSON ?
The editor is here : http://gilboo.carton.free.fr/OJSC5/edit_ner2.html
-
@hrgdavor Thank you, I will try from this demo.html file. I already used that file at early stage of V2 to take snapshots of a scene to create an animation, but I'm not sure I understood it all.
-
for now best piece of code to start with using jscad standalone or creating an app is I think in
packages/utils/regl-renderer/demo.html
it is the basis I used for my jscad experiments