diff --git a/src/3rd/js/plugin/frontend/frontend.js b/src/3rd/js/plugin/frontend/frontend.js
index 748940a..033c94e 100644
--- a/src/3rd/js/plugin/frontend/frontend.js
+++ b/src/3rd/js/plugin/frontend/frontend.js
@@ -260,9 +260,9 @@ window.frontend = (opts) => new Proxy({
.then( () => {
// setup exporters
let defaultExporter = THREE.GLTFExporter
- xrf.loaders['gltf'].exporter = defaultExporter
- xrf.loaders['glb'].exporter = defaultExporter
- const exporter = new THREE.GLTFExporter()
+ if( !xrf.loaders['gltf'].exporter ) xrf.loaders['gltf'].exporter = defaultExporter
+ if( !xrf.loaders['glb'].exporter ) xrf.loaders['glb'].exporter = defaultExporter
+ const exporter = new xrf.loaders[ext]()
exporter.parse(
model.scene,
function ( glb ) { download(glb, `${file}`) }, // ready
@@ -280,12 +280,13 @@ window.frontend = (opts) => new Proxy({
// load original scene and overwrite with updates
let url = document.location.search.replace(/\?/,'')
- let {urlObj,dir,file,hash,ext} = xrf.navigator.origin = xrf.URI.parse(url)
- const Loader = xrf.loaders[ext]
+ let {urlObj,dir,file,hash,fileExt} = xrf.navigator.origin = xrf.URI.parse(url)
+ debugger
+ const Loader = xrf.loaders[fileExt]
loader = new Loader().setPath( dir )
notify('exporting scene
please wait..')
loader.load(url, (model) => {
- exportScene(model,ext,file)
+ exportScene(model,fileExt,file)
})
},