New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@loaders.gl/obj

Package Overview
Dependencies
Maintainers
9
Versions
336
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loaders.gl/obj - npm Package Compare versions

Comparing version 1.2.0-beta.2 to 1.2.0-beta.3

2

dist/dist.js

@@ -137,3 +137,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=3)}([function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}},function(e,t){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(t){return"function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?e.exports=n=function(e){return r(e)}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)},n(t)}e.exports=n},function(e,t,r){"use strict";r.r(t);var n=r(0),i=r.n(n),a=r(1),o=r.n(a),s=/^[og]\s*(.+)?/,l=/^mtllib /,u=/^usemtl /,h=function(){function e(t){var r=t.index,n=t.name,a=void 0===n?"":n,o=t.mtllib,s=t.smooth,l=t.groupStart;i()(this,e),this.index=r,this.name=a,this.mtllib=o,this.smooth=s,this.groupStart=l,this.groupEnd=-1,this.groupCount=-1,this.inherited=!1}return o()(e,[{key:"clone",value:function(){return new e({index:arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0})}}]),e}(),c=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";i()(this,e),this.name=t,this.geometry={vertices:[],normals:[],colors:[],uvs:[]},this.materials=[],this.smooth=!0}return o()(e,[{key:"startMaterial",value:function(e,t){var r=this._finalize(!1);r&&(r.inherited||r.groupCount<=0)&&this.materials.splice(r.index,1);var n=new h({index:this.materials.length,name:e,mtllib:Array.isArray(t)&&t.length>0?t[t.length-1]:"",smooth:void 0!==r?r.smooth:this.smooth,groupStart:void 0!==r?r.groupEnd:0});return this.materials.push(n),n}},{key:"currentMaterial",value:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]}},{key:"_finalize",value:function(e){var t=this.currentMaterial();if(t&&-1===t.groupEnd&&(t.groupEnd=this.geometry.vertices.length/3,t.groupCount=t.groupEnd-t.groupStart,t.inherited=!1),e&&this.materials.length>1)for(var r=this.materials.length-1;r>=0;r--)this.materials[r].groupCount<=0&&this.materials.splice(r,1);return e&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),t}}]),e}(),f=function(){function e(){i()(this,e),this.objects=[],this.object=null,this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.materialLibraries=[],this.startObject("",!1)}return o()(e,[{key:"startObject",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.object&&!this.object.fromDeclaration)return this.object.name=e,void(this.object.fromDeclaration=t);var r=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object=new c(e),this.object.fromDeclaration=t,r&&r.name&&"function"==typeof r.clone){var n=r.clone(0);n.inherited=!0,this.object.materials.push(n)}this.objects.push(this.object)}},{key:"finalize",value:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)}},{key:"parseVertexIndex",value:function(e,t){var r=parseInt(e,10);return 3*(r>=0?r-1:r+t/3)}},{key:"parseNormalIndex",value:function(e,t){var r=parseInt(e,10);return 3*(r>=0?r-1:r+t/3)}},{key:"parseUVIndex",value:function(e,t){var r=parseInt(e,10);return 2*(r>=0?r-1:r+t/2)}},{key:"addVertex",value:function(e,t,r){var n=this.vertices,i=this.object.geometry.vertices;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:"addVertexPoint",value:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])}},{key:"addVertexLine",value:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])}},{key:"addNormal",value:function(e,t,r){var n=this.normals,i=this.object.geometry.normals;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:"addColor",value:function(e,t,r){var n=this.colors,i=this.object.geometry.colors;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:"addUV",value:function(e,t,r){var n=this.uvs,i=this.object.geometry.uvs;i.push(n[e+0],n[e+1]),i.push(n[t+0],n[t+1]),i.push(n[r+0],n[r+1])}},{key:"addUVLine",value:function(e){var t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])}},{key:"addFace",value:function(e,t,r,n,i,a,o,s,l){var u=this.vertices.length,h=this.parseVertexIndex(e,u),c=this.parseVertexIndex(t,u),f=this.parseVertexIndex(r,u);if(this.addVertex(h,c,f),void 0!==n&&""!==n){var v=this.uvs.length;h=this.parseUVIndex(n,v),c=this.parseUVIndex(i,v),f=this.parseUVIndex(a,v),this.addUV(h,c,f)}if(void 0!==o&&""!==o){var d=this.normals.length;h=this.parseNormalIndex(o,d),c=o===s?h:this.parseNormalIndex(s,d),f=o===l?h:this.parseNormalIndex(l,d),this.addNormal(h,c,f)}this.colors.length>0&&this.addColor(h,c,f)}},{key:"addPointGeometry",value:function(e){this.object.geometry.type="Points";var t=this.vertices.length,r=!0,n=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value;this.addVertexPoint(this.parseVertexIndex(s,t))}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}}},{key:"addLineGeometry",value:function(e,t){this.object.geometry.type="Line";var r=this.vertices.length,n=this.uvs.length,i=!0,a=!1,o=void 0;try{for(var s,l=e[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var u=s.value;this.addVertexLine(this.parseVertexIndex(u,r))}}catch(e){a=!0,o=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw o}}var h=!0,c=!1,f=void 0;try{for(var v,d=t[Symbol.iterator]();!(h=(v=d.next()).done);h=!0){var p=v.value;this.addUVLine(this.parseUVIndex(p,n))}}catch(e){c=!0,f=e}finally{try{h||null==d.return||d.return()}finally{if(c)throw f}}}}]),e}(),v=function(e){var t=new f;-1!==e.indexOf("\r\n")&&(e=e.replace(/\r\n/g,"\n")),-1!==e.indexOf("\\\n")&&(e=e.replace(/\\\n/g,""));for(var r=e.split("\n"),n="",i="",a=[],o="function"==typeof"".trimLeft,h=0,c=r.length;h<c;h++)if(n=r[h],0!==(n=o?n.trimLeft():n.trim()).length&&"#"!==(i=n.charAt(0)))if("v"===i){var v=n.split(/\s+/);switch(v[0]){case"v":t.vertices.push(parseFloat(v[1]),parseFloat(v[2]),parseFloat(v[3])),8===v.length&&t.colors.push(parseFloat(v[4]),parseFloat(v[5]),parseFloat(v[6]));break;case"vn":t.normals.push(parseFloat(v[1]),parseFloat(v[2]),parseFloat(v[3]));break;case"vt":t.uvs.push(parseFloat(v[1]),parseFloat(v[2]))}}else if("f"===i){for(var d=n.substr(1).trim().split(/\s+/),p=[],m=0,y=d.length;m<y;m++){var b=d[m];if(b.length>0){var g=b.split("/");p.push(g)}}for(var x=p[0],j=1,O=p.length-1;j<O;j++){var S=p[j],w=p[j+1];t.addFace(x[0],S[0],w[0],x[1],S[1],w[1],x[2],S[2],w[2])}}else if("l"===i){var k=n.substring(1).trim().split(" "),I=void 0,F=[];if(-1===n.indexOf("/"))I=k;else{I=[];for(var V=0,L=k.length;V<L;V++){var C=k[V].split("/");""!==C[0]&&I.push(C[0]),""!==C[1]&&F.push(C[1])}}t.addLineGeometry(I,F)}else if("p"===i){var _=n.substr(1).trim().split(" ");t.addPointGeometry(_)}else if(null!==(a=s.exec(n))){var A=(" "+a[0].substr(1).trim()).substr(1);t.startObject(A)}else if(u.test(n))t.object.startMaterial(n.substring(7).trim(),t.materialLibraries);else if(l.test(n))t.materialLibraries.push(n.substring(7).trim());else{if("s"!==i){if("\0"===n)continue;throw new Error('Unexpected line: "'.concat(n,'"'))}if((a=n.split(" ")).length>1){var z=a[1].trim().toLowerCase();t.object.smooth="0"!==z&&"off"!==z}else t.object.smooth=!0;var M=t.object.currentMaterial();M&&(M.smooth=t.object.smooth)}t.finalize();var P=[],T=[],N=!0,E=!1,U=void 0;try{for(var R,D=t.objects[Symbol.iterator]();!(N=(R=D.next()).done);N=!0){var G=R.value,B=G.geometry;if(0!==B.vertices.length){var X={header:{vertexCount:B.vertices.length/3},attributes:{}};switch(B.type){case"Points":X.mode=0;break;case"Line":X.mode=1;break;default:X.mode=4}X.attributes.POSITION={value:new Float32Array(B.vertices),size:3},B.normals.length>0&&(X.attributes.NORMAL={value:new Float32Array(B.normals),size:3}),B.colors.length>0&&(X.attributes.COLOR_0={value:new Float32Array(B.colors),size:3}),B.uvs.length>0&&(X.attributes.TEXCOORD_0={value:new Float32Array(B.uvs),size:2}),X.materials=[];var J=!0,q=!1,H=void 0;try{for(var K,Q=G.materials[Symbol.iterator]();!(J=(K=Q.next()).done);J=!0){var W=K.value,Y={name:W.name,flatShading:!W.smooth};X.materials.push(Y),T.push(Y)}}catch(e){q=!0,H=e}finally{try{J||null==Q.return||Q.return()}finally{if(q)throw H}}X.name=G.name,P.push(X)}}}catch(e){E=!0,U=e}finally{try{N||null==D.return||D.return()}finally{if(E)throw U}}return{meshes:P,materials:T}};function d(e,t){var r,n,i,a=new Float32Array(3*t),o=0,s=!0,l=!1,u=void 0;try{for(var h,c=e[Symbol.iterator]();!(s=(h=c.next()).done);s=!0){var f=h.value.attributes,v=f.POSITION,d=f.NORMAL,p=f.COLOR_0,m=f.TEXCOORD_0;a.set(v.value,3*o),d&&(r=r||new Float32Array(3*t)).set(d.value,3*o),p&&(n=n||new Float32Array(3*t)).set(p.value,3*o),m&&(i=i||new Float32Array(2*t)).set(m.value,2*o),o+=v.value.length/3}}catch(e){l=!0,u=e}finally{try{s||null==c.return||c.return()}finally{if(l)throw u}}var y={};return y.POSITION={value:a,size:3},r&&(y.NORMAL={value:r,size:3}),n&&(y.COLOR_0={value:n,size:3}),i&&(y.TEXCOORD_0={value:i,size:2}),y}var p,m={name:"OBJ",extensions:["obj"],testText:function(e){return"v"===e[0]},parseTextSync:function(e){var t=v(e).meshes,r=t.reduce(function(e,t){return e+t.header.vertexCount},0);return{loaderData:{header:{}},header:{vertexCount:r},mode:4,attributes:d(t,r)}}},y=r(2),b=r.n(y);p=m,"undefined"!=typeof self&&(self.onmessage=function(e){var t=e.data,r=t.arraybuffer,n=t.opts;try{var i,a;if(p.parseSync)i=r,a=p.parseSync;else{if(!p.parseTextSync)throw new Error("Could not load data with ".concat(p.name," loader"));i=(new TextDecoder).decode(r),a=p.parseTextSync}var o=a(i,n),s=function e(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,i=n||new Set;if(t)if(t instanceof ArrayBuffer)i.add(t);else if(t.buffer&&t.buffer instanceof ArrayBuffer)i.add(t.buffer);else if(r&&"object"===b()(t))for(var a in t)e(t[a],r,i);return void 0===n?Array.from(i):null}(o);self.postMessage({type:"done",result:o},s)}catch(e){self.postMessage({type:"error",message:e.message})}})}]);
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=3)}([function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}},function(e,t){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(t){return"function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?e.exports=n=function(e){return r(e)}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)},n(t)}e.exports=n},function(e,t,r){"use strict";r.r(t);var n=r(0),i=r.n(n),a=r(1),o=r.n(a),s=/^[og]\s*(.+)?/,l=/^mtllib /,u=/^usemtl /,h=function(){function e(t){var r=t.index,n=t.name,a=void 0===n?"":n,o=t.mtllib,s=t.smooth,l=t.groupStart;i()(this,e),this.index=r,this.name=a,this.mtllib=o,this.smooth=s,this.groupStart=l,this.groupEnd=-1,this.groupCount=-1,this.inherited=!1}return o()(e,[{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.index;return new e({index:t,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0})}}]),e}(),c=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";i()(this,e),this.name=t,this.geometry={vertices:[],normals:[],colors:[],uvs:[]},this.materials=[],this.smooth=!0}return o()(e,[{key:"startMaterial",value:function(e,t){var r=this._finalize(!1);r&&(r.inherited||r.groupCount<=0)&&this.materials.splice(r.index,1);var n=new h({index:this.materials.length,name:e,mtllib:Array.isArray(t)&&t.length>0?t[t.length-1]:"",smooth:void 0!==r?r.smooth:this.smooth,groupStart:void 0!==r?r.groupEnd:0});return this.materials.push(n),n}},{key:"currentMaterial",value:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]}},{key:"_finalize",value:function(e){var t=this.currentMaterial();if(t&&-1===t.groupEnd&&(t.groupEnd=this.geometry.vertices.length/3,t.groupCount=t.groupEnd-t.groupStart,t.inherited=!1),e&&this.materials.length>1)for(var r=this.materials.length-1;r>=0;r--)this.materials[r].groupCount<=0&&this.materials.splice(r,1);return e&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),t}}]),e}(),f=function(){function e(){i()(this,e),this.objects=[],this.object=null,this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.materialLibraries=[],this.startObject("",!1)}return o()(e,[{key:"startObject",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.object&&!this.object.fromDeclaration)return this.object.name=e,void(this.object.fromDeclaration=t);var r=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object=new c(e),this.object.fromDeclaration=t,r&&r.name&&"function"==typeof r.clone){var n=r.clone(0);n.inherited=!0,this.object.materials.push(n)}this.objects.push(this.object)}},{key:"finalize",value:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)}},{key:"parseVertexIndex",value:function(e,t){var r=parseInt(e,10);return 3*(r>=0?r-1:r+t/3)}},{key:"parseNormalIndex",value:function(e,t){var r=parseInt(e,10);return 3*(r>=0?r-1:r+t/3)}},{key:"parseUVIndex",value:function(e,t){var r=parseInt(e,10);return 2*(r>=0?r-1:r+t/2)}},{key:"addVertex",value:function(e,t,r){var n=this.vertices,i=this.object.geometry.vertices;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:"addVertexPoint",value:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])}},{key:"addVertexLine",value:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])}},{key:"addNormal",value:function(e,t,r){var n=this.normals,i=this.object.geometry.normals;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:"addColor",value:function(e,t,r){var n=this.colors,i=this.object.geometry.colors;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:"addUV",value:function(e,t,r){var n=this.uvs,i=this.object.geometry.uvs;i.push(n[e+0],n[e+1]),i.push(n[t+0],n[t+1]),i.push(n[r+0],n[r+1])}},{key:"addUVLine",value:function(e){var t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])}},{key:"addFace",value:function(e,t,r,n,i,a,o,s,l){var u=this.vertices.length,h=this.parseVertexIndex(e,u),c=this.parseVertexIndex(t,u),f=this.parseVertexIndex(r,u);if(this.addVertex(h,c,f),void 0!==n&&""!==n){var v=this.uvs.length;h=this.parseUVIndex(n,v),c=this.parseUVIndex(i,v),f=this.parseUVIndex(a,v),this.addUV(h,c,f)}if(void 0!==o&&""!==o){var d=this.normals.length;h=this.parseNormalIndex(o,d),c=o===s?h:this.parseNormalIndex(s,d),f=o===l?h:this.parseNormalIndex(l,d),this.addNormal(h,c,f)}this.colors.length>0&&this.addColor(h,c,f)}},{key:"addPointGeometry",value:function(e){this.object.geometry.type="Points";var t=this.vertices.length,r=!0,n=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value;this.addVertexPoint(this.parseVertexIndex(s,t))}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}}},{key:"addLineGeometry",value:function(e,t){this.object.geometry.type="Line";var r=this.vertices.length,n=this.uvs.length,i=!0,a=!1,o=void 0;try{for(var s,l=e[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var u=s.value;this.addVertexLine(this.parseVertexIndex(u,r))}}catch(e){a=!0,o=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw o}}var h=!0,c=!1,f=void 0;try{for(var v,d=t[Symbol.iterator]();!(h=(v=d.next()).done);h=!0){var p=v.value;this.addUVLine(this.parseUVIndex(p,n))}}catch(e){c=!0,f=e}finally{try{h||null==d.return||d.return()}finally{if(c)throw f}}}}]),e}(),v=function(e){var t=new f;-1!==e.indexOf("\r\n")&&(e=e.replace(/\r\n/g,"\n")),-1!==e.indexOf("\\\n")&&(e=e.replace(/\\\n/g,""));for(var r=e.split("\n"),n="",i="",a=[],o="function"==typeof"".trimLeft,h=0,c=r.length;h<c;h++)if(n=r[h],0!==(n=o?n.trimLeft():n.trim()).length&&"#"!==(i=n.charAt(0)))if("v"===i){var v=n.split(/\s+/);switch(v[0]){case"v":t.vertices.push(parseFloat(v[1]),parseFloat(v[2]),parseFloat(v[3])),8===v.length&&t.colors.push(parseFloat(v[4]),parseFloat(v[5]),parseFloat(v[6]));break;case"vn":t.normals.push(parseFloat(v[1]),parseFloat(v[2]),parseFloat(v[3]));break;case"vt":t.uvs.push(parseFloat(v[1]),parseFloat(v[2]))}}else if("f"===i){for(var d=n.substr(1).trim().split(/\s+/),p=[],m=0,y=d.length;m<y;m++){var b=d[m];if(b.length>0){var g=b.split("/");p.push(g)}}for(var x=p[0],j=1,O=p.length-1;j<O;j++){var S=p[j],w=p[j+1];t.addFace(x[0],S[0],w[0],x[1],S[1],w[1],x[2],S[2],w[2])}}else if("l"===i){var k=n.substring(1).trim().split(" "),I=void 0,F=[];if(-1===n.indexOf("/"))I=k;else{I=[];for(var V=0,L=k.length;V<L;V++){var C=k[V].split("/");""!==C[0]&&I.push(C[0]),""!==C[1]&&F.push(C[1])}}t.addLineGeometry(I,F)}else if("p"===i){var _=n.substr(1).trim().split(" ");t.addPointGeometry(_)}else if(null!==(a=s.exec(n))){var A=(" "+a[0].substr(1).trim()).substr(1);t.startObject(A)}else if(u.test(n))t.object.startMaterial(n.substring(7).trim(),t.materialLibraries);else if(l.test(n))t.materialLibraries.push(n.substring(7).trim());else{if("s"!==i){if("\0"===n)continue;throw new Error('Unexpected line: "'.concat(n,'"'))}if((a=n.split(" ")).length>1){var z=a[1].trim().toLowerCase();t.object.smooth="0"!==z&&"off"!==z}else t.object.smooth=!0;var M=t.object.currentMaterial();M&&(M.smooth=t.object.smooth)}t.finalize();var P=[],T=[],N=!0,E=!1,U=void 0;try{for(var R,D=t.objects[Symbol.iterator]();!(N=(R=D.next()).done);N=!0){var G=R.value,B=G.geometry;if(0!==B.vertices.length){var X={header:{vertexCount:B.vertices.length/3},attributes:{}};switch(B.type){case"Points":X.mode=0;break;case"Line":X.mode=1;break;default:X.mode=4}X.attributes.POSITION={value:new Float32Array(B.vertices),size:3},B.normals.length>0&&(X.attributes.NORMAL={value:new Float32Array(B.normals),size:3}),B.colors.length>0&&(X.attributes.COLOR_0={value:new Float32Array(B.colors),size:3}),B.uvs.length>0&&(X.attributes.TEXCOORD_0={value:new Float32Array(B.uvs),size:2}),X.materials=[];var J=!0,q=!1,H=void 0;try{for(var K,Q=G.materials[Symbol.iterator]();!(J=(K=Q.next()).done);J=!0){var W=K.value,Y={name:W.name,flatShading:!W.smooth};X.materials.push(Y),T.push(Y)}}catch(e){q=!0,H=e}finally{try{J||null==Q.return||Q.return()}finally{if(q)throw H}}X.name=G.name,P.push(X)}}}catch(e){E=!0,U=e}finally{try{N||null==D.return||D.return()}finally{if(E)throw U}}return{meshes:P,materials:T}};function d(e,t){var r,n,i,a=new Float32Array(3*t),o=0,s=!0,l=!1,u=void 0;try{for(var h,c=e[Symbol.iterator]();!(s=(h=c.next()).done);s=!0){var f=h.value.attributes,v=f.POSITION,d=f.NORMAL,p=f.COLOR_0,m=f.TEXCOORD_0;a.set(v.value,3*o),d&&(r=r||new Float32Array(3*t)).set(d.value,3*o),p&&(n=n||new Float32Array(3*t)).set(p.value,3*o),m&&(i=i||new Float32Array(2*t)).set(m.value,2*o),o+=v.value.length/3}}catch(e){l=!0,u=e}finally{try{s||null==c.return||c.return()}finally{if(l)throw u}}var y={};return y.POSITION={value:a,size:3},r&&(y.NORMAL={value:r,size:3}),n&&(y.COLOR_0={value:n,size:3}),i&&(y.TEXCOORD_0={value:i,size:2}),y}var p,m={name:"OBJ",extensions:["obj"],testText:function(e){return"v"===e[0]},parseTextSync:function(e){var t=v(e).meshes,r=t.reduce(function(e,t){return e+t.header.vertexCount},0);return{loaderData:{header:{}},header:{vertexCount:r},mode:4,attributes:d(t,r)}}},y=r(2),b=r.n(y);p=m,"undefined"!=typeof self&&(self.onmessage=function(e){var t=e.data,r=t.arraybuffer,n=t.opts;try{var i,a;if(p.parseSync)i=r,a=p.parseSync;else{if(!p.parseTextSync)throw new Error("Could not load data with ".concat(p.name," loader"));i=(new TextDecoder).decode(r),a=p.parseTextSync}var o=a(i,n),s=function e(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,i=n||new Set;if(t)if(t instanceof ArrayBuffer)i.add(t);else if(t.buffer&&t.buffer instanceof ArrayBuffer)i.add(t.buffer);else if(r&&"object"===b()(t))for(var a in t)e(t[a],r,i);return void 0===n?Array.from(i):null}(o);self.postMessage({type:"done",result:o},s)}catch(e){self.postMessage({type:"error",message:e.message})}})}]);

