/*! Grunt Uglify 2016-01-24 */"use strict";varTHREE={REVISION:"71"};"object"==typeofmodule&&(module.exports=THREE),void0===Math.sign&&(Math.sign=function(a){return0>a?-1:a>0?1:+a}),THREE.log=function(){},THREE.warn=function(){},THREE.error=function(){},THREE.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2},THREE.CullFaceNone=0,THREE.CullFaceBack=1,THREE.CullFaceFront=2,THREE.CullFaceFrontBack=3,THREE.FrontFaceDirectionCW=0,THREE.FrontFaceDirectionCCW=1,THREE.BasicShadowMap=0,THREE.PCFShadowMap=1,THREE.PCFSoftShadowMap=2,THREE.FrontSide=0,THREE.BackSide=1,THREE.DoubleSide=2,THREE.NoShading=0,THREE.FlatShading=1,THREE.SmoothShading=2,THREE.NoColors=0,THREE.FaceColors=1,THREE.VertexColors=2,THREE.NoBlending=0,THREE.NormalBlending=1,THREE.AdditiveBlending=2,THREE.SubtractiveBlending=3,THREE.MultiplyBlending=4,THREE.CustomBlending=5,THREE.AddEquation=100,THREE.SubtractEquation=101,THREE.ReverseSubtractEquation=102,THREE.MinEquation=103,THREE.MaxEquation=104,THREE.ZeroFactor=200,THREE.OneFactor=201,THREE.SrcColorFactor=202,THREE.OneMinusSrcColorFactor=203,THREE.SrcAlphaFactor=204,THREE.OneMinusSrcAlphaFactor=205,THREE.DstAlphaFactor=206,THREE.OneMinusDstAlphaFactor=207,THREE.DstColorFactor=208,THREE.OneMinusDstColorFactor=209,THREE.SrcAlphaSaturateFactor=210,THREE.MultiplyOperation=0,THREE.MixOperation=1,THREE.AddOperation=2,THREE.UVMapping=300,THREE.CubeReflectionMapping=301,THREE.CubeRefractionMapping=302,THREE.EquirectangularReflectionMapping=303,THREE.EquirectangularRefractionMapping=304,THREE.SphericalReflectionMapping=305,THREE.RepeatWrapping=1e3,THREE.ClampToEdgeWrapping=1001,THREE.MirroredRepeatWrapping=1002,THREE.NearestFilter=1003,THREE.NearestMipMapNearestFilter=1004,THREE.NearestMipMapLinearFilter=1005,THREE.LinearFilter=1006,THREE.LinearMipMapNearestFilter=1007,THREE.LinearMipMapLinearFilter=1008,THREE.UnsignedByteType=1009,THREE.ByteType=1010,THREE.ShortType=1011,THREE.UnsignedShortType=1012,THREE.IntType=1013,THREE.UnsignedIntType=1014,THREE.FloatType=1015,THREE.HalfFloatType=1025,THREE.UnsignedShort4444Type=1016,THREE.UnsignedShort5551Type=1017,THREE.UnsignedShort565Type=1018,THREE.AlphaFormat=1019,THREE.RGBFormat=1020,THREE.RGBAFormat=1021,THREE.LuminanceFormat=1022,THREE.LuminanceAlphaFormat=1023,THREE.RGBEFormat=THREE.RGBAFormat,THREE.RGB_S3TC_DXT1_Format=2001,THREE.RGBA_S3TC_DXT1_Format=2002,THREE.RGBA_S3TC_DXT3_Format=2003,THREE.RGBA_S3TC_DXT5_Format=2004,THREE.RGB_PVRTC_4BPPV1_Format=2100,THREE.RGB_PVRTC_2BPPV1_Format=2101,THREE.RGBA_PVRTC_4BPPV1_Format=2102,THREE.RGBA_PVRTC_2BPPV1_Format=2103,THREE.Projector=function(){THREE.error("THREE.Projector has been moved to /examples/js/renderers/Projector.js."),this.projectVector=function(a,b){THREE.warn("THREE.Projector: .projectVector() is now vector.project()."),a.project(b)},this.unprojectVector=function(a,b){THREE.warn("THREE.Projector: .unprojectVector() is now vector.unproject()."),a.unproject(b)},this.pickingRay=function(a,b){THREE.error("THREE.Projector: .pickingRay() is now raycaster.setFromCamera().")}},THREE.CanvasRenderer=function(){THREE.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js"),this.domElement=document.createElement("canvas"),this.clear=function(){},this.render=function(){},this.setClearColor=function(){},this.setSize=function(){}},THREE.Color=function(a){return3===arguments.length?this.setRGB(arguments[0],arguments[1],arguments[2]):this.set(a)},THREE.Color.prototype={constructor:THREE.Color,r:1,g:1,b:1,set:function(a){returnainstanceofTHREE.Color?this.copy(a):"number"==typeofa?this.setHex(a):"string"==typeofa&&this.setStyle(a),this},setHex:function(a){returna=Math.floor(a),this.r=(a>>16&255)/255,this.g=(a>>8&255)/255,this.b=(255&a)/255,this},setRGB:function(a,b,c){returnthis.r=a,this.g=b,this.b=c,this},setHSL:function(a,b,c){if(0===b)this.r=this.g=this.b=c;else{vard=function(a,b,c){return0>c&&(c+=1),c>1&&(c-=1),1/6>c?a+6*(b-a)*c:.5>c?b:2/3>c?a+6*(b-a)*(2/3-c):a};b=.5>=c?c*(1+b):c+b-c*b,c=2*c-b,this.r=d(c,b,a+1/3),this.g=d(c,b,a),this.b=d(c,b,a-1/3)}returnthis},setStyle:function(a){return/^rgb\((\d+),
constructor:THREE.Euler,_x:0,_y:0,_z:0,_order:THREE.Euler.DefaultOrder,getx(){returnthis._x},setx(a){this._x=a,this.onChangeCallback()},gety(){returnthis._y},sety(a){this._y=a,this.onChangeCallback()},getz(){returnthis._z},setz(a){this._z=a,this.onChangeCallback()},getorder(){returnthis._order},setorder(a){this._order=a,this.onChangeCallback()},set:function(a,b,c,d){returnthis._x=a,this._y=b,this._z=c,this._order=d||this._order,this.onChangeCallback(),this},copy:function(a){returnthis._x=a._x,this._y=a._y,this._z=a._z,this._order=a._order,this.onChangeCallback(),this},setFromRotationMatrix:function(a,b,c){vard=THREE.Math.clamp,e=a.elements;a=e[0];varf=e[4],g=e[8],h=e[1],i=e[5],j=e[9],k=e[2],l=e[6],e=e[10];returnb=b||this._order,"XYZ"===b?(this._y=Math.asin(d(g,-1,1)),.99999>Math.abs(g)?(this._x=Math.atan2(-j,e),this._z=Math.atan2(-f,a)):(this._x=Math.atan2(l,i),this._z=0)):"YXZ"===b?(this._x=Math.asin(-d(j,-1,1)),.99999>Math.abs(j)?(this._y=Math.atan2(g,e),this._z=Math.atan2(h,i)):(this._y=Math.atan2(-k,a),this._z=0)):"ZXY"===b?(this._x=Math.asin(d(l,-1,1)),.99999>Math.abs(l)?(this._y=Math.atan2(-k,e),this._z=Math.atan2(-f,i)):(this._y=0,this._z=Math.atan2(h,a))):"ZYX"===b?(this._y=Math.asin(-d(k,-1,1)),.99999>Math.abs(k)?(this._x=Math.atan2(l,e),this._z=Math.atan2(h,a)):(this._x=0,this._z=Math.atan2(-f,i))):"YZX"===b?(this._z=Math.asin(d(h,-1,1)),.99999>Math.abs(h)?(this._x=Math.atan2(-j,i),this._y=Math.atan2(-k,a)):(this._x=0,this._y=Math.atan2(g,e))):"XZY"===b?(this._z=Math.asin(-d(f,-1,1)),.99999>Math.abs(f)?(this._x=Math.atan2(l,i),this._y=Math.atan2(g,a)):(this._x=Math.atan2(-j,e),this._y=0)):THREE.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+b),this._order=b,!1!==c&&this.onChangeCallback(),this},setFromQuaternion:function(){vara;returnfunction(b,c,d){returnvoid0===a&&(a=newTHREE.Matrix4),a.makeRotationFromQuaternion(b),this.setFromRotationMatrix(a,c,d),this}}(),setFromVector3:function(a,b){returnthis.set(a.x,a.y,a.z,b||this._order)},reorder:function(){vara=newTHREE.Quaternion;returnfunction(b){a.setFromEuler(this),this.setFromQuaternion(a,b)}}(),equals:function(a){returna._x===this._x&&a._y===this._y&&a._z===this._z&&a._order===this._order},fromArray:function(a){returnthis._x=a[0],this._y=a[1],this._z=a[2],void0!==a[3]&&(this._order=a[3]),this.onChangeCallback(),this},toArray:function(a,b){returnvoid0===a&&(a=[]),void0===b&&(b=0),a[b]=this._x,a[b+1]=this._y,a[b+2]=this._z,a[b+3]=this._order,a},toVector3:function(a){returna?a.set(this._x,this._y,this._z):newTHREE.Vector3(this._x,this._y,this._z)},onChange:function(a){returnthis.onChangeCallback=a,this},onChangeCallback:function(){},clone:function(){returnnewTHREE.Euler(this._x,this._y,this._z,this._order)}},THREE.Line3=function(a,b){this.start=void0!==a?a:newTHREE.Vector3,this.end=void0!==b?b:newTHREE.Vector3},THREE.Line3.prototype={constructor:THREE.Line3,set:function(a,b){returnthis.start.copy(a),this.end.copy(b),this},copy:function(a){returnthis.start.copy(a.start),this.end.copy(a.end),this},center:function(a){return(a||newTHREE.Vector3).addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(a){return(a||newTHREE.Vector3).subVectors(this.end,this.start)},distanceSq:function(){returnthis.start.distanceToSquared(this.end)},distance:function(){returnthis.start.distanceTo(this.end)},at:function(a,b){varc=b||newTHREE.Vector3;returnthis.delta(c).multiplyScalar(a).add(this.start)},closestPointToPointParameter:function(){vara=newTHREE.Vector3,b=newTHREE.Vector3;returnfunction(c,d){a.subVectors(c,this.start),b.subVectors(this.end,this.start);vare=b.dot(b),e=b.dot(a)/e;returnd&&(e=THREE.Math.clamp(e,0,1)),e}}(),closestPointToPoint:function(a,b,c){returna=this.closestPointToPointParameter(a,b),c=c||newTHREE.Vector3,this.delta(c).multiplyScalar(a).add(this.start)},applyMatrix4:function(a){returnthis.start.applyMatrix4(a),this.end.applyMatrix4(a),this},equals:function(a){returna.start.equals(this.start)&&a.end.equals(this.end)},clone:function(){return(newTHREE.Line3).copy(this
color:16777215*Math.random()}),this.updateMorphTargets()},THREE.Mesh.prototype=Object.create(THREE.Object3D.prototype),THREE.Mesh.prototype.constructor=THREE.Mesh,THREE.Mesh.prototype.updateMorphTargets=function(){if(void0!==this.geometry.morphTargets&&0<this.geometry.morphTargets.length){this.morphTargetBase=-1,this.morphTargetForcedOrder=[],this.morphTargetInfluences=[],this.morphTargetDictionary={};for(vara=0,b=this.geometry.morphTargets.length;b>a;a++)this.morphTargetInfluences.push(0),this.morphTargetDictionary[this.geometry.morphTargets[a].name]=a}},THREE.Mesh.prototype.getMorphTargetIndexByName=function(a){returnvoid0!==this.morphTargetDictionary[a]?this.morphTargetDictionary[a]:(THREE.warn("THREE.Mesh.getMorphTargetIndexByName: morph target "+a+" does not exist. Returning 0."),0)},THREE.Mesh.prototype.raycast=function(){vara=newTHREE.Matrix4,b=newTHREE.Ray,c=newTHREE.Sphere,d=newTHREE.Vector3,e=newTHREE.Vector3,f=newTHREE.Vector3;returnfunction(g,h){vari=this.geometry;if(null===i.boundingSphere&&i.computeBoundingSphere(),c.copy(i.boundingSphere),c.applyMatrix4(this.matrixWorld),!1!==g.ray.isIntersectionSphere(c)&&(a.getInverse(this.matrixWorld),b.copy(g.ray).applyMatrix4(a),null===i.boundingBox||!1!==b.isIntersectionBox(i.boundingBox)))if(iinstanceofTHREE.BufferGeometry){varj=this.material;if(void0!==j){vark,l,m=i.attributes,n=g.precision;if(void0!==m.index){varo=m.index.array,p=m.position.array,q=i.offsets;0===q.length&&(q=[{start:0,count:o.length,index:0}]);for(varr=0,s=q.length;s>r;++r)for(varm=q[r].start,t=q[r].index,i=m,u=m+q[r].count;u>i;i+=3){m=t+o[i],k=t+o[i+1],l=t+o[i+2],d.fromArray(p,3*m),e.fromArray(p,3*k),f.fromArray(p,3*l);varv=j.side===THREE.BackSide?b.intersectTriangle(f,e,d,!0):b.intersectTriangle(d,e,f,j.side!==THREE.DoubleSide);if(null!==v){v.applyMatrix4(this.matrixWorld);varw=g.ray.origin.distanceTo(v);n>w||w<g.near||w>g.far||h.push({distance:w,point:v,face:newTHREE.Face3(m,k,l,THREE.Triangle.normal(d,e,f)),faceIndex:null,object:this})}}}elsefor(p=m.position.array,o=i=0,u=p.length;u>i;i+=3,o+=9)m=i,k=i+1,l=i+2,d.fromArray(p,o),e.fromArray(p,o+3),f.fromArray(p,o+6),v=j.side===THREE.BackSide?b.intersectTriangle(f,e,d,!0):b.intersectTriangle(d,e,f,j.side!==THREE.DoubleSide),null!==v&&(v.applyMatrix4(this.matrixWorld),w=g.ray.origin.distanceTo(v),n>w||w<g.near||w>g.far||h.push({distance:w,point:v,face:newTHREE.Face3(m,k,l,THREE.Triangle.normal(d,e,f)),faceIndex:null,object:this}))}}elseif(iinstanceofTHREE.Geometry)for(o=this.materialinstanceofTHREE.MeshFaceMaterial,p=!0===o?this.material.materials:null,n=g.precision,q=i.vertices,r=0,s=i.faces.length;s>r;r++)if(t=i.faces[r],j=!0===o?p[t.materialIndex]:this.material,void0!==j){if(m=q[t.a],k=q[t.b],l=q[t.c],!0===j.morphTargets){v=i.morphTargets,w=this.morphTargetInfluences,d.set(0,0,0),e.set(0,0,0),f.set(0,0,0);for(varu=0,x=v.length;x>u;u++){vary=w[u];if(0!==y){varz=v[u].vertices;d.x+=(z[t.a].x-m.x)*y,d.y+=(z[t.a].y-m.y)*y,d.z+=(z[t.a].z-m.z)*y,e.x+=(z[t.b].x-k.x)*y,e.y+=(z[t.b].y-k.y)*y,e.z+=(z[t.b].z-k.z)*y,f.x+=(z[t.c].x-l.x)*y,f.y+=(z[t.c].y-l.y)*y,f.z+=(z[t.c].z-l.z)*y}}d.add(m),e.add(k),f.add(l),m=d,k=e,l=f}v=j.side===THREE.BackSide?b.intersectTriangle(l,k,m,!0):b.intersectTriangle(m,k,l,j.side!==THREE.DoubleSide),null!==v&&(v.applyMatrix4(this.matrixWorld),w=g.ray.origin.distanceTo(v),n>w||w<g.near||w>g.far||h.push({distance:w,point:v,face:t,faceIndex:r,object:this}))}}}(),THREE.Mesh.prototype.clone=function(a,b){returnvoid0===a&&(a=newTHREE.Mesh(this.geometry,this.material)),THREE.Object3D.prototype.clone.call(this,a,b),a},THREE.Bone=function(a){THREE.Object3D.call(this),this.type="Bone",this.skin=a},THREE.Bone.prototype=Object.create(THREE.Object3D.prototype),THREE.Bone.prototype.constructor=THREE.Bone,THREE.Skeleton=function(a,b,c){if(this.useVertexTexture=void0!==c?c:!0,this.identityMatrix=newTHREE.Matrix4,a=a||[],this.bones=a.slice(0),this.useVertexTexture?(this.boneTextureHeight=this.boneTextureWidth=a=256<this.bones.length?64:64<this.bones.length?32:16<this.bones.length?16:8,this.boneMatrices=ne
W.vertexAttribPointer(h,3,W.FLOAT,!1,0,0)),h=c["morphNormal"+i],h>=0&&d.morphNormals&&(W.bindBuffer(W.ARRAY_BUFFER,e.__webglMorphNormalsBuffers[m]),ra.enableAttribute(h),W.vertexAttribPointer(h,3,W.FLOAT,!1,0,0)),f.__webglMorphTargetInfluences[i]=k[m]}elsef.__webglMorphTargetInfluences[i]=0}null!==d.program.uniforms.morphTargetInfluences&&W.uniform1fv(d.program.uniforms.morphTargetInfluences,f.__webglMorphTargetInfluences)}if(a){if(e.__webglCustomAttributesList)for(c=0,k=e.__webglCustomAttributesList.length;k>c;c++)j=e.__webglCustomAttributesList[c],0<=b[j.buffer.belongsToAttribute]&&(W.bindBuffer(W.ARRAY_BUFFER,j.buffer),ra.enableAttribute(b[j.buffer.belongsToAttribute]),W.vertexAttribPointer(b[j.buffer.belongsToAttribute],j.size,W.FLOAT,!1,0,0));0<=b.color&&(0<f.geometry.colors.length||0<f.geometry.faces.length?(W.bindBuffer(W.ARRAY_BUFFER,e.__webglColorBuffer),ra.enableAttribute(b.color),W.vertexAttribPointer(b.color,3,W.FLOAT,!1,0,0)):void0!==d.defaultAttributeValues&&W.vertexAttrib3fv(b.color,d.defaultAttributeValues.color)),0<=b.normal&&(W.bindBuffer(W.ARRAY_BUFFER,e.__webglNormalBuffer),ra.enableAttribute(b.normal),W.vertexAttribPointer(b.normal,3,W.FLOAT,!1,0,0)),0<=b.tangent&&(W.bindBuffer(W.ARRAY_BUFFER,e.__webglTangentBuffer),ra.enableAttribute(b.tangent),W.vertexAttribPointer(b.tangent,4,W.FLOAT,!1,0,0)),0<=b.uv&&(f.geometry.faceVertexUvs[0]?(W.bindBuffer(W.ARRAY_BUFFER,e.__webglUVBuffer),ra.enableAttribute(b.uv),W.vertexAttribPointer(b.uv,2,W.FLOAT,!1,0,0)):void0!==d.defaultAttributeValues&&W.vertexAttrib2fv(b.uv,d.defaultAttributeValues.uv)),0<=b.uv2&&(f.geometry.faceVertexUvs[1]?(W.bindBuffer(W.ARRAY_BUFFER,e.__webglUV2Buffer),ra.enableAttribute(b.uv2),W.vertexAttribPointer(b.uv2,2,W.FLOAT,!1,0,0)):void0!==d.defaultAttributeValues&&W.vertexAttrib2fv(b.uv2,d.defaultAttributeValues.uv2)),d.skinning&&0<=b.skinIndex&&0<=b.skinWeight&&(W.bindBuffer(W.ARRAY_BUFFER,e.__webglSkinIndicesBuffer),ra.enableAttribute(b.skinIndex),W.vertexAttribPointer(b.skinIndex,4,W.FLOAT,!1,0,0),W.bindBuffer(W.ARRAY_BUFFER,e.__webglSkinWeightsBuffer),ra.enableAttribute(b.skinWeight),W.vertexAttribPointer(b.skinWeight,4,W.FLOAT,!1,0,0)),0<=b.lineDistance&&(W.bindBuffer(W.ARRAY_BUFFER,e.__webglLineDistanceBuffer),ra.enableAttribute(b.lineDistance),W.vertexAttribPointer(b.lineDistance,1,W.FLOAT,!1,0,0))}ra.disableUnusedAttributes(),finstanceofTHREE.Mesh?(f=e.__typeArray===Uint32Array?W.UNSIGNED_INT:W.UNSIGNED_SHORT,d.wireframe?(ra.setLineWidth(d.wireframeLinewidth*E),a&&W.bindBuffer(W.ELEMENT_ARRAY_BUFFER,e.__webglLineBuffer),W.drawElements(W.LINES,e.__webglLineCount,f,0)):(a&&W.bindBuffer(W.ELEMENT_ARRAY_BUFFER,e.__webglFaceBuffer),W.drawElements(W.TRIANGLES,e.__webglFaceCount,f,0)),X.info.render.calls++,X.info.render.vertices+=e.__webglFaceCount,X.info.render.faces+=e.__webglFaceCount/3):finstanceofTHREE.Line?(f=f.mode===THREE.LineStrip?W.LINE_STRIP:W.LINES,ra.setLineWidth(d.linewidth*E),W.drawArrays(f,0,e.__webglLineCount),X.info.render.calls++):finstanceofTHREE.PointCloud&&(W.drawArrays(W.POINTS,0,e.__webglParticleCount),X.info.render.calls++,X.info.render.points+=e.__webglParticleCount)}},this.render=function(a,b,c,d){if(!1==binstanceofTHREE.Camera)THREE.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else{varg=a.fog;aa="",_=-1,ba=null,na=!0,!0===a.autoUpdate&&a.updateMatrixWorld(),void0===b.parent&&b.updateMatrixWorld(),a.traverse(function(a){ainstanceofTHREE.SkinnedMesh&&a.skeleton.update()}),b.matrixWorldInverse.getInverse(b.matrixWorld),ka.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse),ja.setFromMatrix(ka),P.length=0,S.length=0,T.length=0,U.length=0,V.length=0,h(a),!0===X.sortObjects&&(S.sort(e),T.sort(f)),Ja.render(a,b),X.info.render.calls=0,X.info.render.vertices=0,X.info.render.faces=0,X.info.render.points=0,this.setRenderTarget(c),(this.autoClear||d)&&this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil),d=0;for(varl=R.length;l>d;d++){varm=R[d],n=m.object;n.visible&&(u(n,b),k(m))}a.overrideMaterial?(d=a.overrideMaterial,q(d),i(S,b,P,g,d),i(T,b