@shopware-ag/dive 3.0.0-beta.0 → 3.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/build/chunks/{AssetCache-CnbDDhU8.cjs → AssetCache-Bk3ov4KH.cjs} +1 -1
  2. package/build/chunks/{AssetCache-C2DuXcmp.mjs → AssetCache-DNcSNSJk.mjs} +1 -1
  3. package/build/chunks/{AssetLoader-h2uyFEfZ.cjs → AssetLoader-D6ScugS-.cjs} +1 -1
  4. package/build/chunks/{AssetLoader-DO7xlbC3.mjs → AssetLoader-Dvq0Wk28.mjs} +3 -3
  5. package/build/chunks/{FileTypes-Bvt5QTJC.cjs → FileTypes-CGEeONh9.cjs} +2 -2
  6. package/build/chunks/{FileTypes-BB4_1gBJ.mjs → FileTypes-DU8bBa_V.mjs} +20 -19
  7. package/build/chunks/{isFileTypeSupported-D1z0zckw.mjs → isFileTypeSupported-DY4QOFj7.mjs} +1 -1
  8. package/build/chunks/{isFileTypeSupported-MJWHcUsR.cjs → isFileTypeSupported-DrMUwnQx.cjs} +1 -1
  9. package/build/dive.cjs +1 -1
  10. package/build/dive.mjs +2 -2
  11. package/build/engine/Dive.d.ts +1 -0
  12. package/build/plugins/ar/index.cjs +1 -1
  13. package/build/plugins/ar/index.mjs +1 -1
  14. package/build/plugins/assetcache/index.cjs +1 -1
  15. package/build/plugins/assetcache/index.mjs +1 -1
  16. package/build/plugins/assetloader/index.cjs +1 -1
  17. package/build/plugins/assetloader/index.mjs +2 -2
  18. package/build/plugins/orbitcontroller/index.cjs +1 -1
  19. package/build/plugins/orbitcontroller/index.mjs +1 -1
  20. package/build/plugins/orientationdisplay/index.cjs +1 -1
  21. package/build/plugins/orientationdisplay/index.mjs +1 -1
  22. package/build/plugins/quickview/index.cjs +1 -1
  23. package/build/plugins/quickview/index.mjs +1 -1
  24. package/build/plugins/state/index.cjs +1 -1
  25. package/build/plugins/state/index.mjs +1 -1
  26. package/build/plugins/toolbox/index.cjs +1 -1
  27. package/build/plugins/toolbox/index.mjs +1 -1
  28. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";var u=Object.defineProperty;var n=(s,e,r)=>e in s?u(s,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):s[e]=r;var t=(s,e,r)=>n(s,typeof e!="symbol"?e+"":e,r);require("./FileTypes-Bvt5QTJC.cjs");require("three/webgpu");require("three/examples/jsm/loaders/HDRLoader.js");require("three/tsl");const h=require("./network-error-CdDXil5g.cjs");class c{constructor(e){t(this,"_promise");t(this,"_resolve");t(this,"_arrayBuffer",null);t(this,"_size",0);t(this,"_createdAt");t(this,"_updatedAt");this._uri=e,this._promise=new Promise(r=>{this._resolve=r}),this._createdAt=new Date,this._updatedAt=new Date}get promise(){return this._promise}get size(){return this._size}get createdAt(){return this._createdAt}get updatedAt(){return this._updatedAt}get arrayBuffer(){return this._arrayBuffer}async load(){const e=await fetch(this._uri);if(!e.ok)throw new h.NetworkError(this._uri);try{this._arrayBuffer=await e.arrayBuffer(),this._size+=this._arrayBuffer.byteLength,this._updatedAt=new Date}catch{throw new h.FileContentError(this._uri)}return this._resolve(this._arrayBuffer),this._arrayBuffer}}class o{constructor(){t(this,"_cache",new Map)}get(){return this._cache}create(e){const r=new c(e);return this._cache.set(e,r),r}write(e,r){this._cache.set(e,r)}read(e){return this._cache.get(e)??null}delete(...e){e.forEach(r=>{this._cache.delete(r)})}clear(){this._cache.clear()}}const a=Symbol.for("@shopware-ag/dive/assetcache"),i=globalThis;i[a]||(i[a]=new o);const _=i[a];exports.AssetCache=_;exports.Chunk=c;