@@ -140,0 +140,0 @@ /***/ }),

@@ -1,1 +0,1 @@

!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var s in r)("object"==typeof exports?exports:t)[s]=r[s]}}(window,function(){return function(t){var e={};function r(s){if(e[s])return e[s].exports;var n=e[s]={i:s,l:!1,exports:{}};return t[s].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,s){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(r.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(s,n,function(e){return t[e]}.bind(null,n));return s},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1)}([function(t,e){!function(t){var e={};function r(s){if(e[s])return e[s].exports;var n=e[s]={i:s,l:!1,exports:{}};return t[s].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=t,r.c=e,r.d=function(t,e,s){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(r.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(s,n,function(e){return t[e]}.bind(null,n));return s},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=3)}([function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function r(t,e){for(var r=0;r<e.length;r++){var s=e[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}t.exports=function(t,e,s){return e&&r(t.prototype,e),s&&r(t,s),t}},function(t,e){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(e){return"function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?t.exports=s=function(t){return r(t)}:t.exports=s=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":r(t)},s(e)}t.exports=s},function(t,e,r){"use strict";r.r(e);var s=r(0),n=r.n(s),o=r(1),i=r.n(o),a=/^[og]\s*(.+)?/,l=/^mtllib /,u=/^usemtl /,h=function(){function t(e){var r=e.index,s=e.name,o=void 0===s?"":s,i=e.mtllib,a=e.smooth,l=e.groupStart;n()(this,t),this.index=r,this.name=o,this.mtllib=i,this.smooth=a,this.groupStart=l,this.groupEnd=-1,this.groupCount=-1,this.inherited=!1}return i()(t,[{key:"clone",value:function(){return new t({index:arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0})}}]),t}(),c=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";n()(this,t),this.name=e,this.geometry={vertices:[],normals:[],colors:[],uvs:[]},this.materials=[],this.smooth=!0}return i()(t,[{key:"startMaterial",value:function(t,e){var r=this._finalize(!1);r&&(r.inherited||r.groupCount<=0)&&this.materials.splice(r.index,1);var s=new h({index:this.materials.length,name:t,mtllib:Array.isArray(e)&&e.length>0?e[e.length-1]:"",smooth:void 0!==r?r.smooth:this.smooth,groupStart:void 0!==r?r.groupEnd:0});return this.materials.push(s),s}},{key:"currentMaterial",value:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]}},{key:"_finalize",value:function(t){var e=this.currentMaterial();if(e&&-1===e.groupEnd&&(e.groupEnd=this.geometry.vertices.length/3,e.groupCount=e.groupEnd-e.groupStart,e.inherited=!1),t&&this.materials.length>1)for(var r=this.materials.length-1;r>=0;r--)this.materials[r].groupCount<=0&&this.materials.splice(r,1);return t&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),e}}]),t}(),f=function(){function t(){n()(this,t),this.objects=[],this.object=null,this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.materialLibraries=[],this.startObject("",!1)}return i()(t,[{key:"startObject",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.object&&!this.object.fromDeclaration)return this.object.name=t,void(this.object.fromDeclaration=e);var r=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object=new c(t),this.object.fromDeclaration=e,r&&r.name&&"function"==typeof r.clone){var s=r.clone(0);s.inherited=!0,this.object.materials.push(s)}this.objects.push(this.object)}},{key:"finalize",value:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)}},{key:"parseVertexIndex",value:function(t,e){var r=parseInt(t,10);return 3*(r>=0?r-1:r+e/3)}},{key:"parseNormalIndex",value:function(t,e){var r=parseInt(t,10);return 3*(r>=0?r-1:r+e/3)}},{key:"parseUVIndex",value:function(t,e){var r=parseInt(t,10);return 2*(r>=0?r-1:r+e/2)}},{key:"addVertex",value:function(t,e,r){var s=this.vertices,n=this.object.geometry.vertices;n.push(s[t+0],s[t+1],s[t+2]),n.push(s[e+0],s[e+1],s[e+2]),n.push(s[r+0],s[r+1],s[r+2])}},{key:"addVertexPoint",value:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])}},{key:"addVertexLine",value:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])}},{key:"addNormal",value:function(t,e,r){var s=this.normals,n=this.object.geometry.normals;n.push(s[t+0],s[t+1],s[t+2]),n.push(s[e+0],s[e+1],s[e+2]),n.push(s[r+0],s[r+1],s[r+2])}},{key:"addColor",value:function(t,e,r){var s=this.colors,n=this.object.geometry.colors;n.push(s[t+0],s[t+1],s[t+2]),n.push(s[e+0],s[e+1],s[e+2]),n.push(s[r+0],s[r+1],s[r+2])}},{key:"addUV",value:function(t,e,r){var s=this.uvs,n=this.object.geometry.uvs;n.push(s[t+0],s[t+1]),n.push(s[e+0],s[e+1]),n.push(s[r+0],s[r+1])}},{key:"addUVLine",value:function(t){var e=this.uvs;this.object.geometry.uvs.push(e[t+0],e[t+1])}},{key:"addFace",value:function(t,e,r,s,n,o,i,a,l){var u=this.vertices.length,h=this.parseVertexIndex(t,u),c=this.parseVertexIndex(e,u),f=this.parseVertexIndex(r,u);if(this.addVertex(h,c,f),void 0!==s&&""!==s){var d=this.uvs.length;h=this.parseUVIndex(s,d),c=this.parseUVIndex(n,d),f=this.parseUVIndex(o,d),this.addUV(h,c,f)}if(void 0!==i&&""!==i){var p=this.normals.length;h=this.parseNormalIndex(i,p),c=i===a?h:this.parseNormalIndex(a,p),f=i===l?h:this.parseNormalIndex(l,p),this.addNormal(h,c,f)}this.colors.length>0&&this.addColor(h,c,f)}},{key:"addPointGeometry",value:function(t){this.object.geometry.type="Points";var e=this.vertices.length,r=!0,s=!1,n=void 0;try{for(var o,i=t[Symbol.iterator]();!(r=(o=i.next()).done);r=!0){var a=o.value;this.addVertexPoint(this.parseVertexIndex(a,e))}}catch(t){s=!0,n=t}finally{try{r||null==i.return||i.return()}finally{if(s)throw n}}}},{key:"addLineGeometry",value:function(t,e){this.object.geometry.type="Line";var r=this.vertices.length,s=this.uvs.length,n=!0,o=!1,i=void 0;try{for(var a,l=t[Symbol.iterator]();!(n=(a=l.next()).done);n=!0){var u=a.value;this.addVertexLine(this.parseVertexIndex(u,r))}}catch(t){o=!0,i=t}finally{try{n||null==l.return||l.return()}finally{if(o)throw i}}var h=!0,c=!1,f=void 0;try{for(var d,p=e[Symbol.iterator]();!(h=(d=p.next()).done);h=!0){var m=d.value;this.addUVLine(this.parseUVIndex(m,s))}}catch(t){c=!0,f=t}finally{try{h||null==p.return||p.return()}finally{if(c)throw f}}}}]),t}();function d(t,e){var r,s,n,o=new Float32Array(3*e),i=0,a=!0,l=!1,u=void 0;try{for(var h,c=t[Symbol.iterator]();!(a=(h=c.next()).done);a=!0){var f=h.value.attributes,d=f.POSITION,p=f.NORMAL,m=f.COLOR_0,v=f.TEXCOORD_0;o.set(d.value,3*i),p&&(r=r||new Float32Array(3*e)).set(p.value,3*i),m&&(s=s||new Float32Array(3*e)).set(m.value,3*i),v&&(n=n||new Float32Array(2*e)).set(v.value,2*i),i+=d.value.length/3}}catch(t){l=!0,u=t}finally{try{a||null==c.return||c.return()}finally{if(l)throw u}}var b={};return b.POSITION={value:o,size:3},r&&(b.NORMAL={value:r,size:3}),s&&(b.COLOR_0={value:s,size:3}),n&&(b.TEXCOORD_0={value:n,size:2}),b}var p,m={name:"OBJ",extensions:["obj"],testText:function(t){return"v"===t[0]},parseTextSync:function(t){var e=function(t){var e=new f;-1!==t.indexOf("\r\n")&&(t=t.replace(/\r\n/g,"\n")),-1!==t.indexOf("\\\n")&&(t=t.replace(/\\\n/g,""));for(var r=t.split("\n"),s="",n="",o=[],i="function"==typeof"".trimLeft,h=0,c=r.length;h<c;h++)if(s=r[h],0!==(s=i?s.trimLeft():s.trim()).length&&"#"!==(n=s.charAt(0)))if("v"===n){var d=s.split(/\s+/);switch(d[0]){case"v":e.vertices.push(parseFloat(d[1]),parseFloat(d[2]),parseFloat(d[3])),8===d.length&&e.colors.push(parseFloat(d[4]),parseFloat(d[5]),parseFloat(d[6]));break;case"vn":e.normals.push(parseFloat(d[1]),parseFloat(d[2]),parseFloat(d[3]));break;case"vt":e.uvs.push(parseFloat(d[1]),parseFloat(d[2]))}}else if("f"===n){for(var p=s.substr(1).trim().split(/\s+/),m=[],v=0,b=p.length;v<b;v++){var y=p[v];if(y.length>0){var g=y.split("/");m.push(g)}}for(var x=m[0],j=1,O=m.length-1;j<O;j++){var w=m[j],S=m[j+1];e.addFace(x[0],w[0],S[0],x[1],w[1],S[1],x[2],w[2],S[2])}}else if("l"===n){var I=s.substring(1).trim().split(" "),F=void 0,L=[];if(-1===s.indexOf("/"))F=I;else{F=[];for(var V=0,_=I.length;V<_;V++){var C=I[V].split("/");""!==C[0]&&F.push(C[0]),""!==C[1]&&L.push(C[1])}}e.addLineGeometry(F,L)}else if("p"===n){var z=s.substr(1).trim().split(" ");e.addPointGeometry(z)}else if(null!==(o=a.exec(s))){var A=(" "+o[0].substr(1).trim()).substr(1);e.startObject(A)}else if(u.test(s))e.object.startMaterial(s.substring(7).trim(),e.materialLibraries);else if(l.test(s))e.materialLibraries.push(s.substring(7).trim());else{if("s"!==n){if("\0"===s)continue;throw new Error('Unexpected line: "'.concat(s,'"'))}if((o=s.split(" ")).length>1){var k=o[1].trim().toLowerCase();e.object.smooth="0"!==k&&"off"!==k}else e.object.smooth=!0;var M=e.object.currentMaterial();M&&(M.smooth=e.object.smooth)}e.finalize();var P=[],N=[],T=!0,E=!1,U=void 0;try{for(var R,D=e.objects[Symbol.iterator]();!(T=(R=D.next()).done);T=!0){var G=R.value,B=G.geometry;if(0!==B.vertices.length){var X={header:{vertexCount:B.vertices.length/3},attributes:{}};switch(B.type){case"Points":X.mode=0;break;case"Line":X.mode=1;break;default:X.mode=4}X.attributes.POSITION={value:new Float32Array(B.vertices),size:3},B.normals.length>0&&(X.attributes.NORMAL={value:new Float32Array(B.normals),size:3}),B.colors.length>0&&(X.attributes.COLOR_0={value:new Float32Array(B.colors),size:3}),B.uvs.length>0&&(X.attributes.TEXCOORD_0={value:new Float32Array(B.uvs),size:2}),X.materials=[];var J=!0,W=!1,$=void 0;try{for(var q,H=G.materials[Symbol.iterator]();!(J=(q=H.next()).done);J=!0){var K=q.value,Q={name:K.name,flatShading:!K.smooth};X.materials.push(Q),N.push(Q)}}catch(t){W=!0,$=t}finally{try{J||null==H.return||H.return()}finally{if(W)throw $}}X.name=G.name,P.push(X)}}}catch(t){E=!0,U=t}finally{try{T||null==D.return||D.return()}finally{if(E)throw U}}return{meshes:P,materials:N}}(t).meshes,r=e.reduce(function(t,e){return t+e.header.vertexCount},0);return{loaderData:{header:{}},header:{vertexCount:r},mode:4,attributes:d(e,r)}}},v=r(2),b=r.n(v);p=m,"undefined"!=typeof self&&(self.onmessage=function(t){var e=t.data,r=e.arraybuffer,s=e.opts;try{var n,o;if(p.parseSync)n=r,o=p.parseSync;else{if(!p.parseTextSync)throw new Error("Could not load data with ".concat(p.name," loader"));n=(new TextDecoder).decode(r),o=p.parseTextSync}var i=o(n,s),a=function t(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s=arguments.length>2?arguments[2]:void 0,n=s||new Set;if(e)if(e instanceof ArrayBuffer)n.add(e);else if(e.buffer&&e.buffer instanceof ArrayBuffer)n.add(e.buffer);else if(r&&"object"===b()(e))for(var o in e)t(e[o],r,n);return void 0===s?Array.from(n):null}(i);self.postMessage({type:"done",result:i},a)}catch(t){self.postMessage({type:"error",message:t.message})}})}])},function(t,e,r){(function(e){const s=r(3),n="undefined"==typeof window?e:window;n.loaders=n.loaders||{},t.exports=Object.assign(n.loaders,s)}).call(this,r(2))},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";r.r(e);const s=/^[og]\s*(.+)?/,n=/^mtllib /,o=/^usemtl /;class i{constructor({index:t,name:e="",mtllib:r,smooth:s,groupStart:n}){this.index=t,this.name=e,this.mtllib=r,this.smooth=s,this.groupStart=n,this.groupEnd=-1,this.groupCount=-1,this.inherited=!1}clone(t=this.index){return new i({index:t,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0})}}class a{constructor(t=""){this.name=t,this.geometry={vertices:[],normals:[],colors:[],uvs:[]},this.materials=[],this.smooth=!0}startMaterial(t,e){const r=this._finalize(!1);r&&(r.inherited||r.groupCount<=0)&&this.materials.splice(r.index,1);const s=new i({index:this.materials.length,name:t,mtllib:Array.isArray(e)&&e.length>0?e[e.length-1]:"",smooth:void 0!==r?r.smooth:this.smooth,groupStart:void 0!==r?r.groupEnd:0});return this.materials.push(s),s}currentMaterial(){if(this.materials.length>0)return this.materials[this.materials.length-1]}_finalize(t){const e=this.currentMaterial();if(e&&-1===e.groupEnd&&(e.groupEnd=this.geometry.vertices.length/3,e.groupCount=e.groupEnd-e.groupStart,e.inherited=!1),t&&this.materials.length>1)for(let t=this.materials.length-1;t>=0;t--)this.materials[t].groupCount<=0&&this.materials.splice(t,1);return t&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),e}}class l{constructor(){this.objects=[],this.object=null,this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.materialLibraries=[],this.startObject("",!1)}startObject(t,e=!0){if(this.object&&!this.object.fromDeclaration)return this.object.name=t,void(this.object.fromDeclaration=e);const r=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object=new a(t),this.object.fromDeclaration=e,r&&r.name&&"function"==typeof r.clone){const t=r.clone(0);t.inherited=!0,this.object.materials.push(t)}this.objects.push(this.object)}finalize(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)}parseVertexIndex(t,e){const r=parseInt(t,10);return 3*(r>=0?r-1:r+e/3)}parseNormalIndex(t,e){const r=parseInt(t,10);return 3*(r>=0?r-1:r+e/3)}parseUVIndex(t,e){const r=parseInt(t,10);return 2*(r>=0?r-1:r+e/2)}addVertex(t,e,r){const s=this.vertices,n=this.object.geometry.vertices;n.push(s[t+0],s[t+1],s[t+2]),n.push(s[e+0],s[e+1],s[e+2]),n.push(s[r+0],s[r+1],s[r+2])}addVertexPoint(t){const e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])}addVertexLine(t){const e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])}addNormal(t,e,r){const s=this.normals,n=this.object.geometry.normals;n.push(s[t+0],s[t+1],s[t+2]),n.push(s[e+0],s[e+1],s[e+2]),n.push(s[r+0],s[r+1],s[r+2])}addColor(t,e,r){const s=this.colors,n=this.object.geometry.colors;n.push(s[t+0],s[t+1],s[t+2]),n.push(s[e+0],s[e+1],s[e+2]),n.push(s[r+0],s[r+1],s[r+2])}addUV(t,e,r){const s=this.uvs,n=this.object.geometry.uvs;n.push(s[t+0],s[t+1]),n.push(s[e+0],s[e+1]),n.push(s[r+0],s[r+1])}addUVLine(t){const e=this.uvs;this.object.geometry.uvs.push(e[t+0],e[t+1])}addFace(t,e,r,s,n,o,i,a,l){const u=this.vertices.length;let h=this.parseVertexIndex(t,u),c=this.parseVertexIndex(e,u),f=this.parseVertexIndex(r,u);if(this.addVertex(h,c,f),void 0!==s&&""!==s){const t=this.uvs.length;h=this.parseUVIndex(s,t),c=this.parseUVIndex(n,t),f=this.parseUVIndex(o,t),this.addUV(h,c,f)}if(void 0!==i&&""!==i){const t=this.normals.length;h=this.parseNormalIndex(i,t),c=i===a?h:this.parseNormalIndex(a,t),f=i===l?h:this.parseNormalIndex(l,t),this.addNormal(h,c,f)}this.colors.length>0&&this.addColor(h,c,f)}addPointGeometry(t){this.object.geometry.type="Points";const e=this.vertices.length;for(const r of t)this.addVertexPoint(this.parseVertexIndex(r,e))}addLineGeometry(t,e){this.object.geometry.type="Line";const r=this.vertices.length,s=this.uvs.length;for(const e of t)this.addVertexLine(this.parseVertexIndex(e,r));for(const t of e)this.addUVLine(this.parseUVIndex(t,s))}}var u=t=>{const e=new l;-1!==t.indexOf("\r\n")&&(t=t.replace(/\r\n/g,"\n")),-1!==t.indexOf("\\\n")&&(t=t.replace(/\\\n/g,""));const r=t.split("\n");let i="",a="",u=0,h=[];const c="function"==typeof"".trimLeft;for(let t=0,l=r.length;t<l;t++)if(i=r[t],0!==(u=(i=c?i.trimLeft():i.trim()).length)&&"#"!==(a=i.charAt(0)))if("v"===a){const t=i.split(/\s+/);switch(t[0]){case"v":e.vertices.push(parseFloat(t[1]),parseFloat(t[2]),parseFloat(t[3])),8===t.length&&e.colors.push(parseFloat(t[4]),parseFloat(t[5]),parseFloat(t[6]));break;case"vn":e.normals.push(parseFloat(t[1]),parseFloat(t[2]),parseFloat(t[3]));break;case"vt":e.uvs.push(parseFloat(t[1]),parseFloat(t[2]))}}else if("f"===a){const t=i.substr(1).trim().split(/\s+/),r=[];for(let e=0,s=t.length;e<s;e++){const s=t[e];if(s.length>0){const t=s.split("/");r.push(t)}}const s=r[0];for(let t=1,n=r.length-1;t<n;t++){const n=r[t],o=r[t+1];e.addFace(s[0],n[0],o[0],s[1],n[1],o[1],s[2],n[2],o[2])}}else if("l"===a){const t=i.substring(1).trim().split(" ");let r;const s=[];if(-1===i.indexOf("/"))r=t;else{r=[];for(let e=0,n=t.length;e<n;e++){const n=t[e].split("/");""!==n[0]&&r.push(n[0]),""!==n[1]&&s.push(n[1])}}e.addLineGeometry(r,s)}else if("p"===a){const t=i.substr(1).trim().split(" ");e.addPointGeometry(t)}else if(null!==(h=s.exec(i))){const t=(" "+h[0].substr(1).trim()).substr(1);e.startObject(t)}else if(o.test(i))e.object.startMaterial(i.substring(7).trim(),e.materialLibraries);else if(n.test(i))e.materialLibraries.push(i.substring(7).trim());else{if("s"!==a){if("\0"===i)continue;throw new Error(`Unexpected line: "${i}"`)}{if((h=i.split(" ")).length>1){const t=h[1].trim().toLowerCase();e.object.smooth="0"!==t&&"off"!==t}else e.object.smooth=!0;const t=e.object.currentMaterial();t&&(t.smooth=e.object.smooth)}}e.finalize();const f=[],d=[];for(const t of e.objects){const{geometry:e}=t;if(0===e.vertices.length)continue;const r={header:{vertexCount:e.vertices.length/3},attributes:{}};switch(e.type){case"Points":r.mode=0;break;case"Line":r.mode=1;break;default:r.mode=4}r.attributes.POSITION={value:new Float32Array(e.vertices),size:3},e.normals.length>0&&(r.attributes.NORMAL={value:new Float32Array(e.normals),size:3}),e.colors.length>0&&(r.attributes.COLOR_0={value:new Float32Array(e.colors),size:3}),e.uvs.length>0&&(r.attributes.TEXCOORD_0={value:new Float32Array(e.uvs),size:2}),r.materials=[];for(const e of t.materials){const t={name:e.name,flatShading:!e.smooth};r.materials.push(t),d.push(t)}r.name=t.name,f.push(r)}return{meshes:f,materials:d}};function h(t,e){const r=new Float32Array(3*e);let s,n,o,i=0;for(const a of t){const{POSITION:t,NORMAL:l,COLOR_0:u,TEXCOORD_0:h}=a.attributes;r.set(t.value,3*i),l&&(s=s||new Float32Array(3*e)).set(l.value,3*i),u&&(n=n||new Float32Array(3*e)).set(u.value,3*i),h&&(o=o||new Float32Array(2*e)).set(h.value,2*i),i+=t.value.length/3}const a={};return a.POSITION={value:r,size:3},s&&(a.NORMAL={value:s,size:3}),n&&(a.COLOR_0={value:n,size:3}),o&&(a.TEXCOORD_0={value:o,size:2}),a}var c={name:"OBJ",extensions:["obj"],testText:function(t){return"v"===t[0]},parseTextSync:function(t){const{meshes:e}=u(t),r=e.reduce((t,e)=>t+e.header.vertexCount,0);return{loaderData:{header:{}},header:{vertexCount:r},mode:4,attributes:h(e,r)}}},f=r(0),d={name:"OBJ",extensions:["obj"],worker:r.n(f).a};r.d(e,"OBJLoader",function(){return c}),r.d(e,"OBJWorkerLoader",function(){return d})}])});
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var s in r)("object"==typeof exports?exports:t)[s]=r[s]}}(window,function(){return function(t){var e={};function r(s){if(e[s])return e[s].exports;var n=e[s]={i:s,l:!1,exports:{}};return t[s].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,s){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(r.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(s,n,function(e){return t[e]}.bind(null,n));return s},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1)}([function(t,e){!function(t){var e={};function r(s){if(e[s])return e[s].exports;var n=e[s]={i:s,l:!1,exports:{}};return t[s].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=t,r.c=e,r.d=function(t,e,s){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(r.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(s,n,function(e){return t[e]}.bind(null,n));return s},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=3)}([function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function r(t,e){for(var r=0;r<e.length;r++){var s=e[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}t.exports=function(t,e,s){return e&&r(t.prototype,e),s&&r(t,s),t}},function(t,e){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(e){return"function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?t.exports=s=function(t){return r(t)}:t.exports=s=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":r(t)},s(e)}t.exports=s},function(t,e,r){"use strict";r.r(e);var s=r(0),n=r.n(s),o=r(1),i=r.n(o),a=/^[og]\s*(.+)?/,l=/^mtllib /,u=/^usemtl /,h=function(){function t(e){var r=e.index,s=e.name,o=void 0===s?"":s,i=e.mtllib,a=e.smooth,l=e.groupStart;n()(this,t),this.index=r,this.name=o,this.mtllib=i,this.smooth=a,this.groupStart=l,this.groupEnd=-1,this.groupCount=-1,this.inherited=!1}return i()(t,[{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.index;return new t({index:e,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0})}}]),t}(),c=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";n()(this,t),this.name=e,this.geometry={vertices:[],normals:[],colors:[],uvs:[]},this.materials=[],this.smooth=!0}return i()(t,[{key:"startMaterial",value:function(t,e){var r=this._finalize(!1);r&&(r.inherited||r.groupCount<=0)&&this.materials.splice(r.index,1);var s=new h({index:this.materials.length,name:t,mtllib:Array.isArray(e)&&e.length>0?e[e.length-1]:"",smooth:void 0!==r?r.smooth:this.smooth,groupStart:void 0!==r?r.groupEnd:0});return this.materials.push(s),s}},{key:"currentMaterial",value:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]}},{key:"_finalize",value:function(t){var e=this.currentMaterial();if(e&&-1===e.groupEnd&&(e.groupEnd=this.geometry.vertices.length/3,e.groupCount=e.groupEnd-e.groupStart,e.inherited=!1),t&&this.materials.length>1)for(var r=this.materials.length-1;r>=0;r--)this.materials[r].groupCount<=0&&this.materials.splice(r,1);return t&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),e}}]),t}(),f=function(){function t(){n()(this,t),this.objects=[],this.object=null,this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.materialLibraries=[],this.startObject("",!1)}return i()(t,[{key:"startObject",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.object&&!this.object.fromDeclaration)return this.object.name=t,void(this.object.fromDeclaration=e);var r=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object=new c(t),this.object.fromDeclaration=e,r&&r.name&&"function"==typeof r.clone){var s=r.clone(0);s.inherited=!0,this.object.materials.push(s)}this.objects.push(this.object)}},{key:"finalize",value:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)}},{key:"parseVertexIndex",value:function(t,e){var r=parseInt(t,10);return 3*(r>=0?r-1:r+e/3)}},{key:"parseNormalIndex",value:function(t,e){var r=parseInt(t,10);return 3*(r>=0?r-1:r+e/3)}},{key:"parseUVIndex",value:function(t,e){var r=parseInt(t,10);return 2*(r>=0?r-1:r+e/2)}},{key:"addVertex",value:function(t,e,r){var s=this.vertices,n=this.object.geometry.vertices;n.push(s[t+0],s[t+1],s[t+2]),n.push(s[e+0],s[e+1],s[e+2]),n.push(s[r+0],s[r+1],s[r+2])}},{key:"addVertexPoint",value:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])}},{key:"addVertexLine",value:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])}},{key:"addNormal",value:function(t,e,r){var s=this.normals,n=this.object.geometry.normals;n.push(s[t+0],s[t+1],s[t+2]),n.push(s[e+0],s[e+1],s[e+2]),n.push(s[r+0],s[r+1],s[r+2])}},{key:"addColor",value:function(t,e,r){var s=this.colors,n=this.object.geometry.colors;n.push(s[t+0],s[t+1],s[t+2]),n.push(s[e+0],s[e+1],s[e+2]),n.push(s[r+0],s[r+1],s[r+2])}},{key:"addUV",value:function(t,e,r){var s=this.uvs,n=this.object.geometry.uvs;n.push(s[t+0],s[t+1]),n.push(s[e+0],s[e+1]),n.push(s[r+0],s[r+1])}},{key:"addUVLine",value:function(t){var e=this.uvs;this.object.geometry.uvs.push(e[t+0],e[t+1])}},{key:"addFace",value:function(t,e,r,s,n,o,i,a,l){var u=this.vertices.length,h=this.parseVertexIndex(t,u),c=this.parseVertexIndex(e,u),f=this.parseVertexIndex(r,u);if(this.addVertex(h,c,f),void 0!==s&&""!==s){var d=this.uvs.length;h=this.parseUVIndex(s,d),c=this.parseUVIndex(n,d),f=this.parseUVIndex(o,d),this.addUV(h,c,f)}if(void 0!==i&&""!==i){var p=this.normals.length;h=this.parseNormalIndex(i,p),c=i===a?h:this.parseNormalIndex(a,p),f=i===l?h:this.parseNormalIndex(l,p),this.addNormal(h,c,f)}this.colors.length>0&&this.addColor(h,c,f)}},{key:"addPointGeometry",value:function(t){this.object.geometry.type="Points";var e=this.vertices.length,r=!0,s=!1,n=void 0;try{for(var o,i=t[Symbol.iterator]();!(r=(o=i.next()).done);r=!0){var a=o.value;this.addVertexPoint(this.parseVertexIndex(a,e))}}catch(t){s=!0,n=t}finally{try{r||null==i.return||i.return()}finally{if(s)throw n}}}},{key:"addLineGeometry",value:function(t,e){this.object.geometry.type="Line";var r=this.vertices.length,s=this.uvs.length,n=!0,o=!1,i=void 0;try{for(var a,l=t[Symbol.iterator]();!(n=(a=l.next()).done);n=!0){var u=a.value;this.addVertexLine(this.parseVertexIndex(u,r))}}catch(t){o=!0,i=t}finally{try{n||null==l.return||l.return()}finally{if(o)throw i}}var h=!0,c=!1,f=void 0;try{for(var d,p=e[Symbol.iterator]();!(h=(d=p.next()).done);h=!0){var m=d.value;this.addUVLine(this.parseUVIndex(m,s))}}catch(t){c=!0,f=t}finally{try{h||null==p.return||p.return()}finally{if(c)throw f}}}}]),t}();function d(t,e){var r,s,n,o=new Float32Array(3*e),i=0,a=!0,l=!1,u=void 0;try{for(var h,c=t[Symbol.iterator]();!(a=(h=c.next()).done);a=!0){var f=h.value.attributes,d=f.POSITION,p=f.NORMAL,m=f.COLOR_0,v=f.TEXCOORD_0;o.set(d.value,3*i),p&&(r=r||new Float32Array(3*e)).set(p.value,3*i),m&&(s=s||new Float32Array(3*e)).set(m.value,3*i),v&&(n=n||new Float32Array(2*e)).set(v.value,2*i),i+=d.value.length/3}}catch(t){l=!0,u=t}finally{try{a||null==c.return||c.return()}finally{if(l)throw u}}var b={};return b.POSITION={value:o,size:3},r&&(b.NORMAL={value:r,size:3}),s&&(b.COLOR_0={value:s,size:3}),n&&(b.TEXCOORD_0={value:n,size:2}),b}var p,m={name:"OBJ",extensions:["obj"],testText:function(t){return"v"===t[0]},parseTextSync:function(t){var e=function(t){var e=new f;-1!==t.indexOf("\r\n")&&(t=t.replace(/\r\n/g,"\n")),-1!==t.indexOf("\\\n")&&(t=t.replace(/\\\n/g,""));for(var r=t.split("\n"),s="",n="",o=[],i="function"==typeof"".trimLeft,h=0,c=r.length;h<c;h++)if(s=r[h],0!==(s=i?s.trimLeft():s.trim()).length&&"#"!==(n=s.charAt(0)))if("v"===n){var d=s.split(/\s+/);switch(d[0]){case"v":e.vertices.push(parseFloat(d[1]),parseFloat(d[2]),parseFloat(d[3])),8===d.length&&e.colors.push(parseFloat(d[4]),parseFloat(d[5]),parseFloat(d[6]));break;case"vn":e.normals.push(parseFloat(d[1]),parseFloat(d[2]),parseFloat(d[3]));break;case"vt":e.uvs.push(parseFloat(d[1]),parseFloat(d[2]))}}else if("f"===n){for(var p=s.substr(1).trim().split(/\s+/),m=[],v=0,b=p.length;v<b;v++){var y=p[v];if(y.length>0){var g=y.split("/");m.push(g)}}for(var x=m[0],j=1,O=m.length-1;j<O;j++){var w=m[j],S=m[j+1];e.addFace(x[0],w[0],S[0],x[1],w[1],S[1],x[2],w[2],S[2])}}else if("l"===n){var I=s.substring(1).trim().split(" "),F=void 0,L=[];if(-1===s.indexOf("/"))F=I;else{F=[];for(var V=0,_=I.length;V<_;V++){var C=I[V].split("/");""!==C[0]&&F.push(C[0]),""!==C[1]&&L.push(C[1])}}e.addLineGeometry(F,L)}else if("p"===n){var z=s.substr(1).trim().split(" ");e.addPointGeometry(z)}else if(null!==(o=a.exec(s))){var A=(" "+o[0].substr(1).trim()).substr(1);e.startObject(A)}else if(u.test(s))e.object.startMaterial(s.substring(7).trim(),e.materialLibraries);else if(l.test(s))e.materialLibraries.push(s.substring(7).trim());else{if("s"!==n){if("\0"===s)continue;throw new Error('Unexpected line: "'.concat(s,'"'))}if((o=s.split(" ")).length>1){var k=o[1].trim().toLowerCase();e.object.smooth="0"!==k&&"off"!==k}else e.object.smooth=!0;var M=e.object.currentMaterial();M&&(M.smooth=e.object.smooth)}e.finalize();var P=[],N=[],T=!0,E=!1,U=void 0;try{for(var R,D=e.objects[Symbol.iterator]();!(T=(R=D.next()).done);T=!0){var G=R.value,B=G.geometry;if(0!==B.vertices.length){var X={header:{vertexCount:B.vertices.length/3},attributes:{}};switch(B.type){case"Points":X.mode=0;break;case"Line":X.mode=1;break;default:X.mode=4}X.attributes.POSITION={value:new Float32Array(B.vertices),size:3},B.normals.length>0&&(X.attributes.NORMAL={value:new Float32Array(B.normals),size:3}),B.colors.length>0&&(X.attributes.COLOR_0={value:new Float32Array(B.colors),size:3}),B.uvs.length>0&&(X.attributes.TEXCOORD_0={value:new Float32Array(B.uvs),size:2}),X.materials=[];var J=!0,W=!1,$=void 0;try{for(var q,H=G.materials[Symbol.iterator]();!(J=(q=H.next()).done);J=!0){var K=q.value,Q={name:K.name,flatShading:!K.smooth};X.materials.push(Q),N.push(Q)}}catch(t){W=!0,$=t}finally{try{J||null==H.return||H.return()}finally{if(W)throw $}}X.name=G.name,P.push(X)}}}catch(t){E=!0,U=t}finally{try{T||null==D.return||D.return()}finally{if(E)throw U}}return{meshes:P,materials:N}}(t).meshes,r=e.reduce(function(t,e){return t+e.header.vertexCount},0);return{loaderData:{header:{}},header:{vertexCount:r},mode:4,attributes:d(e,r)}}},v=r(2),b=r.n(v);p=m,"undefined"!=typeof self&&(self.onmessage=function(t){var e=t.data,r=e.arraybuffer,s=e.opts;try{var n,o;if(p.parseSync)n=r,o=p.parseSync;else{if(!p.parseTextSync)throw new Error("Could not load data with ".concat(p.name," loader"));n=(new TextDecoder).decode(r),o=p.parseTextSync}var i=o(n,s),a=function t(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s=arguments.length>2?arguments[2]:void 0,n=s||new Set;if(e)if(e instanceof ArrayBuffer)n.add(e);else if(e.buffer&&e.buffer instanceof ArrayBuffer)n.add(e.buffer);else if(r&&"object"===b()(e))for(var o in e)t(e[o],r,n);return void 0===s?Array.from(n):null}(i);self.postMessage({type:"done",result:i},a)}catch(t){self.postMessage({type:"error",message:t.message})}})}])},function(t,e,r){(function(e){const s=r(3),n="undefined"==typeof window?e:window;n.loaders=n.loaders||{},t.exports=Object.assign(n.loaders,s)}).call(this,r(2))},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";r.r(e);const s=/^[og]\s*(.+)?/,n=/^mtllib /,o=/^usemtl /;class i{constructor({index:t,name:e="",mtllib:r,smooth:s,groupStart:n}){this.index=t,this.name=e,this.mtllib=r,this.smooth=s,this.groupStart=n,this.groupEnd=-1,this.groupCount=-1,this.inherited=!1}clone(t=this.index){return new i({index:t,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0})}}class a{constructor(t=""){this.name=t,this.geometry={vertices:[],normals:[],colors:[],uvs:[]},this.materials=[],this.smooth=!0}startMaterial(t,e){const r=this._finalize(!1);r&&(r.inherited||r.groupCount<=0)&&this.materials.splice(r.index,1);const s=new i({index:this.materials.length,name:t,mtllib:Array.isArray(e)&&e.length>0?e[e.length-1]:"",smooth:void 0!==r?r.smooth:this.smooth,groupStart:void 0!==r?r.groupEnd:0});return this.materials.push(s),s}currentMaterial(){if(this.materials.length>0)return this.materials[this.materials.length-1]}_finalize(t){const e=this.currentMaterial();if(e&&-1===e.groupEnd&&(e.groupEnd=this.geometry.vertices.length/3,e.groupCount=e.groupEnd-e.groupStart,e.inherited=!1),t&&this.materials.length>1)for(let t=this.materials.length-1;t>=0;t--)this.materials[t].groupCount<=0&&this.materials.splice(t,1);return t&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),e}}class l{constructor(){this.objects=[],this.object=null,this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.materialLibraries=[],this.startObject("",!1)}startObject(t,e=!0){if(this.object&&!this.object.fromDeclaration)return this.object.name=t,void(this.object.fromDeclaration=e);const r=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object=new a(t),this.object.fromDeclaration=e,r&&r.name&&"function"==typeof r.clone){const t=r.clone(0);t.inherited=!0,this.object.materials.push(t)}this.objects.push(this.object)}finalize(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)}parseVertexIndex(t,e){const r=parseInt(t,10);return 3*(r>=0?r-1:r+e/3)}parseNormalIndex(t,e){const r=parseInt(t,10);return 3*(r>=0?r-1:r+e/3)}parseUVIndex(t,e){const r=parseInt(t,10);return 2*(r>=0?r-1:r+e/2)}addVertex(t,e,r){const s=this.vertices,n=this.object.geometry.vertices;n.push(s[t+0],s[t+1],s[t+2]),n.push(s[e+0],s[e+1],s[e+2]),n.push(s[r+0],s[r+1],s[r+2])}addVertexPoint(t){const e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])}addVertexLine(t){const e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])}addNormal(t,e,r){const s=this.normals,n=this.object.geometry.normals;n.push(s[t+0],s[t+1],s[t+2]),n.push(s[e+0],s[e+1],s[e+2]),n.push(s[r+0],s[r+1],s[r+2])}addColor(t,e,r){const s=this.colors,n=this.object.geometry.colors;n.push(s[t+0],s[t+1],s[t+2]),n.push(s[e+0],s[e+1],s[e+2]),n.push(s[r+0],s[r+1],s[r+2])}addUV(t,e,r){const s=this.uvs,n=this.object.geometry.uvs;n.push(s[t+0],s[t+1]),n.push(s[e+0],s[e+1]),n.push(s[r+0],s[r+1])}addUVLine(t){const e=this.uvs;this.object.geometry.uvs.push(e[t+0],e[t+1])}addFace(t,e,r,s,n,o,i,a,l){const u=this.vertices.length;let h=this.parseVertexIndex(t,u),c=this.parseVertexIndex(e,u),f=this.parseVertexIndex(r,u);if(this.addVertex(h,c,f),void 0!==s&&""!==s){const t=this.uvs.length;h=this.parseUVIndex(s,t),c=this.parseUVIndex(n,t),f=this.parseUVIndex(o,t),this.addUV(h,c,f)}if(void 0!==i&&""!==i){const t=this.normals.length;h=this.parseNormalIndex(i,t),c=i===a?h:this.parseNormalIndex(a,t),f=i===l?h:this.parseNormalIndex(l,t),this.addNormal(h,c,f)}this.colors.length>0&&this.addColor(h,c,f)}addPointGeometry(t){this.object.geometry.type="Points";const e=this.vertices.length;for(const r of t)this.addVertexPoint(this.parseVertexIndex(r,e))}addLineGeometry(t,e){this.object.geometry.type="Line";const r=this.vertices.length,s=this.uvs.length;for(const e of t)this.addVertexLine(this.parseVertexIndex(e,r));for(const t of e)this.addUVLine(this.parseUVIndex(t,s))}}var u=t=>{const e=new l;-1!==t.indexOf("\r\n")&&(t=t.replace(/\r\n/g,"\n")),-1!==t.indexOf("\\\n")&&(t=t.replace(/\\\n/g,""));const r=t.split("\n");let i="",a="",u=0,h=[];const c="function"==typeof"".trimLeft;for(let t=0,l=r.length;t<l;t++)if(i=r[t],0!==(u=(i=c?i.trimLeft():i.trim()).length)&&"#"!==(a=i.charAt(0)))if("v"===a){const t=i.split(/\s+/);switch(t[0]){case"v":e.vertices.push(parseFloat(t[1]),parseFloat(t[2]),parseFloat(t[3])),8===t.length&&e.colors.push(parseFloat(t[4]),parseFloat(t[5]),parseFloat(t[6]));break;case"vn":e.normals.push(parseFloat(t[1]),parseFloat(t[2]),parseFloat(t[3]));break;case"vt":e.uvs.push(parseFloat(t[1]),parseFloat(t[2]))}}else if("f"===a){const t=i.substr(1).trim().split(/\s+/),r=[];for(let e=0,s=t.length;e<s;e++){const s=t[e];if(s.length>0){const t=s.split("/");r.push(t)}}const s=r[0];for(let t=1,n=r.length-1;t<n;t++){const n=r[t],o=r[t+1];e.addFace(s[0],n[0],o[0],s[1],n[1],o[1],s[2],n[2],o[2])}}else if("l"===a){const t=i.substring(1).trim().split(" ");let r;const s=[];if(-1===i.indexOf("/"))r=t;else{r=[];for(let e=0,n=t.length;e<n;e++){const n=t[e].split("/");""!==n[0]&&r.push(n[0]),""!==n[1]&&s.push(n[1])}}e.addLineGeometry(r,s)}else if("p"===a){const t=i.substr(1).trim().split(" ");e.addPointGeometry(t)}else if(null!==(h=s.exec(i))){const t=(" "+h[0].substr(1).trim()).substr(1);e.startObject(t)}else if(o.test(i))e.object.startMaterial(i.substring(7).trim(),e.materialLibraries);else if(n.test(i))e.materialLibraries.push(i.substring(7).trim());else{if("s"!==a){if("\0"===i)continue;throw new Error(`Unexpected line: "${i}"`)}{if((h=i.split(" ")).length>1){const t=h[1].trim().toLowerCase();e.object.smooth="0"!==t&&"off"!==t}else e.object.smooth=!0;const t=e.object.currentMaterial();t&&(t.smooth=e.object.smooth)}}e.finalize();const f=[],d=[];for(const t of e.objects){const{geometry:e}=t;if(0===e.vertices.length)continue;const r={header:{vertexCount:e.vertices.length/3},attributes:{}};switch(e.type){case"Points":r.mode=0;break;case"Line":r.mode=1;break;default:r.mode=4}r.attributes.POSITION={value:new Float32Array(e.vertices),size:3},e.normals.length>0&&(r.attributes.NORMAL={value:new Float32Array(e.normals),size:3}),e.colors.length>0&&(r.attributes.COLOR_0={value:new Float32Array(e.colors),size:3}),e.uvs.length>0&&(r.attributes.TEXCOORD_0={value:new Float32Array(e.uvs),size:2}),r.materials=[];for(const e of t.materials){const t={name:e.name,flatShading:!e.smooth};r.materials.push(t),d.push(t)}r.name=t.name,f.push(r)}return{meshes:f,materials:d}};function h(t,e){const r=new Float32Array(3*e);let s,n,o,i=0;for(const a of t){const{POSITION:t,NORMAL:l,COLOR_0:u,TEXCOORD_0:h}=a.attributes;r.set(t.value,3*i),l&&(s=s||new Float32Array(3*e)).set(l.value,3*i),u&&(n=n||new Float32Array(3*e)).set(u.value,3*i),h&&(o=o||new Float32Array(2*e)).set(h.value,2*i),i+=t.value.length/3}const a={};return a.POSITION={value:r,size:3},s&&(a.NORMAL={value:s,size:3}),n&&(a.COLOR_0={value:n,size:3}),o&&(a.TEXCOORD_0={value:o,size:2}),a}var c={name:"OBJ",extensions:["obj"],testText:function(t){return"v"===t[0]},parseTextSync:function(t){const{meshes:e}=u(t),r=e.reduce((t,e)=>t+e.header.vertexCount,0);return{loaderData:{header:{}},header:{vertexCount:r},mode:4,attributes:h(e,r)}}},f=r(0),d={name:"OBJ",extensions:["obj"],worker:r.n(f).a};r.d(e,"OBJLoader",function(){return c}),r.d(e,"OBJWorkerLoader",function(){return d})}])});

@@ -7,3 +7,3 @@ "use strict";

exports["default"] = void 0;
var worker = "!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"\",r(r.s=3)}([function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}},function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}},function(e,t){function r(e){return(r=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function n(t){return\"function\"==typeof Symbol&&\"symbol\"===r(Symbol.iterator)?e.exports=n=function(e){return r(e)}:e.exports=n=function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":r(e)},n(t)}e.exports=n},function(e,t,r){\"use strict\";r.r(t);var n=r(0),i=r.n(n),a=r(1),o=r.n(a),s=/^[og]\\s*(.+)?/,l=/^mtllib /,u=/^usemtl /,h=function(){function e(t){var r=t.index,n=t.name,a=void 0===n?\"\":n,o=t.mtllib,s=t.smooth,l=t.groupStart;i()(this,e),this.index=r,this.name=a,this.mtllib=o,this.smooth=s,this.groupStart=l,this.groupEnd=-1,this.groupCount=-1,this.inherited=!1}return o()(e,[{key:\"clone\",value:function(){return new e({index:arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0})}}]),e}(),c=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\";i()(this,e),this.name=t,this.geometry={vertices:[],normals:[],colors:[],uvs:[]},this.materials=[],this.smooth=!0}return o()(e,[{key:\"startMaterial\",value:function(e,t){var r=this._finalize(!1);r&&(r.inherited||r.groupCount<=0)&&this.materials.splice(r.index,1);var n=new h({index:this.materials.length,name:e,mtllib:Array.isArray(t)&&t.length>0?t[t.length-1]:\"\",smooth:void 0!==r?r.smooth:this.smooth,groupStart:void 0!==r?r.groupEnd:0});return this.materials.push(n),n}},{key:\"currentMaterial\",value:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]}},{key:\"_finalize\",value:function(e){var t=this.currentMaterial();if(t&&-1===t.groupEnd&&(t.groupEnd=this.geometry.vertices.length/3,t.groupCount=t.groupEnd-t.groupStart,t.inherited=!1),e&&this.materials.length>1)for(var r=this.materials.length-1;r>=0;r--)this.materials[r].groupCount<=0&&this.materials.splice(r,1);return e&&0===this.materials.length&&this.materials.push({name:\"\",smooth:this.smooth}),t}}]),e}(),f=function(){function e(){i()(this,e),this.objects=[],this.object=null,this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.materialLibraries=[],this.startObject(\"\",!1)}return o()(e,[{key:\"startObject\",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.object&&!this.object.fromDeclaration)return this.object.name=e,void(this.object.fromDeclaration=t);var r=this.object&&\"function\"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&\"function\"==typeof this.object._finalize&&this.object._finalize(!0),this.object=new c(e),this.object.fromDeclaration=t,r&&r.name&&\"function\"==typeof r.clone){var n=r.clone(0);n.inherited=!0,this.object.materials.push(n)}this.objects.push(this.object)}},{key:\"finalize\",value:function(){this.object&&\"function\"==typeof this.object._finalize&&this.object._finalize(!0)}},{key:\"parseVertexIndex\",value:function(e,t){var r=parseInt(e,10);return 3*(r>=0?r-1:r+t/3)}},{key:\"parseNormalIndex\",value:function(e,t){var r=parseInt(e,10);return 3*(r>=0?r-1:r+t/3)}},{key:\"parseUVIndex\",value:function(e,t){var r=parseInt(e,10);return 2*(r>=0?r-1:r+t/2)}},{key:\"addVertex\",value:function(e,t,r){var n=this.vertices,i=this.object.geometry.vertices;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:\"addVertexPoint\",value:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])}},{key:\"addVertexLine\",value:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])}},{key:\"addNormal\",value:function(e,t,r){var n=this.normals,i=this.object.geometry.normals;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:\"addColor\",value:function(e,t,r){var n=this.colors,i=this.object.geometry.colors;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:\"addUV\",value:function(e,t,r){var n=this.uvs,i=this.object.geometry.uvs;i.push(n[e+0],n[e+1]),i.push(n[t+0],n[t+1]),i.push(n[r+0],n[r+1])}},{key:\"addUVLine\",value:function(e){var t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])}},{key:\"addFace\",value:function(e,t,r,n,i,a,o,s,l){var u=this.vertices.length,h=this.parseVertexIndex(e,u),c=this.parseVertexIndex(t,u),f=this.parseVertexIndex(r,u);if(this.addVertex(h,c,f),void 0!==n&&\"\"!==n){var v=this.uvs.length;h=this.parseUVIndex(n,v),c=this.parseUVIndex(i,v),f=this.parseUVIndex(a,v),this.addUV(h,c,f)}if(void 0!==o&&\"\"!==o){var d=this.normals.length;h=this.parseNormalIndex(o,d),c=o===s?h:this.parseNormalIndex(s,d),f=o===l?h:this.parseNormalIndex(l,d),this.addNormal(h,c,f)}this.colors.length>0&&this.addColor(h,c,f)}},{key:\"addPointGeometry\",value:function(e){this.object.geometry.type=\"Points\";var t=this.vertices.length,r=!0,n=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value;this.addVertexPoint(this.parseVertexIndex(s,t))}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}}},{key:\"addLineGeometry\",value:function(e,t){this.object.geometry.type=\"Line\";var r=this.vertices.length,n=this.uvs.length,i=!0,a=!1,o=void 0;try{for(var s,l=e[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var u=s.value;this.addVertexLine(this.parseVertexIndex(u,r))}}catch(e){a=!0,o=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw o}}var h=!0,c=!1,f=void 0;try{for(var v,d=t[Symbol.iterator]();!(h=(v=d.next()).done);h=!0){var p=v.value;this.addUVLine(this.parseUVIndex(p,n))}}catch(e){c=!0,f=e}finally{try{h||null==d.return||d.return()}finally{if(c)throw f}}}}]),e}(),v=function(e){var t=new f;-1!==e.indexOf(\"\\r\\n\")&&(e=e.replace(/\\r\\n/g,\"\\n\")),-1!==e.indexOf(\"\\\\\\n\")&&(e=e.replace(/\\\\\\n/g,\"\"));for(var r=e.split(\"\\n\"),n=\"\",i=\"\",a=[],o=\"function\"==typeof\"\".trimLeft,h=0,c=r.length;h<c;h++)if(n=r[h],0!==(n=o?n.trimLeft():n.trim()).length&&\"#\"!==(i=n.charAt(0)))if(\"v\"===i){var v=n.split(/\\s+/);switch(v[0]){case\"v\":t.vertices.push(parseFloat(v[1]),parseFloat(v[2]),parseFloat(v[3])),8===v.length&&t.colors.push(parseFloat(v[4]),parseFloat(v[5]),parseFloat(v[6]));break;case\"vn\":t.normals.push(parseFloat(v[1]),parseFloat(v[2]),parseFloat(v[3]));break;case\"vt\":t.uvs.push(parseFloat(v[1]),parseFloat(v[2]))}}else if(\"f\"===i){for(var d=n.substr(1).trim().split(/\\s+/),p=[],m=0,y=d.length;m<y;m++){var b=d[m];if(b.length>0){var g=b.split(\"/\");p.push(g)}}for(var x=p[0],j=1,O=p.length-1;j<O;j++){var S=p[j],w=p[j+1];t.addFace(x[0],S[0],w[0],x[1],S[1],w[1],x[2],S[2],w[2])}}else if(\"l\"===i){var k=n.substring(1).trim().split(\" \"),I=void 0,F=[];if(-1===n.indexOf(\"/\"))I=k;else{I=[];for(var V=0,L=k.length;V<L;V++){var C=k[V].split(\"/\");\"\"!==C[0]&&I.push(C[0]),\"\"!==C[1]&&F.push(C[1])}}t.addLineGeometry(I,F)}else if(\"p\"===i){var _=n.substr(1).trim().split(\" \");t.addPointGeometry(_)}else if(null!==(a=s.exec(n))){var A=(\" \"+a[0].substr(1).trim()).substr(1);t.startObject(A)}else if(u.test(n))t.object.startMaterial(n.substring(7).trim(),t.materialLibraries);else if(l.test(n))t.materialLibraries.push(n.substring(7).trim());else{if(\"s\"!==i){if(\"\\0\"===n)continue;throw new Error('Unexpected line: \"'.concat(n,'\"'))}if((a=n.split(\" \")).length>1){var z=a[1].trim().toLowerCase();t.object.smooth=\"0\"!==z&&\"off\"!==z}else t.object.smooth=!0;var M=t.object.currentMaterial();M&&(M.smooth=t.object.smooth)}t.finalize();var P=[],T=[],N=!0,E=!1,U=void 0;try{for(var R,D=t.objects[Symbol.iterator]();!(N=(R=D.next()).done);N=!0){var G=R.value,B=G.geometry;if(0!==B.vertices.length){var X={header:{vertexCount:B.vertices.length/3},attributes:{}};switch(B.type){case\"Points\":X.mode=0;break;case\"Line\":X.mode=1;break;default:X.mode=4}X.attributes.POSITION={value:new Float32Array(B.vertices),size:3},B.normals.length>0&&(X.attributes.NORMAL={value:new Float32Array(B.normals),size:3}),B.colors.length>0&&(X.attributes.COLOR_0={value:new Float32Array(B.colors),size:3}),B.uvs.length>0&&(X.attributes.TEXCOORD_0={value:new Float32Array(B.uvs),size:2}),X.materials=[];var J=!0,q=!1,H=void 0;try{for(var K,Q=G.materials[Symbol.iterator]();!(J=(K=Q.next()).done);J=!0){var W=K.value,Y={name:W.name,flatShading:!W.smooth};X.materials.push(Y),T.push(Y)}}catch(e){q=!0,H=e}finally{try{J||null==Q.return||Q.return()}finally{if(q)throw H}}X.name=G.name,P.push(X)}}}catch(e){E=!0,U=e}finally{try{N||null==D.return||D.return()}finally{if(E)throw U}}return{meshes:P,materials:T}};function d(e,t){var r,n,i,a=new Float32Array(3*t),o=0,s=!0,l=!1,u=void 0;try{for(var h,c=e[Symbol.iterator]();!(s=(h=c.next()).done);s=!0){var f=h.value.attributes,v=f.POSITION,d=f.NORMAL,p=f.COLOR_0,m=f.TEXCOORD_0;a.set(v.value,3*o),d&&(r=r||new Float32Array(3*t)).set(d.value,3*o),p&&(n=n||new Float32Array(3*t)).set(p.value,3*o),m&&(i=i||new Float32Array(2*t)).set(m.value,2*o),o+=v.value.length/3}}catch(e){l=!0,u=e}finally{try{s||null==c.return||c.return()}finally{if(l)throw u}}var y={};return y.POSITION={value:a,size:3},r&&(y.NORMAL={value:r,size:3}),n&&(y.COLOR_0={value:n,size:3}),i&&(y.TEXCOORD_0={value:i,size:2}),y}var p,m={name:\"OBJ\",extensions:[\"obj\"],testText:function(e){return\"v\"===e[0]},parseTextSync:function(e){var t=v(e).meshes,r=t.reduce(function(e,t){return e+t.header.vertexCount},0);return{loaderData:{header:{}},header:{vertexCount:r},mode:4,attributes:d(t,r)}}},y=r(2),b=r.n(y);p=m,\"undefined\"!=typeof self&&(self.onmessage=function(e){var t=e.data,r=t.arraybuffer,n=t.opts;try{var i,a;if(p.parseSync)i=r,a=p.parseSync;else{if(!p.parseTextSync)throw new Error(\"Could not load data with \".concat(p.name,\" loader\"));i=(new TextDecoder).decode(r),a=p.parseTextSync}var o=a(i,n),s=function e(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,i=n||new Set;if(t)if(t instanceof ArrayBuffer)i.add(t);else if(t.buffer&&t.buffer instanceof ArrayBuffer)i.add(t.buffer);else if(r&&\"object\"===b()(t))for(var a in t)e(t[a],r,i);return void 0===n?Array.from(i):null}(o);self.postMessage({type:\"done\",result:o},s)}catch(e){self.postMessage({type:\"error\",message:e.message})}})}]);";
var worker = "!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"\",r(r.s=3)}([function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}},function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}},function(e,t){function r(e){return(r=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function n(t){return\"function\"==typeof Symbol&&\"symbol\"===r(Symbol.iterator)?e.exports=n=function(e){return r(e)}:e.exports=n=function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":r(e)},n(t)}e.exports=n},function(e,t,r){\"use strict\";r.r(t);var n=r(0),i=r.n(n),a=r(1),o=r.n(a),s=/^[og]\\s*(.+)?/,l=/^mtllib /,u=/^usemtl /,h=function(){function e(t){var r=t.index,n=t.name,a=void 0===n?\"\":n,o=t.mtllib,s=t.smooth,l=t.groupStart;i()(this,e),this.index=r,this.name=a,this.mtllib=o,this.smooth=s,this.groupStart=l,this.groupEnd=-1,this.groupCount=-1,this.inherited=!1}return o()(e,[{key:\"clone\",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.index;return new e({index:t,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0})}}]),e}(),c=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\";i()(this,e),this.name=t,this.geometry={vertices:[],normals:[],colors:[],uvs:[]},this.materials=[],this.smooth=!0}return o()(e,[{key:\"startMaterial\",value:function(e,t){var r=this._finalize(!1);r&&(r.inherited||r.groupCount<=0)&&this.materials.splice(r.index,1);var n=new h({index:this.materials.length,name:e,mtllib:Array.isArray(t)&&t.length>0?t[t.length-1]:\"\",smooth:void 0!==r?r.smooth:this.smooth,groupStart:void 0!==r?r.groupEnd:0});return this.materials.push(n),n}},{key:\"currentMaterial\",value:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]}},{key:\"_finalize\",value:function(e){var t=this.currentMaterial();if(t&&-1===t.groupEnd&&(t.groupEnd=this.geometry.vertices.length/3,t.groupCount=t.groupEnd-t.groupStart,t.inherited=!1),e&&this.materials.length>1)for(var r=this.materials.length-1;r>=0;r--)this.materials[r].groupCount<=0&&this.materials.splice(r,1);return e&&0===this.materials.length&&this.materials.push({name:\"\",smooth:this.smooth}),t}}]),e}(),f=function(){function e(){i()(this,e),this.objects=[],this.object=null,this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.materialLibraries=[],this.startObject(\"\",!1)}return o()(e,[{key:\"startObject\",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.object&&!this.object.fromDeclaration)return this.object.name=e,void(this.object.fromDeclaration=t);var r=this.object&&\"function\"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&\"function\"==typeof this.object._finalize&&this.object._finalize(!0),this.object=new c(e),this.object.fromDeclaration=t,r&&r.name&&\"function\"==typeof r.clone){var n=r.clone(0);n.inherited=!0,this.object.materials.push(n)}this.objects.push(this.object)}},{key:\"finalize\",value:function(){this.object&&\"function\"==typeof this.object._finalize&&this.object._finalize(!0)}},{key:\"parseVertexIndex\",value:function(e,t){var r=parseInt(e,10);return 3*(r>=0?r-1:r+t/3)}},{key:\"parseNormalIndex\",value:function(e,t){var r=parseInt(e,10);return 3*(r>=0?r-1:r+t/3)}},{key:\"parseUVIndex\",value:function(e,t){var r=parseInt(e,10);return 2*(r>=0?r-1:r+t/2)}},{key:\"addVertex\",value:function(e,t,r){var n=this.vertices,i=this.object.geometry.vertices;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:\"addVertexPoint\",value:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])}},{key:\"addVertexLine\",value:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])}},{key:\"addNormal\",value:function(e,t,r){var n=this.normals,i=this.object.geometry.normals;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:\"addColor\",value:function(e,t,r){var n=this.colors,i=this.object.geometry.colors;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:\"addUV\",value:function(e,t,r){var n=this.uvs,i=this.object.geometry.uvs;i.push(n[e+0],n[e+1]),i.push(n[t+0],n[t+1]),i.push(n[r+0],n[r+1])}},{key:\"addUVLine\",value:function(e){var t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])}},{key:\"addFace\",value:function(e,t,r,n,i,a,o,s,l){var u=this.vertices.length,h=this.parseVertexIndex(e,u),c=this.parseVertexIndex(t,u),f=this.parseVertexIndex(r,u);if(this.addVertex(h,c,f),void 0!==n&&\"\"!==n){var v=this.uvs.length;h=this.parseUVIndex(n,v),c=this.parseUVIndex(i,v),f=this.parseUVIndex(a,v),this.addUV(h,c,f)}if(void 0!==o&&\"\"!==o){var d=this.normals.length;h=this.parseNormalIndex(o,d),c=o===s?h:this.parseNormalIndex(s,d),f=o===l?h:this.parseNormalIndex(l,d),this.addNormal(h,c,f)}this.colors.length>0&&this.addColor(h,c,f)}},{key:\"addPointGeometry\",value:function(e){this.object.geometry.type=\"Points\";var t=this.vertices.length,r=!0,n=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value;this.addVertexPoint(this.parseVertexIndex(s,t))}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}}},{key:\"addLineGeometry\",value:function(e,t){this.object.geometry.type=\"Line\";var r=this.vertices.length,n=this.uvs.length,i=!0,a=!1,o=void 0;try{for(var s,l=e[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var u=s.value;this.addVertexLine(this.parseVertexIndex(u,r))}}catch(e){a=!0,o=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw o}}var h=!0,c=!1,f=void 0;try{for(var v,d=t[Symbol.iterator]();!(h=(v=d.next()).done);h=!0){var p=v.value;this.addUVLine(this.parseUVIndex(p,n))}}catch(e){c=!0,f=e}finally{try{h||null==d.return||d.return()}finally{if(c)throw f}}}}]),e}(),v=function(e){var t=new f;-1!==e.indexOf(\"\\r\\n\")&&(e=e.replace(/\\r\\n/g,\"\\n\")),-1!==e.indexOf(\"\\\\\\n\")&&(e=e.replace(/\\\\\\n/g,\"\"));for(var r=e.split(\"\\n\"),n=\"\",i=\"\",a=[],o=\"function\"==typeof\"\".trimLeft,h=0,c=r.length;h<c;h++)if(n=r[h],0!==(n=o?n.trimLeft():n.trim()).length&&\"#\"!==(i=n.charAt(0)))if(\"v\"===i){var v=n.split(/\\s+/);switch(v[0]){case\"v\":t.vertices.push(parseFloat(v[1]),parseFloat(v[2]),parseFloat(v[3])),8===v.length&&t.colors.push(parseFloat(v[4]),parseFloat(v[5]),parseFloat(v[6]));break;case\"vn\":t.normals.push(parseFloat(v[1]),parseFloat(v[2]),parseFloat(v[3]));break;case\"vt\":t.uvs.push(parseFloat(v[1]),parseFloat(v[2]))}}else if(\"f\"===i){for(var d=n.substr(1).trim().split(/\\s+/),p=[],m=0,y=d.length;m<y;m++){var b=d[m];if(b.length>0){var g=b.split(\"/\");p.push(g)}}for(var x=p[0],j=1,O=p.length-1;j<O;j++){var S=p[j],w=p[j+1];t.addFace(x[0],S[0],w[0],x[1],S[1],w[1],x[2],S[2],w[2])}}else if(\"l\"===i){var k=n.substring(1).trim().split(\" \"),I=void 0,F=[];if(-1===n.indexOf(\"/\"))I=k;else{I=[];for(var V=0,L=k.length;V<L;V++){var C=k[V].split(\"/\");\"\"!==C[0]&&I.push(C[0]),\"\"!==C[1]&&F.push(C[1])}}t.addLineGeometry(I,F)}else if(\"p\"===i){var _=n.substr(1).trim().split(\" \");t.addPointGeometry(_)}else if(null!==(a=s.exec(n))){var A=(\" \"+a[0].substr(1).trim()).substr(1);t.startObject(A)}else if(u.test(n))t.object.startMaterial(n.substring(7).trim(),t.materialLibraries);else if(l.test(n))t.materialLibraries.push(n.substring(7).trim());else{if(\"s\"!==i){if(\"\\0\"===n)continue;throw new Error('Unexpected line: \"'.concat(n,'\"'))}if((a=n.split(\" \")).length>1){var z=a[1].trim().toLowerCase();t.object.smooth=\"0\"!==z&&\"off\"!==z}else t.object.smooth=!0;var M=t.object.currentMaterial();M&&(M.smooth=t.object.smooth)}t.finalize();var P=[],T=[],N=!0,E=!1,U=void 0;try{for(var R,D=t.objects[Symbol.iterator]();!(N=(R=D.next()).done);N=!0){var G=R.value,B=G.geometry;if(0!==B.vertices.length){var X={header:{vertexCount:B.vertices.length/3},attributes:{}};switch(B.type){case\"Points\":X.mode=0;break;case\"Line\":X.mode=1;break;default:X.mode=4}X.attributes.POSITION={value:new Float32Array(B.vertices),size:3},B.normals.length>0&&(X.attributes.NORMAL={value:new Float32Array(B.normals),size:3}),B.colors.length>0&&(X.attributes.COLOR_0={value:new Float32Array(B.colors),size:3}),B.uvs.length>0&&(X.attributes.TEXCOORD_0={value:new Float32Array(B.uvs),size:2}),X.materials=[];var J=!0,q=!1,H=void 0;try{for(var K,Q=G.materials[Symbol.iterator]();!(J=(K=Q.next()).done);J=!0){var W=K.value,Y={name:W.name,flatShading:!W.smooth};X.materials.push(Y),T.push(Y)}}catch(e){q=!0,H=e}finally{try{J||null==Q.return||Q.return()}finally{if(q)throw H}}X.name=G.name,P.push(X)}}}catch(e){E=!0,U=e}finally{try{N||null==D.return||D.return()}finally{if(E)throw U}}return{meshes:P,materials:T}};function d(e,t){var r,n,i,a=new Float32Array(3*t),o=0,s=!0,l=!1,u=void 0;try{for(var h,c=e[Symbol.iterator]();!(s=(h=c.next()).done);s=!0){var f=h.value.attributes,v=f.POSITION,d=f.NORMAL,p=f.COLOR_0,m=f.TEXCOORD_0;a.set(v.value,3*o),d&&(r=r||new Float32Array(3*t)).set(d.value,3*o),p&&(n=n||new Float32Array(3*t)).set(p.value,3*o),m&&(i=i||new Float32Array(2*t)).set(m.value,2*o),o+=v.value.length/3}}catch(e){l=!0,u=e}finally{try{s||null==c.return||c.return()}finally{if(l)throw u}}var y={};return y.POSITION={value:a,size:3},r&&(y.NORMAL={value:r,size:3}),n&&(y.COLOR_0={value:n,size:3}),i&&(y.TEXCOORD_0={value:i,size:2}),y}var p,m={name:\"OBJ\",extensions:[\"obj\"],testText:function(e){return\"v\"===e[0]},parseTextSync:function(e){var t=v(e).meshes,r=t.reduce(function(e,t){return e+t.header.vertexCount},0);return{loaderData:{header:{}},header:{vertexCount:r},mode:4,attributes:d(t,r)}}},y=r(2),b=r.n(y);p=m,\"undefined\"!=typeof self&&(self.onmessage=function(e){var t=e.data,r=t.arraybuffer,n=t.opts;try{var i,a;if(p.parseSync)i=r,a=p.parseSync;else{if(!p.parseTextSync)throw new Error(\"Could not load data with \".concat(p.name,\" loader\"));i=(new TextDecoder).decode(r),a=p.parseTextSync}var o=a(i,n),s=function e(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,i=n||new Set;if(t)if(t instanceof ArrayBuffer)i.add(t);else if(t.buffer&&t.buffer instanceof ArrayBuffer)i.add(t.buffer);else if(r&&\"object\"===b()(t))for(var a in t)e(t[a],r,i);return void 0===n?Array.from(i):null}(o);self.postMessage({type:\"done\",result:o},s)}catch(e){self.postMessage({type:\"error\",message:e.message})}})}]);";
var _default = {

@@ -10,0 +10,0 @@ name: 'OBJ',

@@ -1,4 +0,4 @@

const moduleExports = require('./index');
var moduleExports = require('./index');
const _global = typeof window === 'undefined' ? global : window;
var _global = typeof window === 'undefined' ? global : window;

@@ -5,0 +5,0 @@ _global.loaders = _global.loaders || {};

import parseOBJ from './parse-obj';
export default function loadOBJ(text) {
const {
var {
meshes
} = parseOBJ(text);
const vertexCount = meshes.reduce((s, mesh) => s + mesh.header.vertexCount, 0);
var vertexCount = meshes.reduce((s, mesh) => s + mesh.header.vertexCount, 0);
return {

@@ -20,10 +20,10 @@ loaderData: {

function mergeAttributes(meshes, vertexCount) {
const positions = new Float32Array(vertexCount * 3);
let normals;
let colors;
let uvs;
let i = 0;
var positions = new Float32Array(vertexCount * 3);
var normals;
var colors;
var uvs;
var i = 0;
for (const mesh of meshes) {
const {
for (var mesh of meshes) {
var {
POSITION,

@@ -54,3 +54,3 @@ NORMAL,

const attributes = {};
var attributes = {};
attributes.POSITION = {

@@ -57,0 +57,0 @@ value: positions,

@@ -1,2 +0,2 @@

const worker = "!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"\",r(r.s=3)}([function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}},function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}},function(e,t){function r(e){return(r=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function n(t){return\"function\"==typeof Symbol&&\"symbol\"===r(Symbol.iterator)?e.exports=n=function(e){return r(e)}:e.exports=n=function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":r(e)},n(t)}e.exports=n},function(e,t,r){\"use strict\";r.r(t);var n=r(0),i=r.n(n),a=r(1),o=r.n(a),s=/^[og]\\s*(.+)?/,l=/^mtllib /,u=/^usemtl /,h=function(){function e(t){var r=t.index,n=t.name,a=void 0===n?\"\":n,o=t.mtllib,s=t.smooth,l=t.groupStart;i()(this,e),this.index=r,this.name=a,this.mtllib=o,this.smooth=s,this.groupStart=l,this.groupEnd=-1,this.groupCount=-1,this.inherited=!1}return o()(e,[{key:\"clone\",value:function(){return new e({index:arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0})}}]),e}(),c=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\";i()(this,e),this.name=t,this.geometry={vertices:[],normals:[],colors:[],uvs:[]},this.materials=[],this.smooth=!0}return o()(e,[{key:\"startMaterial\",value:function(e,t){var r=this._finalize(!1);r&&(r.inherited||r.groupCount<=0)&&this.materials.splice(r.index,1);var n=new h({index:this.materials.length,name:e,mtllib:Array.isArray(t)&&t.length>0?t[t.length-1]:\"\",smooth:void 0!==r?r.smooth:this.smooth,groupStart:void 0!==r?r.groupEnd:0});return this.materials.push(n),n}},{key:\"currentMaterial\",value:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]}},{key:\"_finalize\",value:function(e){var t=this.currentMaterial();if(t&&-1===t.groupEnd&&(t.groupEnd=this.geometry.vertices.length/3,t.groupCount=t.groupEnd-t.groupStart,t.inherited=!1),e&&this.materials.length>1)for(var r=this.materials.length-1;r>=0;r--)this.materials[r].groupCount<=0&&this.materials.splice(r,1);return e&&0===this.materials.length&&this.materials.push({name:\"\",smooth:this.smooth}),t}}]),e}(),f=function(){function e(){i()(this,e),this.objects=[],this.object=null,this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.materialLibraries=[],this.startObject(\"\",!1)}return o()(e,[{key:\"startObject\",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.object&&!this.object.fromDeclaration)return this.object.name=e,void(this.object.fromDeclaration=t);var r=this.object&&\"function\"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&\"function\"==typeof this.object._finalize&&this.object._finalize(!0),this.object=new c(e),this.object.fromDeclaration=t,r&&r.name&&\"function\"==typeof r.clone){var n=r.clone(0);n.inherited=!0,this.object.materials.push(n)}this.objects.push(this.object)}},{key:\"finalize\",value:function(){this.object&&\"function\"==typeof this.object._finalize&&this.object._finalize(!0)}},{key:\"parseVertexIndex\",value:function(e,t){var r=parseInt(e,10);return 3*(r>=0?r-1:r+t/3)}},{key:\"parseNormalIndex\",value:function(e,t){var r=parseInt(e,10);return 3*(r>=0?r-1:r+t/3)}},{key:\"parseUVIndex\",value:function(e,t){var r=parseInt(e,10);return 2*(r>=0?r-1:r+t/2)}},{key:\"addVertex\",value:function(e,t,r){var n=this.vertices,i=this.object.geometry.vertices;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:\"addVertexPoint\",value:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])}},{key:\"addVertexLine\",value:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])}},{key:\"addNormal\",value:function(e,t,r){var n=this.normals,i=this.object.geometry.normals;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:\"addColor\",value:function(e,t,r){var n=this.colors,i=this.object.geometry.colors;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:\"addUV\",value:function(e,t,r){var n=this.uvs,i=this.object.geometry.uvs;i.push(n[e+0],n[e+1]),i.push(n[t+0],n[t+1]),i.push(n[r+0],n[r+1])}},{key:\"addUVLine\",value:function(e){var t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])}},{key:\"addFace\",value:function(e,t,r,n,i,a,o,s,l){var u=this.vertices.length,h=this.parseVertexIndex(e,u),c=this.parseVertexIndex(t,u),f=this.parseVertexIndex(r,u);if(this.addVertex(h,c,f),void 0!==n&&\"\"!==n){var v=this.uvs.length;h=this.parseUVIndex(n,v),c=this.parseUVIndex(i,v),f=this.parseUVIndex(a,v),this.addUV(h,c,f)}if(void 0!==o&&\"\"!==o){var d=this.normals.length;h=this.parseNormalIndex(o,d),c=o===s?h:this.parseNormalIndex(s,d),f=o===l?h:this.parseNormalIndex(l,d),this.addNormal(h,c,f)}this.colors.length>0&&this.addColor(h,c,f)}},{key:\"addPointGeometry\",value:function(e){this.object.geometry.type=\"Points\";var t=this.vertices.length,r=!0,n=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value;this.addVertexPoint(this.parseVertexIndex(s,t))}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}}},{key:\"addLineGeometry\",value:function(e,t){this.object.geometry.type=\"Line\";var r=this.vertices.length,n=this.uvs.length,i=!0,a=!1,o=void 0;try{for(var s,l=e[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var u=s.value;this.addVertexLine(this.parseVertexIndex(u,r))}}catch(e){a=!0,o=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw o}}var h=!0,c=!1,f=void 0;try{for(var v,d=t[Symbol.iterator]();!(h=(v=d.next()).done);h=!0){var p=v.value;this.addUVLine(this.parseUVIndex(p,n))}}catch(e){c=!0,f=e}finally{try{h||null==d.return||d.return()}finally{if(c)throw f}}}}]),e}(),v=function(e){var t=new f;-1!==e.indexOf(\"\\r\\n\")&&(e=e.replace(/\\r\\n/g,\"\\n\")),-1!==e.indexOf(\"\\\\\\n\")&&(e=e.replace(/\\\\\\n/g,\"\"));for(var r=e.split(\"\\n\"),n=\"\",i=\"\",a=[],o=\"function\"==typeof\"\".trimLeft,h=0,c=r.length;h<c;h++)if(n=r[h],0!==(n=o?n.trimLeft():n.trim()).length&&\"#\"!==(i=n.charAt(0)))if(\"v\"===i){var v=n.split(/\\s+/);switch(v[0]){case\"v\":t.vertices.push(parseFloat(v[1]),parseFloat(v[2]),parseFloat(v[3])),8===v.length&&t.colors.push(parseFloat(v[4]),parseFloat(v[5]),parseFloat(v[6]));break;case\"vn\":t.normals.push(parseFloat(v[1]),parseFloat(v[2]),parseFloat(v[3]));break;case\"vt\":t.uvs.push(parseFloat(v[1]),parseFloat(v[2]))}}else if(\"f\"===i){for(var d=n.substr(1).trim().split(/\\s+/),p=[],m=0,y=d.length;m<y;m++){var b=d[m];if(b.length>0){var g=b.split(\"/\");p.push(g)}}for(var x=p[0],j=1,O=p.length-1;j<O;j++){var S=p[j],w=p[j+1];t.addFace(x[0],S[0],w[0],x[1],S[1],w[1],x[2],S[2],w[2])}}else if(\"l\"===i){var k=n.substring(1).trim().split(\" \"),I=void 0,F=[];if(-1===n.indexOf(\"/\"))I=k;else{I=[];for(var V=0,L=k.length;V<L;V++){var C=k[V].split(\"/\");\"\"!==C[0]&&I.push(C[0]),\"\"!==C[1]&&F.push(C[1])}}t.addLineGeometry(I,F)}else if(\"p\"===i){var _=n.substr(1).trim().split(\" \");t.addPointGeometry(_)}else if(null!==(a=s.exec(n))){var A=(\" \"+a[0].substr(1).trim()).substr(1);t.startObject(A)}else if(u.test(n))t.object.startMaterial(n.substring(7).trim(),t.materialLibraries);else if(l.test(n))t.materialLibraries.push(n.substring(7).trim());else{if(\"s\"!==i){if(\"\\0\"===n)continue;throw new Error('Unexpected line: \"'.concat(n,'\"'))}if((a=n.split(\" \")).length>1){var z=a[1].trim().toLowerCase();t.object.smooth=\"0\"!==z&&\"off\"!==z}else t.object.smooth=!0;var M=t.object.currentMaterial();M&&(M.smooth=t.object.smooth)}t.finalize();var P=[],T=[],N=!0,E=!1,U=void 0;try{for(var R,D=t.objects[Symbol.iterator]();!(N=(R=D.next()).done);N=!0){var G=R.value,B=G.geometry;if(0!==B.vertices.length){var X={header:{vertexCount:B.vertices.length/3},attributes:{}};switch(B.type){case\"Points\":X.mode=0;break;case\"Line\":X.mode=1;break;default:X.mode=4}X.attributes.POSITION={value:new Float32Array(B.vertices),size:3},B.normals.length>0&&(X.attributes.NORMAL={value:new Float32Array(B.normals),size:3}),B.colors.length>0&&(X.attributes.COLOR_0={value:new Float32Array(B.colors),size:3}),B.uvs.length>0&&(X.attributes.TEXCOORD_0={value:new Float32Array(B.uvs),size:2}),X.materials=[];var J=!0,q=!1,H=void 0;try{for(var K,Q=G.materials[Symbol.iterator]();!(J=(K=Q.next()).done);J=!0){var W=K.value,Y={name:W.name,flatShading:!W.smooth};X.materials.push(Y),T.push(Y)}}catch(e){q=!0,H=e}finally{try{J||null==Q.return||Q.return()}finally{if(q)throw H}}X.name=G.name,P.push(X)}}}catch(e){E=!0,U=e}finally{try{N||null==D.return||D.return()}finally{if(E)throw U}}return{meshes:P,materials:T}};function d(e,t){var r,n,i,a=new Float32Array(3*t),o=0,s=!0,l=!1,u=void 0;try{for(var h,c=e[Symbol.iterator]();!(s=(h=c.next()).done);s=!0){var f=h.value.attributes,v=f.POSITION,d=f.NORMAL,p=f.COLOR_0,m=f.TEXCOORD_0;a.set(v.value,3*o),d&&(r=r||new Float32Array(3*t)).set(d.value,3*o),p&&(n=n||new Float32Array(3*t)).set(p.value,3*o),m&&(i=i||new Float32Array(2*t)).set(m.value,2*o),o+=v.value.length/3}}catch(e){l=!0,u=e}finally{try{s||null==c.return||c.return()}finally{if(l)throw u}}var y={};return y.POSITION={value:a,size:3},r&&(y.NORMAL={value:r,size:3}),n&&(y.COLOR_0={value:n,size:3}),i&&(y.TEXCOORD_0={value:i,size:2}),y}var p,m={name:\"OBJ\",extensions:[\"obj\"],testText:function(e){return\"v\"===e[0]},parseTextSync:function(e){var t=v(e).meshes,r=t.reduce(function(e,t){return e+t.header.vertexCount},0);return{loaderData:{header:{}},header:{vertexCount:r},mode:4,attributes:d(t,r)}}},y=r(2),b=r.n(y);p=m,\"undefined\"!=typeof self&&(self.onmessage=function(e){var t=e.data,r=t.arraybuffer,n=t.opts;try{var i,a;if(p.parseSync)i=r,a=p.parseSync;else{if(!p.parseTextSync)throw new Error(\"Could not load data with \".concat(p.name,\" loader\"));i=(new TextDecoder).decode(r),a=p.parseTextSync}var o=a(i,n),s=function e(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,i=n||new Set;if(t)if(t instanceof ArrayBuffer)i.add(t);else if(t.buffer&&t.buffer instanceof ArrayBuffer)i.add(t.buffer);else if(r&&\"object\"===b()(t))for(var a in t)e(t[a],r,i);return void 0===n?Array.from(i):null}(o);self.postMessage({type:\"done\",result:o},s)}catch(e){self.postMessage({type:\"error\",message:e.message})}})}]);";
var worker = "!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"\",r(r.s=3)}([function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}},function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}},function(e,t){function r(e){return(r=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function n(t){return\"function\"==typeof Symbol&&\"symbol\"===r(Symbol.iterator)?e.exports=n=function(e){return r(e)}:e.exports=n=function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":r(e)},n(t)}e.exports=n},function(e,t,r){\"use strict\";r.r(t);var n=r(0),i=r.n(n),a=r(1),o=r.n(a),s=/^[og]\\s*(.+)?/,l=/^mtllib /,u=/^usemtl /,h=function(){function e(t){var r=t.index,n=t.name,a=void 0===n?\"\":n,o=t.mtllib,s=t.smooth,l=t.groupStart;i()(this,e),this.index=r,this.name=a,this.mtllib=o,this.smooth=s,this.groupStart=l,this.groupEnd=-1,this.groupCount=-1,this.inherited=!1}return o()(e,[{key:\"clone\",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.index;return new e({index:t,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0})}}]),e}(),c=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\";i()(this,e),this.name=t,this.geometry={vertices:[],normals:[],colors:[],uvs:[]},this.materials=[],this.smooth=!0}return o()(e,[{key:\"startMaterial\",value:function(e,t){var r=this._finalize(!1);r&&(r.inherited||r.groupCount<=0)&&this.materials.splice(r.index,1);var n=new h({index:this.materials.length,name:e,mtllib:Array.isArray(t)&&t.length>0?t[t.length-1]:\"\",smooth:void 0!==r?r.smooth:this.smooth,groupStart:void 0!==r?r.groupEnd:0});return this.materials.push(n),n}},{key:\"currentMaterial\",value:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]}},{key:\"_finalize\",value:function(e){var t=this.currentMaterial();if(t&&-1===t.groupEnd&&(t.groupEnd=this.geometry.vertices.length/3,t.groupCount=t.groupEnd-t.groupStart,t.inherited=!1),e&&this.materials.length>1)for(var r=this.materials.length-1;r>=0;r--)this.materials[r].groupCount<=0&&this.materials.splice(r,1);return e&&0===this.materials.length&&this.materials.push({name:\"\",smooth:this.smooth}),t}}]),e}(),f=function(){function e(){i()(this,e),this.objects=[],this.object=null,this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.materialLibraries=[],this.startObject(\"\",!1)}return o()(e,[{key:\"startObject\",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.object&&!this.object.fromDeclaration)return this.object.name=e,void(this.object.fromDeclaration=t);var r=this.object&&\"function\"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&\"function\"==typeof this.object._finalize&&this.object._finalize(!0),this.object=new c(e),this.object.fromDeclaration=t,r&&r.name&&\"function\"==typeof r.clone){var n=r.clone(0);n.inherited=!0,this.object.materials.push(n)}this.objects.push(this.object)}},{key:\"finalize\",value:function(){this.object&&\"function\"==typeof this.object._finalize&&this.object._finalize(!0)}},{key:\"parseVertexIndex\",value:function(e,t){var r=parseInt(e,10);return 3*(r>=0?r-1:r+t/3)}},{key:\"parseNormalIndex\",value:function(e,t){var r=parseInt(e,10);return 3*(r>=0?r-1:r+t/3)}},{key:\"parseUVIndex\",value:function(e,t){var r=parseInt(e,10);return 2*(r>=0?r-1:r+t/2)}},{key:\"addVertex\",value:function(e,t,r){var n=this.vertices,i=this.object.geometry.vertices;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:\"addVertexPoint\",value:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])}},{key:\"addVertexLine\",value:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])}},{key:\"addNormal\",value:function(e,t,r){var n=this.normals,i=this.object.geometry.normals;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:\"addColor\",value:function(e,t,r){var n=this.colors,i=this.object.geometry.colors;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:\"addUV\",value:function(e,t,r){var n=this.uvs,i=this.object.geometry.uvs;i.push(n[e+0],n[e+1]),i.push(n[t+0],n[t+1]),i.push(n[r+0],n[r+1])}},{key:\"addUVLine\",value:function(e){var t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])}},{key:\"addFace\",value:function(e,t,r,n,i,a,o,s,l){var u=this.vertices.length,h=this.parseVertexIndex(e,u),c=this.parseVertexIndex(t,u),f=this.parseVertexIndex(r,u);if(this.addVertex(h,c,f),void 0!==n&&\"\"!==n){var v=this.uvs.length;h=this.parseUVIndex(n,v),c=this.parseUVIndex(i,v),f=this.parseUVIndex(a,v),this.addUV(h,c,f)}if(void 0!==o&&\"\"!==o){var d=this.normals.length;h=this.parseNormalIndex(o,d),c=o===s?h:this.parseNormalIndex(s,d),f=o===l?h:this.parseNormalIndex(l,d),this.addNormal(h,c,f)}this.colors.length>0&&this.addColor(h,c,f)}},{key:\"addPointGeometry\",value:function(e){this.object.geometry.type=\"Points\";var t=this.vertices.length,r=!0,n=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value;this.addVertexPoint(this.parseVertexIndex(s,t))}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}}},{key:\"addLineGeometry\",value:function(e,t){this.object.geometry.type=\"Line\";var r=this.vertices.length,n=this.uvs.length,i=!0,a=!1,o=void 0;try{for(var s,l=e[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var u=s.value;this.addVertexLine(this.parseVertexIndex(u,r))}}catch(e){a=!0,o=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw o}}var h=!0,c=!1,f=void 0;try{for(var v,d=t[Symbol.iterator]();!(h=(v=d.next()).done);h=!0){var p=v.value;this.addUVLine(this.parseUVIndex(p,n))}}catch(e){c=!0,f=e}finally{try{h||null==d.return||d.return()}finally{if(c)throw f}}}}]),e}(),v=function(e){var t=new f;-1!==e.indexOf(\"\\r\\n\")&&(e=e.replace(/\\r\\n/g,\"\\n\")),-1!==e.indexOf(\"\\\\\\n\")&&(e=e.replace(/\\\\\\n/g,\"\"));for(var r=e.split(\"\\n\"),n=\"\",i=\"\",a=[],o=\"function\"==typeof\"\".trimLeft,h=0,c=r.length;h<c;h++)if(n=r[h],0!==(n=o?n.trimLeft():n.trim()).length&&\"#\"!==(i=n.charAt(0)))if(\"v\"===i){var v=n.split(/\\s+/);switch(v[0]){case\"v\":t.vertices.push(parseFloat(v[1]),parseFloat(v[2]),parseFloat(v[3])),8===v.length&&t.colors.push(parseFloat(v[4]),parseFloat(v[5]),parseFloat(v[6]));break;case\"vn\":t.normals.push(parseFloat(v[1]),parseFloat(v[2]),parseFloat(v[3]));break;case\"vt\":t.uvs.push(parseFloat(v[1]),parseFloat(v[2]))}}else if(\"f\"===i){for(var d=n.substr(1).trim().split(/\\s+/),p=[],m=0,y=d.length;m<y;m++){var b=d[m];if(b.length>0){var g=b.split(\"/\");p.push(g)}}for(var x=p[0],j=1,O=p.length-1;j<O;j++){var S=p[j],w=p[j+1];t.addFace(x[0],S[0],w[0],x[1],S[1],w[1],x[2],S[2],w[2])}}else if(\"l\"===i){var k=n.substring(1).trim().split(\" \"),I=void 0,F=[];if(-1===n.indexOf(\"/\"))I=k;else{I=[];for(var V=0,L=k.length;V<L;V++){var C=k[V].split(\"/\");\"\"!==C[0]&&I.push(C[0]),\"\"!==C[1]&&F.push(C[1])}}t.addLineGeometry(I,F)}else if(\"p\"===i){var _=n.substr(1).trim().split(\" \");t.addPointGeometry(_)}else if(null!==(a=s.exec(n))){var A=(\" \"+a[0].substr(1).trim()).substr(1);t.startObject(A)}else if(u.test(n))t.object.startMaterial(n.substring(7).trim(),t.materialLibraries);else if(l.test(n))t.materialLibraries.push(n.substring(7).trim());else{if(\"s\"!==i){if(\"\\0\"===n)continue;throw new Error('Unexpected line: \"'.concat(n,'\"'))}if((a=n.split(\" \")).length>1){var z=a[1].trim().toLowerCase();t.object.smooth=\"0\"!==z&&\"off\"!==z}else t.object.smooth=!0;var M=t.object.currentMaterial();M&&(M.smooth=t.object.smooth)}t.finalize();var P=[],T=[],N=!0,E=!1,U=void 0;try{for(var R,D=t.objects[Symbol.iterator]();!(N=(R=D.next()).done);N=!0){var G=R.value,B=G.geometry;if(0!==B.vertices.length){var X={header:{vertexCount:B.vertices.length/3},attributes:{}};switch(B.type){case\"Points\":X.mode=0;break;case\"Line\":X.mode=1;break;default:X.mode=4}X.attributes.POSITION={value:new Float32Array(B.vertices),size:3},B.normals.length>0&&(X.attributes.NORMAL={value:new Float32Array(B.normals),size:3}),B.colors.length>0&&(X.attributes.COLOR_0={value:new Float32Array(B.colors),size:3}),B.uvs.length>0&&(X.attributes.TEXCOORD_0={value:new Float32Array(B.uvs),size:2}),X.materials=[];var J=!0,q=!1,H=void 0;try{for(var K,Q=G.materials[Symbol.iterator]();!(J=(K=Q.next()).done);J=!0){var W=K.value,Y={name:W.name,flatShading:!W.smooth};X.materials.push(Y),T.push(Y)}}catch(e){q=!0,H=e}finally{try{J||null==Q.return||Q.return()}finally{if(q)throw H}}X.name=G.name,P.push(X)}}}catch(e){E=!0,U=e}finally{try{N||null==D.return||D.return()}finally{if(E)throw U}}return{meshes:P,materials:T}};function d(e,t){var r,n,i,a=new Float32Array(3*t),o=0,s=!0,l=!1,u=void 0;try{for(var h,c=e[Symbol.iterator]();!(s=(h=c.next()).done);s=!0){var f=h.value.attributes,v=f.POSITION,d=f.NORMAL,p=f.COLOR_0,m=f.TEXCOORD_0;a.set(v.value,3*o),d&&(r=r||new Float32Array(3*t)).set(d.value,3*o),p&&(n=n||new Float32Array(3*t)).set(p.value,3*o),m&&(i=i||new Float32Array(2*t)).set(m.value,2*o),o+=v.value.length/3}}catch(e){l=!0,u=e}finally{try{s||null==c.return||c.return()}finally{if(l)throw u}}var y={};return y.POSITION={value:a,size:3},r&&(y.NORMAL={value:r,size:3}),n&&(y.COLOR_0={value:n,size:3}),i&&(y.TEXCOORD_0={value:i,size:2}),y}var p,m={name:\"OBJ\",extensions:[\"obj\"],testText:function(e){return\"v\"===e[0]},parseTextSync:function(e){var t=v(e).meshes,r=t.reduce(function(e,t){return e+t.header.vertexCount},0);return{loaderData:{header:{}},header:{vertexCount:r},mode:4,attributes:d(t,r)}}},y=r(2),b=r.n(y);p=m,\"undefined\"!=typeof self&&(self.onmessage=function(e){var t=e.data,r=t.arraybuffer,n=t.opts;try{var i,a;if(p.parseSync)i=r,a=p.parseSync;else{if(!p.parseTextSync)throw new Error(\"Could not load data with \".concat(p.name,\" loader\"));i=(new TextDecoder).decode(r),a=p.parseTextSync}var o=a(i,n),s=function e(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,i=n||new Set;if(t)if(t instanceof ArrayBuffer)i.add(t);else if(t.buffer&&t.buffer instanceof ArrayBuffer)i.add(t.buffer);else if(r&&\"object\"===b()(t))for(var a in t)e(t[a],r,i);return void 0===n?Array.from(i):null}(o);self.postMessage({type:\"done\",result:o},s)}catch(e){self.postMessage({type:\"error\",message:e.message})}})}]);";
export default {

@@ -3,0 +3,0 @@ name: 'OBJ',

@@ -1,8 +0,8 @@

const OBJECT_RE = /^[og]\s*(.+)?/;
const MATERIAL_RE = /^mtllib /;
const MATERIAL_USE_RE = /^usemtl /;
var OBJECT_RE = /^[og]\s*(.+)?/;
var MATERIAL_RE = /^mtllib /;
var MATERIAL_USE_RE = /^usemtl /;
class MeshMaterial {
constructor(_ref) {
let {
var {
index,

@@ -25,3 +25,3 @@ name = '',

clone() {
let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.index;
var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.index;
return new MeshMaterial({

@@ -40,3 +40,3 @@ index,

constructor() {
let name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
this.name = name;

@@ -54,3 +54,3 @@ this.geometry = {

startMaterial(name, libraries) {
const previous = this._finalize(false);
var previous = this._finalize(false);

@@ -61,3 +61,3 @@ if (previous && (previous.inherited || previous.groupCount <= 0)) {

const material = new MeshMaterial({
var material = new MeshMaterial({
index: this.materials.length,

@@ -82,3 +82,3 @@ name,

_finalize(end) {
const lastMultiMaterial = this.currentMaterial();
var lastMultiMaterial = this.currentMaterial();

@@ -92,3 +92,3 @@ if (lastMultiMaterial && lastMultiMaterial.groupEnd === -1) {

if (end && this.materials.length > 1) {
for (let mi = this.materials.length - 1; mi >= 0; mi--) {
for (var mi = this.materials.length - 1; mi >= 0; mi--) {
if (this.materials[mi].groupCount <= 0) {

@@ -125,3 +125,3 @@ this.materials.splice(mi, 1);

startObject(name) {
let fromDeclaration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
var fromDeclaration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;

@@ -134,3 +134,3 @@ if (this.object && !this.object.fromDeclaration) {

const previousMaterial = this.object && typeof this.object.currentMaterial === 'function' ? this.object.currentMaterial() : undefined;
var previousMaterial = this.object && typeof this.object.currentMaterial === 'function' ? this.object.currentMaterial() : undefined;

@@ -145,3 +145,3 @@ if (this.object && typeof this.object._finalize === 'function') {

if (previousMaterial && previousMaterial.name && typeof previousMaterial.clone === 'function') {
const declared = previousMaterial.clone(0);
var declared = previousMaterial.clone(0);
declared.inherited = true;

@@ -161,3 +161,3 @@ this.object.materials.push(declared);

parseVertexIndex(value, len) {
const index = parseInt(value, 10);
var index = parseInt(value, 10);
return (index >= 0 ? index - 1 : index + len / 3) * 3;

@@ -167,3 +167,3 @@ }

parseNormalIndex(value, len) {
const index = parseInt(value, 10);
var index = parseInt(value, 10);
return (index >= 0 ? index - 1 : index + len / 3) * 3;

@@ -173,3 +173,3 @@ }

parseUVIndex(value, len) {
const index = parseInt(value, 10);
var index = parseInt(value, 10);
return (index >= 0 ? index - 1 : index + len / 2) * 2;

@@ -179,4 +179,4 @@ }

addVertex(a, b, c) {
const src = this.vertices;
const dst = this.object.geometry.vertices;
var src = this.vertices;
var dst = this.object.geometry.vertices;
dst.push(src[a + 0], src[a + 1], src[a + 2]);

@@ -188,4 +188,4 @@ dst.push(src[b + 0], src[b + 1], src[b + 2]);

addVertexPoint(a) {
const src = this.vertices;
const dst = this.object.geometry.vertices;
var src = this.vertices;
var dst = this.object.geometry.vertices;
dst.push(src[a + 0], src[a + 1], src[a + 2]);

@@ -195,4 +195,4 @@ }

addVertexLine(a) {
const src = this.vertices;
const dst = this.object.geometry.vertices;
var src = this.vertices;
var dst = this.object.geometry.vertices;
dst.push(src[a + 0], src[a + 1], src[a + 2]);

@@ -202,4 +202,4 @@ }

addNormal(a, b, c) {
const src = this.normals;
const dst = this.object.geometry.normals;
var src = this.normals;
var dst = this.object.geometry.normals;
dst.push(src[a + 0], src[a + 1], src[a + 2]);

@@ -211,4 +211,4 @@ dst.push(src[b + 0], src[b + 1], src[b + 2]);

addColor(a, b, c) {
const src = this.colors;
const dst = this.object.geometry.colors;
var src = this.colors;
var dst = this.object.geometry.colors;
dst.push(src[a + 0], src[a + 1], src[a + 2]);

@@ -220,4 +220,4 @@ dst.push(src[b + 0], src[b + 1], src[b + 2]);

addUV(a, b, c) {
const src = this.uvs;
const dst = this.object.geometry.uvs;
var src = this.uvs;
var dst = this.object.geometry.uvs;
dst.push(src[a + 0], src[a + 1]);

@@ -229,4 +229,4 @@ dst.push(src[b + 0], src[b + 1]);

addUVLine(a) {
const src = this.uvs;
const dst = this.object.geometry.uvs;
var src = this.uvs;
var dst = this.object.geometry.uvs;
dst.push(src[a + 0], src[a + 1]);

@@ -236,10 +236,10 @@ }

addFace(a, b, c, ua, ub, uc, na, nb, nc) {
const vLen = this.vertices.length;
let ia = this.parseVertexIndex(a, vLen);
let ib = this.parseVertexIndex(b, vLen);
let ic = this.parseVertexIndex(c, vLen);
var vLen = this.vertices.length;
var ia = this.parseVertexIndex(a, vLen);
var ib = this.parseVertexIndex(b, vLen);
var ic = this.parseVertexIndex(c, vLen);
this.addVertex(ia, ib, ic);
if (ua !== undefined && ua !== '') {
const uvLen = this.uvs.length;
var uvLen = this.uvs.length;
ia = this.parseUVIndex(ua, uvLen);

@@ -252,3 +252,3 @@ ib = this.parseUVIndex(ub, uvLen);

if (na !== undefined && na !== '') {
const nLen = this.normals.length;
var nLen = this.normals.length;
ia = this.parseNormalIndex(na, nLen);

@@ -267,5 +267,5 @@ ib = na === nb ? ia : this.parseNormalIndex(nb, nLen);

this.object.geometry.type = 'Points';
const vLen = this.vertices.length;
var vLen = this.vertices.length;
for (const vertex of vertices) {
for (var vertex of vertices) {
this.addVertexPoint(this.parseVertexIndex(vertex, vLen));

@@ -277,10 +277,10 @@ }

this.object.geometry.type = 'Line';
const vLen = this.vertices.length;
const uvLen = this.uvs.length;
var vLen = this.vertices.length;
var uvLen = this.uvs.length;
for (const vertex of vertices) {
for (var vertex of vertices) {
this.addVertexLine(this.parseVertexIndex(vertex, vLen));
}
for (const uv of uvs) {
for (var uv of uvs) {
this.addUVLine(this.parseUVIndex(uv, uvLen));

@@ -293,3 +293,3 @@ }

export default (text => {
const state = new ParserState();
var state = new ParserState();

@@ -304,10 +304,10 @@ if (text.indexOf('\r\n') !== -1) {

const lines = text.split('\n');
let line = '';
let lineFirstChar = '';
let lineLength = 0;
let result = [];
const trimLeft = typeof ''.trimLeft === 'function';
var lines = text.split('\n');
var line = '';
var lineFirstChar = '';
var lineLength = 0;
var result = [];
var trimLeft = typeof ''.trimLeft === 'function';
for (let i = 0, l = lines.length; i < l; i++) {
for (var i = 0, l = lines.length; i < l; i++) {
line = lines[i];

@@ -321,3 +321,3 @@ line = trimLeft ? line.trimLeft() : line.trim();

if (lineFirstChar === 'v') {
const data = line.split(/\s+/);
var data = line.split(/\s+/);

@@ -345,11 +345,11 @@ switch (data[0]) {

} else if (lineFirstChar === 'f') {
const lineData = line.substr(1).trim();
const vertexData = lineData.split(/\s+/);
const faceVertices = [];
var lineData = line.substr(1).trim();
var vertexData = lineData.split(/\s+/);
var faceVertices = [];
for (let j = 0, jl = vertexData.length; j < jl; j++) {
const vertex = vertexData[j];
for (var j = 0, jl = vertexData.length; j < jl; j++) {
var vertex = vertexData[j];
if (vertex.length > 0) {
const vertexParts = vertex.split('/');
var vertexParts = vertex.split('/');
faceVertices.push(vertexParts);

@@ -359,13 +359,13 @@ }

const v1 = faceVertices[0];
var v1 = faceVertices[0];
for (let j = 1, jl = faceVertices.length - 1; j < jl; j++) {
const v2 = faceVertices[j];
const v3 = faceVertices[j + 1];
for (var _j = 1, _jl = faceVertices.length - 1; _j < _jl; _j++) {
var v2 = faceVertices[_j];
var v3 = faceVertices[_j + 1];
state.addFace(v1[0], v2[0], v3[0], v1[1], v2[1], v3[1], v1[2], v2[2], v3[2]);
}
} else if (lineFirstChar === 'l') {
const lineParts = line.substring(1).trim().split(' ');
let lineVertices;
const lineUVs = [];
var lineParts = line.substring(1).trim().split(' ');
var lineVertices = void 0;
var lineUVs = [];

@@ -377,4 +377,4 @@ if (line.indexOf('/') === -1) {

for (let li = 0, llen = lineParts.length; li < llen; li++) {
const parts = lineParts[li].split('/');
for (var li = 0, llen = lineParts.length; li < llen; li++) {
var parts = lineParts[li].split('/');
if (parts[0] !== '') lineVertices.push(parts[0]);

@@ -387,7 +387,9 @@ if (parts[1] !== '') lineUVs.push(parts[1]);

} else if (lineFirstChar === 'p') {
const lineData = line.substr(1).trim();
const pointData = lineData.split(' ');
var _lineData = line.substr(1).trim();
var pointData = _lineData.split(' ');
state.addPointGeometry(pointData);
} else if ((result = OBJECT_RE.exec(line)) !== null) {
const name = (' ' + result[0].substr(1).trim()).substr(1);
var name = (' ' + result[0].substr(1).trim()).substr(1);
state.startObject(name);

@@ -402,3 +404,3 @@ } else if (MATERIAL_USE_RE.test(line)) {

if (result.length > 1) {
const value = result[1].trim().toLowerCase();
var value = result[1].trim().toLowerCase();
state.object.smooth = value !== '0' && value !== 'off';

@@ -409,3 +411,3 @@ } else {

const material = state.object.currentMaterial();
var material = state.object.currentMaterial();
if (material) material.smooth = state.object.smooth;

@@ -419,11 +421,11 @@ } else {

state.finalize();
const meshes = [];
const materials = [];
var meshes = [];
var materials = [];
for (const object of state.objects) {
const {
for (var object of state.objects) {
var {
geometry
} = object;
if (geometry.vertices.length === 0) continue;
const mesh = {
var mesh = {
header: {

@@ -477,4 +479,4 @@ vertexCount: geometry.vertices.length / 3

for (const sourceMaterial of object.materials) {
const _material = {
for (var sourceMaterial of object.materials) {
var _material = {
name: sourceMaterial.name,

@@ -481,0 +483,0 @@ flatShading: !sourceMaterial.smooth

@@ -1,2 +0,2 @@

var worker = "!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"\",r(r.s=3)}([function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}},function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}},function(e,t){function r(e){return(r=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function n(t){return\"function\"==typeof Symbol&&\"symbol\"===r(Symbol.iterator)?e.exports=n=function(e){return r(e)}:e.exports=n=function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":r(e)},n(t)}e.exports=n},function(e,t,r){\"use strict\";r.r(t);var n=r(0),i=r.n(n),a=r(1),o=r.n(a),s=/^[og]\\s*(.+)?/,l=/^mtllib /,u=/^usemtl /,h=function(){function e(t){var r=t.index,n=t.name,a=void 0===n?\"\":n,o=t.mtllib,s=t.smooth,l=t.groupStart;i()(this,e),this.index=r,this.name=a,this.mtllib=o,this.smooth=s,this.groupStart=l,this.groupEnd=-1,this.groupCount=-1,this.inherited=!1}return o()(e,[{key:\"clone\",value:function(){return new e({index:arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0})}}]),e}(),c=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\";i()(this,e),this.name=t,this.geometry={vertices:[],normals:[],colors:[],uvs:[]},this.materials=[],this.smooth=!0}return o()(e,[{key:\"startMaterial\",value:function(e,t){var r=this._finalize(!1);r&&(r.inherited||r.groupCount<=0)&&this.materials.splice(r.index,1);var n=new h({index:this.materials.length,name:e,mtllib:Array.isArray(t)&&t.length>0?t[t.length-1]:\"\",smooth:void 0!==r?r.smooth:this.smooth,groupStart:void 0!==r?r.groupEnd:0});return this.materials.push(n),n}},{key:\"currentMaterial\",value:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]}},{key:\"_finalize\",value:function(e){var t=this.currentMaterial();if(t&&-1===t.groupEnd&&(t.groupEnd=this.geometry.vertices.length/3,t.groupCount=t.groupEnd-t.groupStart,t.inherited=!1),e&&this.materials.length>1)for(var r=this.materials.length-1;r>=0;r--)this.materials[r].groupCount<=0&&this.materials.splice(r,1);return e&&0===this.materials.length&&this.materials.push({name:\"\",smooth:this.smooth}),t}}]),e}(),f=function(){function e(){i()(this,e),this.objects=[],this.object=null,this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.materialLibraries=[],this.startObject(\"\",!1)}return o()(e,[{key:\"startObject\",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.object&&!this.object.fromDeclaration)return this.object.name=e,void(this.object.fromDeclaration=t);var r=this.object&&\"function\"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&\"function\"==typeof this.object._finalize&&this.object._finalize(!0),this.object=new c(e),this.object.fromDeclaration=t,r&&r.name&&\"function\"==typeof r.clone){var n=r.clone(0);n.inherited=!0,this.object.materials.push(n)}this.objects.push(this.object)}},{key:\"finalize\",value:function(){this.object&&\"function\"==typeof this.object._finalize&&this.object._finalize(!0)}},{key:\"parseVertexIndex\",value:function(e,t){var r=parseInt(e,10);return 3*(r>=0?r-1:r+t/3)}},{key:\"parseNormalIndex\",value:function(e,t){var r=parseInt(e,10);return 3*(r>=0?r-1:r+t/3)}},{key:\"parseUVIndex\",value:function(e,t){var r=parseInt(e,10);return 2*(r>=0?r-1:r+t/2)}},{key:\"addVertex\",value:function(e,t,r){var n=this.vertices,i=this.object.geometry.vertices;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:\"addVertexPoint\",value:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])}},{key:\"addVertexLine\",value:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])}},{key:\"addNormal\",value:function(e,t,r){var n=this.normals,i=this.object.geometry.normals;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:\"addColor\",value:function(e,t,r){var n=this.colors,i=this.object.geometry.colors;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:\"addUV\",value:function(e,t,r){var n=this.uvs,i=this.object.geometry.uvs;i.push(n[e+0],n[e+1]),i.push(n[t+0],n[t+1]),i.push(n[r+0],n[r+1])}},{key:\"addUVLine\",value:function(e){var t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])}},{key:\"addFace\",value:function(e,t,r,n,i,a,o,s,l){var u=this.vertices.length,h=this.parseVertexIndex(e,u),c=this.parseVertexIndex(t,u),f=this.parseVertexIndex(r,u);if(this.addVertex(h,c,f),void 0!==n&&\"\"!==n){var v=this.uvs.length;h=this.parseUVIndex(n,v),c=this.parseUVIndex(i,v),f=this.parseUVIndex(a,v),this.addUV(h,c,f)}if(void 0!==o&&\"\"!==o){var d=this.normals.length;h=this.parseNormalIndex(o,d),c=o===s?h:this.parseNormalIndex(s,d),f=o===l?h:this.parseNormalIndex(l,d),this.addNormal(h,c,f)}this.colors.length>0&&this.addColor(h,c,f)}},{key:\"addPointGeometry\",value:function(e){this.object.geometry.type=\"Points\";var t=this.vertices.length,r=!0,n=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value;this.addVertexPoint(this.parseVertexIndex(s,t))}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}}},{key:\"addLineGeometry\",value:function(e,t){this.object.geometry.type=\"Line\";var r=this.vertices.length,n=this.uvs.length,i=!0,a=!1,o=void 0;try{for(var s,l=e[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var u=s.value;this.addVertexLine(this.parseVertexIndex(u,r))}}catch(e){a=!0,o=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw o}}var h=!0,c=!1,f=void 0;try{for(var v,d=t[Symbol.iterator]();!(h=(v=d.next()).done);h=!0){var p=v.value;this.addUVLine(this.parseUVIndex(p,n))}}catch(e){c=!0,f=e}finally{try{h||null==d.return||d.return()}finally{if(c)throw f}}}}]),e}(),v=function(e){var t=new f;-1!==e.indexOf(\"\\r\\n\")&&(e=e.replace(/\\r\\n/g,\"\\n\")),-1!==e.indexOf(\"\\\\\\n\")&&(e=e.replace(/\\\\\\n/g,\"\"));for(var r=e.split(\"\\n\"),n=\"\",i=\"\",a=[],o=\"function\"==typeof\"\".trimLeft,h=0,c=r.length;h<c;h++)if(n=r[h],0!==(n=o?n.trimLeft():n.trim()).length&&\"#\"!==(i=n.charAt(0)))if(\"v\"===i){var v=n.split(/\\s+/);switch(v[0]){case\"v\":t.vertices.push(parseFloat(v[1]),parseFloat(v[2]),parseFloat(v[3])),8===v.length&&t.colors.push(parseFloat(v[4]),parseFloat(v[5]),parseFloat(v[6]));break;case\"vn\":t.normals.push(parseFloat(v[1]),parseFloat(v[2]),parseFloat(v[3]));break;case\"vt\":t.uvs.push(parseFloat(v[1]),parseFloat(v[2]))}}else if(\"f\"===i){for(var d=n.substr(1).trim().split(/\\s+/),p=[],m=0,y=d.length;m<y;m++){var b=d[m];if(b.length>0){var g=b.split(\"/\");p.push(g)}}for(var x=p[0],j=1,O=p.length-1;j<O;j++){var S=p[j],w=p[j+1];t.addFace(x[0],S[0],w[0],x[1],S[1],w[1],x[2],S[2],w[2])}}else if(\"l\"===i){var k=n.substring(1).trim().split(\" \"),I=void 0,F=[];if(-1===n.indexOf(\"/\"))I=k;else{I=[];for(var V=0,L=k.length;V<L;V++){var C=k[V].split(\"/\");\"\"!==C[0]&&I.push(C[0]),\"\"!==C[1]&&F.push(C[1])}}t.addLineGeometry(I,F)}else if(\"p\"===i){var _=n.substr(1).trim().split(\" \");t.addPointGeometry(_)}else if(null!==(a=s.exec(n))){var A=(\" \"+a[0].substr(1).trim()).substr(1);t.startObject(A)}else if(u.test(n))t.object.startMaterial(n.substring(7).trim(),t.materialLibraries);else if(l.test(n))t.materialLibraries.push(n.substring(7).trim());else{if(\"s\"!==i){if(\"\\0\"===n)continue;throw new Error('Unexpected line: \"'.concat(n,'\"'))}if((a=n.split(\" \")).length>1){var z=a[1].trim().toLowerCase();t.object.smooth=\"0\"!==z&&\"off\"!==z}else t.object.smooth=!0;var M=t.object.currentMaterial();M&&(M.smooth=t.object.smooth)}t.finalize();var P=[],T=[],N=!0,E=!1,U=void 0;try{for(var R,D=t.objects[Symbol.iterator]();!(N=(R=D.next()).done);N=!0){var G=R.value,B=G.geometry;if(0!==B.vertices.length){var X={header:{vertexCount:B.vertices.length/3},attributes:{}};switch(B.type){case\"Points\":X.mode=0;break;case\"Line\":X.mode=1;break;default:X.mode=4}X.attributes.POSITION={value:new Float32Array(B.vertices),size:3},B.normals.length>0&&(X.attributes.NORMAL={value:new Float32Array(B.normals),size:3}),B.colors.length>0&&(X.attributes.COLOR_0={value:new Float32Array(B.colors),size:3}),B.uvs.length>0&&(X.attributes.TEXCOORD_0={value:new Float32Array(B.uvs),size:2}),X.materials=[];var J=!0,q=!1,H=void 0;try{for(var K,Q=G.materials[Symbol.iterator]();!(J=(K=Q.next()).done);J=!0){var W=K.value,Y={name:W.name,flatShading:!W.smooth};X.materials.push(Y),T.push(Y)}}catch(e){q=!0,H=e}finally{try{J||null==Q.return||Q.return()}finally{if(q)throw H}}X.name=G.name,P.push(X)}}}catch(e){E=!0,U=e}finally{try{N||null==D.return||D.return()}finally{if(E)throw U}}return{meshes:P,materials:T}};function d(e,t){var r,n,i,a=new Float32Array(3*t),o=0,s=!0,l=!1,u=void 0;try{for(var h,c=e[Symbol.iterator]();!(s=(h=c.next()).done);s=!0){var f=h.value.attributes,v=f.POSITION,d=f.NORMAL,p=f.COLOR_0,m=f.TEXCOORD_0;a.set(v.value,3*o),d&&(r=r||new Float32Array(3*t)).set(d.value,3*o),p&&(n=n||new Float32Array(3*t)).set(p.value,3*o),m&&(i=i||new Float32Array(2*t)).set(m.value,2*o),o+=v.value.length/3}}catch(e){l=!0,u=e}finally{try{s||null==c.return||c.return()}finally{if(l)throw u}}var y={};return y.POSITION={value:a,size:3},r&&(y.NORMAL={value:r,size:3}),n&&(y.COLOR_0={value:n,size:3}),i&&(y.TEXCOORD_0={value:i,size:2}),y}var p,m={name:\"OBJ\",extensions:[\"obj\"],testText:function(e){return\"v\"===e[0]},parseTextSync:function(e){var t=v(e).meshes,r=t.reduce(function(e,t){return e+t.header.vertexCount},0);return{loaderData:{header:{}},header:{vertexCount:r},mode:4,attributes:d(t,r)}}},y=r(2),b=r.n(y);p=m,\"undefined\"!=typeof self&&(self.onmessage=function(e){var t=e.data,r=t.arraybuffer,n=t.opts;try{var i,a;if(p.parseSync)i=r,a=p.parseSync;else{if(!p.parseTextSync)throw new Error(\"Could not load data with \".concat(p.name,\" loader\"));i=(new TextDecoder).decode(r),a=p.parseTextSync}var o=a(i,n),s=function e(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,i=n||new Set;if(t)if(t instanceof ArrayBuffer)i.add(t);else if(t.buffer&&t.buffer instanceof ArrayBuffer)i.add(t.buffer);else if(r&&\"object\"===b()(t))for(var a in t)e(t[a],r,i);return void 0===n?Array.from(i):null}(o);self.postMessage({type:\"done\",result:o},s)}catch(e){self.postMessage({type:\"error\",message:e.message})}})}]);";
var worker = "!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"\",r(r.s=3)}([function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}},function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}},function(e,t){function r(e){return(r=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function n(t){return\"function\"==typeof Symbol&&\"symbol\"===r(Symbol.iterator)?e.exports=n=function(e){return r(e)}:e.exports=n=function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":r(e)},n(t)}e.exports=n},function(e,t,r){\"use strict\";r.r(t);var n=r(0),i=r.n(n),a=r(1),o=r.n(a),s=/^[og]\\s*(.+)?/,l=/^mtllib /,u=/^usemtl /,h=function(){function e(t){var r=t.index,n=t.name,a=void 0===n?\"\":n,o=t.mtllib,s=t.smooth,l=t.groupStart;i()(this,e),this.index=r,this.name=a,this.mtllib=o,this.smooth=s,this.groupStart=l,this.groupEnd=-1,this.groupCount=-1,this.inherited=!1}return o()(e,[{key:\"clone\",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.index;return new e({index:t,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0})}}]),e}(),c=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\";i()(this,e),this.name=t,this.geometry={vertices:[],normals:[],colors:[],uvs:[]},this.materials=[],this.smooth=!0}return o()(e,[{key:\"startMaterial\",value:function(e,t){var r=this._finalize(!1);r&&(r.inherited||r.groupCount<=0)&&this.materials.splice(r.index,1);var n=new h({index:this.materials.length,name:e,mtllib:Array.isArray(t)&&t.length>0?t[t.length-1]:\"\",smooth:void 0!==r?r.smooth:this.smooth,groupStart:void 0!==r?r.groupEnd:0});return this.materials.push(n),n}},{key:\"currentMaterial\",value:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]}},{key:\"_finalize\",value:function(e){var t=this.currentMaterial();if(t&&-1===t.groupEnd&&(t.groupEnd=this.geometry.vertices.length/3,t.groupCount=t.groupEnd-t.groupStart,t.inherited=!1),e&&this.materials.length>1)for(var r=this.materials.length-1;r>=0;r--)this.materials[r].groupCount<=0&&this.materials.splice(r,1);return e&&0===this.materials.length&&this.materials.push({name:\"\",smooth:this.smooth}),t}}]),e}(),f=function(){function e(){i()(this,e),this.objects=[],this.object=null,this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.materialLibraries=[],this.startObject(\"\",!1)}return o()(e,[{key:\"startObject\",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.object&&!this.object.fromDeclaration)return this.object.name=e,void(this.object.fromDeclaration=t);var r=this.object&&\"function\"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&\"function\"==typeof this.object._finalize&&this.object._finalize(!0),this.object=new c(e),this.object.fromDeclaration=t,r&&r.name&&\"function\"==typeof r.clone){var n=r.clone(0);n.inherited=!0,this.object.materials.push(n)}this.objects.push(this.object)}},{key:\"finalize\",value:function(){this.object&&\"function\"==typeof this.object._finalize&&this.object._finalize(!0)}},{key:\"parseVertexIndex\",value:function(e,t){var r=parseInt(e,10);return 3*(r>=0?r-1:r+t/3)}},{key:\"parseNormalIndex\",value:function(e,t){var r=parseInt(e,10);return 3*(r>=0?r-1:r+t/3)}},{key:\"parseUVIndex\",value:function(e,t){var r=parseInt(e,10);return 2*(r>=0?r-1:r+t/2)}},{key:\"addVertex\",value:function(e,t,r){var n=this.vertices,i=this.object.geometry.vertices;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:\"addVertexPoint\",value:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])}},{key:\"addVertexLine\",value:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])}},{key:\"addNormal\",value:function(e,t,r){var n=this.normals,i=this.object.geometry.normals;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:\"addColor\",value:function(e,t,r){var n=this.colors,i=this.object.geometry.colors;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:\"addUV\",value:function(e,t,r){var n=this.uvs,i=this.object.geometry.uvs;i.push(n[e+0],n[e+1]),i.push(n[t+0],n[t+1]),i.push(n[r+0],n[r+1])}},{key:\"addUVLine\",value:function(e){var t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])}},{key:\"addFace\",value:function(e,t,r,n,i,a,o,s,l){var u=this.vertices.length,h=this.parseVertexIndex(e,u),c=this.parseVertexIndex(t,u),f=this.parseVertexIndex(r,u);if(this.addVertex(h,c,f),void 0!==n&&\"\"!==n){var v=this.uvs.length;h=this.parseUVIndex(n,v),c=this.parseUVIndex(i,v),f=this.parseUVIndex(a,v),this.addUV(h,c,f)}if(void 0!==o&&\"\"!==o){var d=this.normals.length;h=this.parseNormalIndex(o,d),c=o===s?h:this.parseNormalIndex(s,d),f=o===l?h:this.parseNormalIndex(l,d),this.addNormal(h,c,f)}this.colors.length>0&&this.addColor(h,c,f)}},{key:\"addPointGeometry\",value:function(e){this.object.geometry.type=\"Points\";var t=this.vertices.length,r=!0,n=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value;this.addVertexPoint(this.parseVertexIndex(s,t))}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}}},{key:\"addLineGeometry\",value:function(e,t){this.object.geometry.type=\"Line\";var r=this.vertices.length,n=this.uvs.length,i=!0,a=!1,o=void 0;try{for(var s,l=e[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var u=s.value;this.addVertexLine(this.parseVertexIndex(u,r))}}catch(e){a=!0,o=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw o}}var h=!0,c=!1,f=void 0;try{for(var v,d=t[Symbol.iterator]();!(h=(v=d.next()).done);h=!0){var p=v.value;this.addUVLine(this.parseUVIndex(p,n))}}catch(e){c=!0,f=e}finally{try{h||null==d.return||d.return()}finally{if(c)throw f}}}}]),e}(),v=function(e){var t=new f;-1!==e.indexOf(\"\\r\\n\")&&(e=e.replace(/\\r\\n/g,\"\\n\")),-1!==e.indexOf(\"\\\\\\n\")&&(e=e.replace(/\\\\\\n/g,\"\"));for(var r=e.split(\"\\n\"),n=\"\",i=\"\",a=[],o=\"function\"==typeof\"\".trimLeft,h=0,c=r.length;h<c;h++)if(n=r[h],0!==(n=o?n.trimLeft():n.trim()).length&&\"#\"!==(i=n.charAt(0)))if(\"v\"===i){var v=n.split(/\\s+/);switch(v[0]){case\"v\":t.vertices.push(parseFloat(v[1]),parseFloat(v[2]),parseFloat(v[3])),8===v.length&&t.colors.push(parseFloat(v[4]),parseFloat(v[5]),parseFloat(v[6]));break;case\"vn\":t.normals.push(parseFloat(v[1]),parseFloat(v[2]),parseFloat(v[3]));break;case\"vt\":t.uvs.push(parseFloat(v[1]),parseFloat(v[2]))}}else if(\"f\"===i){for(var d=n.substr(1).trim().split(/\\s+/),p=[],m=0,y=d.length;m<y;m++){var b=d[m];if(b.length>0){var g=b.split(\"/\");p.push(g)}}for(var x=p[0],j=1,O=p.length-1;j<O;j++){var S=p[j],w=p[j+1];t.addFace(x[0],S[0],w[0],x[1],S[1],w[1],x[2],S[2],w[2])}}else if(\"l\"===i){var k=n.substring(1).trim().split(\" \"),I=void 0,F=[];if(-1===n.indexOf(\"/\"))I=k;else{I=[];for(var V=0,L=k.length;V<L;V++){var C=k[V].split(\"/\");\"\"!==C[0]&&I.push(C[0]),\"\"!==C[1]&&F.push(C[1])}}t.addLineGeometry(I,F)}else if(\"p\"===i){var _=n.substr(1).trim().split(\" \");t.addPointGeometry(_)}else if(null!==(a=s.exec(n))){var A=(\" \"+a[0].substr(1).trim()).substr(1);t.startObject(A)}else if(u.test(n))t.object.startMaterial(n.substring(7).trim(),t.materialLibraries);else if(l.test(n))t.materialLibraries.push(n.substring(7).trim());else{if(\"s\"!==i){if(\"\\0\"===n)continue;throw new Error('Unexpected line: \"'.concat(n,'\"'))}if((a=n.split(\" \")).length>1){var z=a[1].trim().toLowerCase();t.object.smooth=\"0\"!==z&&\"off\"!==z}else t.object.smooth=!0;var M=t.object.currentMaterial();M&&(M.smooth=t.object.smooth)}t.finalize();var P=[],T=[],N=!0,E=!1,U=void 0;try{for(var R,D=t.objects[Symbol.iterator]();!(N=(R=D.next()).done);N=!0){var G=R.value,B=G.geometry;if(0!==B.vertices.length){var X={header:{vertexCount:B.vertices.length/3},attributes:{}};switch(B.type){case\"Points\":X.mode=0;break;case\"Line\":X.mode=1;break;default:X.mode=4}X.attributes.POSITION={value:new Float32Array(B.vertices),size:3},B.normals.length>0&&(X.attributes.NORMAL={value:new Float32Array(B.normals),size:3}),B.colors.length>0&&(X.attributes.COLOR_0={value:new Float32Array(B.colors),size:3}),B.uvs.length>0&&(X.attributes.TEXCOORD_0={value:new Float32Array(B.uvs),size:2}),X.materials=[];var J=!0,q=!1,H=void 0;try{for(var K,Q=G.materials[Symbol.iterator]();!(J=(K=Q.next()).done);J=!0){var W=K.value,Y={name:W.name,flatShading:!W.smooth};X.materials.push(Y),T.push(Y)}}catch(e){q=!0,H=e}finally{try{J||null==Q.return||Q.return()}finally{if(q)throw H}}X.name=G.name,P.push(X)}}}catch(e){E=!0,U=e}finally{try{N||null==D.return||D.return()}finally{if(E)throw U}}return{meshes:P,materials:T}};function d(e,t){var r,n,i,a=new Float32Array(3*t),o=0,s=!0,l=!1,u=void 0;try{for(var h,c=e[Symbol.iterator]();!(s=(h=c.next()).done);s=!0){var f=h.value.attributes,v=f.POSITION,d=f.NORMAL,p=f.COLOR_0,m=f.TEXCOORD_0;a.set(v.value,3*o),d&&(r=r||new Float32Array(3*t)).set(d.value,3*o),p&&(n=n||new Float32Array(3*t)).set(p.value,3*o),m&&(i=i||new Float32Array(2*t)).set(m.value,2*o),o+=v.value.length/3}}catch(e){l=!0,u=e}finally{try{s||null==c.return||c.return()}finally{if(l)throw u}}var y={};return y.POSITION={value:a,size:3},r&&(y.NORMAL={value:r,size:3}),n&&(y.COLOR_0={value:n,size:3}),i&&(y.TEXCOORD_0={value:i,size:2}),y}var p,m={name:\"OBJ\",extensions:[\"obj\"],testText:function(e){return\"v\"===e[0]},parseTextSync:function(e){var t=v(e).meshes,r=t.reduce(function(e,t){return e+t.header.vertexCount},0);return{loaderData:{header:{}},header:{vertexCount:r},mode:4,attributes:d(t,r)}}},y=r(2),b=r.n(y);p=m,\"undefined\"!=typeof self&&(self.onmessage=function(e){var t=e.data,r=t.arraybuffer,n=t.opts;try{var i,a;if(p.parseSync)i=r,a=p.parseSync;else{if(!p.parseTextSync)throw new Error(\"Could not load data with \".concat(p.name,\" loader\"));i=(new TextDecoder).decode(r),a=p.parseTextSync}var o=a(i,n),s=function e(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,i=n||new Set;if(t)if(t instanceof ArrayBuffer)i.add(t);else if(t.buffer&&t.buffer instanceof ArrayBuffer)i.add(t.buffer);else if(r&&\"object\"===b()(t))for(var a in t)e(t[a],r,i);return void 0===n?Array.from(i):null}(o);self.postMessage({type:\"done\",result:o},s)}catch(e){self.postMessage({type:\"error\",message:e.message})}})}]);";
export default {

@@ -3,0 +3,0 @@ name: 'OBJ',

@@ -1,1 +0,1 @@

!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=3)}([function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}},function(e,t){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(t){return"function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?e.exports=n=function(e){return r(e)}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)},n(t)}e.exports=n},function(e,t,r){"use strict";r.r(t);var n=r(0),i=r.n(n),a=r(1),o=r.n(a),s=/^[og]\s*(.+)?/,l=/^mtllib /,u=/^usemtl /,h=function(){function e(t){var r=t.index,n=t.name,a=void 0===n?"":n,o=t.mtllib,s=t.smooth,l=t.groupStart;i()(this,e),this.index=r,this.name=a,this.mtllib=o,this.smooth=s,this.groupStart=l,this.groupEnd=-1,this.groupCount=-1,this.inherited=!1}return o()(e,[{key:"clone",value:function(){return new e({index:arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0})}}]),e}(),c=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";i()(this,e),this.name=t,this.geometry={vertices:[],normals:[],colors:[],uvs:[]},this.materials=[],this.smooth=!0}return o()(e,[{key:"startMaterial",value:function(e,t){var r=this._finalize(!1);r&&(r.inherited||r.groupCount<=0)&&this.materials.splice(r.index,1);var n=new h({index:this.materials.length,name:e,mtllib:Array.isArray(t)&&t.length>0?t[t.length-1]:"",smooth:void 0!==r?r.smooth:this.smooth,groupStart:void 0!==r?r.groupEnd:0});return this.materials.push(n),n}},{key:"currentMaterial",value:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]}},{key:"_finalize",value:function(e){var t=this.currentMaterial();if(t&&-1===t.groupEnd&&(t.groupEnd=this.geometry.vertices.length/3,t.groupCount=t.groupEnd-t.groupStart,t.inherited=!1),e&&this.materials.length>1)for(var r=this.materials.length-1;r>=0;r--)this.materials[r].groupCount<=0&&this.materials.splice(r,1);return e&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),t}}]),e}(),f=function(){function e(){i()(this,e),this.objects=[],this.object=null,this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.materialLibraries=[],this.startObject("",!1)}return o()(e,[{key:"startObject",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.object&&!this.object.fromDeclaration)return this.object.name=e,void(this.object.fromDeclaration=t);var r=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object=new c(e),this.object.fromDeclaration=t,r&&r.name&&"function"==typeof r.clone){var n=r.clone(0);n.inherited=!0,this.object.materials.push(n)}this.objects.push(this.object)}},{key:"finalize",value:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)}},{key:"parseVertexIndex",value:function(e,t){var r=parseInt(e,10);return 3*(r>=0?r-1:r+t/3)}},{key:"parseNormalIndex",value:function(e,t){var r=parseInt(e,10);return 3*(r>=0?r-1:r+t/3)}},{key:"parseUVIndex",value:function(e,t){var r=parseInt(e,10);return 2*(r>=0?r-1:r+t/2)}},{key:"addVertex",value:function(e,t,r){var n=this.vertices,i=this.object.geometry.vertices;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:"addVertexPoint",value:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])}},{key:"addVertexLine",value:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])}},{key:"addNormal",value:function(e,t,r){var n=this.normals,i=this.object.geometry.normals;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:"addColor",value:function(e,t,r){var n=this.colors,i=this.object.geometry.colors;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:"addUV",value:function(e,t,r){var n=this.uvs,i=this.object.geometry.uvs;i.push(n[e+0],n[e+1]),i.push(n[t+0],n[t+1]),i.push(n[r+0],n[r+1])}},{key:"addUVLine",value:function(e){var t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])}},{key:"addFace",value:function(e,t,r,n,i,a,o,s,l){var u=this.vertices.length,h=this.parseVertexIndex(e,u),c=this.parseVertexIndex(t,u),f=this.parseVertexIndex(r,u);if(this.addVertex(h,c,f),void 0!==n&&""!==n){var v=this.uvs.length;h=this.parseUVIndex(n,v),c=this.parseUVIndex(i,v),f=this.parseUVIndex(a,v),this.addUV(h,c,f)}if(void 0!==o&&""!==o){var d=this.normals.length;h=this.parseNormalIndex(o,d),c=o===s?h:this.parseNormalIndex(s,d),f=o===l?h:this.parseNormalIndex(l,d),this.addNormal(h,c,f)}this.colors.length>0&&this.addColor(h,c,f)}},{key:"addPointGeometry",value:function(e){this.object.geometry.type="Points";var t=this.vertices.length,r=!0,n=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value;this.addVertexPoint(this.parseVertexIndex(s,t))}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}}},{key:"addLineGeometry",value:function(e,t){this.object.geometry.type="Line";var r=this.vertices.length,n=this.uvs.length,i=!0,a=!1,o=void 0;try{for(var s,l=e[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var u=s.value;this.addVertexLine(this.parseVertexIndex(u,r))}}catch(e){a=!0,o=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw o}}var h=!0,c=!1,f=void 0;try{for(var v,d=t[Symbol.iterator]();!(h=(v=d.next()).done);h=!0){var p=v.value;this.addUVLine(this.parseUVIndex(p,n))}}catch(e){c=!0,f=e}finally{try{h||null==d.return||d.return()}finally{if(c)throw f}}}}]),e}(),v=function(e){var t=new f;-1!==e.indexOf("\r\n")&&(e=e.replace(/\r\n/g,"\n")),-1!==e.indexOf("\\\n")&&(e=e.replace(/\\\n/g,""));for(var r=e.split("\n"),n="",i="",a=[],o="function"==typeof"".trimLeft,h=0,c=r.length;h<c;h++)if(n=r[h],0!==(n=o?n.trimLeft():n.trim()).length&&"#"!==(i=n.charAt(0)))if("v"===i){var v=n.split(/\s+/);switch(v[0]){case"v":t.vertices.push(parseFloat(v[1]),parseFloat(v[2]),parseFloat(v[3])),8===v.length&&t.colors.push(parseFloat(v[4]),parseFloat(v[5]),parseFloat(v[6]));break;case"vn":t.normals.push(parseFloat(v[1]),parseFloat(v[2]),parseFloat(v[3]));break;case"vt":t.uvs.push(parseFloat(v[1]),parseFloat(v[2]))}}else if("f"===i){for(var d=n.substr(1).trim().split(/\s+/),p=[],m=0,y=d.length;m<y;m++){var b=d[m];if(b.length>0){var g=b.split("/");p.push(g)}}for(var x=p[0],j=1,O=p.length-1;j<O;j++){var S=p[j],w=p[j+1];t.addFace(x[0],S[0],w[0],x[1],S[1],w[1],x[2],S[2],w[2])}}else if("l"===i){var k=n.substring(1).trim().split(" "),I=void 0,F=[];if(-1===n.indexOf("/"))I=k;else{I=[];for(var V=0,L=k.length;V<L;V++){var C=k[V].split("/");""!==C[0]&&I.push(C[0]),""!==C[1]&&F.push(C[1])}}t.addLineGeometry(I,F)}else if("p"===i){var _=n.substr(1).trim().split(" ");t.addPointGeometry(_)}else if(null!==(a=s.exec(n))){var A=(" "+a[0].substr(1).trim()).substr(1);t.startObject(A)}else if(u.test(n))t.object.startMaterial(n.substring(7).trim(),t.materialLibraries);else if(l.test(n))t.materialLibraries.push(n.substring(7).trim());else{if("s"!==i){if("\0"===n)continue;throw new Error('Unexpected line: "'.concat(n,'"'))}if((a=n.split(" ")).length>1){var z=a[1].trim().toLowerCase();t.object.smooth="0"!==z&&"off"!==z}else t.object.smooth=!0;var M=t.object.currentMaterial();M&&(M.smooth=t.object.smooth)}t.finalize();var P=[],T=[],N=!0,E=!1,U=void 0;try{for(var R,D=t.objects[Symbol.iterator]();!(N=(R=D.next()).done);N=!0){var G=R.value,B=G.geometry;if(0!==B.vertices.length){var X={header:{vertexCount:B.vertices.length/3},attributes:{}};switch(B.type){case"Points":X.mode=0;break;case"Line":X.mode=1;break;default:X.mode=4}X.attributes.POSITION={value:new Float32Array(B.vertices),size:3},B.normals.length>0&&(X.attributes.NORMAL={value:new Float32Array(B.normals),size:3}),B.colors.length>0&&(X.attributes.COLOR_0={value:new Float32Array(B.colors),size:3}),B.uvs.length>0&&(X.attributes.TEXCOORD_0={value:new Float32Array(B.uvs),size:2}),X.materials=[];var J=!0,q=!1,H=void 0;try{for(var K,Q=G.materials[Symbol.iterator]();!(J=(K=Q.next()).done);J=!0){var W=K.value,Y={name:W.name,flatShading:!W.smooth};X.materials.push(Y),T.push(Y)}}catch(e){q=!0,H=e}finally{try{J||null==Q.return||Q.return()}finally{if(q)throw H}}X.name=G.name,P.push(X)}}}catch(e){E=!0,U=e}finally{try{N||null==D.return||D.return()}finally{if(E)throw U}}return{meshes:P,materials:T}};function d(e,t){var r,n,i,a=new Float32Array(3*t),o=0,s=!0,l=!1,u=void 0;try{for(var h,c=e[Symbol.iterator]();!(s=(h=c.next()).done);s=!0){var f=h.value.attributes,v=f.POSITION,d=f.NORMAL,p=f.COLOR_0,m=f.TEXCOORD_0;a.set(v.value,3*o),d&&(r=r||new Float32Array(3*t)).set(d.value,3*o),p&&(n=n||new Float32Array(3*t)).set(p.value,3*o),m&&(i=i||new Float32Array(2*t)).set(m.value,2*o),o+=v.value.length/3}}catch(e){l=!0,u=e}finally{try{s||null==c.return||c.return()}finally{if(l)throw u}}var y={};return y.POSITION={value:a,size:3},r&&(y.NORMAL={value:r,size:3}),n&&(y.COLOR_0={value:n,size:3}),i&&(y.TEXCOORD_0={value:i,size:2}),y}var p,m={name:"OBJ",extensions:["obj"],testText:function(e){return"v"===e[0]},parseTextSync:function(e){var t=v(e).meshes,r=t.reduce(function(e,t){return e+t.header.vertexCount},0);return{loaderData:{header:{}},header:{vertexCount:r},mode:4,attributes:d(t,r)}}},y=r(2),b=r.n(y);p=m,"undefined"!=typeof self&&(self.onmessage=function(e){var t=e.data,r=t.arraybuffer,n=t.opts;try{var i,a;if(p.parseSync)i=r,a=p.parseSync;else{if(!p.parseTextSync)throw new Error("Could not load data with ".concat(p.name," loader"));i=(new TextDecoder).decode(r),a=p.parseTextSync}var o=a(i,n),s=function e(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,i=n||new Set;if(t)if(t instanceof ArrayBuffer)i.add(t);else if(t.buffer&&t.buffer instanceof ArrayBuffer)i.add(t.buffer);else if(r&&"object"===b()(t))for(var a in t)e(t[a],r,i);return void 0===n?Array.from(i):null}(o);self.postMessage({type:"done",result:o},s)}catch(e){self.postMessage({type:"error",message:e.message})}})}]);
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=3)}([function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}},function(e,t){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(t){return"function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?e.exports=n=function(e){return r(e)}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)},n(t)}e.exports=n},function(e,t,r){"use strict";r.r(t);var n=r(0),i=r.n(n),a=r(1),o=r.n(a),s=/^[og]\s*(.+)?/,l=/^mtllib /,u=/^usemtl /,h=function(){function e(t){var r=t.index,n=t.name,a=void 0===n?"":n,o=t.mtllib,s=t.smooth,l=t.groupStart;i()(this,e),this.index=r,this.name=a,this.mtllib=o,this.smooth=s,this.groupStart=l,this.groupEnd=-1,this.groupCount=-1,this.inherited=!1}return o()(e,[{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.index;return new e({index:t,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0})}}]),e}(),c=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";i()(this,e),this.name=t,this.geometry={vertices:[],normals:[],colors:[],uvs:[]},this.materials=[],this.smooth=!0}return o()(e,[{key:"startMaterial",value:function(e,t){var r=this._finalize(!1);r&&(r.inherited||r.groupCount<=0)&&this.materials.splice(r.index,1);var n=new h({index:this.materials.length,name:e,mtllib:Array.isArray(t)&&t.length>0?t[t.length-1]:"",smooth:void 0!==r?r.smooth:this.smooth,groupStart:void 0!==r?r.groupEnd:0});return this.materials.push(n),n}},{key:"currentMaterial",value:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]}},{key:"_finalize",value:function(e){var t=this.currentMaterial();if(t&&-1===t.groupEnd&&(t.groupEnd=this.geometry.vertices.length/3,t.groupCount=t.groupEnd-t.groupStart,t.inherited=!1),e&&this.materials.length>1)for(var r=this.materials.length-1;r>=0;r--)this.materials[r].groupCount<=0&&this.materials.splice(r,1);return e&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),t}}]),e}(),f=function(){function e(){i()(this,e),this.objects=[],this.object=null,this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.materialLibraries=[],this.startObject("",!1)}return o()(e,[{key:"startObject",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.object&&!this.object.fromDeclaration)return this.object.name=e,void(this.object.fromDeclaration=t);var r=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object=new c(e),this.object.fromDeclaration=t,r&&r.name&&"function"==typeof r.clone){var n=r.clone(0);n.inherited=!0,this.object.materials.push(n)}this.objects.push(this.object)}},{key:"finalize",value:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)}},{key:"parseVertexIndex",value:function(e,t){var r=parseInt(e,10);return 3*(r>=0?r-1:r+t/3)}},{key:"parseNormalIndex",value:function(e,t){var r=parseInt(e,10);return 3*(r>=0?r-1:r+t/3)}},{key:"parseUVIndex",value:function(e,t){var r=parseInt(e,10);return 2*(r>=0?r-1:r+t/2)}},{key:"addVertex",value:function(e,t,r){var n=this.vertices,i=this.object.geometry.vertices;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:"addVertexPoint",value:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])}},{key:"addVertexLine",value:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])}},{key:"addNormal",value:function(e,t,r){var n=this.normals,i=this.object.geometry.normals;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:"addColor",value:function(e,t,r){var n=this.colors,i=this.object.geometry.colors;i.push(n[e+0],n[e+1],n[e+2]),i.push(n[t+0],n[t+1],n[t+2]),i.push(n[r+0],n[r+1],n[r+2])}},{key:"addUV",value:function(e,t,r){var n=this.uvs,i=this.object.geometry.uvs;i.push(n[e+0],n[e+1]),i.push(n[t+0],n[t+1]),i.push(n[r+0],n[r+1])}},{key:"addUVLine",value:function(e){var t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])}},{key:"addFace",value:function(e,t,r,n,i,a,o,s,l){var u=this.vertices.length,h=this.parseVertexIndex(e,u),c=this.parseVertexIndex(t,u),f=this.parseVertexIndex(r,u);if(this.addVertex(h,c,f),void 0!==n&&""!==n){var v=this.uvs.length;h=this.parseUVIndex(n,v),c=this.parseUVIndex(i,v),f=this.parseUVIndex(a,v),this.addUV(h,c,f)}if(void 0!==o&&""!==o){var d=this.normals.length;h=this.parseNormalIndex(o,d),c=o===s?h:this.parseNormalIndex(s,d),f=o===l?h:this.parseNormalIndex(l,d),this.addNormal(h,c,f)}this.colors.length>0&&this.addColor(h,c,f)}},{key:"addPointGeometry",value:function(e){this.object.geometry.type="Points";var t=this.vertices.length,r=!0,n=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value;this.addVertexPoint(this.parseVertexIndex(s,t))}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}}},{key:"addLineGeometry",value:function(e,t){this.object.geometry.type="Line";var r=this.vertices.length,n=this.uvs.length,i=!0,a=!1,o=void 0;try{for(var s,l=e[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var u=s.value;this.addVertexLine(this.parseVertexIndex(u,r))}}catch(e){a=!0,o=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw o}}var h=!0,c=!1,f=void 0;try{for(var v,d=t[Symbol.iterator]();!(h=(v=d.next()).done);h=!0){var p=v.value;this.addUVLine(this.parseUVIndex(p,n))}}catch(e){c=!0,f=e}finally{try{h||null==d.return||d.return()}finally{if(c)throw f}}}}]),e}(),v=function(e){var t=new f;-1!==e.indexOf("\r\n")&&(e=e.replace(/\r\n/g,"\n")),-1!==e.indexOf("\\\n")&&(e=e.replace(/\\\n/g,""));for(var r=e.split("\n"),n="",i="",a=[],o="function"==typeof"".trimLeft,h=0,c=r.length;h<c;h++)if(n=r[h],0!==(n=o?n.trimLeft():n.trim()).length&&"#"!==(i=n.charAt(0)))if("v"===i){var v=n.split(/\s+/);switch(v[0]){case"v":t.vertices.push(parseFloat(v[1]),parseFloat(v[2]),parseFloat(v[3])),8===v.length&&t.colors.push(parseFloat(v[4]),parseFloat(v[5]),parseFloat(v[6]));break;case"vn":t.normals.push(parseFloat(v[1]),parseFloat(v[2]),parseFloat(v[3]));break;case"vt":t.uvs.push(parseFloat(v[1]),parseFloat(v[2]))}}else if("f"===i){for(var d=n.substr(1).trim().split(/\s+/),p=[],m=0,y=d.length;m<y;m++){var b=d[m];if(b.length>0){var g=b.split("/");p.push(g)}}for(var x=p[0],j=1,O=p.length-1;j<O;j++){var S=p[j],w=p[j+1];t.addFace(x[0],S[0],w[0],x[1],S[1],w[1],x[2],S[2],w[2])}}else if("l"===i){var k=n.substring(1).trim().split(" "),I=void 0,F=[];if(-1===n.indexOf("/"))I=k;else{I=[];for(var V=0,L=k.length;V<L;V++){var C=k[V].split("/");""!==C[0]&&I.push(C[0]),""!==C[1]&&F.push(C[1])}}t.addLineGeometry(I,F)}else if("p"===i){var _=n.substr(1).trim().split(" ");t.addPointGeometry(_)}else if(null!==(a=s.exec(n))){var A=(" "+a[0].substr(1).trim()).substr(1);t.startObject(A)}else if(u.test(n))t.object.startMaterial(n.substring(7).trim(),t.materialLibraries);else if(l.test(n))t.materialLibraries.push(n.substring(7).trim());else{if("s"!==i){if("\0"===n)continue;throw new Error('Unexpected line: "'.concat(n,'"'))}if((a=n.split(" ")).length>1){var z=a[1].trim().toLowerCase();t.object.smooth="0"!==z&&"off"!==z}else t.object.smooth=!0;var M=t.object.currentMaterial();M&&(M.smooth=t.object.smooth)}t.finalize();var P=[],T=[],N=!0,E=!1,U=void 0;try{for(var R,D=t.objects[Symbol.iterator]();!(N=(R=D.next()).done);N=!0){var G=R.value,B=G.geometry;if(0!==B.vertices.length){var X={header:{vertexCount:B.vertices.length/3},attributes:{}};switch(B.type){case"Points":X.mode=0;break;case"Line":X.mode=1;break;default:X.mode=4}X.attributes.POSITION={value:new Float32Array(B.vertices),size:3},B.normals.length>0&&(X.attributes.NORMAL={value:new Float32Array(B.normals),size:3}),B.colors.length>0&&(X.attributes.COLOR_0={value:new Float32Array(B.colors),size:3}),B.uvs.length>0&&(X.attributes.TEXCOORD_0={value:new Float32Array(B.uvs),size:2}),X.materials=[];var J=!0,q=!1,H=void 0;try{for(var K,Q=G.materials[Symbol.iterator]();!(J=(K=Q.next()).done);J=!0){var W=K.value,Y={name:W.name,flatShading:!W.smooth};X.materials.push(Y),T.push(Y)}}catch(e){q=!0,H=e}finally{try{J||null==Q.return||Q.return()}finally{if(q)throw H}}X.name=G.name,P.push(X)}}}catch(e){E=!0,U=e}finally{try{N||null==D.return||D.return()}finally{if(E)throw U}}return{meshes:P,materials:T}};function d(e,t){var r,n,i,a=new Float32Array(3*t),o=0,s=!0,l=!1,u=void 0;try{for(var h,c=e[Symbol.iterator]();!(s=(h=c.next()).done);s=!0){var f=h.value.attributes,v=f.POSITION,d=f.NORMAL,p=f.COLOR_0,m=f.TEXCOORD_0;a.set(v.value,3*o),d&&(r=r||new Float32Array(3*t)).set(d.value,3*o),p&&(n=n||new Float32Array(3*t)).set(p.value,3*o),m&&(i=i||new Float32Array(2*t)).set(m.value,2*o),o+=v.value.length/3}}catch(e){l=!0,u=e}finally{try{s||null==c.return||c.return()}finally{if(l)throw u}}var y={};return y.POSITION={value:a,size:3},r&&(y.NORMAL={value:r,size:3}),n&&(y.COLOR_0={value:n,size:3}),i&&(y.TEXCOORD_0={value:i,size:2}),y}var p,m={name:"OBJ",extensions:["obj"],testText:function(e){return"v"===e[0]},parseTextSync:function(e){var t=v(e).meshes,r=t.reduce(function(e,t){return e+t.header.vertexCount},0);return{loaderData:{header:{}},header:{vertexCount:r},mode:4,attributes:d(t,r)}}},y=r(2),b=r.n(y);p=m,"undefined"!=typeof self&&(self.onmessage=function(e){var t=e.data,r=t.arraybuffer,n=t.opts;try{var i,a;if(p.parseSync)i=r,a=p.parseSync;else{if(!p.parseTextSync)throw new Error("Could not load data with ".concat(p.name," loader"));i=(new TextDecoder).decode(r),a=p.parseTextSync}var o=a(i,n),s=function e(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,i=n||new Set;if(t)if(t instanceof ArrayBuffer)i.add(t);else if(t.buffer&&t.buffer instanceof ArrayBuffer)i.add(t.buffer);else if(r&&"object"===b()(t))for(var a in t)e(t[a],r,i);return void 0===n?Array.from(i):null}(o);self.postMessage({type:"done",result:o},s)}catch(e){self.postMessage({type:"error",message:e.message})}})}]);
{
"name": "@loaders.gl/obj",
"version": "1.2.0-beta.2",
"version": "1.2.0-beta.3",
"description": "Framework-independent loader for the OBJ format",

@@ -37,5 +37,5 @@ "license": "MIT",

"@babel/runtime": "^7.3.1",
"@loaders.gl/loader-utils": "1.2.0-beta.2"
"@loaders.gl/loader-utils": "1.2.0-beta.3"
},
"gitHead": "82626f4ecad7c816c70780376d661f267b6c523e"
"gitHead": "39442622efe0e06323db958c53c9805fc9b7699d"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc