var globalObject="undefined"!=typeof global?global:"undefined"!=typeof window?window:this,babylonDependency=globalObject&&globalObject.BABYLON||BABYLON||"undefined"!=typeof require&&require("babylonjs"),BABYLON=babylonDependency,__decorate=this&&this.__decorate||function(e,t,r,i){var s,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,i);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(n=(a<3?s(n):a>3?s(t,r,n):s(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n},__extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}})(),BABYLON;!(function(e){var t=(function(){function t(){}return t.OBJ=function(t,r,i,s){var a=[],n=1;r&&(i||(i="mat"),a.push("mtllib "+i+".mtl"));for(var o=0;o0&&(s.byteOffset=t),i&&(s.name=i),s},r.prototype.createAccessor=function(e,t,r,i,s,a,n){var o={name:t,bufferView:e,componentType:i,count:s,type:r};return a&&(o.min=a),n&&(o.max=n),o},r.prototype.calculateMinMax=function(e,t,r,i,s){var a=[1/0,1/0,1/0],n=[-(1/0),-(1/0),-(1/0)],o=t+r;if(r>0)for(var u=t;un[c]&&(n[c]=e[l]),++l;return{min:a,max:n}},r.prototype.writeAttributeData=function(t,r,i,s,a,n,o){var u=a,l=r.verticesStart+r.verticesCount,c=0;switch(t){case e.VertexBuffer.PositionKind:case e.VertexBuffer.NormalKind:for(var h=r.verticesStart;h0&&(s.buffers=[i]),this.nodes&&0!==this.nodes.length&&(s.nodes=this.nodes),this.meshes&&0!==this.meshes.length&&(s.meshes=this.meshes),this.scenes&&0!==this.scenes.length&&(s.scenes=this.scenes,s.scene=0),this.bufferViews&&0!==this.bufferViews.length&&(s.bufferViews=this.bufferViews),this.accessors&&0!==this.accessors.length&&(s.accessors=this.accessors),this.materials&&0!==this.materials.length&&(s.materials=this.materials),this.textures&&0!==this.textures.length&&(s.textures=this.textures),this.images&&0!==this.images.length)if(e){s.images=[];for(var a=this.images.length,n=this.totalByteLength,o=0;o0)if(n){for(var N=u.getIndices(),_=l.indexStart,E=l.indexCount+_,R=s,U=_;U0){for(var i=e.meshes,s={nodes:new Array},a=0;a