1
+ "use strict";var u=Object.defineProperty;var n=(s,e,r)=>e in s?u(s,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):s[e]=r;var t=(s,e,r)=>n(s,typeof e!="symbol"?e+"":e,r);require("./FileTypes-CGEeONh9.cjs");require("three/webgpu");require("three/examples/jsm/loaders/HDRLoader.js");require("three/tsl");const h=require("./network-error-CdDXil5g.cjs");class c{constructor(e){t(this,"_promise");t(this,"_resolve");t(this,"_arrayBuffer",null);t(this,"_size",0);t(this,"_createdAt");t(this,"_updatedAt");this._uri=e,this._promise=new Promise(r=>{this._resolve=r}),this._createdAt=new Date,this._updatedAt=new Date}get promise(){return this._promise}get size(){return this._size}get createdAt(){return this._createdAt}get updatedAt(){return this._updatedAt}get arrayBuffer(){return this._arrayBuffer}async load(){const e=await fetch(this._uri);if(!e.ok)throw new h.NetworkError(this._uri);try{this._arrayBuffer=await e.arrayBuffer(),this._size+=this._arrayBuffer.byteLength,this._updatedAt=new Date}catch{throw new h.FileContentError(this._uri)}return this._resolve(this._arrayBuffer),this._arrayBuffer}}class o{constructor(){t(this,"_cache",new Map)}get(){return this._cache}create(e){const r=new c(e);return this._cache.set(e,r),r}write(e,r){this._cache.set(e,r)}read(e){return this._cache.get(e)??null}delete(...e){e.forEach(r=>{this._cache.delete(r)})}clear(){this._cache.clear()}}const a=Symbol.for("@shopware-ag/dive/assetcache"),i=globalThis;i[a]||(i[a]=new o);const _=i[a];exports.AssetCache=_;exports.Chunk=c;
@@ -1,7 +1,7 @@
1
1
  var h = Object.defineProperty;
