|
@@ -333,8 +333,7 @@ this.material;if(void 0!==m){var n=k.attributes,p,r,q=g.precision;if(void 0!==n.
|
|
THREE.DoubleSide);if(null!==B){B.applyMatrix4(this.matrixWorld);var C=g.ray.origin.distanceTo(B);C<q||C<g.near||C>g.far||h.push({distance:C,point:B,indices:[n,p,r],face:null,faceIndex:null,object:this})}}}else for(s=n.position.array,t=k=0,y=s.length;k<y;k+=3,t+=9)n=k,p=k+1,r=k+2,d.set(s[t],s[t+1],s[t+2]),e.set(s[t+3],s[t+4],s[t+5]),f.set(s[t+6],s[t+7],s[t+8]),B=m.side===THREE.BackSide?b.intersectTriangle(f,e,d,!0):b.intersectTriangle(d,e,f,m.side!==THREE.DoubleSide),null!==B&&(B.applyMatrix4(this.matrixWorld),
|
|
THREE.DoubleSide);if(null!==B){B.applyMatrix4(this.matrixWorld);var C=g.ray.origin.distanceTo(B);C<q||C<g.near||C>g.far||h.push({distance:C,point:B,indices:[n,p,r],face:null,faceIndex:null,object:this})}}}else for(s=n.position.array,t=k=0,y=s.length;k<y;k+=3,t+=9)n=k,p=k+1,r=k+2,d.set(s[t],s[t+1],s[t+2]),e.set(s[t+3],s[t+4],s[t+5]),f.set(s[t+6],s[t+7],s[t+8]),B=m.side===THREE.BackSide?b.intersectTriangle(f,e,d,!0):b.intersectTriangle(d,e,f,m.side!==THREE.DoubleSide),null!==B&&(B.applyMatrix4(this.matrixWorld),
|
|
C=g.ray.origin.distanceTo(B),C<q||C<g.near||C>g.far||h.push({distance:C,point:B,indices:[n,p,r],face:null,faceIndex:null,object:this}))}}else if(k instanceof THREE.Geometry)for(t=this.material instanceof THREE.MeshFaceMaterial,s=!0===t?this.material.materials:null,q=g.precision,v=k.vertices,x=0,u=k.faces.length;x<u;x++)if(G=k.faces[x],m=!0===t?s[G.materialIndex]:this.material,void 0!==m){n=v[G.a];p=v[G.b];r=v[G.c];if(!0===m.morphTargets){B=k.morphTargets;C=this.morphTargetInfluences;d.set(0,0,0);
|
|
C=g.ray.origin.distanceTo(B),C<q||C<g.near||C>g.far||h.push({distance:C,point:B,indices:[n,p,r],face:null,faceIndex:null,object:this}))}}else if(k instanceof THREE.Geometry)for(t=this.material instanceof THREE.MeshFaceMaterial,s=!0===t?this.material.materials:null,q=g.precision,v=k.vertices,x=0,u=k.faces.length;x<u;x++)if(G=k.faces[x],m=!0===t?s[G.materialIndex]:this.material,void 0!==m){n=v[G.a];p=v[G.b];r=v[G.c];if(!0===m.morphTargets){B=k.morphTargets;C=this.morphTargetInfluences;d.set(0,0,0);
|
|
e.set(0,0,0);f.set(0,0,0);for(var y=0,A=B.length;y<A;y++){var w=C[y];if(0!==w){var z=B[y].vertices;d.x+=(z[G.a].x-n.x)*w;d.y+=(z[G.a].y-n.y)*w;d.z+=(z[G.a].z-n.z)*w;e.x+=(z[G.b].x-p.x)*w;e.y+=(z[G.b].y-p.y)*w;e.z+=(z[G.b].z-p.z)*w;f.x+=(z[G.c].x-r.x)*w;f.y+=(z[G.c].y-r.y)*w;f.z+=(z[G.c].z-r.z)*w}}d.add(n);e.add(p);f.add(r);n=d;p=e;r=f}B=m.side===THREE.BackSide?b.intersectTriangle(r,p,n,!0):b.intersectTriangle(n,p,r,m.side!==THREE.DoubleSide);null!==B&&(B.applyMatrix4(this.matrixWorld),C=g.ray.origin.distanceTo(B),
|
|
e.set(0,0,0);f.set(0,0,0);for(var y=0,A=B.length;y<A;y++){var w=C[y];if(0!==w){var z=B[y].vertices;d.x+=(z[G.a].x-n.x)*w;d.y+=(z[G.a].y-n.y)*w;d.z+=(z[G.a].z-n.z)*w;e.x+=(z[G.b].x-p.x)*w;e.y+=(z[G.b].y-p.y)*w;e.z+=(z[G.b].z-p.z)*w;f.x+=(z[G.c].x-r.x)*w;f.y+=(z[G.c].y-r.y)*w;f.z+=(z[G.c].z-r.z)*w}}d.add(n);e.add(p);f.add(r);n=d;p=e;r=f}B=m.side===THREE.BackSide?b.intersectTriangle(r,p,n,!0):b.intersectTriangle(n,p,r,m.side!==THREE.DoubleSide);null!==B&&(B.applyMatrix4(this.matrixWorld),C=g.ray.origin.distanceTo(B),
|
|
-C<q||C<g.near||C>g.far||h.push({distance:C,point:B,face:G,faceIndex:x,object:this}))}}}();THREE.Mesh.prototype.clone=function(a,b){void 0===a&&(a=new THREE.Mesh(this.geometry,this.material));THREE.Object3D.prototype.clone.call(this,a,b);return a};THREE.Bone=function(a){THREE.Object3D.call(this);this.skin=a;this.accumulatedSclWeight=this.accumulatedPosWeight=this.accumulatedRotWeight=0};THREE.Bone.prototype=Object.create(THREE.Object3D.prototype);
|
|
|
|
-THREE.Bone.prototype.updateMatrixWorld=function(a){THREE.Object3D.prototype.updateMatrixWorld.call(this,a);this.accumulatedSclWeight=this.accumulatedPosWeight=this.accumulatedRotWeight=0};
|
|
|
|
|
|
+C<q||C<g.near||C>g.far||h.push({distance:C,point:B,face:G,faceIndex:x,object:this}))}}}();THREE.Mesh.prototype.clone=function(a,b){void 0===a&&(a=new THREE.Mesh(this.geometry,this.material));THREE.Object3D.prototype.clone.call(this,a,b);return a};THREE.Bone=function(a){THREE.Object3D.call(this);this.skin=a};THREE.Bone.prototype=Object.create(THREE.Object3D.prototype);
|
|
THREE.Skeleton=function(a,b,c){this.useVertexTexture=void 0!==c?c:!0;this.identityMatrix=new THREE.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=new Float32Array(this.boneTextureWidth*this.boneTextureHeight*4),this.boneTexture=new THREE.DataTexture(this.boneMatrices,this.boneTextureWidth,this.boneTextureHeight,THREE.RGBAFormat,THREE.FloatType),
|
|
THREE.Skeleton=function(a,b,c){this.useVertexTexture=void 0!==c?c:!0;this.identityMatrix=new THREE.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=new Float32Array(this.boneTextureWidth*this.boneTextureHeight*4),this.boneTexture=new THREE.DataTexture(this.boneMatrices,this.boneTextureWidth,this.boneTextureHeight,THREE.RGBAFormat,THREE.FloatType),
|
|
this.boneTexture.minFilter=THREE.NearestFilter,this.boneTexture.magFilter=THREE.NearestFilter,this.boneTexture.generateMipmaps=!1,this.boneTexture.flipY=!1):this.boneMatrices=new Float32Array(16*this.bones.length);if(void 0===b)this.calculateInverses();else if(this.bones.length===b.length)this.boneInverses=b.slice(0);else for(console.warn("THREE.Skeleton bonInverses is the wrong length."),this.boneInverses=[],b=0,a=this.bones.length;b<a;b++)this.boneInverses.push(new THREE.Matrix4)};
|
|
this.boneTexture.minFilter=THREE.NearestFilter,this.boneTexture.magFilter=THREE.NearestFilter,this.boneTexture.generateMipmaps=!1,this.boneTexture.flipY=!1):this.boneMatrices=new Float32Array(16*this.bones.length);if(void 0===b)this.calculateInverses();else if(this.bones.length===b.length)this.boneInverses=b.slice(0);else for(console.warn("THREE.Skeleton bonInverses is the wrong length."),this.boneInverses=[],b=0,a=this.bones.length;b<a;b++)this.boneInverses.push(new THREE.Matrix4)};
|
|
THREE.Skeleton.prototype.calculateInverses=function(){this.boneInverses=[];for(var a=0,b=this.bones.length;a<b;a++){var c=new THREE.Matrix4;this.bones[a]&&c.getInverse(this.bones[a].matrixWorld);this.boneInverses.push(c)}};
|
|
THREE.Skeleton.prototype.calculateInverses=function(){this.boneInverses=[];for(var a=0,b=this.bones.length;a<b;a++){var c=new THREE.Matrix4;this.bones[a]&&c.getInverse(this.bones[a].matrixWorld);this.boneInverses.push(c)}};
|
|
@@ -362,8 +361,8 @@ THREE.Sprite.prototype.clone=function(a){void 0===a&&(a=new THREE.Sprite(this.ma
|
|
THREE.Scene.prototype.clone=function(a){void 0===a&&(a=new THREE.Scene);THREE.Object3D.prototype.clone.call(this,a);null!==this.fog&&(a.fog=this.fog.clone());null!==this.overrideMaterial&&(a.overrideMaterial=this.overrideMaterial.clone());a.autoUpdate=this.autoUpdate;a.matrixAutoUpdate=this.matrixAutoUpdate;return a};THREE.Fog=function(a,b,c){this.name="";this.color=new THREE.Color(a);this.near=void 0!==b?b:1;this.far=void 0!==c?c:1E3};
|
|
THREE.Scene.prototype.clone=function(a){void 0===a&&(a=new THREE.Scene);THREE.Object3D.prototype.clone.call(this,a);null!==this.fog&&(a.fog=this.fog.clone());null!==this.overrideMaterial&&(a.overrideMaterial=this.overrideMaterial.clone());a.autoUpdate=this.autoUpdate;a.matrixAutoUpdate=this.matrixAutoUpdate;return a};THREE.Fog=function(a,b,c){this.name="";this.color=new THREE.Color(a);this.near=void 0!==b?b:1;this.far=void 0!==c?c:1E3};
|
|
THREE.Fog.prototype.clone=function(){return new THREE.Fog(this.color.getHex(),this.near,this.far)};THREE.FogExp2=function(a,b){this.name="";this.color=new THREE.Color(a);this.density=void 0!==b?b:2.5E-4};THREE.FogExp2.prototype.clone=function(){return new THREE.FogExp2(this.color.getHex(),this.density)};
|
|
THREE.Fog.prototype.clone=function(){return new THREE.Fog(this.color.getHex(),this.near,this.far)};THREE.FogExp2=function(a,b){this.name="";this.color=new THREE.Color(a);this.density=void 0!==b?b:2.5E-4};THREE.FogExp2.prototype.clone=function(){return new THREE.FogExp2(this.color.getHex(),this.density)};
|
|
THREE.CanvasRenderer=function(a){function b(a,b,c,d){m(b);n(c);p(d);r(a.getStyle());N.stroke();wa.expandByScalar(2*b)}function c(a){q(a.getStyle());N.fill()}function d(a){e(a.target)}function e(a){if(!(a instanceof THREE.CompressedTexture)){var b=a.wrapS===THREE.RepeatWrapping,c=a.wrapT===THREE.RepeatWrapping,d=a.image,e=document.createElement("canvas");e.width=d.width;e.height=d.height;var f=e.getContext("2d");f.setTransform(1,0,0,-1,0,d.height);f.drawImage(d,0,0);fb[a.id]=N.createPattern(e,!0===
|
|
THREE.CanvasRenderer=function(a){function b(a,b,c,d){m(b);n(c);p(d);r(a.getStyle());N.stroke();wa.expandByScalar(2*b)}function c(a){q(a.getStyle());N.fill()}function d(a){e(a.target)}function e(a){if(!(a instanceof THREE.CompressedTexture)){var b=a.wrapS===THREE.RepeatWrapping,c=a.wrapT===THREE.RepeatWrapping,d=a.image,e=document.createElement("canvas");e.width=d.width;e.height=d.height;var f=e.getContext("2d");f.setTransform(1,0,0,-1,0,d.height);f.drawImage(d,0,0);fb[a.id]=N.createPattern(e,!0===
|
|
-b&&!0===c?"repeat":!0===b&&!1===c?"repeat-x":!1===b&&!0===c?"repeat-y":"no-repeat")}}function f(a,b,c,f,g,h,k,m,n,r,t,s,p){if(!(p instanceof THREE.DataTexture)){!1===p.hasEventListener("update",d)&&(void 0!==p.image&&0<p.image.width&&e(p),p.addEventListener("update",d));var u=fb[p.id];if(void 0!==u){q(u);var u=p.offset.x/p.repeat.x,l=p.offset.y/p.repeat.y,v=p.image.width*p.repeat.x;p=p.image.height*p.repeat.y;k=(k+u)*v;m=(m+l)*p;c-=a;f-=b;g-=a;h-=b;n=(n+u)*v-k;r=(r+l)*p-m;t=(t+u)*v-k;s=(s+l)*p-m;
|
|
|
|
-p=n*s-t*r;0!==p&&(u=1/p,p=(s*c-r*g)*u,r=(s*f-r*h)*u,c=(n*g-t*c)*u,f=(n*h-t*f)*u,a=a-p*k-c*m,b=b-r*k-f*m,N.save(),N.transform(p,r,c,f,a,b),N.fill(),N.restore())}else q("rgba(0,0,0,1)"),N.fill()}}function g(a,b,c){var d=b.x-a.x,e=b.y-a.y,f=d*d+e*e;0!==f&&(c/=Math.sqrt(f),d*=c,e*=c,b.x+=d,b.y+=e,a.x-=d,a.y-=e)}function h(a){S!==a&&(S=N.globalAlpha=a)}function k(a){J!==a&&(a===THREE.NormalBlending?N.globalCompositeOperation="source-over":a===THREE.AdditiveBlending?N.globalCompositeOperation="lighter":
|
|
|
|
|
|
+b&&!0===c?"repeat":!0===b&&!1===c?"repeat-x":!1===b&&!0===c?"repeat-y":"no-repeat")}}function f(a,b,c,f,g,h,k,m,n,r,s,t,p){if(!(p instanceof THREE.DataTexture)){!1===p.hasEventListener("update",d)&&(void 0!==p.image&&0<p.image.width&&e(p),p.addEventListener("update",d));var u=fb[p.id];if(void 0!==u){q(u);var u=p.offset.x/p.repeat.x,l=p.offset.y/p.repeat.y,v=p.image.width*p.repeat.x;p=p.image.height*p.repeat.y;k=(k+u)*v;m=(m+l)*p;c-=a;f-=b;g-=a;h-=b;n=(n+u)*v-k;r=(r+l)*p-m;s=(s+u)*v-k;t=(t+l)*p-m;
|
|
|
|
+p=n*t-s*r;0!==p&&(u=1/p,p=(t*c-r*g)*u,r=(t*f-r*h)*u,c=(n*g-s*c)*u,f=(n*h-s*f)*u,a=a-p*k-c*m,b=b-r*k-f*m,N.save(),N.transform(p,r,c,f,a,b),N.fill(),N.restore())}else q("rgba(0,0,0,1)"),N.fill()}}function g(a,b,c){var d=b.x-a.x,e=b.y-a.y,f=d*d+e*e;0!==f&&(c/=Math.sqrt(f),d*=c,e*=c,b.x+=d,b.y+=e,a.x-=d,a.y-=e)}function h(a){S!==a&&(S=N.globalAlpha=a)}function k(a){J!==a&&(a===THREE.NormalBlending?N.globalCompositeOperation="source-over":a===THREE.AdditiveBlending?N.globalCompositeOperation="lighter":
|
|
a===THREE.SubtractiveBlending&&(N.globalCompositeOperation="darker"),J=a)}function m(a){P!==a&&(P=N.lineWidth=a)}function n(a){ca!==a&&(ca=N.lineCap=a)}function p(a){oa!==a&&(oa=N.lineJoin=a)}function r(a){E!==a&&(E=N.strokeStyle=a)}function q(a){V!==a&&(V=N.fillStyle=a)}function t(a){K.length!==a.length&&(N.setLineDash(a),K=a)}console.log("THREE.CanvasRenderer",THREE.REVISION);var s=THREE.Math.smoothstep;a=a||{};var v=this,x,u,G,y=new THREE.Projector,B=void 0!==a.canvas?a.canvas:document.createElement("canvas"),
|
|
a===THREE.SubtractiveBlending&&(N.globalCompositeOperation="darker"),J=a)}function m(a){P!==a&&(P=N.lineWidth=a)}function n(a){ca!==a&&(ca=N.lineCap=a)}function p(a){oa!==a&&(oa=N.lineJoin=a)}function r(a){E!==a&&(E=N.strokeStyle=a)}function q(a){V!==a&&(V=N.fillStyle=a)}function t(a){K.length!==a.length&&(N.setLineDash(a),K=a)}console.log("THREE.CanvasRenderer",THREE.REVISION);var s=THREE.Math.smoothstep;a=a||{};var v=this,x,u,G,y=new THREE.Projector,B=void 0!==a.canvas?a.canvas:document.createElement("canvas"),
|
|
C=B.width,A=B.height,w=Math.floor(C/2),z=Math.floor(A/2),D=0,Q=0,R=C,O=A,N=B.getContext("2d",{alpha:!0===a.alpha}),L=new THREE.Color(0),F=0,S=1,J=0,E=null,V=null,P=null,ca=null,oa=null,K=[],aa,Z,ba,X;new THREE.RenderableVertex;new THREE.RenderableVertex;var ta,Ja,Ka,La,Ma,ab,ya=new THREE.Color;new THREE.Color;new THREE.Color;new THREE.Color;new THREE.Color;var I=new THREE.Color,bb=new THREE.Color,lb=new THREE.Color,fb={},ha,qa,Xa,Ha,za,Ia,ia,Aa=new THREE.Box2,da=new THREE.Box2,wa=new THREE.Box2,ra=
|
|
C=B.width,A=B.height,w=Math.floor(C/2),z=Math.floor(A/2),D=0,Q=0,R=C,O=A,N=B.getContext("2d",{alpha:!0===a.alpha}),L=new THREE.Color(0),F=0,S=1,J=0,E=null,V=null,P=null,ca=null,oa=null,K=[],aa,Z,ba,X;new THREE.RenderableVertex;new THREE.RenderableVertex;var ta,Ja,Ka,La,Ma,ab,ya=new THREE.Color;new THREE.Color;new THREE.Color;new THREE.Color;new THREE.Color;var I=new THREE.Color,bb=new THREE.Color,lb=new THREE.Color,fb={},ha,qa,Xa,Ha,za,Ia,ia,Aa=new THREE.Box2,da=new THREE.Box2,wa=new THREE.Box2,ra=
|
|
new THREE.Color,Pa=new THREE.Color,mb=new THREE.Color,Na=new THREE.Vector3,fa=new THREE.Vector3,va=new THREE.Vector3,Sa=new THREE.Matrix3;void 0===N.setLineDash&&(N.setLineDash=function(){});this.domElement=B;this.devicePixelRatio=void 0!==a.devicePixelRatio?a.devicePixelRatio:void 0!==self.devicePixelRatio?self.devicePixelRatio:1;this.sortElements=this.sortObjects=this.autoClear=!0;this.info={render:{vertices:0,faces:0}};this.supportsVertexTextures=function(){};this.setFaceCulling=function(){};this.setSize=
|
|
new THREE.Color,Pa=new THREE.Color,mb=new THREE.Color,Na=new THREE.Vector3,fa=new THREE.Vector3,va=new THREE.Vector3,Sa=new THREE.Matrix3;void 0===N.setLineDash&&(N.setLineDash=function(){});this.domElement=B;this.devicePixelRatio=void 0!==a.devicePixelRatio?a.devicePixelRatio:void 0!==self.devicePixelRatio?self.devicePixelRatio:1;this.sortElements=this.sortObjects=this.autoClear=!0;this.info={render:{vertices:0,faces:0}};this.supportsVertexTextures=function(){};this.setFaceCulling=function(){};this.setSize=
|
|
@@ -452,8 +451,8 @@ a.material}function e(a){for(var b in a.attributes){var c="index"===b?l.ELEMENT_
|
|
3===a.defaultAttributeValues[e].length&&l.vertexAttrib3fv(f,a.defaultAttributeValues[e]))}k()}function g(){for(var a=0,b=Ab.length;a<b;a++)Ab[a]=0}function h(a){Ab[a]=1;0===Bb[a]&&(l.enableVertexAttribArray(a),Bb[a]=1)}function k(){for(var a=0,b=Bb.length;a<b;a++)Bb[a]!==Ab[a]&&(l.disableVertexAttribArray(a),Bb[a]=0)}function m(a,b){return a.material.id!==b.material.id?b.material.id-a.material.id:a.z!==b.z?b.z-a.z:a.id-b.id}function n(a,b){return a.z!==b.z?a.z-b.z:a.id-b.id}function p(a,b){return b[0]-
|
|
3===a.defaultAttributeValues[e].length&&l.vertexAttrib3fv(f,a.defaultAttributeValues[e]))}k()}function g(){for(var a=0,b=Ab.length;a<b;a++)Ab[a]=0}function h(a){Ab[a]=1;0===Bb[a]&&(l.enableVertexAttribArray(a),Bb[a]=1)}function k(){for(var a=0,b=Bb.length;a<b;a++)Bb[a]!==Ab[a]&&(l.disableVertexAttribArray(a),Bb[a]=0)}function m(a,b){return a.material.id!==b.material.id?b.material.id-a.material.id:a.z!==b.z?b.z-a.z:a.id-b.id}function n(a,b){return a.z!==b.z?a.z-b.z:a.id-b.id}function p(a,b){return b[0]-
|
|
a[0]}function r(a,f,g){if(!1!==f.visible){f instanceof THREE.Light&&Ka.push(f);if(!(f instanceof THREE.Scene)){void 0===f.__webglInit&&(f.__webglInit=!0,f.addEventListener("dispose",sc),f._modelViewMatrix=new THREE.Matrix4,f._normalMatrix=new THREE.Matrix3);var h=f.geometry;if(void 0!==h&&void 0===h.__webglInit)if(h.__webglInit=!0,h.addEventListener("dispose",Fc),h instanceof THREE.BufferGeometry)e(h);else if(f instanceof THREE.Mesh)void 0!==f.__webglActive&&B(f,a),x(a,f,h);else if(f instanceof THREE.Line){if(!h.__webglVertexBuffer){h.__webglVertexBuffer=
|
|
a[0]}function r(a,f,g){if(!1!==f.visible){f instanceof THREE.Light&&Ka.push(f);if(!(f instanceof THREE.Scene)){void 0===f.__webglInit&&(f.__webglInit=!0,f.addEventListener("dispose",sc),f._modelViewMatrix=new THREE.Matrix4,f._normalMatrix=new THREE.Matrix3);var h=f.geometry;if(void 0!==h&&void 0===h.__webglInit)if(h.__webglInit=!0,h.addEventListener("dispose",Fc),h instanceof THREE.BufferGeometry)e(h);else if(f instanceof THREE.Mesh)void 0!==f.__webglActive&&B(f,a),x(a,f,h);else if(f instanceof THREE.Line){if(!h.__webglVertexBuffer){h.__webglVertexBuffer=
|
|
l.createBuffer();h.__webglColorBuffer=l.createBuffer();h.__webglLineDistanceBuffer=l.createBuffer();I.info.memory.geometries++;var k=h.vertices.length;h.__vertexArray=new Float32Array(3*k);h.__colorArray=new Float32Array(3*k);h.__lineDistanceArray=new Float32Array(1*k);h.__webglLineCount=k;b(h,f);h.verticesNeedUpdate=!0;h.colorsNeedUpdate=!0;h.lineDistancesNeedUpdate=!0}}else if(f instanceof THREE.PointCloud&&!h.__webglVertexBuffer){h.__webglVertexBuffer=l.createBuffer();h.__webglColorBuffer=l.createBuffer();
|
|
l.createBuffer();h.__webglColorBuffer=l.createBuffer();h.__webglLineDistanceBuffer=l.createBuffer();I.info.memory.geometries++;var k=h.vertices.length;h.__vertexArray=new Float32Array(3*k);h.__colorArray=new Float32Array(3*k);h.__lineDistanceArray=new Float32Array(1*k);h.__webglLineCount=k;b(h,f);h.verticesNeedUpdate=!0;h.colorsNeedUpdate=!0;h.lineDistancesNeedUpdate=!0}}else if(f instanceof THREE.PointCloud&&!h.__webglVertexBuffer){h.__webglVertexBuffer=l.createBuffer();h.__webglColorBuffer=l.createBuffer();
|
|
-I.info.memory.geometries++;var m=h.vertices.length;h.__vertexArray=new Float32Array(3*m);h.__colorArray=new Float32Array(3*m);h.__sortArray=[];h.__webglParticleCount=m;b(h,f);h.verticesNeedUpdate=!0;h.colorsNeedUpdate=!0}if(void 0===f.__webglActive){if(f instanceof THREE.Mesh)if(h instanceof THREE.BufferGeometry)u(La,h,f);else{if(h instanceof THREE.Geometry)for(var n=0,t=h.geometryGroupsList.length;n<t;n++)u(La,h.geometryGroupsList[n],f)}else f instanceof THREE.Line||f instanceof THREE.PointCloud?
|
|
|
|
-u(La,h,f):(f instanceof THREE.ImmediateRenderObject||f.immediateRenderCallback)&&Ma.push({id:null,object:f,opaque:null,transparent:null,z:0});f.__webglActive=!0}var s=La[f.id];if(s&&(!1===f.frustumCulled||!0===kc.intersectsObject(f))){var q=f.geometry,v,w,A;if(q instanceof THREE.BufferGeometry){var C=l.DYNAMIC_DRAW,z=q.attributes,F,J;for(F in z)J=z[F],J.needsUpdate&&("index"===F?(l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,J.buffer),l.bufferData(l.ELEMENT_ARRAY_BUFFER,J.array,C)):(l.bindBuffer(l.ARRAY_BUFFER,
|
|
|
|
|
|
+I.info.memory.geometries++;var m=h.vertices.length;h.__vertexArray=new Float32Array(3*m);h.__colorArray=new Float32Array(3*m);h.__sortArray=[];h.__webglParticleCount=m;b(h,f);h.verticesNeedUpdate=!0;h.colorsNeedUpdate=!0}if(void 0===f.__webglActive){if(f instanceof THREE.Mesh)if(h instanceof THREE.BufferGeometry)u(La,h,f);else{if(h instanceof THREE.Geometry)for(var n=0,s=h.geometryGroupsList.length;n<s;n++)u(La,h.geometryGroupsList[n],f)}else f instanceof THREE.Line||f instanceof THREE.PointCloud?
|
|
|
|
+u(La,h,f):(f instanceof THREE.ImmediateRenderObject||f.immediateRenderCallback)&&Ma.push({id:null,object:f,opaque:null,transparent:null,z:0});f.__webglActive=!0}var t=La[f.id];if(t&&(!1===f.frustumCulled||!0===kc.intersectsObject(f))){var q=f.geometry,v,w,A;if(q instanceof THREE.BufferGeometry){var C=l.DYNAMIC_DRAW,z=q.attributes,F,J;for(F in z)J=z[F],J.needsUpdate&&("index"===F?(l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,J.buffer),l.bufferData(l.ELEMENT_ARRAY_BUFFER,J.array,C)):(l.bindBuffer(l.ARRAY_BUFFER,
|
|
J.buffer),l.bufferData(l.ARRAY_BUFFER,J.array,C)),J.needsUpdate=!1)}else if(f instanceof THREE.Mesh){if(q.buffersNeedUpdate||q.groupsNeedUpdate)q instanceof THREE.BufferGeometry?e(q):f instanceof THREE.Mesh&&x(a,f,q);for(var L=0,Q=q.geometryGroupsList.length;L<Q;L++)if(v=q.geometryGroupsList[L],A=d(f,v),(q.buffersNeedUpdate||q.groupsNeedUpdate)&&c(v,f),w=A.attributes&&G(A),q.verticesNeedUpdate||q.morphTargetsNeedUpdate||q.elementsNeedUpdate||q.uvsNeedUpdate||q.normalsNeedUpdate||q.colorsNeedUpdate||
|
|
J.buffer),l.bufferData(l.ARRAY_BUFFER,J.array,C)),J.needsUpdate=!1)}else if(f instanceof THREE.Mesh){if(q.buffersNeedUpdate||q.groupsNeedUpdate)q instanceof THREE.BufferGeometry?e(q):f instanceof THREE.Mesh&&x(a,f,q);for(var L=0,Q=q.geometryGroupsList.length;L<Q;L++)if(v=q.geometryGroupsList[L],A=d(f,v),(q.buffersNeedUpdate||q.groupsNeedUpdate)&&c(v,f),w=A.attributes&&G(A),q.verticesNeedUpdate||q.morphTargetsNeedUpdate||q.elementsNeedUpdate||q.uvsNeedUpdate||q.normalsNeedUpdate||q.colorsNeedUpdate||
|
|
q.tangentsNeedUpdate||w){var D=v,K=f,R=l.DYNAMIC_DRAW,N=!q.dynamic,S=A;if(D.__inittedArrays){var O=S&&void 0!==S.shading&&S.shading===THREE.SmoothShading,E=void 0,X=void 0,V=void 0,P=void 0,Z=void 0,ba=void 0,ta=void 0,ca=void 0,Ja=void 0,da=void 0,ea=void 0,la=void 0,ma=void 0,na=void 0,ha=void 0,qa=void 0,oa=void 0,aa=void 0,va=void 0,tc=void 0,T=void 0,ia=void 0,Ea=void 0,wa=void 0,Ca=void 0,bb=void 0,Ha=void 0,za=void 0,uc=void 0,Qa=void 0,Xa=void 0,yc=void 0,Ia=void 0,ra=void 0,sa=void 0,Na=
|
|
q.tangentsNeedUpdate||w){var D=v,K=f,R=l.DYNAMIC_DRAW,N=!q.dynamic,S=A;if(D.__inittedArrays){var O=S&&void 0!==S.shading&&S.shading===THREE.SmoothShading,E=void 0,X=void 0,V=void 0,P=void 0,Z=void 0,ba=void 0,ta=void 0,ca=void 0,Ja=void 0,da=void 0,ea=void 0,la=void 0,ma=void 0,na=void 0,ha=void 0,qa=void 0,oa=void 0,aa=void 0,va=void 0,tc=void 0,T=void 0,ia=void 0,Ea=void 0,wa=void 0,Ca=void 0,bb=void 0,Ha=void 0,za=void 0,uc=void 0,Qa=void 0,Xa=void 0,yc=void 0,Ia=void 0,ra=void 0,sa=void 0,Na=
|
|
void 0,Aa=void 0,fa=void 0,Sa=void 0,Pa=void 0,hb=0,nb=0,lb=0,$a=0,fb=0,vb=0,Ya=0,rb=0,ib=0,xa=0,Ga=0,M=0,Ta=void 0,ob=D.__vertexArray,mb=D.__uvArray,Dc=D.__uv2Array,wb=D.__normalArray,Wa=D.__tangentArray,gb=D.__colorArray,Ra=D.__skinIndexArray,Ua=D.__skinWeightArray,cb=D.__morphTargetsArrays,Cb=D.__morphNormalsArrays,Ib=D.__webglCustomAttributesList,H=void 0,Db=D.__faceArray,Eb=D.__lineArray,db=K.geometry,Fb=db.elementsNeedUpdate,Gb=db.uvsNeedUpdate,pb=db.normalsNeedUpdate,Qb=db.tangentsNeedUpdate,
|
|
void 0,Aa=void 0,fa=void 0,Sa=void 0,Pa=void 0,hb=0,nb=0,lb=0,$a=0,fb=0,vb=0,Ya=0,rb=0,ib=0,xa=0,Ga=0,M=0,Ta=void 0,ob=D.__vertexArray,mb=D.__uvArray,Dc=D.__uv2Array,wb=D.__normalArray,Wa=D.__tangentArray,gb=D.__colorArray,Ra=D.__skinIndexArray,Ua=D.__skinWeightArray,cb=D.__morphTargetsArrays,Cb=D.__morphNormalsArrays,Ib=D.__webglCustomAttributesList,H=void 0,Db=D.__faceArray,Eb=D.__lineArray,db=K.geometry,Fb=db.elementsNeedUpdate,Gb=db.uvsNeedUpdate,pb=db.normalsNeedUpdate,Qb=db.tangentsNeedUpdate,
|
|
@@ -479,18 +478,18 @@ l.DYNAMIC_DRAW,kb,Mb,Nb,$,Ob,Xb,zc=q.vertices,ic=zc.length,jc=q.colors,qc=jc.len
|
|
gc[$]=Xb.r,gc[$+1]=Xb.g,gc[$+2]=Xb.b;if(Vb)for(xb=0,pc=Vb.length;xb<pc;xb++)if(Y=Vb[xb],void 0===Y.boundTo||"vertices"===Y.boundTo)if($=0,yb=Y.value.length,1===Y.size)for(ja=0;ja<yb;ja++)Ob=Ub[ja][1],Y.array[ja]=Y.value[Ob];else if(2===Y.size)for(ja=0;ja<yb;ja++)Ob=Ub[ja][1],Ba=Y.value[Ob],Y.array[$]=Ba.x,Y.array[$+1]=Ba.y,$+=2;else if(3===Y.size)if("c"===Y.type)for(ja=0;ja<yb;ja++)Ob=Ub[ja][1],Ba=Y.value[Ob],Y.array[$]=Ba.r,Y.array[$+1]=Ba.g,Y.array[$+2]=Ba.b,$+=3;else for(ja=0;ja<yb;ja++)Ob=Ub[ja][1],
|
|
gc[$]=Xb.r,gc[$+1]=Xb.g,gc[$+2]=Xb.b;if(Vb)for(xb=0,pc=Vb.length;xb<pc;xb++)if(Y=Vb[xb],void 0===Y.boundTo||"vertices"===Y.boundTo)if($=0,yb=Y.value.length,1===Y.size)for(ja=0;ja<yb;ja++)Ob=Ub[ja][1],Y.array[ja]=Y.value[Ob];else if(2===Y.size)for(ja=0;ja<yb;ja++)Ob=Ub[ja][1],Ba=Y.value[Ob],Y.array[$]=Ba.x,Y.array[$+1]=Ba.y,$+=2;else if(3===Y.size)if("c"===Y.type)for(ja=0;ja<yb;ja++)Ob=Ub[ja][1],Ba=Y.value[Ob],Y.array[$]=Ba.r,Y.array[$+1]=Ba.g,Y.array[$+2]=Ba.b,$+=3;else for(ja=0;ja<yb;ja++)Ob=Ub[ja][1],
|
|
Ba=Y.value[Ob],Y.array[$]=Ba.x,Y.array[$+1]=Ba.y,Y.array[$+2]=Ba.z,$+=3;else if(4===Y.size)for(ja=0;ja<yb;ja++)Ob=Ub[ja][1],Ba=Y.value[Ob],Y.array[$]=Ba.x,Y.array[$+1]=Ba.y,Y.array[$+2]=Ba.z,Y.array[$+3]=Ba.w,$+=4}else{if($b)for(kb=0;kb<ic;kb++)Nb=zc[kb],$=3*kb,fc[$]=Nb.x,fc[$+1]=Nb.y,fc[$+2]=Nb.z;if(Wb)for(Mb=0;Mb<qc;Mb++)Xb=jc[Mb],$=3*Mb,gc[$]=Xb.r,gc[$+1]=Xb.g,gc[$+2]=Xb.b;if(Vb)for(xb=0,pc=Vb.length;xb<pc;xb++)if(Y=Vb[xb],Y.needsUpdate&&(void 0===Y.boundTo||"vertices"===Y.boundTo))if(yb=Y.value.length,
|
|
Ba=Y.value[Ob],Y.array[$]=Ba.x,Y.array[$+1]=Ba.y,Y.array[$+2]=Ba.z,$+=3;else if(4===Y.size)for(ja=0;ja<yb;ja++)Ob=Ub[ja][1],Ba=Y.value[Ob],Y.array[$]=Ba.x,Y.array[$+1]=Ba.y,Y.array[$+2]=Ba.z,Y.array[$+3]=Ba.w,$+=4}else{if($b)for(kb=0;kb<ic;kb++)Nb=zc[kb],$=3*kb,fc[$]=Nb.x,fc[$+1]=Nb.y,fc[$+2]=Nb.z;if(Wb)for(Mb=0;Mb<qc;Mb++)Xb=jc[Mb],$=3*Mb,gc[$]=Xb.r,gc[$+1]=Xb.g,gc[$+2]=Xb.b;if(Vb)for(xb=0,pc=Vb.length;xb<pc;xb++)if(Y=Vb[xb],Y.needsUpdate&&(void 0===Y.boundTo||"vertices"===Y.boundTo))if(yb=Y.value.length,
|
|
$=0,1===Y.size)for(ja=0;ja<yb;ja++)Y.array[ja]=Y.value[ja];else if(2===Y.size)for(ja=0;ja<yb;ja++)Ba=Y.value[ja],Y.array[$]=Ba.x,Y.array[$+1]=Ba.y,$+=2;else if(3===Y.size)if("c"===Y.type)for(ja=0;ja<yb;ja++)Ba=Y.value[ja],Y.array[$]=Ba.r,Y.array[$+1]=Ba.g,Y.array[$+2]=Ba.b,$+=3;else for(ja=0;ja<yb;ja++)Ba=Y.value[ja],Y.array[$]=Ba.x,Y.array[$+1]=Ba.y,Y.array[$+2]=Ba.z,$+=3;else if(4===Y.size)for(ja=0;ja<yb;ja++)Ba=Y.value[ja],Y.array[$]=Ba.x,Y.array[$+1]=Ba.y,Y.array[$+2]=Ba.z,Y.array[$+3]=Ba.w,$+=
|
|
$=0,1===Y.size)for(ja=0;ja<yb;ja++)Y.array[ja]=Y.value[ja];else if(2===Y.size)for(ja=0;ja<yb;ja++)Ba=Y.value[ja],Y.array[$]=Ba.x,Y.array[$+1]=Ba.y,$+=2;else if(3===Y.size)if("c"===Y.type)for(ja=0;ja<yb;ja++)Ba=Y.value[ja],Y.array[$]=Ba.r,Y.array[$+1]=Ba.g,Y.array[$+2]=Ba.b,$+=3;else for(ja=0;ja<yb;ja++)Ba=Y.value[ja],Y.array[$]=Ba.x,Y.array[$+1]=Ba.y,Y.array[$+2]=Ba.z,$+=3;else if(4===Y.size)for(ja=0;ja<yb;ja++)Ba=Y.value[ja],Y.array[$]=Ba.x,Y.array[$+1]=Ba.y,Y.array[$+2]=Ba.z,Y.array[$+3]=Ba.w,$+=
|
|
-4}if($b||f.sortParticles)l.bindBuffer(l.ARRAY_BUFFER,q.__webglVertexBuffer),l.bufferData(l.ARRAY_BUFFER,fc,ub);if(Wb||f.sortParticles)l.bindBuffer(l.ARRAY_BUFFER,q.__webglColorBuffer),l.bufferData(l.ARRAY_BUFFER,gc,ub);if(Vb)for(xb=0,pc=Vb.length;xb<pc;xb++)if(Y=Vb[xb],Y.needsUpdate||f.sortParticles)l.bindBuffer(l.ARRAY_BUFFER,Y.buffer),l.bufferData(l.ARRAY_BUFFER,Y.array,ub)}q.verticesNeedUpdate=!1;q.colorsNeedUpdate=!1;A.attributes&&y(A)}for(var hc=0,Ec=s.length;hc<Ec;hc++){var Ac=s[hc],Yb=Ac,rc=
|
|
|
|
|
|
+4}if($b||f.sortParticles)l.bindBuffer(l.ARRAY_BUFFER,q.__webglVertexBuffer),l.bufferData(l.ARRAY_BUFFER,fc,ub);if(Wb||f.sortParticles)l.bindBuffer(l.ARRAY_BUFFER,q.__webglColorBuffer),l.bufferData(l.ARRAY_BUFFER,gc,ub);if(Vb)for(xb=0,pc=Vb.length;xb<pc;xb++)if(Y=Vb[xb],Y.needsUpdate||f.sortParticles)l.bindBuffer(l.ARRAY_BUFFER,Y.buffer),l.bufferData(l.ARRAY_BUFFER,Y.array,ub)}q.verticesNeedUpdate=!1;q.colorsNeedUpdate=!1;A.attributes&&y(A)}for(var hc=0,Ec=t.length;hc<Ec;hc++){var Ac=t[hc],Yb=Ac,rc=
|
|
Yb.object,Bc=Yb.buffer,Cc=rc.geometry,Zb=rc.material;Zb instanceof THREE.MeshFaceMaterial?(Zb=Zb.materials[Cc instanceof THREE.BufferGeometry?0:Bc.materialIndex],Yb.material=Zb,Zb.transparent?ya.push(Yb):ab.push(Yb)):Zb&&(Yb.material=Zb,Zb.transparent?ya.push(Yb):ab.push(Yb));Ac.render=!0;!0===I.sortObjects&&(null!==f.renderDepth?Ac.z=f.renderDepth:(ka.setFromMatrixPosition(f.matrixWorld),ka.applyProjection(ac),Ac.z=ka.z))}}}hc=0;for(Ec=f.children.length;hc<Ec;hc++)r(a,f.children[hc],g)}}function q(a,
|
|
Yb.object,Bc=Yb.buffer,Cc=rc.geometry,Zb=rc.material;Zb instanceof THREE.MeshFaceMaterial?(Zb=Zb.materials[Cc instanceof THREE.BufferGeometry?0:Bc.materialIndex],Yb.material=Zb,Zb.transparent?ya.push(Yb):ab.push(Yb)):Zb&&(Yb.material=Zb,Zb.transparent?ya.push(Yb):ab.push(Yb));Ac.render=!0;!0===I.sortObjects&&(null!==f.renderDepth?Ac.z=f.renderDepth:(ka.setFromMatrixPosition(f.matrixWorld),ka.applyProjection(ac),Ac.z=ka.z))}}}hc=0;for(Ec=f.children.length;hc<Ec;hc++)r(a,f.children[hc],g)}}function q(a,
|
|
-b,c){if(0!==a.length)for(var d=0,e=a.length;d<e;d++)Xa=lb=null,ha=qa=Ia=za=Pa=ra=ia=-1,Ib=!0,a[d].render(b,c,$b,Wb),Xa=lb=null,ha=qa=Ia=za=Pa=ra=ia=-1,Ib=!0}function t(a,b,c,d,e,f){for(var g,h,k,l=a.length-1;-1!==l;l--){g=a[l];h=g.object;k=g.buffer;z(h,b);if(f)g=f;else{g=g.material;if(!g)continue;e&&I.setBlending(g.blending,g.blendEquation,g.blendSrc,g.blendDst);I.setDepthTest(g.depthTest);I.setDepthWrite(g.depthWrite);O(g.polygonOffset,g.polygonOffsetFactor,g.polygonOffsetUnits)}I.setMaterialFaces(g);
|
|
|
|
-k instanceof THREE.BufferGeometry?I.renderBufferDirect(b,c,d,g,k,h):I.renderBuffer(b,c,d,g,k,h)}}function s(a,b,c,d,e,f,g){for(var h,k,l=0,m=a.length;l<m;l++)if(h=a[l],k=h.object,k.visible){if(g)h=g;else{h=h[b];if(!h)continue;f&&I.setBlending(h.blending,h.blendEquation,h.blendSrc,h.blendDst);I.setDepthTest(h.depthTest);I.setDepthWrite(h.depthWrite);O(h.polygonOffset,h.polygonOffsetFactor,h.polygonOffsetUnits)}I.renderImmediateObject(c,d,e,h,k)}}function v(a){var b=a.object.material;b.transparent?
|
|
|
|
|
|
+b,c){if(0!==a.length)for(var d=0,e=a.length;d<e;d++)Xa=lb=null,ha=qa=Ia=za=Pa=ra=ia=-1,Ib=!0,a[d].render(b,c,$b,Wb),Xa=lb=null,ha=qa=Ia=za=Pa=ra=ia=-1,Ib=!0}function t(a,b,c,d,e,f){for(var g,h,l,k=a.length-1;-1!==k;k--){g=a[k];h=g.object;l=g.buffer;z(h,b);if(f)g=f;else{g=g.material;if(!g)continue;e&&I.setBlending(g.blending,g.blendEquation,g.blendSrc,g.blendDst);I.setDepthTest(g.depthTest);I.setDepthWrite(g.depthWrite);O(g.polygonOffset,g.polygonOffsetFactor,g.polygonOffsetUnits)}I.setMaterialFaces(g);
|
|
|
|
+l instanceof THREE.BufferGeometry?I.renderBufferDirect(b,c,d,g,l,h):I.renderBuffer(b,c,d,g,l,h)}}function s(a,b,c,d,e,f,g){for(var h,l,k=0,m=a.length;k<m;k++)if(h=a[k],l=h.object,l.visible){if(g)h=g;else{h=h[b];if(!h)continue;f&&I.setBlending(h.blending,h.blendEquation,h.blendSrc,h.blendDst);I.setDepthTest(h.depthTest);I.setDepthWrite(h.depthWrite);O(h.polygonOffset,h.polygonOffsetFactor,h.polygonOffsetUnits)}I.renderImmediateObject(c,d,e,h,l)}}function v(a){var b=a.object.material;b.transparent?
|
|
(a.transparent=b,a.opaque=null):(a.opaque=b,a.transparent=null)}function x(a,b,d){var e=!1;a=b.material;if(void 0===d.geometryGroups||d.groupsNeedUpdate)delete La[b.id],d.makeGroups(a instanceof THREE.MeshFaceMaterial,ub?4294967296:65535),d.groupsNeedUpdate=!1;for(var f=0,g=d.geometryGroupsList.length;f<g;f++){a=d.geometryGroupsList[f];if(a.__webglVertexBuffer)e=!1;else{e=a;e.__webglVertexBuffer=l.createBuffer();e.__webglNormalBuffer=l.createBuffer();e.__webglTangentBuffer=l.createBuffer();e.__webglColorBuffer=
|
|
(a.transparent=b,a.opaque=null):(a.opaque=b,a.transparent=null)}function x(a,b,d){var e=!1;a=b.material;if(void 0===d.geometryGroups||d.groupsNeedUpdate)delete La[b.id],d.makeGroups(a instanceof THREE.MeshFaceMaterial,ub?4294967296:65535),d.groupsNeedUpdate=!1;for(var f=0,g=d.geometryGroupsList.length;f<g;f++){a=d.geometryGroupsList[f];if(a.__webglVertexBuffer)e=!1;else{e=a;e.__webglVertexBuffer=l.createBuffer();e.__webglNormalBuffer=l.createBuffer();e.__webglTangentBuffer=l.createBuffer();e.__webglColorBuffer=
|
|
l.createBuffer();e.__webglUVBuffer=l.createBuffer();e.__webglUV2Buffer=l.createBuffer();e.__webglSkinIndicesBuffer=l.createBuffer();e.__webglSkinWeightsBuffer=l.createBuffer();e.__webglFaceBuffer=l.createBuffer();e.__webglLineBuffer=l.createBuffer();var h=void 0,k=void 0;if(e.numMorphTargets)for(e.__webglMorphTargetsBuffers=[],h=0,k=e.numMorphTargets;h<k;h++)e.__webglMorphTargetsBuffers.push(l.createBuffer());if(e.numMorphNormals)for(e.__webglMorphNormalsBuffers=[],h=0,k=e.numMorphNormals;h<k;h++)e.__webglMorphNormalsBuffers.push(l.createBuffer());
|
|
l.createBuffer();e.__webglUVBuffer=l.createBuffer();e.__webglUV2Buffer=l.createBuffer();e.__webglSkinIndicesBuffer=l.createBuffer();e.__webglSkinWeightsBuffer=l.createBuffer();e.__webglFaceBuffer=l.createBuffer();e.__webglLineBuffer=l.createBuffer();var h=void 0,k=void 0;if(e.numMorphTargets)for(e.__webglMorphTargetsBuffers=[],h=0,k=e.numMorphTargets;h<k;h++)e.__webglMorphTargetsBuffers.push(l.createBuffer());if(e.numMorphNormals)for(e.__webglMorphNormalsBuffers=[],h=0,k=e.numMorphNormals;h<k;h++)e.__webglMorphNormalsBuffers.push(l.createBuffer());
|
|
I.info.memory.geometries++;c(a,b);d.verticesNeedUpdate=!0;d.morphTargetsNeedUpdate=!0;d.elementsNeedUpdate=!0;d.uvsNeedUpdate=!0;d.normalsNeedUpdate=!0;d.tangentsNeedUpdate=!0;e=d.colorsNeedUpdate=!0}(e||void 0===b.__webglActive)&&u(La,a,b)}b.__webglActive=!0}function u(a,b,c){var d=c.id;a[d]=a[d]||[];a[d].push({id:d,buffer:b,object:c,material:null,z:0})}function G(a){for(var b in a.attributes)if(a.attributes[b].needsUpdate)return!0;return!1}function y(a){for(var b in a.attributes)a.attributes[b].needsUpdate=
|
|
I.info.memory.geometries++;c(a,b);d.verticesNeedUpdate=!0;d.morphTargetsNeedUpdate=!0;d.elementsNeedUpdate=!0;d.uvsNeedUpdate=!0;d.normalsNeedUpdate=!0;d.tangentsNeedUpdate=!0;e=d.colorsNeedUpdate=!0}(e||void 0===b.__webglActive)&&u(La,a,b)}b.__webglActive=!0}function u(a,b,c){var d=c.id;a[d]=a[d]||[];a[d].push({id:d,buffer:b,object:c,material:null,z:0})}function G(a){for(var b in a.attributes)if(a.attributes[b].needsUpdate)return!0;return!1}function y(a){for(var b in a.attributes)a.attributes[b].needsUpdate=
|
|
-!1}function B(a){if(a instanceof THREE.Mesh||a instanceof THREE.PointCloud||a instanceof THREE.Line)delete La[a.id];else if(a instanceof THREE.ImmediateRenderObject||a.immediateRenderCallback)for(var b=Ma,c=b.length-1;0<=c;c--)b[c].object===a&&b.splice(c,1);delete a.__webglActive}function C(a,b,c,d,e){var f,g,h,k;Ha=0;if(d.needsUpdate){d.program&&Bc(d);d.addEventListener("dispose",Cc);var m,n,q,r,p,t;d instanceof THREE.MeshDepthMaterial?t="depth":d instanceof THREE.MeshNormalMaterial?t="normal":d instanceof
|
|
|
|
-THREE.MeshBasicMaterial?t="basic":d instanceof THREE.MeshLambertMaterial?t="lambert":d instanceof THREE.MeshPhongMaterial?t="phong":d instanceof THREE.LineBasicMaterial?t="basic":d instanceof THREE.LineDashedMaterial?t="dashed":d instanceof THREE.PointCloudMaterial&&(t="particle_basic");if(t){var s=THREE.ShaderLib[t];d.__webglShader={uniforms:THREE.UniformsUtils.clone(s.uniforms),vertexShader:s.vertexShader,fragmentShader:s.fragmentShader}}else d.__webglShader={uniforms:d.uniforms,vertexShader:d.vertexShader,
|
|
|
|
-fragmentShader:d.fragmentShader};for(var u=0,v=0,x=0,y=0,G=0,B=b.length;G<B;G++){var C=b[G];C.onlyShadow||!1===C.visible||(C instanceof THREE.DirectionalLight&&u++,C instanceof THREE.PointLight&&v++,C instanceof THREE.SpotLight&&x++,C instanceof THREE.HemisphereLight&&y++)}f=u;g=v;h=x;k=y;for(var z=0,F=0,L=b.length;F<L;F++){var R=b[F];R.castShadow&&(R instanceof THREE.SpotLight&&z++,R instanceof THREE.DirectionalLight&&!R.shadowCascade&&z++)}p=z;if(ic&&e&&e.skeleton&&e.skeleton.useVertexTexture)r=
|
|
|
|
|
|
+!1}function B(a){if(a instanceof THREE.Mesh||a instanceof THREE.PointCloud||a instanceof THREE.Line)delete La[a.id];else if(a instanceof THREE.ImmediateRenderObject||a.immediateRenderCallback)for(var b=Ma,c=b.length-1;0<=c;c--)b[c].object===a&&b.splice(c,1);delete a.__webglActive}function C(a,b,c,d,e){var f,g,h,k;Ha=0;if(d.needsUpdate){d.program&&Bc(d);d.addEventListener("dispose",Cc);var m,n,q,r,s,t;d instanceof THREE.MeshDepthMaterial?t="depth":d instanceof THREE.MeshNormalMaterial?t="normal":d instanceof
|
|
|
|
+THREE.MeshBasicMaterial?t="basic":d instanceof THREE.MeshLambertMaterial?t="lambert":d instanceof THREE.MeshPhongMaterial?t="phong":d instanceof THREE.LineBasicMaterial?t="basic":d instanceof THREE.LineDashedMaterial?t="dashed":d instanceof THREE.PointCloudMaterial&&(t="particle_basic");if(t){var p=THREE.ShaderLib[t];d.__webglShader={uniforms:THREE.UniformsUtils.clone(p.uniforms),vertexShader:p.vertexShader,fragmentShader:p.fragmentShader}}else d.__webglShader={uniforms:d.uniforms,vertexShader:d.vertexShader,
|
|
|
|
+fragmentShader:d.fragmentShader};for(var u=0,v=0,x=0,y=0,G=0,B=b.length;G<B;G++){var C=b[G];C.onlyShadow||!1===C.visible||(C instanceof THREE.DirectionalLight&&u++,C instanceof THREE.PointLight&&v++,C instanceof THREE.SpotLight&&x++,C instanceof THREE.HemisphereLight&&y++)}f=u;g=v;h=x;k=y;for(var z=0,F=0,L=b.length;F<L;F++){var R=b[F];R.castShadow&&(R instanceof THREE.SpotLight&&z++,R instanceof THREE.DirectionalLight&&!R.shadowCascade&&z++)}s=z;if(ic&&e&&e.skeleton&&e.skeleton.useVertexTexture)r=
|
|
1024;else{var K=l.getParameter(l.MAX_VERTEX_UNIFORM_VECTORS),S=Math.floor((K-20)/4);void 0!==e&&e instanceof THREE.SkinnedMesh&&(S=Math.min(e.skeleton.bones.length,S),S<e.skeleton.bones.length&&console.warn("WebGLRenderer: too many bones - "+e.skeleton.bones.length+", this GPU supports just "+S+" (try OpenGL instead of ANGLE)"));r=S}q={precision:P,supportsVertexTextures:jc,map:!!d.map,envMap:!!d.envMap,lightMap:!!d.lightMap,bumpMap:!!d.bumpMap,normalMap:!!d.normalMap,specularMap:!!d.specularMap,alphaMap:!!d.alphaMap,
|
|
1024;else{var K=l.getParameter(l.MAX_VERTEX_UNIFORM_VECTORS),S=Math.floor((K-20)/4);void 0!==e&&e instanceof THREE.SkinnedMesh&&(S=Math.min(e.skeleton.bones.length,S),S<e.skeleton.bones.length&&console.warn("WebGLRenderer: too many bones - "+e.skeleton.bones.length+", this GPU supports just "+S+" (try OpenGL instead of ANGLE)"));r=S}q={precision:P,supportsVertexTextures:jc,map:!!d.map,envMap:!!d.envMap,lightMap:!!d.lightMap,bumpMap:!!d.bumpMap,normalMap:!!d.normalMap,specularMap:!!d.specularMap,alphaMap:!!d.alphaMap,
|
|
-vertexColors:d.vertexColors,fog:c,useFog:d.fog,fogExp:c instanceof THREE.FogExp2,sizeAttenuation:d.sizeAttenuation,logarithmicDepthBuffer:X,skinning:d.skinning,maxBones:r,useVertexTexture:ic&&e&&e.skeleton&&e.skeleton.useVertexTexture,morphTargets:d.morphTargets,morphNormals:d.morphNormals,maxMorphTargets:I.maxMorphTargets,maxMorphNormals:I.maxMorphNormals,maxDirLights:f,maxPointLights:g,maxSpotLights:h,maxHemiLights:k,maxShadows:p,shadowMapEnabled:I.shadowMapEnabled&&e.receiveShadow&&0<p,shadowMapType:I.shadowMapType,
|
|
|
|
|
|
+vertexColors:d.vertexColors,fog:c,useFog:d.fog,fogExp:c instanceof THREE.FogExp2,sizeAttenuation:d.sizeAttenuation,logarithmicDepthBuffer:X,skinning:d.skinning,maxBones:r,useVertexTexture:ic&&e&&e.skeleton&&e.skeleton.useVertexTexture,morphTargets:d.morphTargets,morphNormals:d.morphNormals,maxMorphTargets:I.maxMorphTargets,maxMorphNormals:I.maxMorphNormals,maxDirLights:f,maxPointLights:g,maxSpotLights:h,maxHemiLights:k,maxShadows:s,shadowMapEnabled:I.shadowMapEnabled&&e.receiveShadow&&0<s,shadowMapType:I.shadowMapType,
|
|
shadowMapDebug:I.shadowMapDebug,shadowMapCascade:I.shadowMapCascade,alphaTest:d.alphaTest,metal:d.metal,wrapAround:d.wrapAround,doubleSided:d.side===THREE.DoubleSide,flipSided:d.side===THREE.BackSide};var O=[];t?O.push(t):(O.push(d.fragmentShader),O.push(d.vertexShader));for(var V in d.defines)O.push(V),O.push(d.defines[V]);for(var ta in q)O.push(ta),O.push(q[ta]);var ba=O.join(),Z;ta=0;for(var La=bb.length;ta<La;ta++){var ca=bb[ta];if(ca.code===ba){Z=ca;Z.usedTimes++;break}}void 0===Z&&(Z=new THREE.WebGLProgram(I,
|
|
shadowMapDebug:I.shadowMapDebug,shadowMapCascade:I.shadowMapCascade,alphaTest:d.alphaTest,metal:d.metal,wrapAround:d.wrapAround,doubleSided:d.side===THREE.DoubleSide,flipSided:d.side===THREE.BackSide};var O=[];t?O.push(t):(O.push(d.fragmentShader),O.push(d.vertexShader));for(var V in d.defines)O.push(V),O.push(d.defines[V]);for(var ta in q)O.push(ta),O.push(q[ta]);var ba=O.join(),Z;ta=0;for(var La=bb.length;ta<La;ta++){var ca=bb[ta];if(ca.code===ba){Z=ca;Z.usedTimes++;break}}void 0===Z&&(Z=new THREE.WebGLProgram(I,
|
|
ba,d,q),bb.push(Z),I.info.memory.programs=bb.length);d.program=Z;var Ja=d.program.attributes;if(d.morphTargets){d.numSupportedMorphTargets=0;var da,ya="morphTarget";for(n=0;n<I.maxMorphTargets;n++)da=ya+n,0<=Ja[da]&&d.numSupportedMorphTargets++}if(d.morphNormals)for(d.numSupportedMorphNormals=0,ya="morphNormal",n=0;n<I.maxMorphNormals;n++)da=ya+n,0<=Ja[da]&&d.numSupportedMorphNormals++;d.uniformsList=[];for(m in d.__webglShader.uniforms){var qa=d.program.uniforms[m];qa&&d.uniformsList.push([d.__webglShader.uniforms[m],
|
|
ba,d,q),bb.push(Z),I.info.memory.programs=bb.length);d.program=Z;var Ja=d.program.attributes;if(d.morphTargets){d.numSupportedMorphTargets=0;var da,ya="morphTarget";for(n=0;n<I.maxMorphTargets;n++)da=ya+n,0<=Ja[da]&&d.numSupportedMorphTargets++}if(d.morphNormals)for(d.numSupportedMorphNormals=0,ya="morphNormal",n=0;n<I.maxMorphNormals;n++)da=ya+n,0<=Ja[da]&&d.numSupportedMorphNormals++;d.uniformsList=[];for(m in d.__webglShader.uniforms){var qa=d.program.uniforms[m];qa&&d.uniformsList.push([d.__webglShader.uniforms[m],
|
|
qa])}d.needsUpdate=!1}d.morphTargets&&!e.__webglMorphTargetInfluences&&(e.__webglMorphTargetInfluences=new Float32Array(I.maxMorphTargets));var ab=!1,Ka=!1,oa=!1,Ma=d.program,aa=Ma.uniforms,T=d.__webglShader.uniforms;Ma.id!==lb&&(l.useProgram(Ma.program),lb=Ma.id,oa=Ka=ab=!0);d.id!==ha&&(-1===ha&&(oa=!0),ha=d.id,Ka=!0);if(ab||a!==Xa)l.uniformMatrix4fv(aa.projectionMatrix,!1,a.projectionMatrix.elements),X&&l.uniform1f(aa.logDepthBufFC,2/(Math.log(a.far+1)/Math.LN2)),a!==Xa&&(Xa=a),(d instanceof THREE.ShaderMaterial||
|
|
qa])}d.needsUpdate=!1}d.morphTargets&&!e.__webglMorphTargetInfluences&&(e.__webglMorphTargetInfluences=new Float32Array(I.maxMorphTargets));var ab=!1,Ka=!1,oa=!1,Ma=d.program,aa=Ma.uniforms,T=d.__webglShader.uniforms;Ma.id!==lb&&(l.useProgram(Ma.program),lb=Ma.id,oa=Ka=ab=!0);d.id!==ha&&(-1===ha&&(oa=!0),ha=d.id,Ka=!0);if(ab||a!==Xa)l.uniformMatrix4fv(aa.projectionMatrix,!1,a.projectionMatrix.elements),X&&l.uniform1f(aa.logDepthBufFC,2/(Math.log(a.far+1)/Math.LN2)),a!==Xa&&(Xa=a),(d instanceof THREE.ShaderMaterial||
|
|
@@ -545,14 +544,14 @@ I.info.memory.textures--},Cc=function(a){a=a.target;a.removeEventListener("dispo
|
|
void 0!==a.__webglSkinIndicesBuffer&&l.deleteBuffer(a.__webglSkinIndicesBuffer);void 0!==a.__webglSkinWeightsBuffer&&l.deleteBuffer(a.__webglSkinWeightsBuffer);void 0!==a.__webglFaceBuffer&&l.deleteBuffer(a.__webglFaceBuffer);void 0!==a.__webglLineBuffer&&l.deleteBuffer(a.__webglLineBuffer);void 0!==a.__webglLineDistanceBuffer&&l.deleteBuffer(a.__webglLineDistanceBuffer);if(void 0!==a.__webglCustomAttributesList)for(var b in a.__webglCustomAttributesList)l.deleteBuffer(a.__webglCustomAttributesList[b].buffer);
|
|
void 0!==a.__webglSkinIndicesBuffer&&l.deleteBuffer(a.__webglSkinIndicesBuffer);void 0!==a.__webglSkinWeightsBuffer&&l.deleteBuffer(a.__webglSkinWeightsBuffer);void 0!==a.__webglFaceBuffer&&l.deleteBuffer(a.__webglFaceBuffer);void 0!==a.__webglLineBuffer&&l.deleteBuffer(a.__webglLineBuffer);void 0!==a.__webglLineDistanceBuffer&&l.deleteBuffer(a.__webglLineDistanceBuffer);if(void 0!==a.__webglCustomAttributesList)for(var b in a.__webglCustomAttributesList)l.deleteBuffer(a.__webglCustomAttributesList[b].buffer);
|
|
I.info.memory.geometries--},Bc=function(a){var b=a.program.program;if(void 0!==b){a.program=void 0;var c,d,e=!1;a=0;for(c=bb.length;a<c;a++)if(d=bb[a],d.program===b){d.usedTimes--;0===d.usedTimes&&(e=!0);break}if(!0===e){e=[];a=0;for(c=bb.length;a<c;a++)d=bb[a],d.program!==b&&e.push(d);bb=e;l.deleteProgram(b);I.info.memory.programs--}}};this.renderBufferImmediate=function(a,b,c){g();a.hasPositions&&!a.__webglVertexBuffer&&(a.__webglVertexBuffer=l.createBuffer());a.hasNormals&&!a.__webglNormalBuffer&&
|
|
I.info.memory.geometries--},Bc=function(a){var b=a.program.program;if(void 0!==b){a.program=void 0;var c,d,e=!1;a=0;for(c=bb.length;a<c;a++)if(d=bb[a],d.program===b){d.usedTimes--;0===d.usedTimes&&(e=!0);break}if(!0===e){e=[];a=0;for(c=bb.length;a<c;a++)d=bb[a],d.program!==b&&e.push(d);bb=e;l.deleteProgram(b);I.info.memory.programs--}}};this.renderBufferImmediate=function(a,b,c){g();a.hasPositions&&!a.__webglVertexBuffer&&(a.__webglVertexBuffer=l.createBuffer());a.hasNormals&&!a.__webglNormalBuffer&&
|
|
(a.__webglNormalBuffer=l.createBuffer());a.hasUvs&&!a.__webglUvBuffer&&(a.__webglUvBuffer=l.createBuffer());a.hasColors&&!a.__webglColorBuffer&&(a.__webglColorBuffer=l.createBuffer());a.hasPositions&&(l.bindBuffer(l.ARRAY_BUFFER,a.__webglVertexBuffer),l.bufferData(l.ARRAY_BUFFER,a.positionArray,l.DYNAMIC_DRAW),h(b.attributes.position),l.vertexAttribPointer(b.attributes.position,3,l.FLOAT,!1,0,0));if(a.hasNormals){l.bindBuffer(l.ARRAY_BUFFER,a.__webglNormalBuffer);if(c.shading===THREE.FlatShading){var d,
|
|
(a.__webglNormalBuffer=l.createBuffer());a.hasUvs&&!a.__webglUvBuffer&&(a.__webglUvBuffer=l.createBuffer());a.hasColors&&!a.__webglColorBuffer&&(a.__webglColorBuffer=l.createBuffer());a.hasPositions&&(l.bindBuffer(l.ARRAY_BUFFER,a.__webglVertexBuffer),l.bufferData(l.ARRAY_BUFFER,a.positionArray,l.DYNAMIC_DRAW),h(b.attributes.position),l.vertexAttribPointer(b.attributes.position,3,l.FLOAT,!1,0,0));if(a.hasNormals){l.bindBuffer(l.ARRAY_BUFFER,a.__webglNormalBuffer);if(c.shading===THREE.FlatShading){var d,
|
|
-e,f,m,n,q,r,p,t,s,u,v=3*a.count;for(u=0;u<v;u+=9)s=a.normalArray,d=s[u],e=s[u+1],f=s[u+2],m=s[u+3],q=s[u+4],p=s[u+5],n=s[u+6],r=s[u+7],t=s[u+8],d=(d+m+n)/3,e=(e+q+r)/3,f=(f+p+t)/3,s[u]=d,s[u+1]=e,s[u+2]=f,s[u+3]=d,s[u+4]=e,s[u+5]=f,s[u+6]=d,s[u+7]=e,s[u+8]=f}l.bufferData(l.ARRAY_BUFFER,a.normalArray,l.DYNAMIC_DRAW);h(b.attributes.normal);l.vertexAttribPointer(b.attributes.normal,3,l.FLOAT,!1,0,0)}a.hasUvs&&c.map&&(l.bindBuffer(l.ARRAY_BUFFER,a.__webglUvBuffer),l.bufferData(l.ARRAY_BUFFER,a.uvArray,
|
|
|
|
|
|
+e,f,m,n,q,r,t,s,p,u,v=3*a.count;for(u=0;u<v;u+=9)p=a.normalArray,d=p[u],e=p[u+1],f=p[u+2],m=p[u+3],q=p[u+4],t=p[u+5],n=p[u+6],r=p[u+7],s=p[u+8],d=(d+m+n)/3,e=(e+q+r)/3,f=(f+t+s)/3,p[u]=d,p[u+1]=e,p[u+2]=f,p[u+3]=d,p[u+4]=e,p[u+5]=f,p[u+6]=d,p[u+7]=e,p[u+8]=f}l.bufferData(l.ARRAY_BUFFER,a.normalArray,l.DYNAMIC_DRAW);h(b.attributes.normal);l.vertexAttribPointer(b.attributes.normal,3,l.FLOAT,!1,0,0)}a.hasUvs&&c.map&&(l.bindBuffer(l.ARRAY_BUFFER,a.__webglUvBuffer),l.bufferData(l.ARRAY_BUFFER,a.uvArray,
|
|
l.DYNAMIC_DRAW),h(b.attributes.uv),l.vertexAttribPointer(b.attributes.uv,2,l.FLOAT,!1,0,0));a.hasColors&&c.vertexColors!==THREE.NoColors&&(l.bindBuffer(l.ARRAY_BUFFER,a.__webglColorBuffer),l.bufferData(l.ARRAY_BUFFER,a.colorArray,l.DYNAMIC_DRAW),h(b.attributes.color),l.vertexAttribPointer(b.attributes.color,3,l.FLOAT,!1,0,0));k();l.drawArrays(l.TRIANGLES,0,a.count);a.count=0};this.renderBufferDirect=function(a,b,c,d,e,h){var k=C(a,b,c,d,h);a=k.attributes;b=e.attributes;c=!1;k=16777215*e.id+2*k.id+
|
|
l.DYNAMIC_DRAW),h(b.attributes.uv),l.vertexAttribPointer(b.attributes.uv,2,l.FLOAT,!1,0,0));a.hasColors&&c.vertexColors!==THREE.NoColors&&(l.bindBuffer(l.ARRAY_BUFFER,a.__webglColorBuffer),l.bufferData(l.ARRAY_BUFFER,a.colorArray,l.DYNAMIC_DRAW),h(b.attributes.color),l.vertexAttribPointer(b.attributes.color,3,l.FLOAT,!1,0,0));k();l.drawArrays(l.TRIANGLES,0,a.count);a.count=0};this.renderBufferDirect=function(a,b,c,d,e,h){var k=C(a,b,c,d,h);a=k.attributes;b=e.attributes;c=!1;k=16777215*e.id+2*k.id+
|
|
-(d.wireframe?1:0);k!==qa&&(qa=k,c=!0);c&&g();if(h instanceof THREE.Mesh)if(k=b.index){var m,n;k.array instanceof Uint32Array?(m=l.UNSIGNED_INT,n=4):(m=l.UNSIGNED_SHORT,n=2);e=e.offsets;if(0===e.length)c&&(f(d,a,b,0),l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,k.buffer)),l.drawElements(l.TRIANGLES,k.array.length,m,0),I.info.render.calls++,I.info.render.vertices+=k.array.length,I.info.render.faces+=k.array.length/3;else{c=!0;for(var q=0,r=e.length;q<r;q++){var s=e[q].index;c&&(f(d,a,b,s),l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,
|
|
|
|
|
|
+(d.wireframe?1:0);k!==qa&&(qa=k,c=!0);c&&g();if(h instanceof THREE.Mesh)if(k=b.index){var m,n;k.array instanceof Uint32Array?(m=l.UNSIGNED_INT,n=4):(m=l.UNSIGNED_SHORT,n=2);e=e.offsets;if(0===e.length)c&&(f(d,a,b,0),l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,k.buffer)),l.drawElements(l.TRIANGLES,k.array.length,m,0),I.info.render.calls++,I.info.render.vertices+=k.array.length,I.info.render.faces+=k.array.length/3;else{c=!0;for(var q=0,r=e.length;q<r;q++){var p=e[q].index;c&&(f(d,a,b,p),l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,
|
|
k.buffer));l.drawElements(l.TRIANGLES,e[q].count,m,e[q].start*n);I.info.render.calls++;I.info.render.vertices+=e[q].count;I.info.render.faces+=e[q].count/3}}}else c&&f(d,a,b,0),d=e.attributes.position,l.drawArrays(l.TRIANGLES,0,d.array.length/3),I.info.render.calls++,I.info.render.vertices+=d.array.length/3,I.info.render.faces+=d.array.length/9;else if(h instanceof THREE.PointCloud)c&&f(d,a,b,0),d=b.position,l.drawArrays(l.POINTS,0,d.array.length/3),I.info.render.calls++,I.info.render.points+=d.array.length/
|
|
k.buffer));l.drawElements(l.TRIANGLES,e[q].count,m,e[q].start*n);I.info.render.calls++;I.info.render.vertices+=e[q].count;I.info.render.faces+=e[q].count/3}}}else c&&f(d,a,b,0),d=e.attributes.position,l.drawArrays(l.TRIANGLES,0,d.array.length/3),I.info.render.calls++,I.info.render.vertices+=d.array.length/3,I.info.render.faces+=d.array.length/9;else if(h instanceof THREE.PointCloud)c&&f(d,a,b,0),d=b.position,l.drawArrays(l.POINTS,0,d.array.length/3),I.info.render.calls++,I.info.render.points+=d.array.length/
|
|
-3;else if(h instanceof THREE.Line)if(h=h.type===THREE.LineStrip?l.LINE_STRIP:l.LINES,R(d.linewidth),k=b.index)if(k.array instanceof Uint32Array?(m=l.UNSIGNED_INT,n=4):(m=l.UNSIGNED_SHORT,n=2),e=e.offsets,0===e.length)c&&(f(d,a,b,0),l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,k.buffer)),l.drawElements(h,k.array.length,m,0),I.info.render.calls++,I.info.render.vertices+=k.array.length;else for(1<e.length&&(c=!0),q=0,r=e.length;q<r;q++)s=e[q].index,c&&(f(d,a,b,s),l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,k.buffer)),
|
|
|
|
|
|
+3;else if(h instanceof THREE.Line)if(h=h.type===THREE.LineStrip?l.LINE_STRIP:l.LINES,R(d.linewidth),k=b.index)if(k.array instanceof Uint32Array?(m=l.UNSIGNED_INT,n=4):(m=l.UNSIGNED_SHORT,n=2),e=e.offsets,0===e.length)c&&(f(d,a,b,0),l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,k.buffer)),l.drawElements(h,k.array.length,m,0),I.info.render.calls++,I.info.render.vertices+=k.array.length;else for(1<e.length&&(c=!0),q=0,r=e.length;q<r;q++)p=e[q].index,c&&(f(d,a,b,p),l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,k.buffer)),
|
|
l.drawElements(h,e[q].count,m,e[q].start*n),I.info.render.calls++,I.info.render.vertices+=e[q].count;else c&&f(d,a,b,0),d=b.position,l.drawArrays(h,0,d.array.length/3),I.info.render.calls++,I.info.render.points+=d.array.length/3};this.renderBuffer=function(a,b,c,d,e,f){var m,n;c=C(a,b,c,d,f);b=c.attributes;a=!1;c=16777215*e.id+2*c.id+(d.wireframe?1:0);c!==qa&&(qa=c,a=!0);a&&g();if(!d.morphTargets&&0<=b.position)a&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglVertexBuffer),h(b.position),l.vertexAttribPointer(b.position,
|
|
l.drawElements(h,e[q].count,m,e[q].start*n),I.info.render.calls++,I.info.render.vertices+=e[q].count;else c&&f(d,a,b,0),d=b.position,l.drawArrays(h,0,d.array.length/3),I.info.render.calls++,I.info.render.points+=d.array.length/3};this.renderBuffer=function(a,b,c,d,e,f){var m,n;c=C(a,b,c,d,f);b=c.attributes;a=!1;c=16777215*e.id+2*c.id+(d.wireframe?1:0);c!==qa&&(qa=c,a=!0);a&&g();if(!d.morphTargets&&0<=b.position)a&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglVertexBuffer),h(b.position),l.vertexAttribPointer(b.position,
|
|
3,l.FLOAT,!1,0,0));else if(f.morphTargetBase){c=d.program.attributes;-1!==f.morphTargetBase&&0<=c.position?(l.bindBuffer(l.ARRAY_BUFFER,e.__webglMorphTargetsBuffers[f.morphTargetBase]),h(c.position),l.vertexAttribPointer(c.position,3,l.FLOAT,!1,0,0)):0<=c.position&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglVertexBuffer),h(c.position),l.vertexAttribPointer(c.position,3,l.FLOAT,!1,0,0));if(f.morphTargetForcedOrder.length){var q=0;n=f.morphTargetForcedOrder;for(m=f.morphTargetInfluences;q<d.numSupportedMorphTargets&&
|
|
3,l.FLOAT,!1,0,0));else if(f.morphTargetBase){c=d.program.attributes;-1!==f.morphTargetBase&&0<=c.position?(l.bindBuffer(l.ARRAY_BUFFER,e.__webglMorphTargetsBuffers[f.morphTargetBase]),h(c.position),l.vertexAttribPointer(c.position,3,l.FLOAT,!1,0,0)):0<=c.position&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglVertexBuffer),h(c.position),l.vertexAttribPointer(c.position,3,l.FLOAT,!1,0,0));if(f.morphTargetForcedOrder.length){var q=0;n=f.morphTargetForcedOrder;for(m=f.morphTargetInfluences;q<d.numSupportedMorphTargets&&
|
|
-q<n.length;)0<=c["morphTarget"+q]&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglMorphTargetsBuffers[n[q]]),h(c["morphTarget"+q]),l.vertexAttribPointer(c["morphTarget"+q],3,l.FLOAT,!1,0,0)),0<=c["morphNormal"+q]&&d.morphNormals&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglMorphNormalsBuffers[n[q]]),h(c["morphNormal"+q]),l.vertexAttribPointer(c["morphNormal"+q],3,l.FLOAT,!1,0,0)),f.__webglMorphTargetInfluences[q]=m[n[q]],q++}else{n=[];m=f.morphTargetInfluences;var r,s=m.length;for(r=0;r<s;r++)q=m[r],0<q&&n.push([q,
|
|
|
|
|
|
+q<n.length;)0<=c["morphTarget"+q]&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglMorphTargetsBuffers[n[q]]),h(c["morphTarget"+q]),l.vertexAttribPointer(c["morphTarget"+q],3,l.FLOAT,!1,0,0)),0<=c["morphNormal"+q]&&d.morphNormals&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglMorphNormalsBuffers[n[q]]),h(c["morphNormal"+q]),l.vertexAttribPointer(c["morphNormal"+q],3,l.FLOAT,!1,0,0)),f.__webglMorphTargetInfluences[q]=m[n[q]],q++}else{n=[];m=f.morphTargetInfluences;var r,t=m.length;for(r=0;r<t;r++)q=m[r],0<q&&n.push([q,
|
|
r]);n.length>d.numSupportedMorphTargets?(n.sort(p),n.length=d.numSupportedMorphTargets):n.length>d.numSupportedMorphNormals?n.sort(p):0===n.length&&n.push([0,0]);for(q=0;q<d.numSupportedMorphTargets;)n[q]?(r=n[q][1],0<=c["morphTarget"+q]&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglMorphTargetsBuffers[r]),h(c["morphTarget"+q]),l.vertexAttribPointer(c["morphTarget"+q],3,l.FLOAT,!1,0,0)),0<=c["morphNormal"+q]&&d.morphNormals&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglMorphNormalsBuffers[r]),h(c["morphNormal"+
|
|
r]);n.length>d.numSupportedMorphTargets?(n.sort(p),n.length=d.numSupportedMorphTargets):n.length>d.numSupportedMorphNormals?n.sort(p):0===n.length&&n.push([0,0]);for(q=0;q<d.numSupportedMorphTargets;)n[q]?(r=n[q][1],0<=c["morphTarget"+q]&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglMorphTargetsBuffers[r]),h(c["morphTarget"+q]),l.vertexAttribPointer(c["morphTarget"+q],3,l.FLOAT,!1,0,0)),0<=c["morphNormal"+q]&&d.morphNormals&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglMorphNormalsBuffers[r]),h(c["morphNormal"+
|
|
q]),l.vertexAttribPointer(c["morphNormal"+q],3,l.FLOAT,!1,0,0)),f.__webglMorphTargetInfluences[q]=m[r]):f.__webglMorphTargetInfluences[q]=0,q++}null!==d.program.uniforms.morphTargetInfluences&&l.uniform1fv(d.program.uniforms.morphTargetInfluences,f.__webglMorphTargetInfluences)}if(a){if(e.__webglCustomAttributesList)for(m=0,n=e.__webglCustomAttributesList.length;m<n;m++)c=e.__webglCustomAttributesList[m],0<=b[c.buffer.belongsToAttribute]&&(l.bindBuffer(l.ARRAY_BUFFER,c.buffer),h(b[c.buffer.belongsToAttribute]),
|
|
q]),l.vertexAttribPointer(c["morphNormal"+q],3,l.FLOAT,!1,0,0)),f.__webglMorphTargetInfluences[q]=m[r]):f.__webglMorphTargetInfluences[q]=0,q++}null!==d.program.uniforms.morphTargetInfluences&&l.uniform1fv(d.program.uniforms.morphTargetInfluences,f.__webglMorphTargetInfluences)}if(a){if(e.__webglCustomAttributesList)for(m=0,n=e.__webglCustomAttributesList.length;m<n;m++)c=e.__webglCustomAttributesList[m],0<=b[c.buffer.belongsToAttribute]&&(l.bindBuffer(l.ARRAY_BUFFER,c.buffer),h(b[c.buffer.belongsToAttribute]),
|
|
l.vertexAttribPointer(b[c.buffer.belongsToAttribute],c.size,l.FLOAT,!1,0,0));0<=b.color&&(0<f.geometry.colors.length||0<f.geometry.faces.length?(l.bindBuffer(l.ARRAY_BUFFER,e.__webglColorBuffer),h(b.color),l.vertexAttribPointer(b.color,3,l.FLOAT,!1,0,0)):d.defaultAttributeValues&&l.vertexAttrib3fv(b.color,d.defaultAttributeValues.color));0<=b.normal&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglNormalBuffer),h(b.normal),l.vertexAttribPointer(b.normal,3,l.FLOAT,!1,0,0));0<=b.tangent&&(l.bindBuffer(l.ARRAY_BUFFER,
|
|
l.vertexAttribPointer(b[c.buffer.belongsToAttribute],c.size,l.FLOAT,!1,0,0));0<=b.color&&(0<f.geometry.colors.length||0<f.geometry.faces.length?(l.bindBuffer(l.ARRAY_BUFFER,e.__webglColorBuffer),h(b.color),l.vertexAttribPointer(b.color,3,l.FLOAT,!1,0,0)):d.defaultAttributeValues&&l.vertexAttrib3fv(b.color,d.defaultAttributeValues.color));0<=b.normal&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglNormalBuffer),h(b.normal),l.vertexAttribPointer(b.normal,3,l.FLOAT,!1,0,0));0<=b.tangent&&(l.bindBuffer(l.ARRAY_BUFFER,
|
|
@@ -658,18 +657,18 @@ d[c[1]].z,d[c[2]].z,d[c[3]].z,e);return b});
|
|
THREE.AnimationHandler={LINEAR:0,CATMULLROM:1,CATMULLROM_FORWARD:2,add:function(){console.warn("THREE.AnimationHandler.add() has been deprecated.")},get:function(){console.warn("THREE.AnimationHandler.get() has been deprecated.")},remove:function(){console.warn("THREE.AnimationHandler.remove() has been deprecated.")},animations:[],init:function(a){if(!0!==a.initialized){for(var b=0;b<a.hierarchy.length;b++){for(var c=0;c<a.hierarchy[b].keys.length;c++)if(0>a.hierarchy[b].keys[c].time&&(a.hierarchy[b].keys[c].time=
|
|
THREE.AnimationHandler={LINEAR:0,CATMULLROM:1,CATMULLROM_FORWARD:2,add:function(){console.warn("THREE.AnimationHandler.add() has been deprecated.")},get:function(){console.warn("THREE.AnimationHandler.get() has been deprecated.")},remove:function(){console.warn("THREE.AnimationHandler.remove() has been deprecated.")},animations:[],init:function(a){if(!0!==a.initialized){for(var b=0;b<a.hierarchy.length;b++){for(var c=0;c<a.hierarchy[b].keys.length;c++)if(0>a.hierarchy[b].keys[c].time&&(a.hierarchy[b].keys[c].time=
|
|
0),void 0!==a.hierarchy[b].keys[c].rot&&!(a.hierarchy[b].keys[c].rot instanceof THREE.Quaternion)){var d=a.hierarchy[b].keys[c].rot;a.hierarchy[b].keys[c].rot=(new THREE.Quaternion).fromArray(d)}if(a.hierarchy[b].keys.length&&void 0!==a.hierarchy[b].keys[0].morphTargets){d={};for(c=0;c<a.hierarchy[b].keys.length;c++)for(var e=0;e<a.hierarchy[b].keys[c].morphTargets.length;e++){var f=a.hierarchy[b].keys[c].morphTargets[e];d[f]=-1}a.hierarchy[b].usedMorphTargets=d;for(c=0;c<a.hierarchy[b].keys.length;c++){var g=
|
|
0),void 0!==a.hierarchy[b].keys[c].rot&&!(a.hierarchy[b].keys[c].rot instanceof THREE.Quaternion)){var d=a.hierarchy[b].keys[c].rot;a.hierarchy[b].keys[c].rot=(new THREE.Quaternion).fromArray(d)}if(a.hierarchy[b].keys.length&&void 0!==a.hierarchy[b].keys[0].morphTargets){d={};for(c=0;c<a.hierarchy[b].keys.length;c++)for(var e=0;e<a.hierarchy[b].keys[c].morphTargets.length;e++){var f=a.hierarchy[b].keys[c].morphTargets[e];d[f]=-1}a.hierarchy[b].usedMorphTargets=d;for(c=0;c<a.hierarchy[b].keys.length;c++){var g=
|
|
{};for(f in d){for(e=0;e<a.hierarchy[b].keys[c].morphTargets.length;e++)if(a.hierarchy[b].keys[c].morphTargets[e]===f){g[f]=a.hierarchy[b].keys[c].morphTargetsInfluences[e];break}e===a.hierarchy[b].keys[c].morphTargets.length&&(g[f]=0)}a.hierarchy[b].keys[c].morphTargetsInfluences=g}}for(c=1;c<a.hierarchy[b].keys.length;c++)a.hierarchy[b].keys[c].time===a.hierarchy[b].keys[c-1].time&&(a.hierarchy[b].keys.splice(c,1),c--);for(c=0;c<a.hierarchy[b].keys.length;c++)a.hierarchy[b].keys[c].index=c}a.initialized=
|
|
{};for(f in d){for(e=0;e<a.hierarchy[b].keys[c].morphTargets.length;e++)if(a.hierarchy[b].keys[c].morphTargets[e]===f){g[f]=a.hierarchy[b].keys[c].morphTargetsInfluences[e];break}e===a.hierarchy[b].keys[c].morphTargets.length&&(g[f]=0)}a.hierarchy[b].keys[c].morphTargetsInfluences=g}}for(c=1;c<a.hierarchy[b].keys.length;c++)a.hierarchy[b].keys[c].time===a.hierarchy[b].keys[c-1].time&&(a.hierarchy[b].keys.splice(c,1),c--);for(c=0;c<a.hierarchy[b].keys.length;c++)a.hierarchy[b].keys[c].index=c}a.initialized=
|
|
-!0;return a}},parse:function(a){var b=function(a,c){c.push(a);for(var d=0;d<a.children.length;d++)b(a.children[d],c)},c=[];if(a instanceof THREE.SkinnedMesh)for(var d=0;d<a.skeleton.bones.length;d++)c.push(a.skeleton.bones[d]);else b(a,c);return c},play:function(a){-1===this.animations.indexOf(a)&&this.animations.push(a)},stop:function(a){a=this.animations.indexOf(a);-1!==a&&this.animations.splice(a,1)},update:function(a){for(var b=0;b<this.animations.length;b++)this.animations[b].update(a)}};
|
|
|
|
-THREE.Animation=function(a,b){this.root=a;this.data=THREE.AnimationHandler.init(b);this.hierarchy=THREE.AnimationHandler.parse(a);this.currentTime=0;this.timeScale=1;this.isPlaying=!1;this.loop=!0;this.weight=0;this.interpolationType=THREE.AnimationHandler.LINEAR};THREE.Animation.prototype.keyTypes=["pos","rot","scl"];THREE.Animation.prototype.play=function(a,b){this.currentTime=void 0!==a?a:0;this.weight=void 0!==b?b:1;this.isPlaying=!0;this.reset();THREE.AnimationHandler.play(this)};
|
|
|
|
-THREE.Animation.prototype.stop=function(){this.isPlaying=!1;THREE.AnimationHandler.stop(this)};
|
|
|
|
-THREE.Animation.prototype.reset=function(){for(var a=0,b=this.hierarchy.length;a<b;a++){var c=this.hierarchy[a];c.matrixAutoUpdate=!0;void 0===c.animationCache&&(c.animationCache={});void 0===c.animationCache[this.data.name]&&(c.animationCache[this.data.name]={},c.animationCache[this.data.name].prevKey={pos:0,rot:0,scl:0},c.animationCache[this.data.name].nextKey={pos:0,rot:0,scl:0},c.animationCache[this.data.name].originalMatrix=c.matrix);for(var c=c.animationCache[this.data.name],d=0;3>d;d++){for(var e=
|
|
|
|
-this.keyTypes[d],f=this.data.hierarchy[a].keys[0],g=this.getNextKeyWith(e,a,1);g.time<this.currentTime&&g.index>f.index;)f=g,g=this.getNextKeyWith(e,a,g.index+1);c.prevKey[e]=f;c.nextKey[e]=g}}};
|
|
|
|
|
|
+!0;return a}},parse:function(a){var b=function(a,c){c.push(a);for(var d=0;d<a.children.length;d++)b(a.children[d],c)},c=[];if(a instanceof THREE.SkinnedMesh)for(var d=0;d<a.skeleton.bones.length;d++)c.push(a.skeleton.bones[d]);else b(a,c);return c},play:function(a){-1===this.animations.indexOf(a)&&this.animations.push(a)},stop:function(a){a=this.animations.indexOf(a);-1!==a&&this.animations.splice(a,1)},update:function(a){for(var b=0;b<this.animations.length;b++)this.animations[b].resetBlendWeights();
|
|
|
|
+for(b=0;b<this.animations.length;b++)this.animations[b].update(a)}};THREE.Animation=function(a,b){this.root=a;this.data=THREE.AnimationHandler.init(b);this.hierarchy=THREE.AnimationHandler.parse(a);this.currentTime=0;this.timeScale=1;this.isPlaying=!1;this.loop=!0;this.weight=0;this.interpolationType=THREE.AnimationHandler.LINEAR};THREE.Animation.prototype.keyTypes=["pos","rot","scl"];
|
|
|
|
+THREE.Animation.prototype.play=function(a,b){this.currentTime=void 0!==a?a:0;this.weight=void 0!==b?b:1;this.isPlaying=!0;this.reset();THREE.AnimationHandler.play(this)};THREE.Animation.prototype.stop=function(){this.isPlaying=!1;THREE.AnimationHandler.stop(this)};
|
|
|
|
+THREE.Animation.prototype.reset=function(){for(var a=0,b=this.hierarchy.length;a<b;a++){var c=this.hierarchy[a];c.matrixAutoUpdate=!0;void 0===c.animationCache&&(c.animationCache={animations:{},blending:{positionWeight:0,quaternionWeight:0,scaleWeight:0}});void 0===c.animationCache.animations[this.data.name]&&(c.animationCache.animations[this.data.name]={},c.animationCache.animations[this.data.name].prevKey={pos:0,rot:0,scl:0},c.animationCache.animations[this.data.name].nextKey={pos:0,rot:0,scl:0},
|
|
|
|
+c.animationCache.animations[this.data.name].originalMatrix=c.matrix);for(var c=c.animationCache.animations[this.data.name],d=0;3>d;d++){for(var e=this.keyTypes[d],f=this.data.hierarchy[a].keys[0],g=this.getNextKeyWith(e,a,1);g.time<this.currentTime&&g.index>f.index;)f=g,g=this.getNextKeyWith(e,a,g.index+1);c.prevKey[e]=f;c.nextKey[e]=g}}};
|
|
|
|
+THREE.Animation.prototype.resetBlendWeights=function(){for(var a=0,b=this.hierarchy.length;a<b;a++){var c=this.hierarchy[a];void 0!==c.animationCache&&(c.animationCache.blending.positionWeight=0,c.animationCache.blending.quaternionWeight=0,c.animationCache.blending.scaleWeight=0)}};
|
|
THREE.Animation.prototype.update=function(){var a=[],b=new THREE.Vector3,c=new THREE.Vector3,d=new THREE.Quaternion,e=function(a,b){var c=[],d=[],e,p,r,q,t,s;e=(a.length-1)*b;p=Math.floor(e);e-=p;c[0]=0===p?p:p-1;c[1]=p;c[2]=p>a.length-2?p:p+1;c[3]=p>a.length-3?p:p+2;p=a[c[0]];q=a[c[1]];t=a[c[2]];s=a[c[3]];c=e*e;r=e*c;d[0]=f(p[0],q[0],t[0],s[0],e,c,r);d[1]=f(p[1],q[1],t[1],s[1],e,c,r);d[2]=f(p[2],q[2],t[2],s[2],e,c,r);return d},f=function(a,b,c,d,e,f,r){a=0.5*(c-a);d=0.5*(d-b);return(2*(b-c)+a+d)*
|
|
THREE.Animation.prototype.update=function(){var a=[],b=new THREE.Vector3,c=new THREE.Vector3,d=new THREE.Quaternion,e=function(a,b){var c=[],d=[],e,p,r,q,t,s;e=(a.length-1)*b;p=Math.floor(e);e-=p;c[0]=0===p?p:p-1;c[1]=p;c[2]=p>a.length-2?p:p+1;c[3]=p>a.length-3?p:p+2;p=a[c[0]];q=a[c[1]];t=a[c[2]];s=a[c[3]];c=e*e;r=e*c;d[0]=f(p[0],q[0],t[0],s[0],e,c,r);d[1]=f(p[1],q[1],t[1],s[1],e,c,r);d[2]=f(p[2],q[2],t[2],s[2],e,c,r);return d},f=function(a,b,c,d,e,f,r){a=0.5*(c-a);d=0.5*(d-b);return(2*(b-c)+a+d)*
|
|
-r+(-3*(b-c)-2*a-d)*f+a*e+b};return function(f){if(!1!==this.isPlaying&&(this.currentTime+=f*this.timeScale,0!==this.weight)){f=this.data.length;if(!0===this.loop&&this.currentTime>f)this.currentTime%=f,this.reset();else if(!1===this.loop&&this.currentTime>f){this.stop();return}f=0;for(var h=this.hierarchy.length;f<h;f++)for(var k=this.hierarchy[f],m=k.animationCache[this.data.name],n=0;3>n;n++){var p=this.keyTypes[n],r=m.prevKey[p],q=m.nextKey[p];if(q.time<=this.currentTime){r=this.data.hierarchy[f].keys[0];
|
|
|
|
-for(q=this.getNextKeyWith(p,f,1);q.time<this.currentTime&&q.index>r.index;)r=q,q=this.getNextKeyWith(p,f,q.index+1);m.prevKey[p]=r;m.nextKey[p]=q}k.matrixAutoUpdate=!0;k.matrixWorldNeedsUpdate=!0;var t=(this.currentTime-r.time)/(q.time-r.time),s=r[p],v=q[p];0>t&&(t=0);1<t&&(t=1);if("pos"===p)if(this.interpolationType===THREE.AnimationHandler.LINEAR)c.x=s[0]+(v[0]-s[0])*t,c.y=s[1]+(v[1]-s[1])*t,c.z=s[2]+(v[2]-s[2])*t,k instanceof THREE.Bone?(r=this.weight/(this.weight+k.accumulatedPosWeight),k.position.lerp(c,
|
|
|
|
-r),k.accumulatedPosWeight+=this.weight):k.position.copy(c);else{if(this.interpolationType===THREE.AnimationHandler.CATMULLROM||this.interpolationType===THREE.AnimationHandler.CATMULLROM_FORWARD)a[0]=this.getPrevKeyWith("pos",f,r.index-1).pos,a[1]=s,a[2]=v,a[3]=this.getNextKeyWith("pos",f,q.index+1).pos,t=0.33*t+0.33,q=e(a,t),r=1,k instanceof THREE.Bone&&(r=this.weight/(this.weight+k.accumulatedPosWeight),k.accumulatedPosWeight+=this.weight),p=k.position,p.x+=(q[0]-p.x)*r,p.y+=(q[1]-p.y)*r,p.z+=(q[2]-
|
|
|
|
-p.z)*r,this.interpolationType===THREE.AnimationHandler.CATMULLROM_FORWARD&&(t=e(a,1.01*t),b.set(t[0],t[1],t[2]),b.sub(p),b.y=0,b.normalize(),t=Math.atan2(b.x,b.z),k.rotation.set(0,t,0))}else"rot"===p?(THREE.Quaternion.slerp(s,v,d,t),k instanceof THREE.Bone?0===k.accumulatedRotWeight?(k.quaternion.copy(d),k.accumulatedRotWeight=this.weight):(r=this.weight/(this.weight+k.accumulatedRotWeight),THREE.Quaternion.slerp(k.quaternion,d,k.quaternion,r),k.accumulatedRotWeight+=this.weight):k.quaternion.copy(d)):
|
|
|
|
-"scl"===p&&(c.x=s[0]+(v[0]-s[0])*t,c.y=s[1]+(v[1]-s[1])*t,c.z=s[2]+(v[2]-s[2])*t,k instanceof THREE.Bone?(r=this.weight/(this.weight+k.accumulatedSclWeight),k.scale.lerp(c,r),k.accumulatedSclWeight+=this.weight):k.scale.copy(c))}return!0}}}();
|
|
|
|
-THREE.Animation.prototype.getNextKeyWith=function(a,b,c){var d=this.data.hierarchy[b].keys;for(c=this.interpolationType===THREE.AnimationHandler.CATMULLROM||this.interpolationType===THREE.AnimationHandler.CATMULLROM_FORWARD?c<d.length-1?c:d.length-1:c%d.length;c<d.length;c++)if(void 0!==d[c][a])return d[c];return this.data.hierarchy[b].keys[0]};
|
|
|
|
|
|
+r+(-3*(b-c)-2*a-d)*f+a*e+b};return function(f){if(!1!==this.isPlaying&&(this.currentTime+=f*this.timeScale,0!==this.weight)){f=this.data.length;if(!0===this.loop&&this.currentTime>f)this.currentTime%=f,this.reset();else if(!1===this.loop&&this.currentTime>f){this.stop();return}f=0;for(var h=this.hierarchy.length;f<h;f++)for(var k=this.hierarchy[f],m=k.animationCache.animations[this.data.name],n=k.animationCache.blending,p=0;3>p;p++){var r=this.keyTypes[p],q=m.prevKey[r],t=m.nextKey[r];if(t.time<=
|
|
|
|
+this.currentTime){q=this.data.hierarchy[f].keys[0];for(t=this.getNextKeyWith(r,f,1);t.time<this.currentTime&&t.index>q.index;)q=t,t=this.getNextKeyWith(r,f,t.index+1);m.prevKey[r]=q;m.nextKey[r]=t}k.matrixAutoUpdate=!0;k.matrixWorldNeedsUpdate=!0;var s=(this.currentTime-q.time)/(t.time-q.time),v=q[r],x=t[r];0>s&&(s=0);1<s&&(s=1);if("pos"===r)if(this.interpolationType===THREE.AnimationHandler.LINEAR)c.x=v[0]+(x[0]-v[0])*s,c.y=v[1]+(x[1]-v[1])*s,c.z=v[2]+(x[2]-v[2])*s,q=this.weight/(this.weight+n.positionWeight),
|
|
|
|
+k.position.lerp(c,q),n.positionWeight+=this.weight;else{if(this.interpolationType===THREE.AnimationHandler.CATMULLROM||this.interpolationType===THREE.AnimationHandler.CATMULLROM_FORWARD)a[0]=this.getPrevKeyWith("pos",f,q.index-1).pos,a[1]=v,a[2]=x,a[3]=this.getNextKeyWith("pos",f,t.index+1).pos,s=0.33*s+0.33,t=e(a,s),q=this.weight/(this.weight+n.positionWeight),n.positionWeight+=this.weight,r=k.position,r.x+=(t[0]-r.x)*q,r.y+=(t[1]-r.y)*q,r.z+=(t[2]-r.z)*q,this.interpolationType===THREE.AnimationHandler.CATMULLROM_FORWARD&&
|
|
|
|
+(s=e(a,1.01*s),b.set(s[0],s[1],s[2]),b.sub(r),b.y=0,b.normalize(),s=Math.atan2(b.x,b.z),k.rotation.set(0,s,0))}else"rot"===r?(THREE.Quaternion.slerp(v,x,d,s),0===n.quaternionWeight?(k.quaternion.copy(d),n.quaternionWeight=this.weight):(q=this.weight/(this.weight+n.quaternionWeight),THREE.Quaternion.slerp(k.quaternion,d,k.quaternion,q),n.quaternionWeight+=this.weight)):"scl"===r&&(c.x=v[0]+(x[0]-v[0])*s,c.y=v[1]+(x[1]-v[1])*s,c.z=v[2]+(x[2]-v[2])*s,q=this.weight/(this.weight+n.scaleWeight),k.scale.lerp(c,
|
|
|
|
+q),n.scaleWeight+=this.weight)}return!0}}}();THREE.Animation.prototype.getNextKeyWith=function(a,b,c){var d=this.data.hierarchy[b].keys;for(c=this.interpolationType===THREE.AnimationHandler.CATMULLROM||this.interpolationType===THREE.AnimationHandler.CATMULLROM_FORWARD?c<d.length-1?c:d.length-1:c%d.length;c<d.length;c++)if(void 0!==d[c][a])return d[c];return this.data.hierarchy[b].keys[0]};
|
|
THREE.Animation.prototype.getPrevKeyWith=function(a,b,c){var d=this.data.hierarchy[b].keys;for(c=this.interpolationType===THREE.AnimationHandler.CATMULLROM||this.interpolationType===THREE.AnimationHandler.CATMULLROM_FORWARD?0<c?c:0:0<=c?c:c+d.length;0<=c;c--)if(void 0!==d[c][a])return d[c];return this.data.hierarchy[b].keys[d.length-1]};
|
|
THREE.Animation.prototype.getPrevKeyWith=function(a,b,c){var d=this.data.hierarchy[b].keys;for(c=this.interpolationType===THREE.AnimationHandler.CATMULLROM||this.interpolationType===THREE.AnimationHandler.CATMULLROM_FORWARD?0<c?c:0:0<=c?c:c+d.length;0<=c;c--)if(void 0!==d[c][a])return d[c];return this.data.hierarchy[b].keys[d.length-1]};
|
|
THREE.KeyFrameAnimation=function(a){this.root=a.node;this.data=THREE.AnimationHandler.init(a);this.hierarchy=THREE.AnimationHandler.parse(this.root);this.currentTime=0;this.timeScale=0.001;this.isPlaying=!1;this.loop=this.isPaused=!0;a=0;for(var b=this.hierarchy.length;a<b;a++){var c=this.data.hierarchy[a].sids,d=this.hierarchy[a];if(this.data.hierarchy[a].keys.length&&c){for(var e=0;e<c.length;e++){var f=c[e],g=this.getNextKeyWith(f,a,0);g&&g.apply(f)}d.matrixAutoUpdate=!1;this.data.hierarchy[a].node.updateMatrix();
|
|
THREE.KeyFrameAnimation=function(a){this.root=a.node;this.data=THREE.AnimationHandler.init(a);this.hierarchy=THREE.AnimationHandler.parse(this.root);this.currentTime=0;this.timeScale=0.001;this.isPlaying=!1;this.loop=this.isPaused=!0;a=0;for(var b=this.hierarchy.length;a<b;a++){var c=this.data.hierarchy[a].sids,d=this.hierarchy[a];if(this.data.hierarchy[a].keys.length&&c){for(var e=0;e<c.length;e++){var f=c[e],g=this.getNextKeyWith(f,a,0);g&&g.apply(f)}d.matrixAutoUpdate=!1;this.data.hierarchy[a].node.updateMatrix();
|
|
d.matrixWorldNeedsUpdate=!0}}};
|
|
d.matrixWorldNeedsUpdate=!0}}};
|