Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update builds

  • Loading branch information...
commit 13b486b4cde96ba5fb7591e3afc4b555cd659889 1 parent 99879fa
@zz85 zz85 authored
Showing with 360 additions and 358 deletions.
  1. +314 −313 build/Three.js
  2. +46 −45 build/custom/ThreeExtras.js
View
627 build/Three.js
314 additions, 313 deletions not shown
View
91 build/custom/ThreeExtras.js
@@ -129,22 +129,23 @@ allpoints:e}},triangulateShape:function(a,b){var c=THREE.Shape.Utils.removeHoles
0},b2p0:function(a,b){var c=1-a;return c*c*b},b2p1:function(a,b){return 2*(1-a)*a*b},b2p2:function(a,b){return a*a*b},b2:function(a,b,c,e){return this.b2p0(a,b)+this.b2p1(a,c)+this.b2p2(a,e)},b3p0:function(a,b){var c=1-a;return c*c*c*b},b3p1:function(a,b){var c=1-a;return 3*c*c*a*b},b3p2:function(a,b){return 3*(1-a)*a*a*b},b3p3:function(a,b){return a*a*a*b},b3:function(a,b,c,e,f){return this.b3p0(a,b)+this.b3p1(a,c)+this.b3p2(a,e)+this.b3p3(a,f)}};
THREE.TextPath=function(a,b){THREE.Path.call(this);this.parameters=b||{};this.set(a)};THREE.TextPath.prototype.set=function(a,b){this.text=a;var b=b||this.parameters,c=b.curveSegments!==void 0?b.curveSegments:4,e=b.font!==void 0?b.font:"helvetiker",f=b.weight!==void 0?b.weight:"normal",h=b.style!==void 0?b.style:"normal";THREE.FontUtils.size=b.size!==void 0?b.size:100;THREE.FontUtils.divisions=c;THREE.FontUtils.face=e;THREE.FontUtils.weight=f;THREE.FontUtils.style=h};
THREE.TextPath.prototype.toShapes=function(){for(var a=THREE.FontUtils.drawText(this.text).paths,b=[],c=0,e=a.length;c<e;c++)b=b.concat(a[c].toShapes());return b};
-THREE.CubeGeometry=function(a,b,c,e,f,h,g,j,k){function l(a,b,c,g,j,k,l,n){var p,o,v=e||1,u=f||1,E=j/2,K=k/2,L=m.vertices.length;if(a=="x"&&b=="y"||a=="y"&&b=="x")p="z";else if(a=="x"&&b=="z"||a=="z"&&b=="x")p="y",u=h||1;else if(a=="z"&&b=="y"||a=="y"&&b=="z")p="x",v=h||1;var F=v+1,N=u+1;j/=v;var Q=k/u;for(o=0;o<N;o++)for(k=0;k<F;k++){var C=new THREE.Vector3;C[a]=(k*j-E)*c;C[b]=(o*Q-K)*g;C[p]=l;m.vertices.push(new THREE.Vertex(C))}for(o=0;o<u;o++)for(k=0;k<v;k++)m.faces.push(new THREE.Face4(k+F*o+
-L,k+F*(o+1)+L,k+1+F*(o+1)+L,k+1+F*o+L,null,null,n)),m.faceVertexUvs[0].push([new THREE.UV(k/v,o/u),new THREE.UV(k/v,(o+1)/u),new THREE.UV((k+1)/v,(o+1)/u),new THREE.UV((k+1)/v,o/u)])}THREE.Geometry.call(this);var m=this,n=a/2,o=b/2,p=c/2,j=j?-1:1;if(g!==void 0)if(g instanceof Array)this.materials=g;else{this.materials=[];for(var v=0;v<6;v++)this.materials.push([g])}else this.materials=[];this.sides={px:!0,nx:!0,py:!0,ny:!0,pz:!0,nz:!0};if(k!=void 0)for(var u in k)this.sides[u]!=void 0&&(this.sides[u]=
+THREE.CubeGeometry=function(a,b,c,e,f,h,g,j,k){function l(a,b,c,g,j,k,l,n){var p,o,v=e||1,u=f||1,C=j/2,I=k/2,K=m.vertices.length;if(a=="x"&&b=="y"||a=="y"&&b=="x")p="z";else if(a=="x"&&b=="z"||a=="z"&&b=="x")p="y",u=h||1;else if(a=="z"&&b=="y"||a=="y"&&b=="z")p="x",v=h||1;var L=v+1,J=u+1;j/=v;var N=k/u;for(o=0;o<J;o++)for(k=0;k<L;k++){var D=new THREE.Vector3;D[a]=(k*j-C)*c;D[b]=(o*N-I)*g;D[p]=l;m.vertices.push(new THREE.Vertex(D))}for(o=0;o<u;o++)for(k=0;k<v;k++)m.faces.push(new THREE.Face4(k+L*o+
+K,k+L*(o+1)+K,k+1+L*(o+1)+K,k+1+L*o+K,null,null,n)),m.faceVertexUvs[0].push([new THREE.UV(k/v,o/u),new THREE.UV(k/v,(o+1)/u),new THREE.UV((k+1)/v,(o+1)/u),new THREE.UV((k+1)/v,o/u)])}THREE.Geometry.call(this);var m=this,n=a/2,o=b/2,p=c/2,j=j?-1:1;if(g!==void 0)if(g instanceof Array)this.materials=g;else{this.materials=[];for(var v=0;v<6;v++)this.materials.push([g])}else this.materials=[];this.sides={px:!0,nx:!0,py:!0,ny:!0,pz:!0,nz:!0};if(k!=void 0)for(var u in k)this.sides[u]!=void 0&&(this.sides[u]=
k[u]);this.sides.px&&l("z","y",1*j,-1,c,b,-n,this.materials[0]);this.sides.nx&&l("z","y",-1*j,-1,c,b,n,this.materials[1]);this.sides.py&&l("x","z",1*j,1,a,c,o,this.materials[2]);this.sides.ny&&l("x","z",1*j,-1,a,c,-o,this.materials[3]);this.sides.pz&&l("x","y",1*j,-1,a,b,p,this.materials[4]);this.sides.nz&&l("x","y",-1*j,-1,a,b,-p,this.materials[5]);(function(){for(var a=[],b=[],c=0,e=m.vertices.length;c<e;c++){for(var g=m.vertices[c],h=!1,f=0,j=a.length;f<j;f++){var k=a[f];if(g.position.x==k.position.x&&
g.position.y==k.position.y&&g.position.z==k.position.z){b[c]=f;h=!0;break}}if(!h)b[c]=a.length,a.push(new THREE.Vertex(g.position.clone()))}c=0;for(e=m.faces.length;c<e;c++)g=m.faces[c],g.a=b[g.a],g.b=b[g.b],g.c=b[g.c],g.d=b[g.d];m.vertices=a})();this.computeCentroids();this.computeFaceNormals()};THREE.CubeGeometry.prototype=new THREE.Geometry;THREE.CubeGeometry.prototype.constructor=THREE.CubeGeometry;
THREE.CylinderGeometry=function(a,b,c,e,f,h){function g(a,b,c){j.vertices.push(new THREE.Vertex(new THREE.Vector3(a,b,c)))}THREE.Geometry.call(this);var j=this,k,l=Math.PI*2,m=e/2;for(k=0;k<a;k++)g(Math.sin(l*k/a)*b,Math.cos(l*k/a)*b,-m);for(k=0;k<a;k++)g(Math.sin(l*k/a)*c,Math.cos(l*k/a)*c,m);for(k=0;k<a;k++)j.faces.push(new THREE.Face4(k,k+a,a+(k+1)%a,(k+1)%a));if(c>0){g(0,0,-m-(h||0));for(k=a;k<a+a/2;k++)j.faces.push(new THREE.Face4(2*a,(2*k-2*a)%a,(2*k-2*a+1)%a,(2*k-2*a+2)%a))}if(b>0){g(0,0,m+
(f||0));for(k=a+a/2;k<2*a;k++)j.faces.push(new THREE.Face4(2*a+1,(2*k-2*a+2)%a+a,(2*k-2*a+1)%a+a,(2*k-2*a)%a+a))}k=0;for(a=this.faces.length;k<a;k++){var b=[],c=this.faces[k],f=this.vertices[c.a],h=this.vertices[c.b],m=this.vertices[c.c],n=this.vertices[c.d];b.push(new THREE.UV(0.5+Math.atan2(f.position.x,f.position.y)/l,0.5+f.position.z/e));b.push(new THREE.UV(0.5+Math.atan2(h.position.x,h.position.y)/l,0.5+h.position.z/e));b.push(new THREE.UV(0.5+Math.atan2(m.position.x,m.position.y)/l,0.5+m.position.z/
e));c instanceof THREE.Face4&&b.push(new THREE.UV(0.5+Math.atan2(n.position.x,n.position.y)/l,0.5+n.position.z/e));this.faceVertexUvs[0].push(b)}this.computeCentroids();this.computeFaceNormals()};THREE.CylinderGeometry.prototype=new THREE.Geometry;THREE.CylinderGeometry.prototype.constructor=THREE.CylinderGeometry;
-THREE.ExtrudeGeometry=function(a,b){if(typeof a!="undefined"){THREE.Geometry.call(this);var a=a instanceof Array?a:[a],c,e=a.length,f;this.shapebb=a[e-1].getBoundingBox();for(c=0;c<e;c++)f=a[c],this.addShape(f,b)}};THREE.ExtrudeGeometry.prototype=new THREE.Geometry;THREE.ExtrudeGeometry.prototype.constructor=THREE.ExtrudeGeometry;
+THREE.ExtrudeGeometry=function(a,b){if(typeof a!="undefined"){THREE.Geometry.call(this);var a=a instanceof Array?a:[a],c,e=a.length,f;this.shapebb=a[e-1].getBoundingBox();for(c=0;c<e;c++)f=a[c],this.addShape(f,b);this.computeCentroids();this.computeFaceNormals();this.computeVertexNormals()}};THREE.ExtrudeGeometry.prototype=new THREE.Geometry;THREE.ExtrudeGeometry.prototype.constructor=THREE.ExtrudeGeometry;
THREE.ExtrudeGeometry.prototype.addShape=function(a,b){function c(a,b,c){b||console.log("die");return b.clone().multiplyScalar(c).addSelf(a)}function e(a,b,c){var e=THREE.ExtrudeGeometry.__v1,g=THREE.ExtrudeGeometry.__v2,h=THREE.ExtrudeGeometry.__v3,f=THREE.ExtrudeGeometry.__v4,j=THREE.ExtrudeGeometry.__v5,k=THREE.ExtrudeGeometry.__v6;e.set(a.x-b.x,a.y-b.y);g.set(a.x-c.x,a.y-c.y);e=e.normalize();g=g.normalize();h.set(-e.y,e.x);f.set(g.y,-g.x);j.copy(a).addSelf(h);k.copy(a).addSelf(f);if(j.equals(k))return f.clone();
-j.copy(b).addSelf(h);k.copy(c).addSelf(f);h=e.dot(f);f=k.subSelf(j).dot(f);h==0&&(console.log("Either infinite or no solutions!"),f==0?console.log("Its finite solutions."):console.log("Too bad, no solutions."));f/=h;if(f<0)return b=Math.atan2(b.y-a.y,b.x-a.x),a=Math.atan2(c.y-a.y,c.x-a.x),b>a&&(a+=Math.PI*2),anglec=(b+a)/2,new THREE.Vector2(-Math.cos(anglec),-Math.sin(anglec));return e.multiplyScalar(f).addSelf(j).subSelf(a).clone()}function f(a){for(z=a.length;--z>=0;){O=z;P=z-1;P<0&&(P=a.length-
-1);for(var b=0,b=0;b<p+m*2;b++){var c=N*b,e=N*(b+1),g=T+O+c,c=T+P+c,h=T+P+e,e=T+O+e;g+=G;c+=G;h+=G;e+=G;I.faces.push(new THREE.Face4(g,c,h,e))}}}function h(a,b,c){I.vertices.push(new THREE.Vertex(new THREE.Vector3(a,b,c)))}function g(a,b,c){a+=G;b+=G;c+=G;I.faces.push(new THREE.Face3(a,b,c,null,null,t));I.faceVertexUvs[0].push([new THREE.UV(I.vertices[a].x/B.maxX,I.vertices[a].y/B.maxY),new THREE.UV(I.vertices[b].x/B.maxX,I.vertices[b].y/B.maxY),new THREE.UV(I.vertices[c].x/B.maxX,I.vertices[c].y/
-B.maxY)])}var j=b.amount!==void 0?b.amount:100,k=b.bevelThickness!==void 0?b.bevelThickness:6,l=b.bevelSize!==void 0?b.bevelSize:k-2,m=b.bevelSegments!==void 0?b.bevelSegments:3,n=b.bevelEnabled!==void 0?b.bevelEnabled:!0,o=b.curveSegments!==void 0?b.curveSegments:12,p=b.steps!==void 0?b.steps:1,v=b.bendPath,u=b.extrudePath,w,y=!1,x=b.useSpacedPoints!==void 0?b.useSpacedPoints:!1,t=b.material,B=this.shapebb;console.log(B);if(u)w=u.getPoints(o),p=w.length,y=!0,n=!1;n||(l=k=m=0);var A,D,H,I=this,G=
-this.vertices.length;v&&a.addWrapPath(v);o=x?a.extractAllSpacedPoints(o):a.extractAllPoints(o);v=o.shape;o=o.holes;if(u=!THREE.Shape.Utils.isClockWise(v)){v=v.reverse();D=0;for(H=o.length;D<H;D++)A=o[D],THREE.Shape.Utils.isClockWise(A)&&(o[D]=A.reverse());u=!1}u=THREE.Shape.Utils.triangulateShape(v,o);x=v;D=0;for(H=o.length;D<H;D++)A=o[D],v=v.concat(A);var z,J,E,K,L,F,N=v.length,Q=u.length,C=[];z=0;J=x.length;O=J-1;for(P=z+1;z<J;z++,O++,P++)O==J&&(O=0),P==J&&(P=0),C[z]=e(x[z],x[O],x[P]);var R=[],
-M,S=C.concat();D=0;for(H=o.length;D<H;D++){A=o[D];M=[];z=0;J=A.length;O=J-1;for(P=z+1;z<J;z++,O++,P++)O==J&&(O=0),P==J&&(P=0),M[z]=e(A[z],A[O],A[P]);R.push(M);S=S.concat(M)}for(E=0;E<m;E++){K=E/m;L=k*(1-K);K=l*Math.sin(K*Math.PI/2);z=0;for(J=x.length;z<J;z++)F=c(x[z],C[z],K),h(F.x,F.y,-L);D=0;for(H=o.length;D<H;D++){A=o[D];M=R[D];z=0;for(J=A.length;z<J;z++)F=c(A[z],M[z],K),h(F.x,F.y,-L)}}K=l;for(z=0;z<N;z++)F=n?c(v[z],S[z],K):v[z],y?h(F.x,F.y+w[0].y,w[0].x):h(F.x,F.y,0);for(E=1;E<=p;E++)for(z=0;z<
-N;z++)F=n?c(v[z],S[z],K):v[z],y?h(F.x,F.y+w[E-1].y,w[E-1].x):h(F.x,F.y,j/p*E);for(E=m-1;E>=0;E--){K=E/m;L=k*(1-K);K=l*Math.sin(K*Math.PI/2);z=0;for(J=x.length;z<J;z++)F=c(x[z],C[z],K),h(F.x,F.y,j+L);D=0;for(H=o.length;D<H;D++){A=o[D];M=R[D];z=0;for(J=A.length;z<J;z++)F=c(A[z],M[z],K),y?h(F.x,F.y+w[p-1].y,w[p-1].x+L):h(F.x,F.y,j+L)}}if(n){k=N*0;for(z=0;z<Q;z++)j=u[z],g(j[2]+k,j[1]+k,j[0]+k);k=N*(p+m*2);for(z=0;z<Q;z++)j=u[z],g(j[0]+k,j[1]+k,j[2]+k)}else{for(z=0;z<Q;z++)j=u[z],g(j[2],j[1],j[0]);for(z=
-0;z<Q;z++)j=u[z],g(j[0]+N*p,j[1]+N*p,j[2]+N*p)}var O,P,T=0;f(x);T+=x.length;D=0;for(H=o.length;D<H;D++)A=o[D],f(A),T+=A.length;this.computeCentroids();this.computeFaceNormals()};THREE.ExtrudeGeometry.__v1=new THREE.Vector2;THREE.ExtrudeGeometry.__v2=new THREE.Vector2;THREE.ExtrudeGeometry.__v3=new THREE.Vector2;THREE.ExtrudeGeometry.__v4=new THREE.Vector2;THREE.ExtrudeGeometry.__v5=new THREE.Vector2;THREE.ExtrudeGeometry.__v6=new THREE.Vector2;
+j.copy(b).addSelf(h);k.copy(c).addSelf(f);h=e.dot(f);f=k.subSelf(j).dot(f);h==0&&(console.log("Either infinite or no solutions!"),f==0?console.log("Its finite solutions."):console.log("Too bad, no solutions."));f/=h;if(f<0)return b=Math.atan2(b.y-a.y,b.x-a.x),a=Math.atan2(c.y-a.y,c.x-a.x),b>a&&(a+=Math.PI*2),anglec=(b+a)/2,new THREE.Vector2(-Math.cos(anglec),-Math.sin(anglec));return e.multiplyScalar(f).addSelf(j).subSelf(a).clone()}function f(a){for(z=a.length;--z>=0;){Q=z;P=z-1;P<0&&(P=a.length-
+1);for(var b=0,c=p+m*2,b=0;b<c;b++){var e=N*b,g=N*(b+1),h=T+Q+e,f=T+Q+g,l=h,e=T+P+e,g=T+P+g,n=f;l+=M;e+=M;g+=M;n+=M;G.faces.push(new THREE.Face4(l,e,g,n,null,null,A));A&&(l=b/c,e=(b+1)/c,g=j+k*2,h=(G.vertices[h].position.z+k)/g,f=(G.vertices[f].position.z+k)/g,G.faceVertexUvs[0].push([new THREE.UV(h,l),new THREE.UV(f,l),new THREE.UV(f,e),new THREE.UV(h,e)]))}}}function h(a,b,c){G.vertices.push(new THREE.Vertex(new THREE.Vector3(a,b,c)))}function g(a,b,c){a+=M;b+=M;c+=M;G.faces.push(new THREE.Face3(a,
+b,c,null,null,t));if(t){var e=B.maxY,g=B.maxX;G.faceVertexUvs[0].push([new THREE.UV(G.vertices[a].position.x/g,G.vertices[a].position.y/e),new THREE.UV(G.vertices[b].position.x/g,G.vertices[b].position.y/e),new THREE.UV(G.vertices[c].position.x/g,G.vertices[c].position.y/e)])}}var j=b.amount!==void 0?b.amount:100,k=b.bevelThickness!==void 0?b.bevelThickness:6,l=b.bevelSize!==void 0?b.bevelSize:k-2,m=b.bevelSegments!==void 0?b.bevelSegments:3,n=b.bevelEnabled!==void 0?b.bevelEnabled:!0,o=b.curveSegments!==
+void 0?b.curveSegments:12,p=b.steps!==void 0?b.steps:1,v=b.bendPath,u=b.extrudePath,w,y=!1,x=b.useSpacedPoints!==void 0?b.useSpacedPoints:!1,t=b.material,A=b.extrudeMaterial,B=this.shapebb;if(u)w=u.getPoints(o),p=w.length,y=!0,n=!1;n||(l=k=m=0);var F,E,H,G=this,M=this.vertices.length;v&&a.addWrapPath(v);o=x?a.extractAllSpacedPoints(o):a.extractAllPoints(o);v=o.shape;o=o.holes;if(u=!THREE.Shape.Utils.isClockWise(v)){v=v.reverse();E=0;for(H=o.length;E<H;E++)F=o[E],THREE.Shape.Utils.isClockWise(F)&&
+(o[E]=F.reverse());u=!1}u=THREE.Shape.Utils.triangulateShape(v,o);x=v;E=0;for(H=o.length;E<H;E++)F=o[E],v=v.concat(F);var z,C,I,K,L,J,N=v.length,D=u.length,R=[];z=0;C=x.length;Q=C-1;for(P=z+1;z<C;z++,Q++,P++)Q==C&&(Q=0),P==C&&(P=0),R[z]=e(x[z],x[Q],x[P]);var O=[],S,U=R.concat();E=0;for(H=o.length;E<H;E++){F=o[E];S=[];z=0;C=F.length;Q=C-1;for(P=z+1;z<C;z++,Q++,P++)Q==C&&(Q=0),P==C&&(P=0),S[z]=e(F[z],F[Q],F[P]);O.push(S);U=U.concat(S)}for(I=0;I<m;I++){K=I/m;L=k*(1-K);K=l*Math.sin(K*Math.PI/2);z=0;for(C=
+x.length;z<C;z++)J=c(x[z],R[z],K),h(J.x,J.y,-L);E=0;for(H=o.length;E<H;E++){F=o[E];S=O[E];z=0;for(C=F.length;z<C;z++)J=c(F[z],S[z],K),h(J.x,J.y,-L)}}K=l;for(z=0;z<N;z++)J=n?c(v[z],U[z],K):v[z],y?h(J.x,J.y+w[0].y,w[0].x):h(J.x,J.y,0);for(I=1;I<=p;I++)for(z=0;z<N;z++)J=n?c(v[z],U[z],K):v[z],y?h(J.x,J.y+w[I-1].y,w[I-1].x):h(J.x,J.y,j/p*I);for(I=m-1;I>=0;I--){K=I/m;L=k*(1-K);K=l*Math.sin(K*Math.PI/2);z=0;for(C=x.length;z<C;z++)J=c(x[z],R[z],K),h(J.x,J.y,j+L);E=0;for(H=o.length;E<H;E++){F=o[E];S=O[E];
+z=0;for(C=F.length;z<C;z++)J=c(F[z],S[z],K),y?h(J.x,J.y+w[p-1].y,w[p-1].x+L):h(J.x,J.y,j+L)}}if(n){n=N*0;for(z=0;z<D;z++)l=u[z],g(l[2]+n,l[1]+n,l[0]+n);n=N*(p+m*2);for(z=0;z<D;z++)l=u[z],g(l[0]+n,l[1]+n,l[2]+n)}else{for(z=0;z<D;z++)l=u[z],g(l[2],l[1],l[0]);for(z=0;z<D;z++)l=u[z],g(l[0]+N*p,l[1]+N*p,l[2]+N*p)}var Q,P,T=0;f(x);T+=x.length;E=0;for(H=o.length;E<H;E++)F=o[E],f(F),T+=F.length};THREE.ExtrudeGeometry.__v1=new THREE.Vector2;THREE.ExtrudeGeometry.__v2=new THREE.Vector2;
+THREE.ExtrudeGeometry.__v3=new THREE.Vector2;THREE.ExtrudeGeometry.__v4=new THREE.Vector2;THREE.ExtrudeGeometry.__v5=new THREE.Vector2;THREE.ExtrudeGeometry.__v6=new THREE.Vector2;
THREE.IcosahedronGeometry=function(a){function b(a,b,c){var e=Math.sqrt(a*a+b*b+c*c);return f.vertices.push(new THREE.Vertex(new THREE.Vector3(a/e,b/e,c/e)))-1}function c(a,b,c,e){e.faces.push(new THREE.Face3(a,b,c))}function e(a,c){var e=f.vertices[a].position,g=f.vertices[c].position;return b((e.x+g.x)/2,(e.y+g.y)/2,(e.z+g.z)/2)}var f=this,h=new THREE.Geometry;this.subdivisions=a||0;THREE.Geometry.call(this);a=(1+Math.sqrt(5))/2;b(-1,a,0);b(1,a,0);b(-1,-a,0);b(1,-a,0);b(0,-1,a);b(0,1,a);b(0,-1,
-a);b(0,1,-a);b(a,0,-1);b(a,0,1);b(-a,0,-1);b(-a,0,1);c(0,11,5,h);c(0,5,1,h);c(0,1,7,h);c(0,7,10,h);c(0,10,11,h);c(1,5,9,h);c(5,11,4,h);c(11,10,2,h);c(10,7,6,h);c(7,1,8,h);c(3,9,4,h);c(3,4,2,h);c(3,2,6,h);c(3,6,8,h);c(3,8,9,h);c(4,9,5,h);c(2,4,11,h);c(6,2,10,h);c(8,6,7,h);c(9,8,1,h);for(var g=0;g<this.subdivisions;g++){var a=new THREE.Geometry,j;for(j in h.faces){var k=e(h.faces[j].a,h.faces[j].b),l=e(h.faces[j].b,h.faces[j].c),m=e(h.faces[j].c,h.faces[j].a);c(h.faces[j].a,k,m,a);c(h.faces[j].b,l,
k,a);c(h.faces[j].c,m,l,a);c(k,l,m,a)}h.faces=a.faces}f.faces=h.faces;this.computeCentroids();this.computeFaceNormals();this.computeVertexNormals()};THREE.IcosahedronGeometry.prototype=new THREE.Geometry;THREE.IcosahedronGeometry.prototype.constructor=THREE.IcosahedronGeometry;
@@ -162,8 +163,8 @@ THREE.FontUtils={faces:{},face:"helvetiker",weight:"normal",style:"normal",size:
this.getFace(),c=this.size/b.resolution,e=0,f=String(a).split(""),h=f.length,g=[],a=0;a<h;a++){var j=new THREE.Path,j=this.extractGlyphPoints(f[a],b,c,e,j);e+=j.offset;g.push(j.path)}return{paths:g,offset:e/2}},extractGlyphPoints:function(a,b,c,e,f){var h=[],g,j,k,l,m,n,o,p,v,u,w=b.glyphs[a]||b.glyphs[ctxt.options.fallbackCharacter];if(w){if(w.o){b=w._cachedOutline||(w._cachedOutline=w.o.split(" "));k=b.length;for(a=0;a<k;)switch(j=b[a++],j){case "m":j=b[a++]*c+e;l=b[a++]*c;h.push(new THREE.Vector2(j,
l));f.moveTo(j,l);break;case "l":j=b[a++]*c+e;l=b[a++]*c;h.push(new THREE.Vector2(j,l));f.lineTo(j,l);break;case "q":j=b[a++]*c+e;l=b[a++]*c;o=b[a++]*c+e;p=b[a++]*c;f.quadraticCurveTo(o,p,j,l);if(g=h[h.length-1]){m=g.x;n=g.y;g=1;for(divisions=this.divisions;g<=divisions;g++){var y=g/divisions,x=THREE.Shape.Utils.b2(y,m,o,j),y=THREE.Shape.Utils.b2(y,n,p,l);h.push(new THREE.Vector2(x,y))}}break;case "b":if(j=b[a++]*c+e,l=b[a++]*c,o=b[a++]*c+e,p=b[a++]*-c,v=b[a++]*c+e,u=b[a++]*-c,f.bezierCurveTo(j,l,
o,p,v,u),g=h[h.length-1]){m=g.x;n=g.y;g=1;for(divisions=this.divisions;g<=divisions;g++)y=g/divisions,x=THREE.Shape.Utils.b3(y,m,o,v,j),y=THREE.Shape.Utils.b3(y,n,p,u,l),h.push(new THREE.Vector2(x,y))}}}return{offset:w.ha*c,points:h,path:f}}}};
-(function(a){var b=function(a){for(var b=a.length,f=0,h=b-1,g=0;g<b;h=g++)f+=a[h].x*a[g].y-a[g].x*a[h].y;return f*0.5};a.Triangulate=function(a,e){var f=a.length;if(f<3)return null;var h=[],g=[],j=[],k,l,m;if(b(a)>0)for(l=0;l<f;l++)g[l]=l;else for(l=0;l<f;l++)g[l]=f-1-l;var n=2*f;for(l=f-1;f>2;){if(n--<=0){console.log("Warning, unable to triangulate polygon!");if(e)return j;return h}k=l;f<=k&&(k=0);l=k+1;f<=l&&(l=0);m=l+1;f<=m&&(m=0);var o;a:{o=a;var p=k,v=l,u=m,w=f,y=g,x=void 0,t=void 0,B=void 0,
-A=void 0,D=void 0,H=void 0,I=void 0,G=void 0,z=void 0,t=o[y[p]].x,B=o[y[p]].y,A=o[y[v]].x,D=o[y[v]].y,H=o[y[u]].x,I=o[y[u]].y;if(1.0E-10>(A-t)*(I-B)-(D-B)*(H-t))o=!1;else{for(x=0;x<w;x++)if(!(x==p||x==v||x==u)){var G=o[y[x]].x,z=o[y[x]].y,J=void 0,E=void 0,K=void 0,L=void 0,F=void 0,N=void 0,Q=void 0,C=void 0,R=void 0,M=void 0,S=void 0,O=void 0,J=K=F=void 0,J=H-A,E=I-D,K=t-H,L=B-I,F=A-t,N=D-B,Q=G-t,C=z-B,R=G-A,M=z-D,S=G-H,O=z-I,J=J*M-E*R,F=F*C-N*Q,K=K*O-L*S;if(J>=0&&K>=0&&F>=0){o=!1;break a}}o=!0}}if(o){h.push([a[g[k]],
+(function(a){var b=function(a){for(var b=a.length,f=0,h=b-1,g=0;g<b;h=g++)f+=a[h].x*a[g].y-a[g].x*a[h].y;return f*0.5};a.Triangulate=function(a,e){var f=a.length;if(f<3)return null;var h=[],g=[],j=[],k,l,m;if(b(a)>0)for(l=0;l<f;l++)g[l]=l;else for(l=0;l<f;l++)g[l]=f-1-l;var n=2*f;for(l=f-1;f>2;){if(n--<=0){console.log("Warning, unable to triangulate polygon!");if(e)return j;return h}k=l;f<=k&&(k=0);l=k+1;f<=l&&(l=0);m=l+1;f<=m&&(m=0);var o;a:{o=a;var p=k,v=l,u=m,w=f,y=g,x=void 0,t=void 0,A=void 0,
+B=void 0,F=void 0,E=void 0,H=void 0,G=void 0,M=void 0,t=o[y[p]].x,A=o[y[p]].y,B=o[y[v]].x,F=o[y[v]].y,E=o[y[u]].x,H=o[y[u]].y;if(1.0E-10>(B-t)*(H-A)-(F-A)*(E-t))o=!1;else{for(x=0;x<w;x++)if(!(x==p||x==v||x==u)){var G=o[y[x]].x,M=o[y[x]].y,z=void 0,C=void 0,I=void 0,K=void 0,L=void 0,J=void 0,N=void 0,D=void 0,R=void 0,O=void 0,S=void 0,U=void 0,z=I=L=void 0,z=E-B,C=H-F,I=t-E,K=A-H,L=B-t,J=F-A,N=G-t,D=M-A,R=G-B,O=M-F,S=G-E,U=M-H,z=z*O-C*R,L=L*D-J*N,I=I*U-K*S;if(z>=0&&I>=0&&L>=0){o=!1;break a}}o=!0}}if(o){h.push([a[g[k]],
a[g[l]],a[g[m]]]);j.push([g[k],g[l],g[m]]);k=l;for(m=l+1;m<f;k++,m++)g[k]=g[m];f--;n=2*f}}if(e)return j;return h};a.Triangulate.area=b;return a})(THREE.FontUtils);window._typeface_js={faces:THREE.FontUtils.faces,loadFace:THREE.FontUtils.loadFace};
THREE.TorusGeometry=function(a,b,c,e){THREE.Geometry.call(this);this.radius=a||100;this.tube=b||40;this.segmentsR=c||8;this.segmentsT=e||6;a=[];for(b=0;b<=this.segmentsR;++b)for(c=0;c<=this.segmentsT;++c){var e=c/this.segmentsT*2*Math.PI,f=b/this.segmentsR*2*Math.PI;this.vertices.push(new THREE.Vertex(new THREE.Vector3((this.radius+this.tube*Math.cos(f))*Math.cos(e),(this.radius+this.tube*Math.cos(f))*Math.sin(e),this.tube*Math.sin(f))));a.push([c/this.segmentsT,1-b/this.segmentsR])}for(b=1;b<=this.segmentsR;++b)for(c=
1;c<=this.segmentsT;++c){var e=(this.segmentsT+1)*b+c,f=(this.segmentsT+1)*b+c-1,h=(this.segmentsT+1)*(b-1)+c-1,g=(this.segmentsT+1)*(b-1)+c;this.faces.push(new THREE.Face4(e,f,h,g));this.faceVertexUvs[0].push([new THREE.UV(a[e][0],a[e][1]),new THREE.UV(a[f][0],a[f][1]),new THREE.UV(a[h][0],a[h][1]),new THREE.UV(a[g][0],a[g][1])])}this.computeCentroids();this.computeFaceNormals();this.computeVertexNormals()};THREE.TorusGeometry.prototype=new THREE.Geometry;
@@ -181,43 +182,43 @@ else if(a.DbgColor)g.color=a.DbgColor;if(a.colorSpecular)g.specular=h(a.colorSpe
a.mapSpecular&&b&&f(g,"specularMap",a.mapSpecular,a.mapSpecularRepeat,a.mapSpecularOffset,a.mapSpecularWrap);if(a.mapNormal){var l=THREE.ShaderUtils.lib.normal,m=THREE.UniformsUtils.clone(l.uniforms),n=g.color;j=g.specular;k=g.ambient;var o=g.shininess;m.tNormal.texture=g.normalMap;if(a.mapNormalFactor)m.uNormalScale.value=a.mapNormalFactor;if(g.map)m.tDiffuse.texture=g.map,m.enableDiffuse.value=!0;if(g.specularMap)m.tSpecular.texture=g.specularMap,m.enableSpecular.value=!0;if(g.lightMap)m.tAO.texture=
g.lightMap,m.enableAO.value=!0;m.uDiffuseColor.value.setHex(n);m.uSpecularColor.value.setHex(j);m.uAmbientColor.value.setHex(k);m.uShininess.value=o;if(g.opacity)m.uOpacity.value=g.opacity;g=new THREE.MeshShaderMaterial({fragmentShader:l.fragmentShader,vertexShader:l.vertexShader,uniforms:m,lights:!0,fog:!0})}else g=new THREE[j](g);return g},constructor:THREE.Loader};THREE.JSONLoader=function(a){THREE.Loader.call(this,a)};THREE.JSONLoader.prototype=new THREE.Loader;
THREE.JSONLoader.prototype.constructor=THREE.JSONLoader;THREE.JSONLoader.prototype.supr=THREE.Loader.prototype;THREE.JSONLoader.prototype.load=function(a){var b=this,c=a.model,e=a.callback,f=a.texture_path?a.texture_path:this.extractUrlbase(c),a=new Worker(c);a.onmessage=function(a){b.createModel(a.data,e,f);b.onLoadComplete()};this.onLoadStart();a.postMessage((new Date).getTime())};
-THREE.JSONLoader.prototype.createModel=function(a,b,c){var e=new THREE.Geometry,f=a.scale!==void 0?1/a.scale:1;this.init_materials(e,a.materials,c);(function(b){if(a.version===void 0||a.version!=2)console.error("Deprecated file format.");else{var c,f,k,l,m,n,o,p,v,u,w,y,x,t,B=a.faces;n=a.vertices;var A=a.normals,D=a.colors,H=0;for(c=0;c<a.uvs.length;c++)a.uvs[c].length&&H++;for(c=0;c<H;c++)e.faceUvs[c]=[],e.faceVertexUvs[c]=[];l=0;for(m=n.length;l<m;)o=new THREE.Vertex,o.position.x=n[l++]*b,o.position.y=
-n[l++]*b,o.position.z=n[l++]*b,e.vertices.push(o);l=0;for(m=B.length;l<m;){b=B[l++];n=b&1;k=b&2;c=b&4;f=b&8;p=b&16;o=b&32;u=b&64;b&=128;n?(w=new THREE.Face4,w.a=B[l++],w.b=B[l++],w.c=B[l++],w.d=B[l++],n=4):(w=new THREE.Face3,w.a=B[l++],w.b=B[l++],w.c=B[l++],n=3);if(k)k=B[l++],w.materials=e.materials[k];k=e.faces.length;if(c)for(c=0;c<H;c++)y=a.uvs[c],v=B[l++],t=y[v*2],v=y[v*2+1],e.faceUvs[c][k]=new THREE.UV(t,v);if(f)for(c=0;c<H;c++){y=a.uvs[c];x=[];for(f=0;f<n;f++)v=B[l++],t=y[v*2],v=y[v*2+1],x[f]=
-new THREE.UV(t,v);e.faceVertexUvs[c][k]=x}if(p)p=B[l++]*3,f=new THREE.Vector3,f.x=A[p++],f.y=A[p++],f.z=A[p],w.normal=f;if(o)for(c=0;c<n;c++)p=B[l++]*3,f=new THREE.Vector3,f.x=A[p++],f.y=A[p++],f.z=A[p],w.vertexNormals.push(f);if(u)o=B[l++],o=new THREE.Color(D[o]),w.color=o;if(b)for(c=0;c<n;c++)o=B[l++],o=new THREE.Color(D[o]),w.vertexColors.push(o);e.faces.push(w)}}})(f);(function(){var b,c,f,k;if(a.skinWeights){b=0;for(c=a.skinWeights.length;b<c;b+=2)f=a.skinWeights[b],k=a.skinWeights[b+1],e.skinWeights.push(new THREE.Vector4(f,
+THREE.JSONLoader.prototype.createModel=function(a,b,c){var e=new THREE.Geometry,f=a.scale!==void 0?1/a.scale:1;this.init_materials(e,a.materials,c);(function(b){if(a.version===void 0||a.version!=2)console.error("Deprecated file format.");else{var c,f,k,l,m,n,o,p,v,u,w,y,x,t,A=a.faces;n=a.vertices;var B=a.normals,F=a.colors,E=0;for(c=0;c<a.uvs.length;c++)a.uvs[c].length&&E++;for(c=0;c<E;c++)e.faceUvs[c]=[],e.faceVertexUvs[c]=[];l=0;for(m=n.length;l<m;)o=new THREE.Vertex,o.position.x=n[l++]*b,o.position.y=
+n[l++]*b,o.position.z=n[l++]*b,e.vertices.push(o);l=0;for(m=A.length;l<m;){b=A[l++];n=b&1;k=b&2;c=b&4;f=b&8;p=b&16;o=b&32;u=b&64;b&=128;n?(w=new THREE.Face4,w.a=A[l++],w.b=A[l++],w.c=A[l++],w.d=A[l++],n=4):(w=new THREE.Face3,w.a=A[l++],w.b=A[l++],w.c=A[l++],n=3);if(k)k=A[l++],w.materials=e.materials[k];k=e.faces.length;if(c)for(c=0;c<E;c++)y=a.uvs[c],v=A[l++],t=y[v*2],v=y[v*2+1],e.faceUvs[c][k]=new THREE.UV(t,v);if(f)for(c=0;c<E;c++){y=a.uvs[c];x=[];for(f=0;f<n;f++)v=A[l++],t=y[v*2],v=y[v*2+1],x[f]=
+new THREE.UV(t,v);e.faceVertexUvs[c][k]=x}if(p)p=A[l++]*3,f=new THREE.Vector3,f.x=B[p++],f.y=B[p++],f.z=B[p],w.normal=f;if(o)for(c=0;c<n;c++)p=A[l++]*3,f=new THREE.Vector3,f.x=B[p++],f.y=B[p++],f.z=B[p],w.vertexNormals.push(f);if(u)o=A[l++],o=new THREE.Color(F[o]),w.color=o;if(b)for(c=0;c<n;c++)o=A[l++],o=new THREE.Color(F[o]),w.vertexColors.push(o);e.faces.push(w)}}})(f);(function(){var b,c,f,k;if(a.skinWeights){b=0;for(c=a.skinWeights.length;b<c;b+=2)f=a.skinWeights[b],k=a.skinWeights[b+1],e.skinWeights.push(new THREE.Vector4(f,
k,0,0))}if(a.skinIndices){b=0;for(c=a.skinIndices.length;b<c;b+=2)f=a.skinIndices[b],k=a.skinIndices[b+1],e.skinIndices.push(new THREE.Vector4(f,k,0,0))}e.bones=a.bones;e.animation=a.animation})();(function(b){if(a.morphTargets!==void 0){var c,f,k,l,m,n,o,p,v;c=0;for(f=a.morphTargets.length;c<f;c++){e.morphTargets[c]={};e.morphTargets[c].name=a.morphTargets[c].name;e.morphTargets[c].vertices=[];p=e.morphTargets[c].vertices;v=a.morphTargets[c].vertices;k=0;for(l=v.length;k<l;k+=3)m=v[k]*b,n=v[k+1]*
b,o=v[k+2]*b,p.push(new THREE.Vertex(new THREE.Vector3(m,n,o)))}}if(a.morphColors!==void 0){c=0;for(f=a.morphColors.length;c<f;c++){e.morphColors[c]={};e.morphColors[c].name=a.morphColors[c].name;e.morphColors[c].colors=[];l=e.morphColors[c].colors;m=a.morphColors[c].colors;b=0;for(k=m.length;b<k;b+=3)n=new THREE.Color(16755200),n.setRGB(m[b],m[b+1],m[b+2]),l.push(n)}}})(f);(function(){if(a.edges!==void 0){var b,c,f;for(b=0;b<a.edges.length;b+=2)c=a.edges[b],f=a.edges[b+1],e.edges.push(new THREE.Edge(e.vertices[c],
e.vertices[f],c,f))}})();e.computeCentroids();e.computeFaceNormals();this.hasNormals(e)&&e.computeTangents();b(e)};THREE.BinaryLoader=function(a){THREE.Loader.call(this,a)};THREE.BinaryLoader.prototype=new THREE.Loader;THREE.BinaryLoader.prototype.constructor=THREE.BinaryLoader;THREE.BinaryLoader.prototype.supr=THREE.Loader.prototype;
THREE.BinaryLoader.prototype={load:function(a){var b=a.model,c=a.callback,e=a.texture_path?a.texture_path:THREE.Loader.prototype.extractUrlbase(b),f=a.bin_path?a.bin_path:THREE.Loader.prototype.extractUrlbase(b),a=(new Date).getTime(),b=new Worker(b),h=this.showProgress?THREE.Loader.prototype.updateProgress:null;b.onmessage=function(a){THREE.BinaryLoader.prototype.loadAjaxBuffers(a.data.buffers,a.data.materials,c,f,e,h)};b.onerror=function(a){alert("worker.onerror: "+a.message+"\n"+a.data);a.preventDefault()};
b.postMessage(a)},loadAjaxBuffers:function(a,b,c,e,f,h){var g=new XMLHttpRequest,j=e+"/"+a,k=0;g.onreadystatechange=function(){g.readyState==4?g.status==200||g.status==0?THREE.BinaryLoader.prototype.createBinModel(g.responseText,c,f,b):alert("Couldn't load ["+j+"] ["+g.status+"]"):g.readyState==3?h&&(k==0&&(k=g.getResponseHeader("Content-Length")),h({total:k,loaded:g.responseText.length})):g.readyState==2&&(k=g.getResponseHeader("Content-Length"))};g.open("GET",j,!0);g.overrideMimeType("text/plain; charset=x-user-defined");
g.setRequestHeader("Content-Type","text/plain");g.send(null)},createBinModel:function(a,b,c,e){var f=function(b){function c(a,b){var e=m(a,b),f=m(a,b+1),g=m(a,b+2),h=m(a,b+3),j=(h<<1&255|g>>7)-127;e|=(g&127)<<16|f<<8;if(e==0&&j==-127)return 0;return(1-2*(h>>7))*(1+e*Math.pow(2,-23))*Math.pow(2,j)}function f(a,b){var c=m(a,b),e=m(a,b+1),g=m(a,b+2);return(m(a,b+3)<<24)+(g<<16)+(e<<8)+c}function k(a,b){var c=m(a,b);return(m(a,b+1)<<8)+c}function l(a,b){var c=m(a,b);return c>127?c-256:c}function m(a,
-b){return a.charCodeAt(b)&255}function n(b){var c,e,g;c=f(a,b);e=f(a,b+D);g=f(a,b+H);b=k(a,b+I);THREE.BinaryLoader.prototype.f3(y,c,e,g,b)}function o(b){var c,e,g,h,l,m;c=f(a,b);e=f(a,b+D);g=f(a,b+H);h=k(a,b+I);l=f(a,b+G);m=f(a,b+z);b=f(a,b+J);THREE.BinaryLoader.prototype.f3n(y,B,c,e,g,h,l,m,b)}function p(b){var c,e,g,h;c=f(a,b);e=f(a,b+E);g=f(a,b+K);h=f(a,b+L);b=k(a,b+F);THREE.BinaryLoader.prototype.f4(y,c,e,g,h,b)}function v(b){var c,e,g,h,l,m,n,o;c=f(a,b);e=f(a,b+E);g=f(a,b+K);h=f(a,b+L);l=k(a,
-b+F);m=f(a,b+N);n=f(a,b+Q);o=f(a,b+C);b=f(a,b+R);THREE.BinaryLoader.prototype.f4n(y,B,c,e,g,h,l,m,n,o,b)}function u(b){var c,e;c=f(a,b);e=f(a,b+M);b=f(a,b+S);THREE.BinaryLoader.prototype.uv3(y.faceVertexUvs[0],A[c*2],A[c*2+1],A[e*2],A[e*2+1],A[b*2],A[b*2+1])}function w(b){var c,e,g;c=f(a,b);e=f(a,b+O);g=f(a,b+P);b=f(a,b+T);THREE.BinaryLoader.prototype.uv4(y.faceVertexUvs[0],A[c*2],A[c*2+1],A[e*2],A[e*2+1],A[g*2],A[g*2+1],A[b*2],A[b*2+1])}var y=this,x=0,t,B=[],A=[],D,H,I,G,z,J,E,K,L,F,N,Q,C,R,M,S,
-O,P,T,V,W,X,Y,Z,U;THREE.Geometry.call(this);THREE.Loader.prototype.init_materials(y,e,b);t={signature:a.substr(x,8),header_bytes:m(a,x+8),vertex_coordinate_bytes:m(a,x+9),normal_coordinate_bytes:m(a,x+10),uv_coordinate_bytes:m(a,x+11),vertex_index_bytes:m(a,x+12),normal_index_bytes:m(a,x+13),uv_index_bytes:m(a,x+14),material_index_bytes:m(a,x+15),nvertices:f(a,x+16),nnormals:f(a,x+16+4),nuvs:f(a,x+16+8),ntri_flat:f(a,x+16+12),ntri_smooth:f(a,x+16+16),ntri_flat_uv:f(a,x+16+20),ntri_smooth_uv:f(a,x+
-16+24),nquad_flat:f(a,x+16+28),nquad_smooth:f(a,x+16+32),nquad_flat_uv:f(a,x+16+36),nquad_smooth_uv:f(a,x+16+40)};x+=t.header_bytes;D=t.vertex_index_bytes;H=t.vertex_index_bytes*2;I=t.vertex_index_bytes*3;G=t.vertex_index_bytes*3+t.material_index_bytes;z=t.vertex_index_bytes*3+t.material_index_bytes+t.normal_index_bytes;J=t.vertex_index_bytes*3+t.material_index_bytes+t.normal_index_bytes*2;E=t.vertex_index_bytes;K=t.vertex_index_bytes*2;L=t.vertex_index_bytes*3;F=t.vertex_index_bytes*4;N=t.vertex_index_bytes*
-4+t.material_index_bytes;Q=t.vertex_index_bytes*4+t.material_index_bytes+t.normal_index_bytes;C=t.vertex_index_bytes*4+t.material_index_bytes+t.normal_index_bytes*2;R=t.vertex_index_bytes*4+t.material_index_bytes+t.normal_index_bytes*3;M=t.uv_index_bytes;S=t.uv_index_bytes*2;O=t.uv_index_bytes;P=t.uv_index_bytes*2;T=t.uv_index_bytes*3;b=t.vertex_index_bytes*3+t.material_index_bytes;U=t.vertex_index_bytes*4+t.material_index_bytes;V=t.ntri_flat*b;W=t.ntri_smooth*(b+t.normal_index_bytes*3);X=t.ntri_flat_uv*
-(b+t.uv_index_bytes*3);Y=t.ntri_smooth_uv*(b+t.normal_index_bytes*3+t.uv_index_bytes*3);Z=t.nquad_flat*U;b=t.nquad_smooth*(U+t.normal_index_bytes*4);U=t.nquad_flat_uv*(U+t.uv_index_bytes*4);x+=function(b){for(var e,f,h,j=t.vertex_coordinate_bytes*3,k=b+t.nvertices*j;b<k;b+=j)e=c(a,b),f=c(a,b+t.vertex_coordinate_bytes),h=c(a,b+t.vertex_coordinate_bytes*2),THREE.BinaryLoader.prototype.v(y,e,f,h);return t.nvertices*j}(x);x+=function(b){for(var c,e,f,g=t.normal_coordinate_bytes*3,h=b+t.nnormals*g;b<h;b+=
-g)c=l(a,b),e=l(a,b+t.normal_coordinate_bytes),f=l(a,b+t.normal_coordinate_bytes*2),B.push(c/127,e/127,f/127);return t.nnormals*g}(x);x+=function(b){for(var e,f,h=t.uv_coordinate_bytes*2,j=b+t.nuvs*h;b<j;b+=h)e=c(a,b),f=c(a,b+t.uv_coordinate_bytes),A.push(e,f);return t.nuvs*h}(x);V=x+V;W=V+W;X=W+X;Y=X+Y;Z=Y+Z;b=Z+b;U=b+U;(function(a){var b,c=t.vertex_index_bytes*3+t.material_index_bytes,e=c+t.uv_index_bytes*3,f=a+t.ntri_flat_uv*e;for(b=a;b<f;b+=e)n(b),u(b+c);return f-a})(W);(function(a){var b,c=t.vertex_index_bytes*
-3+t.material_index_bytes+t.normal_index_bytes*3,e=c+t.uv_index_bytes*3,f=a+t.ntri_smooth_uv*e;for(b=a;b<f;b+=e)o(b),u(b+c);return f-a})(X);(function(a){var b,c=t.vertex_index_bytes*4+t.material_index_bytes,e=c+t.uv_index_bytes*4,f=a+t.nquad_flat_uv*e;for(b=a;b<f;b+=e)p(b),w(b+c);return f-a})(b);(function(a){var b,c=t.vertex_index_bytes*4+t.material_index_bytes+t.normal_index_bytes*4,e=c+t.uv_index_bytes*4,f=a+t.nquad_smooth_uv*e;for(b=a;b<f;b+=e)v(b),w(b+c);return f-a})(U);(function(a){var b,c=t.vertex_index_bytes*
-3+t.material_index_bytes,e=a+t.ntri_flat*c;for(b=a;b<e;b+=c)n(b);return e-a})(x);(function(a){var b,c=t.vertex_index_bytes*3+t.material_index_bytes+t.normal_index_bytes*3,e=a+t.ntri_smooth*c;for(b=a;b<e;b+=c)o(b);return e-a})(V);(function(a){var b,c=t.vertex_index_bytes*4+t.material_index_bytes,e=a+t.nquad_flat*c;for(b=a;b<e;b+=c)p(b);return e-a})(Y);(function(a){var b,c=t.vertex_index_bytes*4+t.material_index_bytes+t.normal_index_bytes*4,e=a+t.nquad_smooth*c;for(b=a;b<e;b+=c)v(b);return e-a})(Z);
+b){return a.charCodeAt(b)&255}function n(b){var c,e,g;c=f(a,b);e=f(a,b+F);g=f(a,b+E);b=k(a,b+H);THREE.BinaryLoader.prototype.f3(y,c,e,g,b)}function o(b){var c,e,g,h,l,m;c=f(a,b);e=f(a,b+F);g=f(a,b+E);h=k(a,b+H);l=f(a,b+G);m=f(a,b+M);b=f(a,b+z);THREE.BinaryLoader.prototype.f3n(y,A,c,e,g,h,l,m,b)}function p(b){var c,e,g,h;c=f(a,b);e=f(a,b+C);g=f(a,b+I);h=f(a,b+K);b=k(a,b+L);THREE.BinaryLoader.prototype.f4(y,c,e,g,h,b)}function v(b){var c,e,g,h,l,m,n,o;c=f(a,b);e=f(a,b+C);g=f(a,b+I);h=f(a,b+K);l=k(a,
+b+L);m=f(a,b+J);n=f(a,b+N);o=f(a,b+D);b=f(a,b+R);THREE.BinaryLoader.prototype.f4n(y,A,c,e,g,h,l,m,n,o,b)}function u(b){var c,e;c=f(a,b);e=f(a,b+O);b=f(a,b+S);THREE.BinaryLoader.prototype.uv3(y.faceVertexUvs[0],B[c*2],B[c*2+1],B[e*2],B[e*2+1],B[b*2],B[b*2+1])}function w(b){var c,e,g;c=f(a,b);e=f(a,b+U);g=f(a,b+Q);b=f(a,b+P);THREE.BinaryLoader.prototype.uv4(y.faceVertexUvs[0],B[c*2],B[c*2+1],B[e*2],B[e*2+1],B[g*2],B[g*2+1],B[b*2],B[b*2+1])}var y=this,x=0,t,A=[],B=[],F,E,H,G,M,z,C,I,K,L,J,N,D,R,O,S,
+U,Q,P,T,W,X,Y,Z,V;THREE.Geometry.call(this);THREE.Loader.prototype.init_materials(y,e,b);t={signature:a.substr(x,8),header_bytes:m(a,x+8),vertex_coordinate_bytes:m(a,x+9),normal_coordinate_bytes:m(a,x+10),uv_coordinate_bytes:m(a,x+11),vertex_index_bytes:m(a,x+12),normal_index_bytes:m(a,x+13),uv_index_bytes:m(a,x+14),material_index_bytes:m(a,x+15),nvertices:f(a,x+16),nnormals:f(a,x+16+4),nuvs:f(a,x+16+8),ntri_flat:f(a,x+16+12),ntri_smooth:f(a,x+16+16),ntri_flat_uv:f(a,x+16+20),ntri_smooth_uv:f(a,x+
+16+24),nquad_flat:f(a,x+16+28),nquad_smooth:f(a,x+16+32),nquad_flat_uv:f(a,x+16+36),nquad_smooth_uv:f(a,x+16+40)};x+=t.header_bytes;F=t.vertex_index_bytes;E=t.vertex_index_bytes*2;H=t.vertex_index_bytes*3;G=t.vertex_index_bytes*3+t.material_index_bytes;M=t.vertex_index_bytes*3+t.material_index_bytes+t.normal_index_bytes;z=t.vertex_index_bytes*3+t.material_index_bytes+t.normal_index_bytes*2;C=t.vertex_index_bytes;I=t.vertex_index_bytes*2;K=t.vertex_index_bytes*3;L=t.vertex_index_bytes*4;J=t.vertex_index_bytes*
+4+t.material_index_bytes;N=t.vertex_index_bytes*4+t.material_index_bytes+t.normal_index_bytes;D=t.vertex_index_bytes*4+t.material_index_bytes+t.normal_index_bytes*2;R=t.vertex_index_bytes*4+t.material_index_bytes+t.normal_index_bytes*3;O=t.uv_index_bytes;S=t.uv_index_bytes*2;U=t.uv_index_bytes;Q=t.uv_index_bytes*2;P=t.uv_index_bytes*3;b=t.vertex_index_bytes*3+t.material_index_bytes;V=t.vertex_index_bytes*4+t.material_index_bytes;T=t.ntri_flat*b;W=t.ntri_smooth*(b+t.normal_index_bytes*3);X=t.ntri_flat_uv*
+(b+t.uv_index_bytes*3);Y=t.ntri_smooth_uv*(b+t.normal_index_bytes*3+t.uv_index_bytes*3);Z=t.nquad_flat*V;b=t.nquad_smooth*(V+t.normal_index_bytes*4);V=t.nquad_flat_uv*(V+t.uv_index_bytes*4);x+=function(b){for(var e,f,h,j=t.vertex_coordinate_bytes*3,k=b+t.nvertices*j;b<k;b+=j)e=c(a,b),f=c(a,b+t.vertex_coordinate_bytes),h=c(a,b+t.vertex_coordinate_bytes*2),THREE.BinaryLoader.prototype.v(y,e,f,h);return t.nvertices*j}(x);x+=function(b){for(var c,e,f,g=t.normal_coordinate_bytes*3,h=b+t.nnormals*g;b<h;b+=
+g)c=l(a,b),e=l(a,b+t.normal_coordinate_bytes),f=l(a,b+t.normal_coordinate_bytes*2),A.push(c/127,e/127,f/127);return t.nnormals*g}(x);x+=function(b){for(var e,f,h=t.uv_coordinate_bytes*2,j=b+t.nuvs*h;b<j;b+=h)e=c(a,b),f=c(a,b+t.uv_coordinate_bytes),B.push(e,f);return t.nuvs*h}(x);T=x+T;W=T+W;X=W+X;Y=X+Y;Z=Y+Z;b=Z+b;V=b+V;(function(a){var b,c=t.vertex_index_bytes*3+t.material_index_bytes,e=c+t.uv_index_bytes*3,f=a+t.ntri_flat_uv*e;for(b=a;b<f;b+=e)n(b),u(b+c);return f-a})(W);(function(a){var b,c=t.vertex_index_bytes*
+3+t.material_index_bytes+t.normal_index_bytes*3,e=c+t.uv_index_bytes*3,f=a+t.ntri_smooth_uv*e;for(b=a;b<f;b+=e)o(b),u(b+c);return f-a})(X);(function(a){var b,c=t.vertex_index_bytes*4+t.material_index_bytes,e=c+t.uv_index_bytes*4,f=a+t.nquad_flat_uv*e;for(b=a;b<f;b+=e)p(b),w(b+c);return f-a})(b);(function(a){var b,c=t.vertex_index_bytes*4+t.material_index_bytes+t.normal_index_bytes*4,e=c+t.uv_index_bytes*4,f=a+t.nquad_smooth_uv*e;for(b=a;b<f;b+=e)v(b),w(b+c);return f-a})(V);(function(a){var b,c=t.vertex_index_bytes*
+3+t.material_index_bytes,e=a+t.ntri_flat*c;for(b=a;b<e;b+=c)n(b);return e-a})(x);(function(a){var b,c=t.vertex_index_bytes*3+t.material_index_bytes+t.normal_index_bytes*3,e=a+t.ntri_smooth*c;for(b=a;b<e;b+=c)o(b);return e-a})(T);(function(a){var b,c=t.vertex_index_bytes*4+t.material_index_bytes,e=a+t.nquad_flat*c;for(b=a;b<e;b+=c)p(b);return e-a})(Y);(function(a){var b,c=t.vertex_index_bytes*4+t.material_index_bytes+t.normal_index_bytes*4,e=a+t.nquad_smooth*c;for(b=a;b<e;b+=c)v(b);return e-a})(Z);
this.computeCentroids();this.computeFaceNormals();THREE.Loader.prototype.hasNormals(this)&&this.computeTangents()};f.prototype=new THREE.Geometry;f.prototype.constructor=f;b(new f(c))},v:function(a,b,c,e){a.vertices.push(new THREE.Vertex(new THREE.Vector3(b,c,e)))},f3:function(a,b,c,e,f){a.faces.push(new THREE.Face3(b,c,e,null,null,a.materials[f]))},f4:function(a,b,c,e,f,h){a.faces.push(new THREE.Face4(b,c,e,f,null,null,a.materials[h]))},f3n:function(a,b,c,e,f,h,g,j,k){var h=a.materials[h],l=b[j*
3],m=b[j*3+1],j=b[j*3+2],n=b[k*3],o=b[k*3+1],k=b[k*3+2];a.faces.push(new THREE.Face3(c,e,f,[new THREE.Vector3(b[g*3],b[g*3+1],b[g*3+2]),new THREE.Vector3(l,m,j),new THREE.Vector3(n,o,k)],null,h))},f4n:function(a,b,c,e,f,h,g,j,k,l,m){var g=a.materials[g],n=b[k*3],o=b[k*3+1],k=b[k*3+2],p=b[l*3],v=b[l*3+1],l=b[l*3+2],u=b[m*3],w=b[m*3+1],m=b[m*3+2];a.faces.push(new THREE.Face4(c,e,f,h,[new THREE.Vector3(b[j*3],b[j*3+1],b[j*3+2]),new THREE.Vector3(n,o,k),new THREE.Vector3(p,v,l),new THREE.Vector3(u,w,
m)],null,g))},uv3:function(a,b,c,e,f,h,g){var j=[];j.push(new THREE.UV(b,c));j.push(new THREE.UV(e,f));j.push(new THREE.UV(h,g));a.push(j)},uv4:function(a,b,c,e,f,h,g,j,k){var l=[];l.push(new THREE.UV(b,c));l.push(new THREE.UV(e,f));l.push(new THREE.UV(h,g));l.push(new THREE.UV(j,k));a.push(l)},constructor:THREE.BinaryLoader};
THREE.SceneLoader=function(){this.onLoadStart=function(){};this.onLoadProgress=function(){};this.onLoadComplete=function(){};this.callbackSync=function(){};this.callbackProgress=function(){}};
-THREE.SceneLoader.prototype={load:function(a,b){var c=this,e=new Worker(a);e.postMessage(0);var f=THREE.Loader.prototype.extractUrlbase(a);e.onmessage=function(a){function e(a,b){return b=="relativeToHTML"?a:f+"/"+a}function j(){for(p in E.objects)if(!C.objects[p])if(x=E.objects[p],x.geometry!==void 0){if(D=C.geometries[x.geometry]){var a=!1;z=[];for(M=0;M<x.materials.length;M++)z[M]=C.materials[x.materials[M]],a=z[M]instanceof THREE.MeshShaderMaterial;a&&D.computeTangents();t=x.position;r=x.rotation;
-q=x.quaternion;s=x.scale;q=0;z.length==0&&(z[0]=new THREE.MeshFaceMaterial);z.length>1&&(z=[new THREE.MeshFaceMaterial]);object=new THREE.Mesh(D,z);object.name=p;object.position.set(t[0],t[1],t[2]);q?(object.quaternion.set(q[0],q[1],q[2],q[3]),object.useQuaternion=!0):object.rotation.set(r[0],r[1],r[2]);object.scale.set(s[0],s[1],s[2]);object.visible=x.visible;C.scene.addObject(object);C.objects[p]=object;x.meshCollider&&(a=THREE.CollisionUtils.MeshColliderWBox(object),C.scene.collisions.colliders.push(a));
-if(x.castsShadow)a=new THREE.ShadowVolume(D),C.scene.addChild(a),a.position=object.position,a.rotation=object.rotation,a.scale=object.scale;x.trigger&&x.trigger.toLowerCase()!="none"&&(a={type:x.trigger,object:x},C.triggers[object.name]=a)}}else t=x.position,r=x.rotation,q=x.quaternion,s=x.scale,q=0,object=new THREE.Object3D,object.name=p,object.position.set(t[0],t[1],t[2]),q?(object.quaternion.set(q[0],q[1],q[2],q[3]),object.useQuaternion=!0):object.rotation.set(r[0],r[1],r[2]),object.scale.set(s[0],
-s[1],s[2]),object.visible=x.visible!==void 0?x.visible:!1,C.scene.addObject(object),C.objects[p]=object,C.empties[p]=object,x.trigger&&x.trigger.toLowerCase()!="none"&&(a={type:x.trigger,object:x},C.triggers[object.name]=a)}function k(a){return function(b){C.geometries[a]=b;j();L-=1;c.onLoadComplete();m()}}function l(a){return function(b){C.geometries[a]=b}}function m(){c.callbackProgress({totalModels:N,totalTextures:Q,loadedModels:N-L,loadedTextures:Q-F},C);c.onLoadProgress();L==0&&F==0&&b(C)}var n,
-o,p,v,u,w,y,x,t,B,A,D,H,I,G,z,J,E,K,L,F,N,Q,C;E=a.data;G=new THREE.BinaryLoader;K=new THREE.JSONLoader;F=L=0;C={scene:new THREE.Scene,geometries:{},materials:{},textures:{},objects:{},cameras:{},lights:{},fogs:{},triggers:{},empties:{}};a=!1;for(p in E.objects)if(x=E.objects[p],x.meshCollider){a=!0;break}if(a)C.scene.collisions=new THREE.CollisionSystem;if(E.transform){a=E.transform.position;B=E.transform.rotation;var R=E.transform.scale;a&&C.scene.position.set(a[0],a[1],a[2]);B&&C.scene.rotation.set(B[0],
-B[1],B[2]);R&&C.scene.scale.set(R[0],R[1],R[2]);(a||B||R)&&C.scene.updateMatrix()}a=function(){F-=1;m();c.onLoadComplete()};for(u in E.cameras){B=E.cameras[u];if(B.type=="perspective")H=new THREE.Camera(B.fov,B.aspect,B.near,B.far);else if(B.type=="ortho")H=new THREE.Camera,H.projectionMatrix=THREE.Matrix4.makeOrtho(B.left,B.right,B.top,B.bottom,B.near,B.far);t=B.position;B=B.target;H.position.set(t[0],t[1],t[2]);H.target.position.set(B[0],B[1],B[2]);C.cameras[u]=H}for(v in E.lights)u=E.lights[v],
-H=u.color!==void 0?u.color:16777215,B=u.intensity!==void 0?u.intensity:1,u.type=="directional"?(t=u.direction,J=new THREE.DirectionalLight(H,B),J.position.set(t[0],t[1],t[2]),J.position.normalize()):u.type=="point"?(t=u.position,d=u.distance,J=new THREE.PointLight(H,B,d),J.position.set(t[0],t[1],t[2])):u.type=="ambient"&&(J=new THREE.AmbientLight(H)),C.scene.addLight(J),C.lights[v]=J;for(w in E.fogs)v=E.fogs[w],v.type=="linear"?I=new THREE.Fog(0,v.near,v.far):v.type=="exp2"&&(I=new THREE.FogExp2(0,
-v.density)),B=v.color,I.color.setRGB(B[0],B[1],B[2]),C.fogs[w]=I;if(C.cameras&&E.defaults.camera)C.currentCamera=C.cameras[E.defaults.camera];if(C.fogs&&E.defaults.fog)C.scene.fog=C.fogs[E.defaults.fog];B=E.defaults.bgcolor;C.bgColor=new THREE.Color;C.bgColor.setRGB(B[0],B[1],B[2]);C.bgColorAlpha=E.defaults.bgalpha;for(n in E.geometries)if(w=E.geometries[n],w.type=="bin_mesh"||w.type=="ascii_mesh")L+=1,c.onLoadStart();N=L;for(n in E.geometries)w=E.geometries[n],w.type=="cube"?(D=new THREE.CubeGeometry(w.width,
-w.height,w.depth,w.segmentsWidth,w.segmentsHeight,w.segmentsDepth,null,w.flipped,w.sides),C.geometries[n]=D):w.type=="plane"?(D=new THREE.PlaneGeometry(w.width,w.height,w.segmentsWidth,w.segmentsHeight),C.geometries[n]=D):w.type=="sphere"?(D=new THREE.SphereGeometry(w.radius,w.segmentsWidth,w.segmentsHeight),C.geometries[n]=D):w.type=="cylinder"?(D=new THREE.CylinderGeometry(w.numSegs,w.topRad,w.botRad,w.height,w.topOffset,w.botOffset),C.geometries[n]=D):w.type=="torus"?(D=new THREE.TorusGeometry(w.radius,
-w.tube,w.segmentsR,w.segmentsT),C.geometries[n]=D):w.type=="icosahedron"?(D=new THREE.IcosahedronGeometry(w.subdivisions),C.geometries[n]=D):w.type=="bin_mesh"?G.load({model:e(w.url,E.urlBaseType),callback:k(n)}):w.type=="ascii_mesh"?K.load({model:e(w.url,E.urlBaseType),callback:k(n)}):w.type=="embedded_mesh"&&(w=E.embeds[w.id])&&K.createModel(w,l(n),"");for(y in E.textures)if(n=E.textures[y],n.url instanceof Array){F+=n.url.length;for(G=0;G<n.url.length;G++)c.onLoadStart()}else F+=1,c.onLoadStart();
-Q=F;for(y in E.textures){n=E.textures[y];if(n.mapping!=void 0&&THREE[n.mapping]!=void 0)n.mapping=new THREE[n.mapping];if(n.url instanceof Array){G=[];for(var M=0;M<n.url.length;M++)G[M]=e(n.url[M],E.urlBaseType);G=THREE.ImageUtils.loadTextureCube(G,n.mapping,a)}else{G=THREE.ImageUtils.loadTexture(e(n.url,E.urlBaseType),n.mapping,a);if(THREE[n.minFilter]!=void 0)G.minFilter=THREE[n.minFilter];if(THREE[n.magFilter]!=void 0)G.magFilter=THREE[n.magFilter];if(n.repeat){G.repeat.set(n.repeat[0],n.repeat[1]);
-if(n.repeat[0]!=1)G.wrapS=THREE.RepeatWrapping;if(n.repeat[1]!=1)G.wrapT=THREE.RepeatWrapping}n.offset&&G.offset.set(n.offset[0],n.offset[1]);if(n.wrap){K={repeat:THREE.RepeatWrapping,mirror:THREE.MirroredRepeatWrapping};if(K[n.wrap[0]]!==void 0)G.wrapS=K[n.wrap[0]];if(K[n.wrap[1]]!==void 0)G.wrapT=K[n.wrap[1]]}}C.textures[y]=G}for(o in E.materials){y=E.materials[o];for(A in y.parameters)if(A=="envMap"||A=="map"||A=="lightMap")y.parameters[A]=C.textures[y.parameters[A]];else if(A=="shading")y.parameters[A]=
-y.parameters[A]=="flat"?THREE.FlatShading:THREE.SmoothShading;else if(A=="blending")y.parameters[A]=THREE[y.parameters[A]]?THREE[y.parameters[A]]:THREE.NormalBlending;else if(A=="combine")y.parameters[A]=y.parameters[A]=="MixOperation"?THREE.MixOperation:THREE.MultiplyOperation;else if(A=="vertexColors")if(y.parameters[A]=="face")y.parameters[A]=THREE.FaceColors;else if(y.parameters[A])y.parameters[A]=THREE.VertexColors;if(y.parameters.opacity!==void 0&&y.parameters.opacity<1)y.parameters.transparent=
-!0;if(y.parameters.normalMap){n=THREE.ShaderUtils.lib.normal;a=THREE.UniformsUtils.clone(n.uniforms);G=y.parameters.color;K=y.parameters.specular;w=y.parameters.ambient;I=y.parameters.shininess;a.tNormal.texture=C.textures[y.parameters.normalMap];if(y.parameters.normalMapFactor)a.uNormalScale.value=y.parameters.normalMapFactor;if(y.parameters.map)a.tDiffuse.texture=y.parameters.map,a.enableDiffuse.value=!0;if(y.parameters.lightMap)a.tAO.texture=y.parameters.lightMap,a.enableAO.value=!0;if(y.parameters.specularMap)a.tSpecular.texture=
-C.textures[y.parameters.specularMap],a.enableSpecular.value=!0;a.uDiffuseColor.value.setHex(G);a.uSpecularColor.value.setHex(K);a.uAmbientColor.value.setHex(w);a.uShininess.value=I;if(y.parameters.opacity)a.uOpacity.value=y.parameters.opacity;y=new THREE.MeshShaderMaterial({fragmentShader:n.fragmentShader,vertexShader:n.vertexShader,uniforms:a,lights:!0,fog:!0})}else y=new THREE[y.type](y.parameters);C.materials[o]=y}j();c.callbackSync(C)}},constructor:THREE.SceneLoader};THREE.UTF8Loader=function(){};
+THREE.SceneLoader.prototype={load:function(a,b){var c=this,e=new Worker(a);e.postMessage(0);var f=THREE.Loader.prototype.extractUrlbase(a);e.onmessage=function(a){function e(a,b){return b=="relativeToHTML"?a:f+"/"+a}function j(){for(p in C.objects)if(!D.objects[p])if(x=C.objects[p],x.geometry!==void 0){if(F=D.geometries[x.geometry]){var a=!1;M=[];for(O=0;O<x.materials.length;O++)M[O]=D.materials[x.materials[O]],a=M[O]instanceof THREE.MeshShaderMaterial;a&&F.computeTangents();t=x.position;r=x.rotation;
+q=x.quaternion;s=x.scale;q=0;M.length==0&&(M[0]=new THREE.MeshFaceMaterial);M.length>1&&(M=[new THREE.MeshFaceMaterial]);object=new THREE.Mesh(F,M);object.name=p;object.position.set(t[0],t[1],t[2]);q?(object.quaternion.set(q[0],q[1],q[2],q[3]),object.useQuaternion=!0):object.rotation.set(r[0],r[1],r[2]);object.scale.set(s[0],s[1],s[2]);object.visible=x.visible;D.scene.addObject(object);D.objects[p]=object;x.meshCollider&&(a=THREE.CollisionUtils.MeshColliderWBox(object),D.scene.collisions.colliders.push(a));
+if(x.castsShadow)a=new THREE.ShadowVolume(F),D.scene.addChild(a),a.position=object.position,a.rotation=object.rotation,a.scale=object.scale;x.trigger&&x.trigger.toLowerCase()!="none"&&(a={type:x.trigger,object:x},D.triggers[object.name]=a)}}else t=x.position,r=x.rotation,q=x.quaternion,s=x.scale,q=0,object=new THREE.Object3D,object.name=p,object.position.set(t[0],t[1],t[2]),q?(object.quaternion.set(q[0],q[1],q[2],q[3]),object.useQuaternion=!0):object.rotation.set(r[0],r[1],r[2]),object.scale.set(s[0],
+s[1],s[2]),object.visible=x.visible!==void 0?x.visible:!1,D.scene.addObject(object),D.objects[p]=object,D.empties[p]=object,x.trigger&&x.trigger.toLowerCase()!="none"&&(a={type:x.trigger,object:x},D.triggers[object.name]=a)}function k(a){return function(b){D.geometries[a]=b;j();K-=1;c.onLoadComplete();m()}}function l(a){return function(b){D.geometries[a]=b}}function m(){c.callbackProgress({totalModels:J,totalTextures:N,loadedModels:J-K,loadedTextures:N-L},D);c.onLoadProgress();K==0&&L==0&&b(D)}var n,
+o,p,v,u,w,y,x,t,A,B,F,E,H,G,M,z,C,I,K,L,J,N,D;C=a.data;G=new THREE.BinaryLoader;I=new THREE.JSONLoader;L=K=0;D={scene:new THREE.Scene,geometries:{},materials:{},textures:{},objects:{},cameras:{},lights:{},fogs:{},triggers:{},empties:{}};a=!1;for(p in C.objects)if(x=C.objects[p],x.meshCollider){a=!0;break}if(a)D.scene.collisions=new THREE.CollisionSystem;if(C.transform){a=C.transform.position;A=C.transform.rotation;var R=C.transform.scale;a&&D.scene.position.set(a[0],a[1],a[2]);A&&D.scene.rotation.set(A[0],
+A[1],A[2]);R&&D.scene.scale.set(R[0],R[1],R[2]);(a||A||R)&&D.scene.updateMatrix()}a=function(){L-=1;m();c.onLoadComplete()};for(u in C.cameras){A=C.cameras[u];if(A.type=="perspective")E=new THREE.Camera(A.fov,A.aspect,A.near,A.far);else if(A.type=="ortho")E=new THREE.Camera,E.projectionMatrix=THREE.Matrix4.makeOrtho(A.left,A.right,A.top,A.bottom,A.near,A.far);t=A.position;A=A.target;E.position.set(t[0],t[1],t[2]);E.target.position.set(A[0],A[1],A[2]);D.cameras[u]=E}for(v in C.lights)u=C.lights[v],
+E=u.color!==void 0?u.color:16777215,A=u.intensity!==void 0?u.intensity:1,u.type=="directional"?(t=u.direction,z=new THREE.DirectionalLight(E,A),z.position.set(t[0],t[1],t[2]),z.position.normalize()):u.type=="point"?(t=u.position,d=u.distance,z=new THREE.PointLight(E,A,d),z.position.set(t[0],t[1],t[2])):u.type=="ambient"&&(z=new THREE.AmbientLight(E)),D.scene.addLight(z),D.lights[v]=z;for(w in C.fogs)v=C.fogs[w],v.type=="linear"?H=new THREE.Fog(0,v.near,v.far):v.type=="exp2"&&(H=new THREE.FogExp2(0,
+v.density)),A=v.color,H.color.setRGB(A[0],A[1],A[2]),D.fogs[w]=H;if(D.cameras&&C.defaults.camera)D.currentCamera=D.cameras[C.defaults.camera];if(D.fogs&&C.defaults.fog)D.scene.fog=D.fogs[C.defaults.fog];A=C.defaults.bgcolor;D.bgColor=new THREE.Color;D.bgColor.setRGB(A[0],A[1],A[2]);D.bgColorAlpha=C.defaults.bgalpha;for(n in C.geometries)if(w=C.geometries[n],w.type=="bin_mesh"||w.type=="ascii_mesh")K+=1,c.onLoadStart();J=K;for(n in C.geometries)w=C.geometries[n],w.type=="cube"?(F=new THREE.CubeGeometry(w.width,
+w.height,w.depth,w.segmentsWidth,w.segmentsHeight,w.segmentsDepth,null,w.flipped,w.sides),D.geometries[n]=F):w.type=="plane"?(F=new THREE.PlaneGeometry(w.width,w.height,w.segmentsWidth,w.segmentsHeight),D.geometries[n]=F):w.type=="sphere"?(F=new THREE.SphereGeometry(w.radius,w.segmentsWidth,w.segmentsHeight),D.geometries[n]=F):w.type=="cylinder"?(F=new THREE.CylinderGeometry(w.numSegs,w.topRad,w.botRad,w.height,w.topOffset,w.botOffset),D.geometries[n]=F):w.type=="torus"?(F=new THREE.TorusGeometry(w.radius,
+w.tube,w.segmentsR,w.segmentsT),D.geometries[n]=F):w.type=="icosahedron"?(F=new THREE.IcosahedronGeometry(w.subdivisions),D.geometries[n]=F):w.type=="bin_mesh"?G.load({model:e(w.url,C.urlBaseType),callback:k(n)}):w.type=="ascii_mesh"?I.load({model:e(w.url,C.urlBaseType),callback:k(n)}):w.type=="embedded_mesh"&&(w=C.embeds[w.id])&&I.createModel(w,l(n),"");for(y in C.textures)if(n=C.textures[y],n.url instanceof Array){L+=n.url.length;for(G=0;G<n.url.length;G++)c.onLoadStart()}else L+=1,c.onLoadStart();
+N=L;for(y in C.textures){n=C.textures[y];if(n.mapping!=void 0&&THREE[n.mapping]!=void 0)n.mapping=new THREE[n.mapping];if(n.url instanceof Array){G=[];for(var O=0;O<n.url.length;O++)G[O]=e(n.url[O],C.urlBaseType);G=THREE.ImageUtils.loadTextureCube(G,n.mapping,a)}else{G=THREE.ImageUtils.loadTexture(e(n.url,C.urlBaseType),n.mapping,a);if(THREE[n.minFilter]!=void 0)G.minFilter=THREE[n.minFilter];if(THREE[n.magFilter]!=void 0)G.magFilter=THREE[n.magFilter];if(n.repeat){G.repeat.set(n.repeat[0],n.repeat[1]);
+if(n.repeat[0]!=1)G.wrapS=THREE.RepeatWrapping;if(n.repeat[1]!=1)G.wrapT=THREE.RepeatWrapping}n.offset&&G.offset.set(n.offset[0],n.offset[1]);if(n.wrap){I={repeat:THREE.RepeatWrapping,mirror:THREE.MirroredRepeatWrapping};if(I[n.wrap[0]]!==void 0)G.wrapS=I[n.wrap[0]];if(I[n.wrap[1]]!==void 0)G.wrapT=I[n.wrap[1]]}}D.textures[y]=G}for(o in C.materials){y=C.materials[o];for(B in y.parameters)if(B=="envMap"||B=="map"||B=="lightMap")y.parameters[B]=D.textures[y.parameters[B]];else if(B=="shading")y.parameters[B]=
+y.parameters[B]=="flat"?THREE.FlatShading:THREE.SmoothShading;else if(B=="blending")y.parameters[B]=THREE[y.parameters[B]]?THREE[y.parameters[B]]:THREE.NormalBlending;else if(B=="combine")y.parameters[B]=y.parameters[B]=="MixOperation"?THREE.MixOperation:THREE.MultiplyOperation;else if(B=="vertexColors")if(y.parameters[B]=="face")y.parameters[B]=THREE.FaceColors;else if(y.parameters[B])y.parameters[B]=THREE.VertexColors;if(y.parameters.opacity!==void 0&&y.parameters.opacity<1)y.parameters.transparent=
+!0;if(y.parameters.normalMap){n=THREE.ShaderUtils.lib.normal;a=THREE.UniformsUtils.clone(n.uniforms);G=y.parameters.color;I=y.parameters.specular;w=y.parameters.ambient;H=y.parameters.shininess;a.tNormal.texture=D.textures[y.parameters.normalMap];if(y.parameters.normalMapFactor)a.uNormalScale.value=y.parameters.normalMapFactor;if(y.parameters.map)a.tDiffuse.texture=y.parameters.map,a.enableDiffuse.value=!0;if(y.parameters.lightMap)a.tAO.texture=y.parameters.lightMap,a.enableAO.value=!0;if(y.parameters.specularMap)a.tSpecular.texture=
+D.textures[y.parameters.specularMap],a.enableSpecular.value=!0;a.uDiffuseColor.value.setHex(G);a.uSpecularColor.value.setHex(I);a.uAmbientColor.value.setHex(w);a.uShininess.value=H;if(y.parameters.opacity)a.uOpacity.value=y.parameters.opacity;y=new THREE.MeshShaderMaterial({fragmentShader:n.fragmentShader,vertexShader:n.vertexShader,uniforms:a,lights:!0,fog:!0})}else y=new THREE[y.type](y.parameters);D.materials[o]=y}j();c.callbackSync(D)}},constructor:THREE.SceneLoader};THREE.UTF8Loader=function(){};
THREE.UTF8Loader.prototype=new THREE.UTF8Loader;THREE.UTF8Loader.prototype.constructor=THREE.UTF8Loader;
THREE.UTF8Loader.prototype={load:function(a){var b=new XMLHttpRequest,c=a.model,e=a.callback,f=a.scale!==void 0?a.scale:1,h=a.offsetX!==void 0?a.offsetX:0,g=a.offsetY!==void 0?a.offsetY:0,j=a.offsetZ!==void 0?a.offsetZ:0;b.onreadystatechange=function(){b.readyState==4?b.status==200||b.status==0?THREE.UTF8Loader.prototype.createModel(b.responseText,e,f,h,g,j):alert("Couldn't load ["+c+"] ["+b.status+"]"):b.readyState!=3&&b.readyState==2&&b.getResponseHeader("Content-Length")};b.open("GET",c,!0);b.send(null)},
decompressMesh:function(a){var b=a.charCodeAt(0);b>=57344&&(b-=2048);b++;for(var c=new Float32Array(8*b),e=1,f=0;f<8;f++){for(var h=0,g=0;g<b;++g){var j=a.charCodeAt(g+e);h+=j>>1^-(j&1);c[8*g+f]=h}e+=b}b=a.length-e;h=new Uint16Array(b);for(f=g=0;f<b;f++)j=a.charCodeAt(f+e),h[f]=g-j,j==0&&g++;return[c,h]},createModel:function(a,b,c,e,f,h){var g=function(){var b=this;b.materials=[];THREE.Geometry.call(this);var g=THREE.UTF8Loader.prototype.decompressMesh(a),l=[],m=[];(function(a,g,k){for(var l,m,w,
@@ -227,10 +228,10 @@ l,e,f,g,0,e,f,g),h=m[e*2],e=m[e*2+1],k=m[f*2],f=m[f*2+1],x=m[g*2],g=m[g*2+1],THR
THREE.MarchingCubes=function(a,b){THREE.Object3D.call(this);this.materials=b instanceof Array?b:[b];this.init=function(a){this.isolation=80;this.size=a;this.size2=this.size*this.size;this.size3=this.size2*this.size;this.halfsize=this.size/2;this.delta=2/this.size;this.yd=this.size;this.zd=this.size2;this.field=new Float32Array(this.size3);this.normal_cache=new Float32Array(this.size3*3);this.vlist=new Float32Array(36);this.nlist=new Float32Array(36);this.firstDraw=!0;this.maxCount=4096;this.count=
0;this.hasNormal=this.hasPos=!1;this.positionArray=new Float32Array(this.maxCount*3);this.normalArray=new Float32Array(this.maxCount*3)};this.lerp=function(a,b,f){return a+(b-a)*f};this.VIntX=function(a,b,f,h,g,j,k,l,m,n){g=(g-m)/(n-m);m=this.normal_cache;b[h]=j+g*this.delta;b[h+1]=k;b[h+2]=l;f[h]=this.lerp(m[a],m[a+3],g);f[h+1]=this.lerp(m[a+1],m[a+4],g);f[h+2]=this.lerp(m[a+2],m[a+5],g)};this.VIntY=function(a,b,f,h,g,j,k,l,m,n){g=(g-m)/(n-m);m=this.normal_cache;b[h]=j;b[h+1]=k+g*this.delta;b[h+
2]=l;b=a+this.yd*3;f[h]=this.lerp(m[a],m[b],g);f[h+1]=this.lerp(m[a+1],m[b+1],g);f[h+2]=this.lerp(m[a+2],m[b+2],g)};this.VIntZ=function(a,b,f,h,g,j,k,l,m,n){g=(g-m)/(n-m);m=this.normal_cache;b[h]=j;b[h+1]=k;b[h+2]=l+g*this.delta;b=a+this.zd*3;f[h]=this.lerp(m[a],m[b],g);f[h+1]=this.lerp(m[a+1],m[b+1],g);f[h+2]=this.lerp(m[a+2],m[b+2],g)};this.compNorm=function(a){var b=a*3;this.normal_cache[b]==0&&(this.normal_cache[b]=this.field[a-1]-this.field[a+1],this.normal_cache[b+1]=this.field[a-this.yd]-this.field[a+
-this.yd],this.normal_cache[b+2]=this.field[a-this.zd]-this.field[a+this.zd])};this.polygonize=function(a,b,f,h,g,j){var k=h+1,l=h+this.yd,m=h+this.zd,n=k+this.yd,o=k+this.zd,p=h+this.yd+this.zd,v=k+this.yd+this.zd,u=0,w=this.field[h],y=this.field[k],x=this.field[l],t=this.field[n],B=this.field[m],A=this.field[o],D=this.field[p],H=this.field[v];w<g&&(u|=1);y<g&&(u|=2);x<g&&(u|=8);t<g&&(u|=4);B<g&&(u|=16);A<g&&(u|=32);D<g&&(u|=128);H<g&&(u|=64);var I=THREE.edgeTable[u];if(I==0)return 0;var G=this.delta,
-z=a+G,J=b+G,G=f+G;I&1&&(this.compNorm(h),this.compNorm(k),this.VIntX(h*3,this.vlist,this.nlist,0,g,a,b,f,w,y));I&2&&(this.compNorm(k),this.compNorm(n),this.VIntY(k*3,this.vlist,this.nlist,3,g,z,b,f,y,t));I&4&&(this.compNorm(l),this.compNorm(n),this.VIntX(l*3,this.vlist,this.nlist,6,g,a,J,f,x,t));I&8&&(this.compNorm(h),this.compNorm(l),this.VIntY(h*3,this.vlist,this.nlist,9,g,a,b,f,w,x));I&16&&(this.compNorm(m),this.compNorm(o),this.VIntX(m*3,this.vlist,this.nlist,12,g,a,b,G,B,A));I&32&&(this.compNorm(o),
-this.compNorm(v),this.VIntY(o*3,this.vlist,this.nlist,15,g,z,b,G,A,H));I&64&&(this.compNorm(p),this.compNorm(v),this.VIntX(p*3,this.vlist,this.nlist,18,g,a,J,G,D,H));I&128&&(this.compNorm(m),this.compNorm(p),this.VIntY(m*3,this.vlist,this.nlist,21,g,a,b,G,B,D));I&256&&(this.compNorm(h),this.compNorm(m),this.VIntZ(h*3,this.vlist,this.nlist,24,g,a,b,f,w,B));I&512&&(this.compNorm(k),this.compNorm(o),this.VIntZ(k*3,this.vlist,this.nlist,27,g,z,b,f,y,A));I&1024&&(this.compNorm(n),this.compNorm(v),this.VIntZ(n*
-3,this.vlist,this.nlist,30,g,z,J,f,t,H));I&2048&&(this.compNorm(l),this.compNorm(p),this.VIntZ(l*3,this.vlist,this.nlist,33,g,a,J,f,x,D));u<<=4;for(g=h=0;THREE.triTable[u+g]!=-1;)a=u+g,b=a+1,f=a+2,this.posnormtriv(this.vlist,this.nlist,3*THREE.triTable[a],3*THREE.triTable[b],3*THREE.triTable[f],j),g+=3,h++;return h};this.posnormtriv=function(a,b,f,h,g,j){var k=this.count*3;this.positionArray[k]=a[f];this.positionArray[k+1]=a[f+1];this.positionArray[k+2]=a[f+2];this.positionArray[k+3]=a[h];this.positionArray[k+
+this.yd],this.normal_cache[b+2]=this.field[a-this.zd]-this.field[a+this.zd])};this.polygonize=function(a,b,f,h,g,j){var k=h+1,l=h+this.yd,m=h+this.zd,n=k+this.yd,o=k+this.zd,p=h+this.yd+this.zd,v=k+this.yd+this.zd,u=0,w=this.field[h],y=this.field[k],x=this.field[l],t=this.field[n],A=this.field[m],B=this.field[o],F=this.field[p],E=this.field[v];w<g&&(u|=1);y<g&&(u|=2);x<g&&(u|=8);t<g&&(u|=4);A<g&&(u|=16);B<g&&(u|=32);F<g&&(u|=128);E<g&&(u|=64);var H=THREE.edgeTable[u];if(H==0)return 0;var G=this.delta,
+M=a+G,z=b+G,G=f+G;H&1&&(this.compNorm(h),this.compNorm(k),this.VIntX(h*3,this.vlist,this.nlist,0,g,a,b,f,w,y));H&2&&(this.compNorm(k),this.compNorm(n),this.VIntY(k*3,this.vlist,this.nlist,3,g,M,b,f,y,t));H&4&&(this.compNorm(l),this.compNorm(n),this.VIntX(l*3,this.vlist,this.nlist,6,g,a,z,f,x,t));H&8&&(this.compNorm(h),this.compNorm(l),this.VIntY(h*3,this.vlist,this.nlist,9,g,a,b,f,w,x));H&16&&(this.compNorm(m),this.compNorm(o),this.VIntX(m*3,this.vlist,this.nlist,12,g,a,b,G,A,B));H&32&&(this.compNorm(o),
+this.compNorm(v),this.VIntY(o*3,this.vlist,this.nlist,15,g,M,b,G,B,E));H&64&&(this.compNorm(p),this.compNorm(v),this.VIntX(p*3,this.vlist,this.nlist,18,g,a,z,G,F,E));H&128&&(this.compNorm(m),this.compNorm(p),this.VIntY(m*3,this.vlist,this.nlist,21,g,a,b,G,A,F));H&256&&(this.compNorm(h),this.compNorm(m),this.VIntZ(h*3,this.vlist,this.nlist,24,g,a,b,f,w,A));H&512&&(this.compNorm(k),this.compNorm(o),this.VIntZ(k*3,this.vlist,this.nlist,27,g,M,b,f,y,B));H&1024&&(this.compNorm(n),this.compNorm(v),this.VIntZ(n*
+3,this.vlist,this.nlist,30,g,M,z,f,t,E));H&2048&&(this.compNorm(l),this.compNorm(p),this.VIntZ(l*3,this.vlist,this.nlist,33,g,a,z,f,x,F));u<<=4;for(g=h=0;THREE.triTable[u+g]!=-1;)a=u+g,b=a+1,f=a+2,this.posnormtriv(this.vlist,this.nlist,3*THREE.triTable[a],3*THREE.triTable[b],3*THREE.triTable[f],j),g+=3,h++;return h};this.posnormtriv=function(a,b,f,h,g,j){var k=this.count*3;this.positionArray[k]=a[f];this.positionArray[k+1]=a[f+1];this.positionArray[k+2]=a[f+2];this.positionArray[k+3]=a[h];this.positionArray[k+
4]=a[h+1];this.positionArray[k+5]=a[h+2];this.positionArray[k+6]=a[g];this.positionArray[k+7]=a[g+1];this.positionArray[k+8]=a[g+2];this.normalArray[k]=b[f];this.normalArray[k+1]=b[f+1];this.normalArray[k+2]=b[f+2];this.normalArray[k+3]=b[h];this.normalArray[k+4]=b[h+1];this.normalArray[k+5]=b[h+2];this.normalArray[k+6]=b[g];this.normalArray[k+7]=b[g+1];this.normalArray[k+8]=b[g+2];this.hasNormal=this.hasPos=!0;this.count+=3;this.count>=this.maxCount-3&&j(this)};this.begin=function(){this.count=0;
this.hasNormal=this.hasPos=!1};this.end=function(a){if(this.count!=0){for(var b=this.count*3;b<this.positionArray.length;b++)this.positionArray[b]=0;a(this)}};this.addBall=function(a,b,f,h,g){var j=this.size*Math.sqrt(h/g),k=f*this.size,l=b*this.size,m=a*this.size,n=Math.floor(k-j);n<1&&(n=1);k=Math.floor(k+j);k>this.size-1&&(k=this.size-1);var o=Math.floor(l-j);o<1&&(o=1);l=Math.floor(l+j);l>this.size-1&&(l=this.size-1);var p=Math.floor(m-j);p<1&&(p=1);j=Math.floor(m+j);j>this.size-1&&(j=this.size-
1);for(var v,u,w,y,x,t;n<k;n++){m=this.size2*n;u=n/this.size-f;x=u*u;for(u=o;u<l;u++){w=m+this.size*u;v=u/this.size-b;t=v*v;for(v=p;v<j;v++)y=v/this.size-a,y=h/(1.0E-6+y*y+t+x)-g,y>0&&(this.field[w+v]+=y)}}};this.addPlaneX=function(a,b){var f,h,g,j,k,l=this.size,m=this.yd,n=this.zd,o=this.field,p=l*Math.sqrt(a/b);p>l&&(p=l);for(f=0;f<p;f++)if(h=f/l,h*=h,j=a/(1.0E-4+h)-b,j>0)for(h=0;h<l;h++){k=f+h*m;for(g=0;g<l;g++)o[n*g+k]+=j}};this.addPlaneY=function(a,b){var f,h,g,j,k,l,m=this.size,n=this.yd,o=
@@ -281,7 +282,7 @@ THREE.CollisionSystem.__r=new THREE.Ray;THREE.CollisionUtils={};THREE.CollisionU
THREE.CollisionUtils.MeshColliderWBox=function(a){return new THREE.MeshCollider(a,THREE.CollisionUtils.MeshOBB(a))};
if(THREE.WebGLRenderer)THREE.AnaglyphWebGLRenderer=function(a){THREE.WebGLRenderer.call(this,a);var b=this,c=this.setSize,e=this.render,f=new THREE.Camera,h=new THREE.Camera,g=new THREE.Matrix4,j=new THREE.Matrix4,k,l,m;f.useTarget=h.useTarget=!1;f.matrixAutoUpdate=h.matrixAutoUpdate=!1;var a={minFilter:THREE.LinearFilter,magFilter:THREE.NearestFilter,format:THREE.RGBAFormat},n=new THREE.WebGLRenderTarget(512,512,a),o=new THREE.WebGLRenderTarget(512,512,a),p=new THREE.Camera(53,1,1,1E4);p.position.z=
2;_material=new THREE.MeshShaderMaterial({uniforms:{mapLeft:{type:"t",value:0,texture:n},mapRight:{type:"t",value:1,texture:o}},vertexShader:"varying vec2 vUv;\nvoid main() {\nvUv = vec2( uv.x, 1.0 - uv.y );\ngl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D mapLeft;\nuniform sampler2D mapRight;\nvarying vec2 vUv;\nvoid main() {\nvec4 colorL, colorR;\nvec2 uv = vUv;\ncolorL = texture2D( mapLeft, uv );\ncolorR = texture2D( mapRight, uv );\ngl_FragColor = vec4( colorL.g * 0.7 + colorL.b * 0.3, colorR.g, colorR.b, colorL.a + colorR.a ) * 1.1;\n}"});
-var v=new THREE.Scene;v.addObject(new THREE.Mesh(new THREE.PlaneGeometry(2,2),_material));this.setSize=function(a,e){c.call(b,a,e);n.width=a;n.height=e;o.width=a;o.height=e};this.render=function(a,c){c.update(null,!0);if(k!==c.aspect||l!==c.near||m!==c.fov){k=c.aspect;l=c.near;m=c.fov;var y=c.projectionMatrix.clone(),x=125/30*0.5,t=x*l/125,B=l*Math.tan(m*Math.PI/360),A;g.n14=x;j.n14=-x;x=-B*k+t;A=B*k+t;y.n11=2*l/(A-x);y.n13=(A+x)/(A-x);f.projectionMatrix=y.clone();x=-B*k-t;A=B*k-t;y.n11=2*l/(A-x);
-y.n13=(A+x)/(A-x);h.projectionMatrix=y.clone()}f.matrix=c.matrixWorld.clone().multiplySelf(j);f.update(null,!0);f.position.copy(c.position);f.near=l;f.far=c.far;e.call(b,a,f,n,!0);h.matrix=c.matrixWorld.clone().multiplySelf(g);h.update(null,!0);h.position.copy(c.position);h.near=l;h.far=c.far;e.call(b,a,h,o,!0);e.call(b,v,p)}};
+var v=new THREE.Scene;v.addObject(new THREE.Mesh(new THREE.PlaneGeometry(2,2),_material));this.setSize=function(a,e){c.call(b,a,e);n.width=a;n.height=e;o.width=a;o.height=e};this.render=function(a,c){c.update(null,!0);if(k!==c.aspect||l!==c.near||m!==c.fov){k=c.aspect;l=c.near;m=c.fov;var y=c.projectionMatrix.clone(),x=125/30*0.5,t=x*l/125,A=l*Math.tan(m*Math.PI/360),B;g.n14=x;j.n14=-x;x=-A*k+t;B=A*k+t;y.n11=2*l/(B-x);y.n13=(B+x)/(B-x);f.projectionMatrix=y.clone();x=-A*k-t;B=A*k-t;y.n11=2*l/(B-x);
+y.n13=(B+x)/(B-x);h.projectionMatrix=y.clone()}f.matrix=c.matrixWorld.clone().multiplySelf(j);f.update(null,!0);f.position.copy(c.position);f.near=l;f.far=c.far;e.call(b,a,f,n,!0);h.matrix=c.matrixWorld.clone().multiplySelf(g);h.update(null,!0);h.position.copy(c.position);h.near=l;h.far=c.far;e.call(b,a,h,o,!0);e.call(b,v,p)}};
if(THREE.WebGLRenderer)THREE.CrosseyedWebGLRenderer=function(a){THREE.WebGLRenderer.call(this,a);this.autoClear=!1;var b=this,c=this.setSize,e=this.render,f,h,g=new THREE.Camera,j=new THREE.Camera;b.separation=10;if(a&&a.separation!==void 0)b.separation=a.separation;(new THREE.Camera(53,window.innerWidth/2/window.innerHeight,1,1E4)).position.z=-10;this.setSize=function(a,e){c.call(b,a,e);f=a/2;h=e};this.render=function(a,c){this.clear();g.fov=c.fov;g.aspect=0.5*c.aspect;g.near=c.near;g.far=c.far;
g.updateProjectionMatrix();g.position.copy(c.position);g.target.position.copy(c.target.position);g.translateX(b.separation);j.projectionMatrix=g.projectionMatrix;j.position.copy(c.position);j.target.position.copy(c.target.position);j.translateX(-b.separation);this.setViewport(0,0,f,h);e.call(b,a,g);this.setViewport(f,0,f,h);e.call(b,a,j,!1)}};
Please sign in to comment.
Something went wrong with that request. Please try again.