@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.
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 moduleimport
.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.