hrgdavor / jscadui

MIT License
30 stars 7 forks source link

Convert examples to use JSCAD v2 syntax #90

Closed platypii closed 7 months ago

platypii commented 7 months ago

Fixes #82

@Hermann-SW raised a good point: right now the scripts used as examples ONLY work on jscad.app because of the magic of jscadui's import handling. This is especially confusing as we are in transition from V2 with require and V3 with ES module import.

To be consistent, in this PR I reverted the example scripts to use V2 require syntax, which should work in both openjscad.xyz and jscad.app.

At some point, once JSCAD V3 is released, I think we should update the examples to use import statements, along with the new "flattened" V3 api. But not yet.