var BABYLON;!(function(e){var t=(function(){function t(){}return t.GLTF=function(t,r,i){var s=r.replace(/\.[^\/.]+$/,""),a=new e.GLTF2._Exporter(t,i);if(t.isReady)return a._generateGLTF(s);throw new Error("glTF Serializer: Scene is not ready!")},t.GLB=function(t,r,i){var s=r.replace(/\.[^\/.]+$/,""),a=new e.GLTF2._Exporter(t,i);if(t.isReady)return a._generateGLB(s);throw new Error("glTF Serializer: Scene is not ready!")},t})();e.GLTF2Export=t})(BABYLON||(BABYLON={}));var BABYLON;!(function(e){!(function(t){var r=(function(){function r(e,t){this.asset={generator:"BabylonJS",version:"2.0"},this.babylonScene=e,this.bufferViews=new Array,this.accessors=new Array,this.meshes=new Array,this.scenes=new Array,this.nodes=new Array,this.images=new Array,this.materials=new Array,this.imageData={},void 0!==t&&(this.options=t);var r=0;r=this.createScene(this.babylonScene,r),this.totalByteLength=r}return r.prototype.createBufferView=function(e,t,r,i){var s={buffer:e,byteLength:r};return t>0&&(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[h]&&(n[h]=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,h=0;switch(t){case e.VertexBuffer.PositionKind:case e.VertexBuffer.NormalKind:for(var c=r.verticesStart;c0&&(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 R=u.getIndices(),N=l.indexStart,O=l.indexCount+N,U=s,G=N;G0){for(var i=e.meshes,s={nodes:new Array},a=0;a