I have an electron app written using TypeScript and I use
import to require
threejs and the
3MFLoader. The 3MF example uses
<script src> to require JSZip as the 3MF loader does not require JSZip itself.
When I try and use the loader it fails with
3MFLoader.js THREE.3MFLoader: jszip missing and file is compressed. as
JSZip is not defined.
If I patch
3MFLoader.js and add the following at the top it suddenly works:
import * as JSZip from "../../js/libs/jszip.min.js";
How am I supposed to import the 3MFLoader? Adding the same line above the 3MFLoader import in my own source file has no effect (naturally).