@hrgdavor yes, the method I used was what was available but any other could replace it. The purpose is to get data from the embedded jscad script and create a pdf file from it that can then be downloaded or directly viewed into the browser.
@Pippo-LoVe as mentioned, JSCAD focuses on designs for 3D printing, and therefore colors are essential. Colors are assigned to a geometry / shape after completing all operations.
Colors can also be assigned to individual polygons on 3D geometries.
Having said the above, textures may be possible. But there have not been many requests for this support.
I love the idea of putting all the docs in markdown in the git repo itself.
The original site could also be hosted in gh-pages branch. There are a bunch of tools to convert markdown to html, so they could be optionally embedded in the app.
@z3dev There's one thing that still makes me use obj from my obj2jscad.js. It is that the deserialized obj loses the polygon vertices list and it needs to be rebuild from the geometries, unless I didn'k look at the right place. But as 99 % of the time the user won't use those data, I understand that the deserializer don't keep track of them.
Yes. You can make that example work. You might want to take a look at this project, which uses the JSCAD CLI (command line interface) for compiling the design and exporting SVG. Specifically, the 'localfont' project.
If you are going to work with other JavaScript libraries, especially those using async functions or promises then take a look at the 'googlefont' project.