!function e(t,r,n){function a(o,s){if(!r[o]){if(!t[o]){var u="function"==typeof require&&require;if(!s&&u)return u(o,!0);if(i)return i(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[o]={exports:{}};t[o][0].call(l.exports,function(e){var r=t[o][1][e];return a(r||e)},l,l.exports,e,t,r,n)}return r[o].exports}for(var i="function"==typeof require&&require,o=0;o=t.length&&t===m(e,0,t.length)}(e))g=(new o).parse(e);else{var n=m(e);if(!function(e){function t(t){var r=e[t-1];return e=e.slice(n+t),n++,r}for(var r=["K","a","y","d","a","r","a","\\","F","B","X","\\","B","i","n","a","r","y","\\","\\"],n=0,a=0;a0,o="string"==typeof a.Content&&""!==a.Content;if(i||o){var s=this.parseImage(r[n]);t[a.RelativeFilename||a.Filename]=s}}}}for(var u in e){var c=e[u];void 0!==t[c]?e[u]=t[c]:e[u]=e[u].split("\\").pop()}return e},parseImage:function(e){var t,r=e.Content,n=e.RelativeFilename||e.Filename,a=n.slice(n.lastIndexOf(".")+1).toLowerCase();switch(a){case"bmp":t="image/bmp";break;case"jpg":case"jpeg":t="image/jpeg";break;case"png":t="image/png";break;case"tif":t="image/tiff";break;case"tga":if("function"!=typeof THREE.TGALoader)return void console.warn("FBXLoader: THREE.TGALoader is required to load TGA textures");null===THREE.Loader.Handlers.get(".tga")&&THREE.Loader.Handlers.add(/\.tga$/i,new THREE.TGALoader),t="image/tga";break;default:return void console.warn('FBXLoader: Image type "'+a+'" is not supported.')}if("string"==typeof r)return"data:"+t+";base64,"+r;var i=new Uint8Array(r);return window.URL.createObjectURL(new Blob([i],{type:t}))},parseTextures:function(e){var t=new Map;if("Texture"in g.Objects){var r=g.Objects.Texture;for(var n in r){var a=this.parseTexture(r[n],e);t.set(parseInt(n),a)}}return t},parseTexture:function(e,t){var r=this.loadTexture(e,t);r.ID=e.id,r.name=e.attrName;var n=e.WrapModeU,a=e.WrapModeV,i=void 0!==n?n.value:0,o=void 0!==a?a.value:0;if(r.wrapS=0===i?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,r.wrapT=0===o?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,"Scaling"in e){var s=e.Scaling.value;r.repeat.x=s[0],r.repeat.y=s[1]}return r},loadTexture:function(e,t){var r,n=this.textureLoader.path,a=E.get(e.id).children;void 0!==a&&a.length>0&&void 0!==t[a[0].ID]&&(0!==(r=t[a[0].ID]).indexOf("blob:")&&0!==r.indexOf("data:")||this.textureLoader.setPath(void 0));var i,o=e.FileName.slice(-3).toLowerCase();if("tga"===o){var s=THREE.Loader.Handlers.get(".tga");null===s?(console.warn("FBXLoader: TGALoader not found, creating empty placeholder texture for",r),i=new THREE.Texture):i=s.load(r)}else"psd"===o?(console.warn("FBXLoader: PSD textures are not supported, creating empty placeholder texture for",r),i=new THREE.Texture):i=this.textureLoader.load(r);return this.textureLoader.setPath(n),i},parseMaterials:function(e){var t=new Map;if("Material"in g.Objects){var r=g.Objects.Material;for(var n in r){var a=this.parseMaterial(r[n],e);null!==a&&t.set(parseInt(n),a)}}return t},parseMaterial:function(e,t){var r=e.id,n=e.attrName,i=e.ShadingModel;if("object"===(void 0===i?"undefined":a(i))&&(i=i.value),!E.has(r))return null;var o,s=this.parseParameters(e,t,r);switch(i.toLowerCase()){case"phong":o=new THREE.MeshPhongMaterial;break;case"lambert":o=new THREE.MeshLambertMaterial;break;default:console.warn('THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.',i),o=new THREE.MeshPhongMaterial({color:3342591})}return o.setValues(s),o.name=n,o},parseParameters:function(e,t,r){var n={};e.BumpFactor&&(n.bumpScale=e.BumpFactor.value),e.Diffuse?n.color=(new THREE.Color).fromArray(e.Diffuse.value):e.DiffuseColor&&"Color"===e.DiffuseColor.type&&(n.color=(new THREE.Color).fromArray(e.DiffuseColor.value)),e.DisplacementFactor&&(n.displacementScale=e.DisplacementFactor.value),e.Emissive?n.emissive=(new THREE.Color).fromArray(e.Emissive.value):e.EmissiveColor&&"Color"===e.EmissiveColor.type&&(n.emissive=(new THREE.Color).fromArray(e.EmissiveColor.value)),e.EmissiveFactor&&(n.emissiveIntensity=parseFloat(e.EmissiveFactor.value)),e.Opacity&&(n.opacity=parseFloat(e.Opacity.value)),n.opacity<1&&(n.transparent=!0),e.ReflectionFactor&&(n.reflectivity=e.ReflectionFactor.value),e.Shininess&&(n.shininess=e.Shininess.value),e.Specular?n.specular=(new THREE.Color).fromArray(e.Specular.value):e.SpecularColor&&"Color"===e.SpecularColor.type&&(n.specular=(new THREE.Color).fromArray(e.SpecularColor.value));var a=this;return E.get(r).children.forEach(function(e){var r=e.relationship;switch(r){case"Bump":n.bumpMap=a.getTexture(t,e.ID);break;case"DiffuseColor":n.map=a.getTexture(t,e.ID);break;case"DisplacementColor":n.displacementMap=a.getTexture(t,e.ID);break;case"EmissiveColor":n.emissiveMap=a.getTexture(t,e.ID);break;case"NormalMap":n.normalMap=a.getTexture(t,e.ID);break;case"ReflectionColor":n.envMap=a.getTexture(t,e.ID),n.envMap.mapping=THREE.EquirectangularReflectionMapping;break;case"SpecularColor":n.specularMap=a.getTexture(t,e.ID);break;case"TransparentColor":n.alphaMap=a.getTexture(t,e.ID),n.transparent=!0;break;case"AmbientColor":case"ShininessExponent":case"SpecularFactor":case"VectorDisplacementColor":default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",r)}}),n},getTexture:function(e,t){return"LayeredTexture"in g.Objects&&t in g.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),t=E.get(t).children[0].ID),e.get(t)},parseDeformers:function(){var e={},t={};if("Deformer"in g.Objects){var r=g.Objects.Deformer;for(var n in r){var a=r[n],i=E.get(parseInt(n));if("Skin"===a.attrType){var o=this.parseSkeleton(i,r);o.ID=n,i.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),o.geometryID=i.parents[0].ID,e[n]=o}else if("BlendShape"===a.attrType){var s={id:n};s.rawTargets=this.parseMorphTargets(i,r),s.id=n,i.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),t[n]=s}}}return{skeletons:e,morphTargets:t}},parseSkeleton:function(e,t){var r=[];return e.children.forEach(function(e){var n=t[e.ID];if("Cluster"===n.attrType){var a={ID:e.ID,indices:[],weights:[],transform:(new THREE.Matrix4).fromArray(n.Transform.a),transformLink:(new THREE.Matrix4).fromArray(n.TransformLink.a),linkMode:n.Mode};"Indexes"in n&&(a.indices=n.Indexes.a,a.weights=n.Weights.a),r.push(a)}}),{rawBones:r,bones:[]}},parseMorphTargets:function(e,t){for(var r=[],n=0;n1?i=o:o.length>0?i=o[0]:(i=new THREE.MeshPhongMaterial({color:13421772}),o.push(i)),"color"in a.attributes&&o.forEach(function(e){e.vertexColors=THREE.VertexColors}),a.FBX_Deformer?(o.forEach(function(e){e.skinning=!0}),n=new THREE.SkinnedMesh(a,i)):n=new THREE.Mesh(a,i),n},createCurve:function(e,t){var r=e.children.reduce(function(e,r){return t.has(r.ID)&&(e=t.get(r.ID)),e},null),n=new THREE.LineBasicMaterial({color:3342591,linewidth:1});return new THREE.Line(r,n)},setModelTransforms:function(e,t){var r={};"RotationOrder"in t&&(r.eulerOrder=parseInt(t.RotationOrder.value)),"Lcl_Translation"in t&&(r.translation=t.Lcl_Translation.value),"RotationOffset"in t&&(r.rotationOffset=t.RotationOffset.value),"Lcl_Rotation"in t&&(r.rotation=t.Lcl_Rotation.value),"PreRotation"in t&&(r.preRotation=t.PreRotation.value),"PostRotation"in t&&(r.postRotation=t.PostRotation.value),"Lcl_Scaling"in t&&(r.scale=t.Lcl_Scaling.value);var n=f(r);e.applyMatrix(n)},setLookAtProperties:function(e,t){if("LookAtProperty"in t){E.get(e.ID).children.forEach(function(t){if("LookAtProperty"===t.relationship){var r=g.Objects.Model[t.ID];if("Lcl_Translation"in r){var n=r.Lcl_Translation.value;void 0!==e.target?(e.target.position.fromArray(n),y.add(e.target)):e.lookAt((new THREE.Vector3).fromArray(n))}}})}},bindSkeleton:function(e,t,r){var n=this.parsePoseNodes();for(var a in e){var i=e[a];E.get(parseInt(i.ID)).parents.forEach(function(e){if(t.has(e.ID)){var a=e.ID;E.get(a).parents.forEach(function(e){if(r.has(e.ID)){r.get(e.ID).bind(new THREE.Skeleton(i.bones),n[e.ID])}})}})}},parsePoseNodes:function(){var e={};if("Pose"in g.Objects){var t=g.Objects.Pose;for(var r in t)if("BindPose"===t[r].attrType){var n=t[r].PoseNode;Array.isArray(n)?n.forEach(function(t){e[t.Node]=(new THREE.Matrix4).fromArray(t.Matrix.a)}):e[n.Node]=(new THREE.Matrix4).fromArray(n.Matrix.a)}}return e},createAmbientLight:function(){if("GlobalSettings"in g&&"AmbientColor"in g.GlobalSettings){var e=g.GlobalSettings.AmbientColor.value,t=e[0],r=e[1],n=e[2];if(0!==t||0!==r||0!==n){var a=new THREE.Color(t,r,n);y.add(new THREE.AmbientLight(a,1))}}},setupMorphMaterials:function(){y.traverse(function(e){if(e.isMesh&&(e.geometry.morphAttributes.position||e.geometry.morphAttributes.normal)){var t=e.uuid,r=e.material.uuid,n=!1;y.traverse(function(e){e.isMesh&&e.material.uuid===r&&e.uuid!==t&&(n=!0)}),!0===n&&(e.material=e.material.clone()),e.material.morphTargets=!0}})}},r.prototype={constructor:r,parse:function(e){var t=new Map;if("Geometry"in g.Objects){var r=g.Objects.Geometry;for(var n in r){var a=E.get(parseInt(n)),i=this.parseGeometry(a,r[n],e);t.set(parseInt(n),i)}}return t},parseGeometry:function(e,t,r){switch(t.attrType){case"Mesh":return this.parseMeshGeometry(e,t,r);case"NurbsCurve":return this.parseNurbsGeometry(t)}},parseMeshGeometry:function(e,t,r){var n=r.skeletons,a=r.morphTargets,i=e.parents.map(function(e){return g.Objects.Model[e.ID]});if(0!==i.length){var o=e.children.reduce(function(e,t){return void 0!==n[t.ID]&&(e=n[t.ID]),e},null),s=e.children.reduce(function(e,t){return void 0!==a[t.ID]&&(e=a[t.ID]),e},null),u=i[0],c={};"RotationOrder"in u&&(c.eulerOrder=u.RotationOrder.value),"GeometricTranslation"in u&&(c.translation=u.GeometricTranslation.value),"GeometricRotation"in u&&(c.rotation=u.GeometricRotation.value),"GeometricScaling"in u&&(c.scale=u.GeometricScaling.value);var l=f(c);return this.genGeometry(t,o,s,l)}},genGeometry:function(e,t,r,n){var a=new THREE.BufferGeometry;e.attrName&&(a.name=e.attrName);var i=this.parseGeoNode(e,t),o=this.genBuffers(i),s=new THREE.Float32BufferAttribute(o.vertex,3);if(n.applyToBufferAttribute(s),a.addAttribute("position",s),o.colors.length>0&&a.addAttribute("color",new THREE.Float32BufferAttribute(o.colors,3)),t&&(a.addAttribute("skinIndex",new THREE.Uint16BufferAttribute(o.weightsIndices,4)),a.addAttribute("skinWeight",new THREE.Float32BufferAttribute(o.vertexWeights,4)),a.FBX_Deformer=t),o.normal.length>0){var u=new THREE.Float32BufferAttribute(o.normal,3);(new THREE.Matrix3).getNormalMatrix(n).applyToBufferAttribute(u),a.addAttribute("normal",u)}if(o.uvs.forEach(function(e,t){var r="uv"+(t+1).toString();0===t&&(r="uv"),a.addAttribute(r,new THREE.Float32BufferAttribute(o.uvs[t],2))}),i.material&&"AllSame"!==i.material.mappingType){var c=o.materialIndex[0],l=0;if(o.materialIndex.forEach(function(e,t){e!==c&&(a.addGroup(l,t-l,c),c=e,l=t)}),a.groups.length>0){var p=a.groups[a.groups.length-1],f=p.start+p.count;f!==o.materialIndex.length&&a.addGroup(f,o.materialIndex.length-f,c)}0===a.groups.length&&a.addGroup(0,o.materialIndex.length,o.materialIndex[0])}return this.addMorphTargets(a,e,r,n),a},parseGeoNode:function(e,t){var r={};if(r.vertexPositions=void 0!==e.Vertices?e.Vertices.a:[],r.vertexIndices=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],e.LayerElementColor&&(r.color=this.parseVertexColors(e.LayerElementColor[0])),e.LayerElementMaterial&&(r.material=this.parseMaterialIndices(e.LayerElementMaterial[0])),e.LayerElementNormal&&(r.normal=this.parseNormals(e.LayerElementNormal[0])),e.LayerElementUV){r.uv=[];for(var n=0;e.LayerElementUV[n];)r.uv.push(this.parseUVs(e.LayerElementUV[n])),n++}return r.weightTable={},null!==t&&(r.skeleton=t,t.rawBones.forEach(function(e,t){e.indices.forEach(function(n,a){void 0===r.weightTable[n]&&(r.weightTable[n]=[]),r.weightTable[n].push({id:t,weight:e.weights[a]})})})),r},genBuffers:function(e){var t={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]},r=0,n=0,a=!1,i=[],o=[],s=[],u=[],c=[],l=[],f=this;return e.vertexIndices.forEach(function(d,h){var m=!1;d<0&&(d^=-1,m=!0);var v=[],g=[];if(i.push(3*d,3*d+1,3*d+2),e.color){R=p(h,r,d,e.color);s.push(R[0],R[1],R[2])}if(e.skeleton){if(void 0!==e.weightTable[d]&&e.weightTable[d].forEach(function(e){g.push(e.weight),v.push(e.id)}),g.length>4){a||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),a=!0);var E=[0,0,0,0],y=[0,0,0,0];g.forEach(function(e,t){var r=e,n=v[t];y.forEach(function(e,t,a){if(r>e){a[t]=r,r=e;var i=E[t];E[t]=n,n=i}})}),v=E,g=y}for(;g.length<4;)g.push(0),v.push(0);for(var T=0;T<4;++T)c.push(g[T]),l.push(v[T])}if(e.normal){var R=p(h,r,d,e.normal);o.push(R[0],R[1],R[2])}if(e.material&&"AllSame"!==e.material.mappingType)var b=p(h,r,d,e.material)[0];e.uv&&e.uv.forEach(function(e,t){var n=p(h,r,d,e);void 0===u[t]&&(u[t]=[]),u[t].push(n[0]),u[t].push(n[1])}),n++,m&&(f.genFace(t,e,i,b,o,s,u,c,l,n),r++,n=0,i=[],o=[],s=[],u=[],c=[],l=[])}),t},genFace:function(e,t,r,n,a,i,o,s,u,c){for(var l=2;l1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");var i=e.get(a[0].ID);r[n]={name:t[n].attrName,layer:i}}return r},addClip:function(e){var t=[],r=this;return e.layer.forEach(function(e){t=t.concat(r.generateTracks(e))}),new THREE.AnimationClip(e.name,-1,t)},generateTracks:function(e){var t=[],r=new THREE.Vector3,n=new THREE.Quaternion,a=new THREE.Vector3;if(e.transform&&e.transform.decompose(r,n,a),r=r.toArray(),n=(new THREE.Euler).setFromQuaternion(n).toArray(),a=a.toArray(),void 0!==e.T&&Object.keys(e.T.curves).length>0){var i=this.generateVectorTrack(e.modelName,e.T.curves,r,"position");void 0!==i&&t.push(i)}if(void 0!==e.R&&Object.keys(e.R.curves).length>0){var o=this.generateRotationTrack(e.modelName,e.R.curves,n,e.preRotations,e.postRotations);void 0!==o&&t.push(o)}if(void 0!==e.S&&Object.keys(e.S.curves).length>0){var s=this.generateVectorTrack(e.modelName,e.S.curves,a,"scale");void 0!==s&&t.push(s)}if(void 0!==e.DeformPercent){var u=this.generateMorphTrack(e);void 0!==u&&t.push(u)}return t},generateVectorTrack:function(e,t,r,n){var a=this.getTimesForAllAxes(t),i=this.getKeyframeTrackValues(a,t,r);return new THREE.VectorKeyframeTrack(e+"."+n,a,i)},generateRotationTrack:function(e,t,r,n,a){void 0!==t.x&&(this.interpolateRotations(t.x),t.x.values=t.x.values.map(THREE.Math.degToRad)),void 0!==t.y&&(this.interpolateRotations(t.y),t.y.values=t.y.values.map(THREE.Math.degToRad)),void 0!==t.z&&(this.interpolateRotations(t.z),t.z.values=t.z.values.map(THREE.Math.degToRad));var i=this.getTimesForAllAxes(t),o=this.getKeyframeTrackValues(i,t,r);void 0!==n&&((n=n.map(THREE.Math.degToRad)).push("ZYX"),n=(new THREE.Euler).fromArray(n),n=(new THREE.Quaternion).setFromEuler(n)),void 0!==a&&((a=a.map(THREE.Math.degToRad)).push("ZYX"),a=(new THREE.Euler).fromArray(a),a=(new THREE.Quaternion).setFromEuler(a).inverse());for(var s=new THREE.Quaternion,u=new THREE.Euler,c=[],l=0;l=180){for(var i=a/180,o=n/i,s=r+o,u=e.times[t-1],c=(e.times[t]-u)/i,l=u+c,p=[],f=[];l1&&(r=e[1].replace(/^(\w+)::/,""),n=e[2]),{id:t,name:r,type:n}},parseNodeProperty:function(e,t,r){var n=t[1].replace(/^"/,"").replace(/"$/,"").trim(),a=t[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===n&&","===a&&(a=r.replace(/"/g,"").replace(/,$/,"").trim());var i=this.getCurrentNode();if("Properties70"!==i.name){if("C"===n){var o=a.split(",").slice(1),s=parseInt(o[0]),u=parseInt(o[1]),c=a.split(",").slice(3);n="connections",function(e,t){for(var r=0,n=e.length,a=t.length;r=e.size():e.getOffset()+160+16>=e.size()},parseNode:function(e,t){var r={},n=t>=7500?e.getUint64():e.getUint32(),a=t>=7500?e.getUint64():e.getUint32(),i=(t>=7500?e.getUint64():e.getUint32(),e.getUint8()),o=e.getString(i);if(0===n)return null;for(var s=[],u=0;u0?s[0]:"",l=s.length>1?s[1]:"",p=s.length>2?s[2]:"";for(r.singleProperty=1===a&&e.getOffset()===n;n>e.getOffset();){var f=this.parseNode(e,t);null!==f&&this.parseSubNode(o,r,f)}return r.propertyList=s,"number"==typeof c&&(r.id=c),""!==l&&(r.attrName=l),""!==p&&(r.attrType=p),""!==o&&(r.name=o),r},parseSubNode:function(e,t,r){if(!0===r.singleProperty){var n=r.propertyList[0];Array.isArray(n)?(t[r.name]=r,r.a=n):t[r.name]=n}else if("Connections"===e&&"C"===r.name){var a=[];r.propertyList.forEach(function(e,t){0!==t&&a.push(e)}),void 0===t.connections&&(t.connections=[]),t.connections.push(a)}else if("Properties70"===r.name){Object.keys(r).forEach(function(e){t[e]=r[e]})}else if("Properties70"===e&&"P"===r.name){var i,o=r.propertyList[0],s=r.propertyList[1],u=r.propertyList[2],c=r.propertyList[3];0===o.indexOf("Lcl ")&&(o=o.replace("Lcl ","Lcl_")),0===s.indexOf("Lcl ")&&(s=s.replace("Lcl ","Lcl_")),i="Color"===s||"ColorRGB"===s||"Vector"===s||"Vector3D"===s||0===s.indexOf("Lcl_")?[r.propertyList[4],r.propertyList[5],r.propertyList[6]]:r.propertyList[4],t[o]={type:s,type2:u,flag:c,value:i}}else void 0===t[r.name]?"number"==typeof r.id?(t[r.name]={},t[r.name][r.id]=r):t[r.name]=r:"PoseNode"===r.name?(Array.isArray(t[r.name])||(t[r.name]=[t[r.name]]),t[r.name].push(r)):void 0===t[r.name][r.id]&&(t[r.name][r.id]=r)},parseProperty:function(e){var t=e.getString(1);switch(t){case"C":return e.getBoolean();case"D":return e.getFloat64();case"F":return e.getFloat32();case"I":return e.getInt32();case"L":return e.getInt64();case"R":r=e.getUint32();return e.getArrayBuffer(r);case"S":var r=e.getUint32();return e.getString(r);case"Y":return e.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":var n=e.getUint32(),a=e.getUint32(),i=e.getUint32();if(0===a)switch(t){case"b":case"c":return e.getBooleanArray(n);case"d":return e.getFloat64Array(n);case"f":return e.getFloat32Array(n);case"i":return e.getInt32Array(n);case"l":return e.getInt64Array(n)}"undefined"==typeof Zlib&&console.error("THREE.FBXLoader: External library Inflate.min.js required, obtain or import from https://github.com/imaya/zlib.js");var o=new s(new Zlib.Inflate(new Uint8Array(e.getArrayBuffer(i))).decompress().buffer);switch(t){case"b":case"c":return o.getBooleanArray(n);case"d":return o.getFloat64Array(n);case"f":return o.getFloat32Array(n);case"i":return o.getInt32Array(n);case"l":return o.getInt64Array(n)}default:throw new Error("THREE.FBXLoader: Unknown property type "+t)}}},s.prototype={constructor:s,getOffset:function(){return this.offset},size:function(){return this.dv.buffer.byteLength},skip:function(e){this.offset+=e},getBoolean:function(){return 1==(1&this.getUint8())},getBooleanArray:function(e){for(var t=[],r=0;r=0&&(t=t.slice(0,n)),THREE.LoaderUtils.decodeText(new Uint8Array(t))}},u.prototype={constructor:u,add:function(e,t){this[e]=t}};var T=[],R=new THREE.Matrix4,b=new THREE.Euler,w=new THREE.Vector3,x=new THREE.Vector3,I=new THREE.Matrix4;return e}()},{}],3:[function(e,t,r){"use strict";function n(e){var t=document.getElementById(e),r=t.parentNode;try{r&&r.removeChild(t)}catch(e){}}function a(e,t,r){return new r(function(r,a){var i=t.timeout||5e3,o="script_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),s=function(e,t){var r=document.createElement("script");return r.type="text/javascript",r.async=!0,r.id=t,r.src=e,r}(e,o),u=setTimeout(function(){a(new Error("Script request to "+e+" timed out")),n(o)},i),c=function(e){clearTimeout(e)};s.addEventListener("load",function(e){r({ok:!0}),c(u),n(o)}),s.addEventListener("error",function(t){a(new Error("Script request to "+e+" failed "+t)),c(u),n(o)}),function(e){var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}(s)})}t.exports=function(e){return e=e||{},function(t,r){return r=r||{},a(t,r,e.Promise||Promise)}}},{}],4:[function(e,t,r){"use strict";function n(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")}var a={once:THREE.LoopOnce,repeat:THREE.LoopRepeat,pingpong:THREE.LoopPingPong};t.exports=AFRAME.registerComponent("animation-mixer",{schema:{clip:{default:"*"},duration:{default:0},clampWhenFinished:{default:!1,type:"boolean"},crossFadeDuration:{default:0},loop:{default:"repeat",oneOf:Object.keys(a)},repetitions:{default:1/0,min:0},timeScale:{default:1}},init:function(){var e=this;this.model=null,this.mixer=null,this.activeActions=[];var t=this.el.getObject3D("mesh");t?this.load(t):this.el.addEventListener("model-loaded",function(t){e.load(t.detail.model)})},load:function(e){var t=this.el;this.model=e,this.mixer=new THREE.AnimationMixer(e),this.mixer.addEventListener("loop",function(e){t.emit("animation-loop",{action:e.action,loopDelta:e.loopDelta})}),this.mixer.addEventListener("finished",function(e){t.emit("animation-finished",{action:e.action,direction:e.direction})}),this.data.clip&&this.update({})},remove:function(){this.mixer&&this.mixer.stopAllAction()},update:function(e){if(e){var t=this.data,r=AFRAME.utils.diff(t,e);if("clip"in r)return this.stopAction(),void(t.clip&&this.playAction());this.activeActions.forEach(function(e){"duration"in r&&t.duration&&e.setDuration(t.duration),"clampWhenFinished"in r&&(e.clampWhenFinished=t.clampWhenFinished),("loop"in r||"repetitions"in r)&&e.setLoop(a[t.loop],t.repetitions),"timeScale"in r&&e.setEffectiveTimeScale(t.timeScale)})}},stopAction:function(){for(var e=this.data,t=0;t