2
2
  var c = (s, e, t) => e in s ? h(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
3
  var r = (s, e, t) => c(s, typeof e != "symbol" ? e + "" : e, t);
4
- import "./FileTypes-BB4_1gBJ.mjs";
4
+ import "./FileTypes-DU8bBa_V.mjs";
5
5
  import "three/webgpu";
6
6
  import "three/examples/jsm/loaders/HDRLoader.js";
7
7
  import "three/tsl";
@@ -1,3 +1,3 @@
1
- "use strict";var U=Object.create;var b=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty;var x=(i,t,n)=>t in i?b(i,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[t]=n;var G=(i,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of F(t))!N.call(i,s)&&s!==n&&b(i,s,{get:()=>t[s],enumerable:!(r=M(t,s))||r.enumerable});return i};var S=(i,t,n)=>(n=i!=null?U(k(i)):{},G(t||!i||!i.__esModule?b(n,"default",{value:i,enumerable:!0}):n,i));var h=(i,t,n)=>x(i,typeof t!="symbol"?t+"":t,n);const v=require("three/examples/jsm/loaders/GLTFLoader.js"),W=require("three/examples/jsm/loaders/USDLoader.js"),j=require("./FileTypes-Bvt5QTJC.cjs"),A=require("three/webgpu");require("three/examples/jsm/loaders/HDRLoader.js");require("three/tsl");const C=require("./isFileTypeSupported-MJWHcUsR.cjs"),L=require("./parse-error-Dy_EE4rL.cjs"),B=require("three/examples/jsm/loaders/DRACOLoader.js"),E=require("./AssetCache-CnbDDhU8.cjs");function I(){let i,t;onmessage=function(e){const o=e.data;switch(o.type){case"init":i=o.decoderConfig,t=new Promise(function(a){i.onModuleLoaded=function(f){a({draco:f})},DracoDecoderModule(i)});break;case"decode":const c=o.buffer,u=o.taskConfig;t.then(a=>{const f=a.draco,d=new f.Decoder;try{const _=n(f,d,new Int8Array(c),u),p=_.attributes.map(g=>g.array.buffer);_.index&&p.push(_.index.array.buffer),self.postMessage({type:"decode",id:o.id,geometry:_},p)}catch(_){console.error(_),self.postMessage({type:"error",id:o.id,error:_.message})}finally{f.destroy(d)}});break}};function n(e,o,c,u){const a=u.attributeIDs,f=u.attributeTypes;let d,_;const p=o.GetEncodedGeometryType(c);if(p===e.TRIANGULAR_MESH)d=new e.Mesh,_=o.DecodeArrayToMesh(c,c.byteLength,d);else if(p===e.POINT_CLOUD)d=new e.PointCloud,_=o.DecodeArrayToPointCloud(c,c.byteLength,d);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!_.ok()||d.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+_.error_msg());const g={index:null,attributes:[]};for(const w in a){const y=self[f[w]];let m,D;if(u.useUniqueIDs)D=a[w],m=o.GetAttributeByUniqueId(d,D);else{if(D=o.GetAttributeId(d,e[a[w]]),D===-1)continue;m=o.GetAttribute(d,D)}const R=s(e,o,d,w,y,m);w==="color"&&(R.vertexColorSpace=u.vertexColorSpace),g.attributes.push(R)}return p===e.TRIANGULAR_MESH&&(g.index=r(e,o,d)),e.destroy(d),g}function r(e,o,c){const a=c.num_faces()*3,f=a*4,d=e._malloc(f);o.GetTrianglesUInt32Array(c,f,d);const _=new Uint32Array(e.HEAPF32.buffer,d,a).slice();return e._free(d),{array:_,itemSize:1}}function s(e,o,c,u,a,f){const d=f.num_components(),p=c.num_points()*d,g=p*a.BYTES_PER_ELEMENT,w=l(e,a),y=e._malloc(g);o.GetAttributeDataArrayForAllPoints(c,f,w,g,y);const m=new a(e.HEAPF32.buffer,y,p).slice();return e._free(y),{name:u,array:m,itemSize:d}}function l(e,o){switch(o){case Float32Array:return e.DT_FLOAT32;case Int8Array:return e.DT_INT8;case Int16Array:return e.DT_INT16;case Int32Array:return e.DT_INT32;case Uint8Array:return e.DT_UINT8;case Uint16Array:return e.DT_UINT16;case Uint32Array:return e.DT_UINT32}}}const T={LOAD_DRACO_JS_DECODER:async()=>(await import("three/examples/jsm/libs/draco/draco_decoder.js?raw")).default,LOAD_DRACO_WASM_WRAPPER:async()=>(await import("three/examples/jsm/libs/draco/draco_wasm_wrapper.js?raw")).default,LOAD_DRACO_WASM_DECODER:async()=>{const i=(await import("three/examples/jsm/libs/draco/draco_decoder.wasm?url")).default;return await(await fetch(i)).arrayBuffer()}};class P extends B.DRACOLoader{constructor(){super(...arguments);h(this,"decoderPending",null);h(this,"decoderConfig",{type:"js",wasmBinary:null});h(this,"workerSourceURL","")}async _initDecoder(){if(this.decoderPending)return this.decoderPending;const n=typeof WebAssembly!="object"||this.decoderConfig.type==="js",r=[];return n?r.push(T.LOAD_DRACO_JS_DECODER()):(r.push(T.LOAD_DRACO_WASM_WRAPPER()),r.push(T.LOAD_DRACO_WASM_DECODER())),this.decoderPending=Promise.all(r).then(s=>{const l=s[0];n||(this.decoderConfig.wasmBinary=s[1]);const e=I.toString(),o=["/* draco decoder */",l,"","/* worker */",e.substring(e.indexOf("{")+1,e.lastIndexOf("}"))].join(`
1
+ "use strict";var U=Object.create;var b=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty;var x=(i,t,n)=>t in i?b(i,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[t]=n;var G=(i,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of F(t))!N.call(i,s)&&s!==n&&b(i,s,{get:()=>t[s],enumerable:!(r=M(t,s))||r.enumerable});return i};var S=(i,t,n)=>(n=i!=null?U(k(i)):{},G(t||!i||!i.__esModule?b(n,"default",{value:i,enumerable:!0}):n,i));var h=(i,t,n)=>x(i,typeof t!="symbol"?t+"":t,n);const v=require("three/examples/jsm/loaders/GLTFLoader.js"),W=require("three/examples/jsm/loaders/USDLoader.js"),j=require("./FileTypes-CGEeONh9.cjs"),A=require("three/webgpu");require("three/examples/jsm/loaders/HDRLoader.js");require("three/tsl");const C=require("./isFileTypeSupported-DrMUwnQx.cjs"),L=require("./parse-error-Dy_EE4rL.cjs"),B=require("three/examples/jsm/loaders/DRACOLoader.js"),E=require("./AssetCache-Bk3ov4KH.cjs");function I(){let i,t;onmessage=function(e){const o=e.data;switch(o.type){case"init":i=o.decoderConfig,t=new Promise(function(a){i.onModuleLoaded=function(f){a({draco:f})},DracoDecoderModule(i)});break;case"decode":const c=o.buffer,u=o.taskConfig;t.then(a=>{const f=a.draco,d=new f.Decoder;try{const _=n(f,d,new Int8Array(c),u),p=_.attributes.map(g=>g.array.buffer);_.index&&p.push(_.index.array.buffer),self.postMessage({type:"decode",id:o.id,geometry:_},p)}catch(_){console.error(_),self.postMessage({type:"error",id:o.id,error:_.message})}finally{f.destroy(d)}});break}};function n(e,o,c,u){const a=u.attributeIDs,f=u.attributeTypes;let d,_;const p=o.GetEncodedGeometryType(c);if(p===e.TRIANGULAR_MESH)d=new e.Mesh,_=o.DecodeArrayToMesh(c,c.byteLength,d);else if(p===e.POINT_CLOUD)d=new e.PointCloud,_=o.DecodeArrayToPointCloud(c,c.byteLength,d);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!_.ok()||d.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+_.error_msg());const g={index:null,attributes:[]};for(const w in a){const y=self[f[w]];let m,D;if(u.useUniqueIDs)D=a[w],m=o.GetAttributeByUniqueId(d,D);else{if(D=o.GetAttributeId(d,e[a[w]]),D===-1)continue;m=o.GetAttribute(d,D)}const R=s(e,o,d,w,y,m);w==="color"&&(R.vertexColorSpace=u.vertexColorSpace),g.attributes.push(R)}return p===e.TRIANGULAR_MESH&&(g.index=r(e,o,d)),e.destroy(d),g}function r(e,o,c){const a=c.num_faces()*3,f=a*4,d=e._malloc(f);o.GetTrianglesUInt32Array(c,f,d);const _=new Uint32Array(e.HEAPF32.buffer,d,a).slice();return e._free(d),{array:_,itemSize:1}}function s(e,o,c,u,a,f){const d=f.num_components(),p=c.num_points()*d,g=p*a.BYTES_PER_ELEMENT,w=l(e,a),y=e._malloc(g);o.GetAttributeDataArrayForAllPoints(c,f,w,g,y);const m=new a(e.HEAPF32.buffer,y,p).slice();return e._free(y),{name:u,array:m,itemSize:d}}function l(e,o){switch(o){case Float32Array:return e.DT_FLOAT32;case Int8Array:return e.DT_INT8;case Int16Array:return e.DT_INT16;case Int32Array:return e.DT_INT32;case Uint8Array:return e.DT_UINT8;case Uint16Array:return e.DT_UINT16;case Uint32Array:return e.DT_UINT32}}}const T={LOAD_DRACO_JS_DECODER:async()=>(await import("three/examples/jsm/libs/draco/draco_decoder.js?raw")).default,LOAD_DRACO_WASM_WRAPPER:async()=>(await import("three/examples/jsm/libs/draco/draco_wasm_wrapper.js?raw")).default,LOAD_DRACO_WASM_DECODER:async()=>{const i=(await import("three/examples/jsm/libs/draco/draco_decoder.wasm?url")).default;return await(await fetch(i)).arrayBuffer()}};class P extends B.DRACOLoader{constructor(){super(...arguments);h(this,"decoderPending",null);h(this,"decoderConfig",{type:"js",wasmBinary:null});h(this,"workerSourceURL","")}async _initDecoder(){if(this.decoderPending)return this.decoderPending;const n=typeof WebAssembly!="object"||this.decoderConfig.type==="js",r=[];return n?r.push(T.LOAD_DRACO_JS_DECODER()):(r.push(T.LOAD_DRACO_WASM_WRAPPER()),r.push(T.LOAD_DRACO_WASM_DECODER())),this.decoderPending=Promise.all(r).then(s=>{const l=s[0];n||(this.decoderConfig.wasmBinary=s[1]);const e=I.toString(),o=["/* draco decoder */",l,"","/* worker */",e.substring(e.indexOf("{")+1,e.lastIndexOf("}"))].join(`
2
2
  `);this.workerSourceURL=URL.createObjectURL(new Blob([o]))}),this.decoderPending}}function q(){let i=null,t=null;const n=[[/'CONFIG_CONTROL_DESIGN'\s*\)/g,"'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF')"],[/'AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF\.\s*\{[\s\S]*?\}\s*'/g,"'AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF'"]];function r(){return i||(i=occtimportjs({locateFile:function(){return t}})),i}function s(e){for(var o=new TextDecoder("utf-8",{fatal:!1}),c=new TextEncoder,u=o.decode(e),a=0;a<n.length;a++){var f=n[a][0],d=n[a][1];u=u.replace(f,d)}return new Uint8Array(c.encode(u))}function l(e,o){var c=s(o);try{var u=e.ReadStepFile(c,null);if(u.success&&u.root)return u}catch{}try{return e.ReadStepFile(o,null)}catch{return{success:!1,root:{meshes:[],children:[]},meshes:[]}}}onmessage=async function(e){var o=e.data;switch(o.type){case"init":t=o.wasmUrl;break;case"parse":try{var c=await r(),u=new Uint8Array(o.buffer),a=o.fileType,f;if(a==="step"||a==="stp"?f=l(c,u):f=c.ReadIgesFile(u,null),!f.success||!f.root){self.postMessage({type:"error",id:o.id,error:"Failed to parse CAD file"});return}self.postMessage({type:"result",id:o.id,result:f})}catch(d){self.postMessage({type:"error",id:o.id,error:d instanceof Error?d.message:String(d)})}break}}}const O={LOAD_OCCT_JS:async()=>(await Promise.resolve().then(()=>require("./occt-import-js-DdbbsFBH.cjs"))).default,LOAD_OCCT_WASM_URL:async()=>(await Promise.resolve().then(()=>require("./occt-import-js-BQ1yZHCj.cjs"))).default};class H{constructor(){h(this,"_workerPending",null);h(this,"_worker",null);h(this,"_nextId",0);h(this,"_pending",new Map)}_getWorker(){return this._workerPending?this._workerPending:(this._workerPending=(async()=>{const[t,n]=await Promise.all([O.LOAD_OCCT_JS(),O.LOAD_OCCT_WASM_URL()]),r=q.toString(),s=["/* occt-import-js */",t,"","/* step worker */",r.substring(r.indexOf("{")+1,r.lastIndexOf("}"))].join(`
3
3
  `),l=URL.createObjectURL(new Blob([s])),e=new Worker(l),o=new URL(n,window.location.href).href;return e.postMessage({type:"init",wasmUrl:o}),e.onmessage=c=>{const{type:u,id:a,result:f,error:d}=c.data,_=this._pending.get(a);if(_)if(this._pending.delete(a),u==="result")try{_.resolve(this._buildScene(f))}catch(p){_.reject(p instanceof Error?p:new Error(String(p)))}else _.reject(new Error(d??"Worker error"))},e.onerror=c=>{for(const[,{reject:u}]of this._pending)u(new Error(c.message??"Worker error"));this._pending.clear()},this._worker=e,e})(),this._workerPending)}async parseAsync(t,n){const r=this._nextId++,s=await this._getWorker();return new Promise((l,e)=>{this._pending.set(r,{resolve:l,reject:e});const o=t.slice(0);s.postMessage({type:"parse",id:r,buffer:o,fileType:n},[o])})}dispose(){if(this._worker){for(const[,{reject:t}]of this._pending)t(new Error("STEPLoader disposed"));this._pending.clear(),this._worker.terminate(),this._worker=null,this._workerPending=null}}_buildScene(t){const n=new A.Group;return n.name=t.root.name??"CAD Model",this._buildNode(t.root,t.meshes,n),n.rotation.x=-Math.PI/2,n.rotation.z=Math.PI/2,n}_buildNode(t,n,r){const s=new A.Group;s.name=t.name??"Part";for(const l of t.meshes){const e=n[l];if(e!=null&&e.attributes){const o=this._createMesh(e);s.add(o)}}for(const l of t.children)this._buildNode(l,n,s);r.add(s)}_createMesh(t){var u,a;const{position:n,normal:r}=t.attributes,s=t.index??t.attributes.index,l=new A.BufferGeometry;l.setAttribute("position",new A.BufferAttribute(new Float32Array(n.array),3)),(u=r==null?void 0:r.array)!=null&&u.length?l.setAttribute("normal",new A.BufferAttribute(new Float32Array(r.array),3)):l.computeVertexNormals(),(a=s==null?void 0:s.array)!=null&&a.length&&l.setIndex(new A.BufferAttribute(new Uint32Array(s.array),1));const e=t.color,o=new A.MeshStandardMaterial({metalness:.3,roughness:.6});e&&e.length>=3?o.color.setRGB(e[0],e[1],e[2]):o.color.setHex(13421772);const c=new A.Mesh(l,o);return c.name=t.name??"Mesh",c.castShadow=!0,c.receiveShadow=!0,c}}class z{constructor(){h(this,"_gltfLoader");h(this,"_usdLoader");h(this,"_stepLoader");const t=new P;t.setDecoderConfig({type:"wasm"}),this._gltfLoader=new v.GLTFLoader,this._gltfLoader.setDRACOLoader(t),this._usdLoader=new W.USDLoader,this._stepLoader=new H}async load(t,n){let r;if(n)r=n;else if(r=C.getFileTypeFromUri(t),r.length===0&&(r=await this._detectFileTypeFromContent(t),r.length===0))throw new L.FileTypeError("No file extension found in URI","");if(!C.isFileTypeSupported(r))throw new L.FileTypeError(`Unsupported file type: ${r}. Supported types: ${j.SUPPORTED_FILE_TYPES.join(", ")}`,r);const s=E.AssetCache.read(t);if(s)return s.arrayBuffer?this._parse(s.arrayBuffer,r):s.promise.then(o=>this._parse(o,r));const e=await E.AssetCache.create(t).load();return this._parse(e,r)}async _detectFileTypeFromContent(t){try{const n=E.AssetCache.read(t);let r;n?n.arrayBuffer?r=n.arrayBuffer:r=await n.promise:r=await E.AssetCache.create(t).load();const s=new Uint8Array(r);return s.length>=12&&String.fromCharCode(s[0],s[1],s[2],s[3])==="glTF"?s[12]===0?"glb":"gltf":s.length>=4&&s[0]===80&&s[1]===75&&(s[2]===3||s[2]===5)&&(s[3]===4||s[3]===6)?"usdz":s.length>=20&&new TextDecoder("ascii").decode(s.subarray(0,20)).startsWith("ISO-10303-21")?"step":s.length>=80&&s[72]===83?"iges":""}catch{return""}}async _parse(t,n){try{switch(n){case"glb":case"gltf":{const r=await this._gltfLoader.parseAsync(t,"");return r.scene.animations=r.animations,r.scene}case"usdz":{const r=this._usdLoader.parse(t);return r.animations=[],r}case"step":case"stp":{const r=await this._stepLoader.parseAsync(t,n);return r.animations=[],r}case"iges":case"igs":{const r=await this._stepLoader.parseAsync(t,n);return r.animations=[],r}}}catch(r){throw r instanceof Error?new L.ParseError(`Failed to parse ${n} file: ${r.message}`,r):new L.ParseError(`Failed to parse ${n} file`)}}}exports.AssetLoader=z;exports.DRACOWorker=I;exports.DracoLoader=P;
@@ -3,14 +3,14 @@ var I = (_, r, s) => r in _ ? C(_, r, { enumerable: !0, configurable: !0, writab
3
3
  var h = (_, r, s) => I(_, typeof r != "symbol" ? r + "" : r, s);
4
4
  import { GLTFLoader as P } from "three/examples/jsm/loaders/GLTFLoader.js";
5
5
  import { USDLoader as U } from "three/examples/jsm/loaders/USDLoader.js";
6
- import { S as M } from "./FileTypes-BB4_1gBJ.mjs";
6
+ import { S as M } from "./FileTypes-DU8bBa_V.mjs";
7
7
  import { Group as b, BufferGeometry as k, BufferAttribute as E, MeshStandardMaterial as F, Mesh as N } from "three/webgpu";
8
8
  import "three/examples/jsm/loaders/HDRLoader.js";
9
9
  import "three/tsl";
10
- import { g as x, i as G } from "./isFileTypeSupported-D1z0zckw.mjs";
10
+ import { g as x, i as G } from "./isFileTypeSupported-DY4QOFj7.mjs";
11
11
  import { F as R, P as O } from "./parse-error-DfOPyLWM.mjs";
12
12
  import { DRACOLoader as W } from "three/examples/jsm/loaders/DRACOLoader.js";
13
- import { A as D } from "./AssetCache-C2DuXcmp.mjs";
13
+ import { A as D } from "./AssetCache-DNcSNSJk.mjs";
14
14
  function v() {
15
15
  let _, r;
16
16
  onmessage = function(e) {