globalTHREE = {
const threeVersion = '0.123';
const THREE = await require(`three@${threeVersion}/build/three.min.js`);
async function add(key, file) {
THREE[
key
] = await import(`https://unpkg.com/three@${threeVersion}/examples/${file}`).then(
a => a[key]
);
}
await add('SVGLoader', 'jsm/loaders/SVGLoader.js');
await add('OrbitControls', 'jsm/controls/OrbitControls.js');
await add('BufferGeometryUtils', 'jsm/utils/BufferGeometryUtils.js');
await add('GLTFExporter', 'jsm/exporters/GLTFExporter.js');
await add('GLTFLoader', 'jsm/loaders/GLTFLoader.js');
return THREE;
}