提交 a318d875 编写于 作者: A alteredq

Added forgotten THREE namespace to SceneUtils.traverseHierarchy

上级 aa3b1e06
此差异已折叠。
......@@ -48,7 +48,7 @@ b,c)}};THREE.Quaternion=function(a,b,c,e){this.set(a||0,b||0,c||0,e!==undefined?
THREE.Quaternion.prototype={set:function(a,b,c,e){this.x=a;this.y=b;this.z=c;this.w=e;return this},setFromEuler:function(a){var b=0.5*Math.PI/360,c=a.x*b,e=a.y*b,d=a.z*b;a=Math.cos(e);e=Math.sin(e);b=Math.cos(-d);d=Math.sin(-d);var g=Math.cos(c);c=Math.sin(c);var f=a*b,i=e*d;this.w=f*g-i*c;this.x=f*c+i*g;this.y=e*b*g+a*d*c;this.z=a*d*g-e*b*c;return this},calculateW:function(){this.w=-Math.sqrt(Math.abs(1-this.x*this.x-this.y*this.y-this.z*this.z));return this},inverse:function(){this.x*=-1;this.y*=
-1;this.z*=-1;return this},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},normalize:function(){var a=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);if(a==0)this.w=this.z=this.y=this.x=0;else{a=1/a;this.x*=a;this.y*=a;this.z*=a;this.w*=a}return this},multiplySelf:function(a){var b=this.x,c=this.y,e=this.z,d=this.w,g=a.x,f=a.y,i=a.z;a=a.w;this.x=b*a+d*g+c*i-e*f;this.y=c*a+d*f+e*g-b*i;this.z=e*a+d*i+b*f-c*g;this.w=d*a-b*g-c*f-e*i;return this},
multiplyVector3:function(a,b){b||(b=a);var c=a.x,e=a.y,d=a.z,g=this.x,f=this.y,i=this.z,h=this.w,j=h*c+f*d-i*e,k=h*e+i*c-g*d,n=h*d+g*e-f*c;c=-g*c-f*e-i*d;b.x=j*h+c*-g+k*-i-n*-f;b.y=k*h+c*-f+n*-g-j*-i;b.z=n*h+c*-i+j*-f-k*-g;return b}};
THREE.Quaternion.slerp=function(a,b,c,e){var d=a.w*b.w+a.x*b.x+a.y*b.y+a.z*b.z;if(Math.abs(d)>=1){c.w=a.w;c.x=a.x;c.y=a.y;c.z=a.z;return c}var g=Math.acos(d),f=Math.sqrt(1-d*d);if(Math.abs(f)<0.001){c.w=0.5*(a.w+b.w);c.x=0.5*(a.x+b.x);c.y=0.5*(a.y+b.y);c.z=0.5*(a.z+b.z);return c}d=Math.sin((1-e)*g)/f;e=Math.sin(e*g)/f;c.w=a.w*d+b.w*e;c.x=a.x*d+b.x*e;c.y=a.y*d+b.y*e;c.z=a.z*d+b.z*e;return c};THREE.Vertex=function(a){this.position=a||new THREE.Vector3};
THREE.Quaternion.slerp=function(a,b,c,e){var d=a.w*b.w+a.x*b.x+a.y*b.y+a.z*b.z;if(Math.abs(d)>=1){c.w=a.w;c.x=a.x;c.y=a.y;c.z=a.z;return c}var g=Math.acos(d),f=Math.sqrt(1-d*d);if(Math.abs(f)<0.0010){c.w=0.5*(a.w+b.w);c.x=0.5*(a.x+b.x);c.y=0.5*(a.y+b.y);c.z=0.5*(a.z+b.z);return c}d=Math.sin((1-e)*g)/f;e=Math.sin(e*g)/f;c.w=a.w*d+b.w*e;c.x=a.x*d+b.x*e;c.y=a.y*d+b.y*e;c.z=a.z*d+b.z*e;return c};THREE.Vertex=function(a){this.position=a||new THREE.Vector3};
THREE.Face3=function(a,b,c,e,d,g){this.a=a;this.b=b;this.c=c;this.normal=e instanceof THREE.Vector3?e:new THREE.Vector3;this.vertexNormals=e instanceof Array?e:[];this.color=d instanceof THREE.Color?d:new THREE.Color;this.vertexColors=d instanceof Array?d:[];this.vertexTangents=[];this.materials=g instanceof Array?g:[g];this.centroid=new THREE.Vector3};
THREE.Face4=function(a,b,c,e,d,g,f){this.a=a;this.b=b;this.c=c;this.d=e;this.normal=d instanceof THREE.Vector3?d:new THREE.Vector3;this.vertexNormals=d instanceof Array?d:[];this.color=g instanceof THREE.Color?g:new THREE.Color;this.vertexColors=g instanceof Array?g:[];this.vertexTangents=[];this.materials=f instanceof Array?f:[f];this.centroid=new THREE.Vector3};THREE.UV=function(a,b){this.set(a||0,b||0)};
THREE.UV.prototype={set:function(a,b){this.u=a;this.v=b;return this},copy:function(a){this.set(a.u,a.v);return this}};THREE.Geometry=function(){this.id="Geometry"+THREE.GeometryIdCounter++;this.vertices=[];this.colors=[];this.faces=[];this.edges=[];this.faceUvs=[[]];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphColors=[];this.skinWeights=[];this.skinIndices=[];this.boundingSphere=this.boundingBox=null;this.hasTangents=!1};
......
......@@ -48,7 +48,7 @@ b,c)}};THREE.Quaternion=function(a,b,c,e){this.set(a||0,b||0,c||0,e!==undefined?
THREE.Quaternion.prototype={set:function(a,b,c,e){this.x=a;this.y=b;this.z=c;this.w=e;return this},setFromEuler:function(a){var b=0.5*Math.PI/360,c=a.x*b,e=a.y*b,d=a.z*b;a=Math.cos(e);e=Math.sin(e);b=Math.cos(-d);d=Math.sin(-d);var g=Math.cos(c);c=Math.sin(c);var f=a*b,i=e*d;this.w=f*g-i*c;this.x=f*c+i*g;this.y=e*b*g+a*d*c;this.z=a*d*g-e*b*c;return this},calculateW:function(){this.w=-Math.sqrt(Math.abs(1-this.x*this.x-this.y*this.y-this.z*this.z));return this},inverse:function(){this.x*=-1;this.y*=
-1;this.z*=-1;return this},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},normalize:function(){var a=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);if(a==0)this.w=this.z=this.y=this.x=0;else{a=1/a;this.x*=a;this.y*=a;this.z*=a;this.w*=a}return this},multiplySelf:function(a){var b=this.x,c=this.y,e=this.z,d=this.w,g=a.x,f=a.y,i=a.z;a=a.w;this.x=b*a+d*g+c*i-e*f;this.y=c*a+d*f+e*g-b*i;this.z=e*a+d*i+b*f-c*g;this.w=d*a-b*g-c*f-e*i;return this},
multiplyVector3:function(a,b){b||(b=a);var c=a.x,e=a.y,d=a.z,g=this.x,f=this.y,i=this.z,h=this.w,j=h*c+f*d-i*e,l=h*e+i*c-g*d,m=h*d+g*e-f*c;c=-g*c-f*e-i*d;b.x=j*h+c*-g+l*-i-m*-f;b.y=l*h+c*-f+m*-g-j*-i;b.z=m*h+c*-i+j*-f-l*-g;return b}};
THREE.Quaternion.slerp=function(a,b,c,e){var d=a.w*b.w+a.x*b.x+a.y*b.y+a.z*b.z;if(Math.abs(d)>=1){c.w=a.w;c.x=a.x;c.y=a.y;c.z=a.z;return c}var g=Math.acos(d),f=Math.sqrt(1-d*d);if(Math.abs(f)<0.001){c.w=0.5*(a.w+b.w);c.x=0.5*(a.x+b.x);c.y=0.5*(a.y+b.y);c.z=0.5*(a.z+b.z);return c}d=Math.sin((1-e)*g)/f;e=Math.sin(e*g)/f;c.w=a.w*d+b.w*e;c.x=a.x*d+b.x*e;c.y=a.y*d+b.y*e;c.z=a.z*d+b.z*e;return c};THREE.Vertex=function(a){this.position=a||new THREE.Vector3};
THREE.Quaternion.slerp=function(a,b,c,e){var d=a.w*b.w+a.x*b.x+a.y*b.y+a.z*b.z;if(Math.abs(d)>=1){c.w=a.w;c.x=a.x;c.y=a.y;c.z=a.z;return c}var g=Math.acos(d),f=Math.sqrt(1-d*d);if(Math.abs(f)<0.0010){c.w=0.5*(a.w+b.w);c.x=0.5*(a.x+b.x);c.y=0.5*(a.y+b.y);c.z=0.5*(a.z+b.z);return c}d=Math.sin((1-e)*g)/f;e=Math.sin(e*g)/f;c.w=a.w*d+b.w*e;c.x=a.x*d+b.x*e;c.y=a.y*d+b.y*e;c.z=a.z*d+b.z*e;return c};THREE.Vertex=function(a){this.position=a||new THREE.Vector3};
THREE.Face3=function(a,b,c,e,d,g){this.a=a;this.b=b;this.c=c;this.normal=e instanceof THREE.Vector3?e:new THREE.Vector3;this.vertexNormals=e instanceof Array?e:[];this.color=d instanceof THREE.Color?d:new THREE.Color;this.vertexColors=d instanceof Array?d:[];this.vertexTangents=[];this.materials=g instanceof Array?g:[g];this.centroid=new THREE.Vector3};
THREE.Face4=function(a,b,c,e,d,g,f){this.a=a;this.b=b;this.c=c;this.d=e;this.normal=d instanceof THREE.Vector3?d:new THREE.Vector3;this.vertexNormals=d instanceof Array?d:[];this.color=g instanceof THREE.Color?g:new THREE.Color;this.vertexColors=g instanceof Array?g:[];this.vertexTangents=[];this.materials=f instanceof Array?f:[f];this.centroid=new THREE.Vector3};THREE.UV=function(a,b){this.set(a||0,b||0)};
THREE.UV.prototype={set:function(a,b){this.u=a;this.v=b;return this},copy:function(a){this.set(a.u,a.v);return this}};
......
......@@ -5,7 +5,7 @@ THREE.ImageUtils={loadTexture:function(a,b,c){var d=new Image,e=new THREE.Textur
THREE.SceneUtils={addMesh:function(a,b,c,d,e,f,h,g,j,l){b=new THREE.Mesh(b,l);b.scale.x=b.scale.y=b.scale.z=c;b.position.x=d;b.position.y=e;b.position.z=f;b.rotation.x=h;b.rotation.y=g;b.rotation.z=j;a.addObject(b);return b},addPanoramaCubeWebGL:function(a,b,c){var d=THREE.ShaderUtils.lib.cube;d.uniforms.tCube.texture=c;c=new THREE.MeshShaderMaterial({fragmentShader:d.fragmentShader,vertexShader:d.vertexShader,uniforms:d.uniforms});b=new THREE.Mesh(new THREE.Cube(b,b,b,1,1,1,null,!0),c);a.addObject(b);
return b},addPanoramaCube:function(a,b,c){var d=[];d.push(new THREE.MeshBasicMaterial({map:new THREE.Texture(c[0])}));d.push(new THREE.MeshBasicMaterial({map:new THREE.Texture(c[1])}));d.push(new THREE.MeshBasicMaterial({map:new THREE.Texture(c[2])}));d.push(new THREE.MeshBasicMaterial({map:new THREE.Texture(c[3])}));d.push(new THREE.MeshBasicMaterial({map:new THREE.Texture(c[4])}));d.push(new THREE.MeshBasicMaterial({map:new THREE.Texture(c[5])}));b=new THREE.Mesh(new THREE.Cube(b,b,b,1,1,d,!0),
new THREE.MeshFaceMaterial);a.addObject(b);return b},addPanoramaCubePlanes:function(a,b,c){var d=b/2;b=new THREE.Plane(b,b);var e=Math.PI,f=Math.PI/2;THREE.SceneUtils.addMesh(a,b,1,0,0,-d,0,0,0,new THREE.MeshBasicMaterial({map:new THREE.Texture(c[5])}));THREE.SceneUtils.addMesh(a,b,1,-d,0,0,0,f,0,new THREE.MeshBasicMaterial({map:new THREE.Texture(c[0])}));THREE.SceneUtils.addMesh(a,b,1,d,0,0,0,-f,0,new THREE.MeshBasicMaterial({map:new THREE.Texture(c[1])}));THREE.SceneUtils.addMesh(a,b,1,0,d,0,f,
0,e,new THREE.MeshBasicMaterial({map:new THREE.Texture(c[2])}));THREE.SceneUtils.addMesh(a,b,1,0,-d,0,-f,0,e,new THREE.MeshBasicMaterial({map:new THREE.Texture(c[3])}))},showHierarchy:function(a,b){THREE.SceneUtils.traverseHierarchy(a,function(c){c.visible=b})},traverseHierarchy:function(a,b){var c,d,e=a.children.length;for(d=0;d<e;d++){c=a.children[d];b(c);SceneUtils.traverseHierarchy(c,b)}}};
0,e,new THREE.MeshBasicMaterial({map:new THREE.Texture(c[2])}));THREE.SceneUtils.addMesh(a,b,1,0,-d,0,-f,0,e,new THREE.MeshBasicMaterial({map:new THREE.Texture(c[3])}))},showHierarchy:function(a,b){THREE.SceneUtils.traverseHierarchy(a,function(c){c.visible=b})},traverseHierarchy:function(a,b){var c,d,e=a.children.length;for(d=0;d<e;d++){c=a.children[d];b(c);THREE.SceneUtils.traverseHierarchy(c,b)}}};
THREE.ShaderUtils={lib:{fresnel:{uniforms:{mRefractionRatio:{type:"f",value:1.02},mFresnelBias:{type:"f",value:0.1},mFresnelPower:{type:"f",value:2},mFresnelScale:{type:"f",value:1},tCube:{type:"t",value:1,texture:null}},fragmentShader:"uniform samplerCube tCube;\nvarying vec3 vReflect;\nvarying vec3 vRefract[3];\nvarying float vReflectionFactor;\nvoid main() {\nvec4 reflectedColor = textureCube( tCube, vec3( -vReflect.x, vReflect.yz ) );\nvec4 refractedColor = vec4( 1.0, 1.0, 1.0, 1.0 );\nrefractedColor.r = textureCube( tCube, vec3( -vRefract[0].x, vRefract[0].yz ) ).r;\nrefractedColor.g = textureCube( tCube, vec3( -vRefract[1].x, vRefract[1].yz ) ).g;\nrefractedColor.b = textureCube( tCube, vec3( -vRefract[2].x, vRefract[2].yz ) ).b;\nrefractedColor.a = 1.0;\ngl_FragColor = mix( refractedColor, reflectedColor, clamp( vReflectionFactor, 0.0, 1.0 ) );\n}",
vertexShader:"uniform float mRefractionRatio;\nuniform float mFresnelBias;\nuniform float mFresnelScale;\nuniform float mFresnelPower;\nvarying vec3 vReflect;\nvarying vec3 vRefract[3];\nvarying float vReflectionFactor;\nvoid main() {\nvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\nvec4 mPosition = objectMatrix * vec4( position, 1.0 );\nvec3 nWorld = normalize ( mat3( objectMatrix[0].xyz, objectMatrix[1].xyz, objectMatrix[2].xyz ) * normal );\nvec3 I = mPosition.xyz - cameraPosition;\nvReflect = reflect( I, nWorld );\nvRefract[0] = refract( normalize( I ), nWorld, mRefractionRatio );\nvRefract[1] = refract( normalize( I ), nWorld, mRefractionRatio * 0.99 );\nvRefract[2] = refract( normalize( I ), nWorld, mRefractionRatio * 0.98 );\nvReflectionFactor = mFresnelBias + mFresnelScale * pow( 1.0 + dot( normalize( I ), nWorld ), mFresnelPower );\ngl_Position = projectionMatrix * mvPosition;\n}"},
normal:{uniforms:{enableAO:{type:"i",value:0},enableDiffuse:{type:"i",value:0},tDiffuse:{type:"t",value:0,texture:null},tNormal:{type:"t",value:2,texture:null},tAO:{type:"t",value:3,texture:null},uNormalScale:{type:"f",value:1},tDisplacement:{type:"t",value:4,texture:null},uDisplacementBias:{type:"f",value:-0.5},uDisplacementScale:{type:"f",value:2.5},uPointLightPos:{type:"v3",value:new THREE.Vector3},uPointLightColor:{type:"c",value:new THREE.Color(15658734)},uDirLightPos:{type:"v3",value:new THREE.Vector3},
......@@ -16,7 +16,7 @@ value:0,texture:null},uImageIncrement:{type:"v2",value:new THREE.Vector2(0.00195
film:{uniforms:{tDiffuse:{type:"t",value:0,texture:null},time:{type:"f",value:0},nIntensity:{type:"f",value:0.5},sIntensity:{type:"f",value:0.05},sCount:{type:"f",value:4096},grayscale:{type:"i",value:1}},vertexShader:"varying vec2 vUv;\nvoid main() {\nvUv = vec2( uv.x, 1.0 - uv.y );\ngl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",fragmentShader:"varying vec2 vUv;\nuniform sampler2D tDiffuse;\nuniform float time;\nuniform bool grayscale;\nuniform float nIntensity;\nuniform float sIntensity;\nuniform float sCount;\nvoid main() {\nvec4 cTextureScreen = texture2D( tDiffuse, vUv );\nfloat x = vUv.x * vUv.y * time * 1000.0;\nx = mod( x, 13.0 ) * mod( x, 123.0 );\nfloat dx = mod( x, 0.01 );\nvec3 cResult = cTextureScreen.rgb + cTextureScreen.rgb * clamp( 0.1 + dx * 100.0, 0.0, 1.0 );\nvec2 sc = vec2( sin( vUv.y * sCount ), cos( vUv.y * sCount ) );\ncResult += cTextureScreen.rgb * vec3( sc.x, sc.y, sc.x ) * sIntensity;\ncResult = cTextureScreen.rgb + clamp( nIntensity, 0.0,1.0 ) * ( cResult - cTextureScreen.rgb );\nif( grayscale ) {\ncResult = vec3( cResult.r * 0.3 + cResult.g * 0.59 + cResult.b * 0.11 );\n}\ngl_FragColor = vec4( cResult, cTextureScreen.a );\n}"},
screen:{uniforms:{tDiffuse:{type:"t",value:0,texture:null},opacity:{type:"f",value:1}},vertexShader:"varying vec2 vUv;\nvoid main() {\nvUv = vec2( uv.x, 1.0 - uv.y );\ngl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",fragmentShader:"varying vec2 vUv;\nuniform sampler2D tDiffuse;\nuniform float opacity;\nvoid main() {\nvec4 texel = texture2D( tDiffuse, vUv );\ngl_FragColor = opacity * texel;\n}"},basic:{uniforms:{},vertexShader:"void main() {\ngl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",
fragmentShader:"void main() {\ngl_FragColor = vec4( 1.0, 0.0, 0.0, 0.5 );\n}"}},buildKernel:function(a){var b,c,d,e,f=2*Math.ceil(a*3)+1;f>25&&(f=25);e=(f-1)*0.5;c=Array(f);for(b=d=0;b<f;++b){c[b]=Math.exp(-((b-e)*(b-e))/(2*a*a));d+=c[b]}for(b=0;b<f;++b)c[b]/=d;return c}};
THREE.QuakeCamera=function(a){function b(c,d){return function(){d.apply(c,arguments)}}THREE.Camera.call(this,a.fov,a.aspect,a.near,a.far,a.target);this.movementSpeed=1;this.lookSpeed=0.005;this.noFly=!1;this.lookVertical=!0;this.autoForward=!1;this.activeLook=!0;this.heightSpeed=!1;this.heightCoef=1;this.heightMin=0;this.constrainVertical=!1;this.verticalMin=0;this.verticalMax=3.14;this.domElement=document;if(a){if(a.movementSpeed!==undefined)this.movementSpeed=a.movementSpeed;if(a.lookSpeed!==undefined)this.lookSpeed=
THREE.QuakeCamera=function(a){function b(c,d){return function(){d.apply(c,arguments)}}THREE.Camera.call(this,a.fov,a.aspect,a.near,a.far,a.target);this.movementSpeed=1;this.lookSpeed=0.0050;this.noFly=!1;this.lookVertical=!0;this.autoForward=!1;this.activeLook=!0;this.heightSpeed=!1;this.heightCoef=1;this.heightMin=0;this.constrainVertical=!1;this.verticalMin=0;this.verticalMax=3.14;this.domElement=document;if(a){if(a.movementSpeed!==undefined)this.movementSpeed=a.movementSpeed;if(a.lookSpeed!==undefined)this.lookSpeed=
a.lookSpeed;if(a.noFly!==undefined)this.noFly=a.noFly;if(a.lookVertical!==undefined)this.lookVertical=a.lookVertical;if(a.autoForward!==undefined)this.autoForward=a.autoForward;if(a.activeLook!==undefined)this.activeLook=a.activeLook;if(a.heightSpeed!==undefined)this.heightSpeed=a.heightSpeed;if(a.heightCoef!==undefined)this.heightCoef=a.heightCoef;if(a.heightMin!==undefined)this.heightMin=a.heightMin;if(a.heightMax!==undefined)this.heightMax=a.heightMax;if(a.constrainVertical!==undefined)this.constrainVertical=
a.constrainVertical;if(a.verticalMin!==undefined)this.verticalMin=a.verticalMin;if(a.verticalMax!==undefined)this.verticalMax=a.verticalMax;if(a.domElement!==undefined)this.domElement=a.domElement}this.theta=this.phi=this.lon=this.lat=this.mouseY=this.mouseX=this.autoSpeedFactor=0;this.moveForward=!1;this.moveBackward=!1;this.moveLeft=!1;this.moveRight=!1;this.freeze=!1;this.mouseDragOn=!1;this.windowHalfX=window.innerWidth/2;this.windowHalfY=window.innerHeight/2;this.onMouseDown=function(c){c.preventDefault();
c.stopPropagation();if(this.activeLook)switch(c.button){case 0:this.moveForward=!0;break;case 2:this.moveBackward=!0}this.mouseDragOn=!0};this.onMouseUp=function(c){c.preventDefault();c.stopPropagation();if(this.activeLook)switch(c.button){case 0:this.moveForward=!1;break;case 2:this.moveBackward=!1}this.mouseDragOn=!1};this.onMouseMove=function(c){this.mouseX=c.clientX-this.windowHalfX;this.mouseY=c.clientY-this.windowHalfY};this.onKeyDown=function(c){switch(c.keyCode){case 38:case 87:this.moveForward=
......@@ -27,7 +27,7 @@ this.heightMax?this.heightMax:this.position.y)-this.heightMin)*this.heightCoef:0
this.onMouseUp),!1);this.domElement.addEventListener("keydown",b(this,this.onKeyDown),!1);this.domElement.addEventListener("keyup",b(this,this.onKeyUp),!1)};THREE.QuakeCamera.prototype=new THREE.Camera;THREE.QuakeCamera.prototype.constructor=THREE.QuakeCamera;THREE.QuakeCamera.prototype.supr=THREE.Camera.prototype;THREE.QuakeCamera.prototype.translate=function(a,b){this.matrix.rotateAxis(b);if(this.noFly)b.y=0;this.position.addSelf(b.multiplyScalar(a));this.target.position.addSelf(b.multiplyScalar(a))};
THREE.PathCamera=function(a){function b(l,k,n,p){var t={name:n,fps:0.6,length:p,hierarchy:[]},w,x=k.getControlPointsArray(),u=k.getLength(),B=x.length,z=0;w=B-1;k={parent:-1,keys:[]};k.keys[0]={time:0,pos:x[0],rot:[0,0,0,1],scl:[1,1,1]};k.keys[w]={time:p,pos:x[w],rot:[0,0,0,1],scl:[1,1,1]};for(w=1;w<B-1;w++){z=p*u.chunks[w]/u.total;k.keys[w]={time:z,pos:x[w]}}t.hierarchy[0]=k;THREE.AnimationHandler.add(t);return new THREE.Animation(l,n,THREE.AnimationHandler.CATMULLROM_FORWARD,!1)}function c(l,k){var n,
p,t=new THREE.Geometry;for(n=0;n<l.points.length*k;n++){p=n/(l.points.length*k);p=l.getPoint(p);t.vertices[n]=new THREE.Vertex(new THREE.Vector3(p.x,p.y,p.z))}return t}function d(l,k){var n=c(k,10),p=c(k,10),t=new THREE.LineBasicMaterial({color:16711680,linewidth:3});lineObj=new THREE.Line(n,t);particleObj=new THREE.ParticleSystem(p,new THREE.ParticleBasicMaterial({color:16755200,size:3}));lineObj.scale.set(1,1,1);l.addChild(lineObj);particleObj.scale.set(1,1,1);l.addChild(particleObj);p=new Sphere(1,
16,8);t=new THREE.MeshBasicMaterial({color:65280});for(i=0;i<k.points.length;i++){n=new THREE.Mesh(p,t);n.position.copy(k.points[i]);n.updateMatrix();l.addChild(n)}}THREE.Camera.call(this,a.fov,a.aspect,a.near,a.far,a.target);this.id="PathCamera"+THREE.PathCameraIdCounter++;this.duration=1E4;this.waypoints=[];this.useConstantSpeed=!0;this.resamplingCoef=50;this.debugPath=new THREE.Object3D;this.debugDummy=new THREE.Object3D;this.animationParent=new THREE.Object3D;this.lookSpeed=0.005;this.lookVertical=
16,8);t=new THREE.MeshBasicMaterial({color:65280});for(i=0;i<k.points.length;i++){n=new THREE.Mesh(p,t);n.position.copy(k.points[i]);n.updateMatrix();l.addChild(n)}}THREE.Camera.call(this,a.fov,a.aspect,a.near,a.far,a.target);this.id="PathCamera"+THREE.PathCameraIdCounter++;this.duration=1E4;this.waypoints=[];this.useConstantSpeed=!0;this.resamplingCoef=50;this.debugPath=new THREE.Object3D;this.debugDummy=new THREE.Object3D;this.animationParent=new THREE.Object3D;this.lookSpeed=0.0050;this.lookVertical=
!0;this.lookHorizontal=!0;this.verticalAngleMap={srcRange:[0,6.28],dstRange:[0,6.28]};this.horizontalAngleMap={srcRange:[0,6.28],dstRange:[0,6.28]};this.domElement=document;if(a){if(a.duration!==undefined)this.duration=a.duration*1E3;if(a.waypoints!==undefined)this.waypoints=a.waypoints;if(a.useConstantSpeed!==undefined)this.useConstantSpeed=a.useConstantSpeed;if(a.resamplingCoef!==undefined)this.resamplingCoef=a.resamplingCoef;if(a.createDebugPath!==undefined)this.createDebugPath=a.createDebugPath;
if(a.createDebugDummy!==undefined)this.createDebugDummy=a.createDebugDummy;if(a.lookSpeed!==undefined)this.lookSpeed=a.lookSpeed;if(a.lookVertical!==undefined)this.lookVertical=a.lookVertical;if(a.lookHorizontal!==undefined)this.lookHorizontal=a.lookHorizontal;if(a.verticalAngleMap!==undefined)this.verticalAngleMap=a.verticalAngleMap;if(a.horizontalAngleMap!==undefined)this.horizontalAngleMap=a.horizontalAngleMap;if(a.domElement!==undefined)this.domElement=a.domElement}this.theta=this.phi=this.lon=
this.lat=this.mouseY=this.mouseX=0;this.windowHalfX=window.innerWidth/2;this.windowHalfY=window.innerHeight/2;var e=Math.PI*2,f=Math.PI/180;this.update=function(l,k,n){var p,t;this.lookHorizontal&&(this.lon+=this.mouseX*this.lookSpeed);this.lookVertical&&(this.lat-=this.mouseY*this.lookSpeed);this.lon=Math.max(0,Math.min(360,this.lon));this.lat=Math.max(-85,Math.min(85,this.lat));this.phi=(90-this.lat)*f;this.theta=this.lon*f;p=this.phi%e;this.phi=p>=0?p:p+e;p=this.verticalAngleMap.srcRange;t=this.verticalAngleMap.dstRange;
......@@ -44,7 +44,7 @@ d));c instanceof THREE.Face4&&b.push(new THREE.UV(0.5+Math.atan2(n.position.x,n.
THREE.Icosahedron=function(a){function b(n,p,t){var w=Math.sqrt(n*n+p*p+t*t);return e.vertices.push(new THREE.Vertex(new THREE.Vector3(n/w,p/w,t/w)))-1}function c(n,p,t,w){w.faces.push(new THREE.Face3(n,p,t))}function d(n,p){var t=e.vertices[n].position,w=e.vertices[p].position;return b((t.x+w.x)/2,(t.y+w.y)/2,(t.z+w.z)/2)}var e=this,f=new THREE.Geometry,h;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,f);c(0,5,1,f);c(0,1,7,f);c(0,7,10,f);c(0,10,11,f);c(1,5,9,f);c(5,11,4,f);c(11,10,2,f);c(10,7,6,f);c(7,1,8,f);c(3,9,4,f);c(3,4,2,f);c(3,2,6,f);c(3,6,8,f);c(3,8,9,f);c(4,9,5,f);c(2,4,11,f);c(6,2,10,f);c(8,6,7,f);c(9,8,1,f);for(a=0;a<this.subdivisions;a++){h=new THREE.Geometry;for(var g in f.faces){var j=d(f.faces[g].a,f.faces[g].b),l=d(f.faces[g].b,f.faces[g].c),k=d(f.faces[g].c,f.faces[g].a);c(f.faces[g].a,j,k,h);c(f.faces[g].b,l,j,h);c(f.faces[g].c,
k,l,h);c(j,l,k,h)}f.faces=h.faces}e.faces=f.faces;delete f;delete h;this.computeCentroids();this.computeFaceNormals();this.computeVertexNormals()};THREE.Icosahedron.prototype=new THREE.Geometry;THREE.Icosahedron.prototype.constructor=THREE.Icosahedron;
THREE.Lathe=function(a,b,c){THREE.Geometry.call(this);this.steps=b||12;this.angle=c||2*Math.PI;b=this.angle/this.steps;c=[];for(var d=[],e=[],f=[],h=(new THREE.Matrix4).setRotationZ(b),g=0;g<a.length;g++){this.vertices.push(new THREE.Vertex(a[g]));c[g]=a[g].clone();d[g]=this.vertices.length-1}for(var j=0;j<=this.angle+0.001;j+=b){for(g=0;g<c.length;g++)if(j<this.angle){c[g]=h.multiplyVector3(c[g].clone());this.vertices.push(new THREE.Vertex(c[g]));e[g]=this.vertices.length-1}else e=f;j==0&&(f=d);
THREE.Lathe=function(a,b,c){THREE.Geometry.call(this);this.steps=b||12;this.angle=c||2*Math.PI;b=this.angle/this.steps;c=[];for(var d=[],e=[],f=[],h=(new THREE.Matrix4).setRotationZ(b),g=0;g<a.length;g++){this.vertices.push(new THREE.Vertex(a[g]));c[g]=a[g].clone();d[g]=this.vertices.length-1}for(var j=0;j<=this.angle+0.0010;j+=b){for(g=0;g<c.length;g++)if(j<this.angle){c[g]=h.multiplyVector3(c[g].clone());this.vertices.push(new THREE.Vertex(c[g]));e[g]=this.vertices.length-1}else e=f;j==0&&(f=d);
for(g=0;g<d.length-1;g++){this.faces.push(new THREE.Face4(e[g],e[g+1],d[g+1],d[g]));this.faceVertexUvs[0].push([new THREE.UV(1-j/this.angle,g/a.length),new THREE.UV(1-j/this.angle,(g+1)/a.length),new THREE.UV(1-(j-b)/this.angle,(g+1)/a.length),new THREE.UV(1-(j-b)/this.angle,g/a.length)])}d=e;e=[]}this.computeCentroids();this.computeFaceNormals();this.computeVertexNormals()};THREE.Lathe.prototype=new THREE.Geometry;THREE.Lathe.prototype.constructor=THREE.Lathe;
THREE.Plane=function(a,b,c,d){THREE.Geometry.call(this);var e,f=a/2,h=b/2;c=c||1;d=d||1;var g=c+1,j=d+1;a/=c;var l=b/d;for(e=0;e<j;e++)for(b=0;b<g;b++)this.vertices.push(new THREE.Vertex(new THREE.Vector3(b*a-f,-(e*l-h),0)));for(e=0;e<d;e++)for(b=0;b<c;b++){this.faces.push(new THREE.Face4(b+g*e,b+g*(e+1),b+1+g*(e+1),b+1+g*e));this.faceVertexUvs[0].push([new THREE.UV(b/c,e/d),new THREE.UV(b/c,(e+1)/d),new THREE.UV((b+1)/c,(e+1)/d),new THREE.UV((b+1)/c,e/d)])}this.computeCentroids();this.computeFaceNormals()};
THREE.Plane.prototype=new THREE.Geometry;THREE.Plane.prototype.constructor=THREE.Plane;
......
......@@ -48,7 +48,7 @@ b,c)}};THREE.Quaternion=function(a,b,c,e){this.set(a||0,b||0,c||0,e!==undefined?
THREE.Quaternion.prototype={set:function(a,b,c,e){this.x=a;this.y=b;this.z=c;this.w=e;return this},setFromEuler:function(a){var b=0.5*Math.PI/360,c=a.x*b,e=a.y*b,d=a.z*b;a=Math.cos(e);e=Math.sin(e);b=Math.cos(-d);d=Math.sin(-d);var g=Math.cos(c);c=Math.sin(c);var f=a*b,i=e*d;this.w=f*g-i*c;this.x=f*c+i*g;this.y=e*b*g+a*d*c;this.z=a*d*g-e*b*c;return this},calculateW:function(){this.w=-Math.sqrt(Math.abs(1-this.x*this.x-this.y*this.y-this.z*this.z));return this},inverse:function(){this.x*=-1;this.y*=
-1;this.z*=-1;return this},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},normalize:function(){var a=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);if(a==0)this.w=this.z=this.y=this.x=0;else{a=1/a;this.x*=a;this.y*=a;this.z*=a;this.w*=a}return this},multiplySelf:function(a){var b=this.x,c=this.y,e=this.z,d=this.w,g=a.x,f=a.y,i=a.z;a=a.w;this.x=b*a+d*g+c*i-e*f;this.y=c*a+d*f+e*g-b*i;this.z=e*a+d*i+b*f-c*g;this.w=d*a-b*g-c*f-e*i;return this},
multiplyVector3:function(a,b){b||(b=a);var c=a.x,e=a.y,d=a.z,g=this.x,f=this.y,i=this.z,h=this.w,j=h*c+f*d-i*e,l=h*e+i*c-g*d,m=h*d+g*e-f*c;c=-g*c-f*e-i*d;b.x=j*h+c*-g+l*-i-m*-f;b.y=l*h+c*-f+m*-g-j*-i;b.z=m*h+c*-i+j*-f-l*-g;return b}};
THREE.Quaternion.slerp=function(a,b,c,e){var d=a.w*b.w+a.x*b.x+a.y*b.y+a.z*b.z;if(Math.abs(d)>=1){c.w=a.w;c.x=a.x;c.y=a.y;c.z=a.z;return c}var g=Math.acos(d),f=Math.sqrt(1-d*d);if(Math.abs(f)<0.001){c.w=0.5*(a.w+b.w);c.x=0.5*(a.x+b.x);c.y=0.5*(a.y+b.y);c.z=0.5*(a.z+b.z);return c}d=Math.sin((1-e)*g)/f;e=Math.sin(e*g)/f;c.w=a.w*d+b.w*e;c.x=a.x*d+b.x*e;c.y=a.y*d+b.y*e;c.z=a.z*d+b.z*e;return c};THREE.Vertex=function(a){this.position=a||new THREE.Vector3};
THREE.Quaternion.slerp=function(a,b,c,e){var d=a.w*b.w+a.x*b.x+a.y*b.y+a.z*b.z;if(Math.abs(d)>=1){c.w=a.w;c.x=a.x;c.y=a.y;c.z=a.z;return c}var g=Math.acos(d),f=Math.sqrt(1-d*d);if(Math.abs(f)<0.0010){c.w=0.5*(a.w+b.w);c.x=0.5*(a.x+b.x);c.y=0.5*(a.y+b.y);c.z=0.5*(a.z+b.z);return c}d=Math.sin((1-e)*g)/f;e=Math.sin(e*g)/f;c.w=a.w*d+b.w*e;c.x=a.x*d+b.x*e;c.y=a.y*d+b.y*e;c.z=a.z*d+b.z*e;return c};THREE.Vertex=function(a){this.position=a||new THREE.Vector3};
THREE.Face3=function(a,b,c,e,d,g){this.a=a;this.b=b;this.c=c;this.normal=e instanceof THREE.Vector3?e:new THREE.Vector3;this.vertexNormals=e instanceof Array?e:[];this.color=d instanceof THREE.Color?d:new THREE.Color;this.vertexColors=d instanceof Array?d:[];this.vertexTangents=[];this.materials=g instanceof Array?g:[g];this.centroid=new THREE.Vector3};
THREE.Face4=function(a,b,c,e,d,g,f){this.a=a;this.b=b;this.c=c;this.d=e;this.normal=d instanceof THREE.Vector3?d:new THREE.Vector3;this.vertexNormals=d instanceof Array?d:[];this.color=g instanceof THREE.Color?g:new THREE.Color;this.vertexColors=g instanceof Array?g:[];this.vertexTangents=[];this.materials=f instanceof Array?f:[f];this.centroid=new THREE.Vector3};THREE.UV=function(a,b){this.set(a||0,b||0)};
THREE.UV.prototype={set:function(a,b){this.u=a;this.v=b;return this},copy:function(a){this.set(a.u,a.v);return this}};THREE.Geometry=function(){this.id="Geometry"+THREE.GeometryIdCounter++;this.vertices=[];this.colors=[];this.faces=[];this.edges=[];this.faceUvs=[[]];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphColors=[];this.skinWeights=[];this.skinIndices=[];this.boundingSphere=this.boundingBox=null;this.hasTangents=!1};
......
......@@ -48,7 +48,7 @@ e,d)}};THREE.Quaternion=function(b,e,d,h){this.set(b||0,e||0,d||0,h!==undefined?
THREE.Quaternion.prototype={set:function(b,e,d,h){this.x=b;this.y=e;this.z=d;this.w=h;return this},setFromEuler:function(b){var e=0.5*Math.PI/360,d=b.x*e,h=b.y*e,g=b.z*e;b=Math.cos(h);h=Math.sin(h);e=Math.cos(-g);g=Math.sin(-g);var k=Math.cos(d);d=Math.sin(d);var i=b*e,p=h*g;this.w=i*k-p*d;this.x=i*d+p*k;this.y=h*e*k+b*g*d;this.z=b*g*k-h*e*d;return this},calculateW:function(){this.w=-Math.sqrt(Math.abs(1-this.x*this.x-this.y*this.y-this.z*this.z));return this},inverse:function(){this.x*=-1;this.y*=
-1;this.z*=-1;return this},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},normalize:function(){var b=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);if(b==0)this.w=this.z=this.y=this.x=0;else{b=1/b;this.x*=b;this.y*=b;this.z*=b;this.w*=b}return this},multiplySelf:function(b){var e=this.x,d=this.y,h=this.z,g=this.w,k=b.x,i=b.y,p=b.z;b=b.w;this.x=e*b+g*k+d*p-h*i;this.y=d*b+g*i+h*k-e*p;this.z=h*b+g*p+e*i-d*k;this.w=g*b-e*k-d*i-h*p;return this},
multiplyVector3:function(b,e){e||(e=b);var d=b.x,h=b.y,g=b.z,k=this.x,i=this.y,p=this.z,q=this.w,u=q*d+i*g-p*h,D=q*h+p*d-k*g,E=q*g+k*h-i*d;d=-k*d-i*h-p*g;e.x=u*q+d*-k+D*-p-E*-i;e.y=D*q+d*-i+E*-k-u*-p;e.z=E*q+d*-p+u*-i-D*-k;return e}};
THREE.Quaternion.slerp=function(b,e,d,h){var g=b.w*e.w+b.x*e.x+b.y*e.y+b.z*e.z;if(Math.abs(g)>=1){d.w=b.w;d.x=b.x;d.y=b.y;d.z=b.z;return d}var k=Math.acos(g),i=Math.sqrt(1-g*g);if(Math.abs(i)<0.001){d.w=0.5*(b.w+e.w);d.x=0.5*(b.x+e.x);d.y=0.5*(b.y+e.y);d.z=0.5*(b.z+e.z);return d}g=Math.sin((1-h)*k)/i;h=Math.sin(h*k)/i;d.w=b.w*g+e.w*h;d.x=b.x*g+e.x*h;d.y=b.y*g+e.y*h;d.z=b.z*g+e.z*h;return d};THREE.Vertex=function(b){this.position=b||new THREE.Vector3};
THREE.Quaternion.slerp=function(b,e,d,h){var g=b.w*e.w+b.x*e.x+b.y*e.y+b.z*e.z;if(Math.abs(g)>=1){d.w=b.w;d.x=b.x;d.y=b.y;d.z=b.z;return d}var k=Math.acos(g),i=Math.sqrt(1-g*g);if(Math.abs(i)<0.0010){d.w=0.5*(b.w+e.w);d.x=0.5*(b.x+e.x);d.y=0.5*(b.y+e.y);d.z=0.5*(b.z+e.z);return d}g=Math.sin((1-h)*k)/i;h=Math.sin(h*k)/i;d.w=b.w*g+e.w*h;d.x=b.x*g+e.x*h;d.y=b.y*g+e.y*h;d.z=b.z*g+e.z*h;return d};THREE.Vertex=function(b){this.position=b||new THREE.Vector3};
THREE.Face3=function(b,e,d,h,g,k){this.a=b;this.b=e;this.c=d;this.normal=h instanceof THREE.Vector3?h:new THREE.Vector3;this.vertexNormals=h instanceof Array?h:[];this.color=g instanceof THREE.Color?g:new THREE.Color;this.vertexColors=g instanceof Array?g:[];this.vertexTangents=[];this.materials=k instanceof Array?k:[k];this.centroid=new THREE.Vector3};
THREE.Face4=function(b,e,d,h,g,k,i){this.a=b;this.b=e;this.c=d;this.d=h;this.normal=g instanceof THREE.Vector3?g:new THREE.Vector3;this.vertexNormals=g instanceof Array?g:[];this.color=k instanceof THREE.Color?k:new THREE.Color;this.vertexColors=k instanceof Array?k:[];this.vertexTangents=[];this.materials=i instanceof Array?i:[i];this.centroid=new THREE.Vector3};THREE.UV=function(b,e){this.set(b||0,e||0)};
THREE.UV.prototype={set:function(b,e){this.u=b;this.v=e;return this},copy:function(b){this.set(b.u,b.v);return this}};THREE.Geometry=function(){this.id="Geometry"+THREE.GeometryIdCounter++;this.vertices=[];this.colors=[];this.faces=[];this.edges=[];this.faceUvs=[[]];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphColors=[];this.skinWeights=[];this.skinIndices=[];this.boundingSphere=this.boundingBox=null;this.hasTangents=!1};
......@@ -216,7 +216,7 @@ o.uvScale.y);c.uniform2f(w.uvOffset,o.uvOffset.x,o.uvOffset.y);c.uniform2f(w.ali
w,x,v,A=new THREE.Vector3,t=za/ya,y=ya*0.5,z=za*0.5,G=16/za,B=[G*t,G],O=[1,1,0],W=[1,1],P=J.uniforms;m=J.attributes;c.useProgram(J.program);ra=J.program;ga="";if(!pb){c.enableVertexAttribArray(J.attributes.vertex);c.enableVertexAttribArray(J.attributes.uv);pb=!0}c.uniform1i(P.occlusionMap,0);c.uniform1i(P.map,1);c.bindBuffer(c.ARRAY_BUFFER,J.vertexBuffer);c.vertexAttribPointer(m.vertex,2,c.FLOAT,!1,16,0);c.vertexAttribPointer(m.uv,2,c.FLOAT,!1,16,8);c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,J.elementBuffer);
c.disable(c.CULL_FACE);c.depthMask(!1);c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_2D,J.occlusionTexture);c.activeTexture(c.TEXTURE1);for(n=0;n<o;n++){m=f.__webglLensFlares[n].object;A.set(m.matrixWorld.n14,m.matrixWorld.n24,m.matrixWorld.n34);s.matrixWorldInverse.multiplyVector3(A);s.projectionMatrix.multiplyVector3(A);O[0]=A.x;O[1]=A.y;O[2]=A.z;W[0]=O[0]*y+y;W[1]=O[1]*z+z;if(J.hasVertexTexture||W[0]>0&&W[0]<ya&&W[1]>0&&W[1]<za){c.bindTexture(c.TEXTURE_2D,J.tempTexture);c.copyTexImage2D(c.TEXTURE_2D,
0,c.RGB,W[0]-8,W[1]-8,16,16,0);c.uniform1i(P.renderType,0);c.uniform2fv(P.scale,B);c.uniform3fv(P.screenPosition,O);c.disable(c.BLEND);c.enable(c.DEPTH_TEST);c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT,0);c.bindTexture(c.TEXTURE_2D,J.occlusionTexture);c.copyTexImage2D(c.TEXTURE_2D,0,c.RGBA,W[0]-8,W[1]-8,16,16,0);c.uniform1i(P.renderType,1);c.disable(c.DEPTH_TEST);c.bindTexture(c.TEXTURE_2D,J.tempTexture);c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT,0);m.positionScreen.x=O[0];m.positionScreen.y=
O[1];m.positionScreen.z=O[2];m.customUpdateCallback?m.customUpdateCallback(m):m.updateLensFlares();c.uniform1i(P.renderType,2);c.enable(c.BLEND);w=0;for(x=m.lensFlares.length;w<x;w++){v=m.lensFlares[w];if(v.opacity>0.001&&v.scale>0.001){O[0]=v.x;O[1]=v.y;O[2]=v.z;G=v.size*v.scale/za;B[0]=G*t;B[1]=G;c.uniform3fv(P.screenPosition,O);c.uniform2fv(P.scale,B);c.uniform1f(P.rotation,v.rotation);c.uniform1f(P.opacity,v.opacity);oa(v.blending);K(v.texture,1);c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT,
O[1];m.positionScreen.z=O[2];m.customUpdateCallback?m.customUpdateCallback(m):m.updateLensFlares();c.uniform1i(P.renderType,2);c.enable(c.BLEND);w=0;for(x=m.lensFlares.length;w<x;w++){v=m.lensFlares[w];if(v.opacity>0.0010&&v.scale>0.0010){O[0]=v.x;O[1]=v.y;O[2]=v.z;G=v.size*v.scale/za;B[0]=G*t;B[1]=G;c.uniform3fv(P.screenPosition,O);c.uniform2fv(P.scale,B);c.uniform1f(P.rotation,v.rotation);c.uniform1f(P.opacity,v.opacity);oa(v.blending);K(v.texture,1);c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT,
0)}}}}c.enable(c.CULL_FACE);c.enable(c.DEPTH_TEST);c.depthMask(ta)}function V(f,s){f._modelViewMatrix.multiplyToArray(s.matrixWorldInverse,f.matrixWorld,f._modelViewMatrixArray);THREE.Matrix4.makeInvert3x3(f._modelViewMatrix).transposeIntoArray(f._normalMatrixArray)}function L(f){var s,m,n,o,w;if(f instanceof THREE.Mesh){m=f.geometry;for(s in m.geometryGroups){n=m.geometryGroups[s];w=!1;for(o in n.__webglCustomAttributes)if(n.__webglCustomAttributes[o].needsUpdate){w=!0;break}if(m.__dirtyVertices||
m.__dirtyMorphTargets||m.__dirtyElements||m.__dirtyUvs||m.__dirtyNormals||m.__dirtyColors||m.__dirtyTangents||w){w=c.DYNAMIC_DRAW;var x=void 0,v=void 0,A=void 0,t=void 0;A=void 0;var y=void 0,z=void 0,G=void 0,B=void 0,O=void 0,W=void 0,P=void 0,X=void 0,Ga=void 0,T=void 0,Q=void 0,U=void 0,ua=void 0;z=void 0;G=void 0;t=void 0;B=void 0;t=void 0;var r=void 0,H=void 0;z=void 0;r=void 0;H=void 0;var j=void 0,Ka=void 0;r=void 0;H=void 0;j=void 0;Ka=void 0;r=void 0;H=void 0;j=void 0;Ka=void 0;r=void 0;
H=void 0;j=void 0;t=void 0;B=void 0;y=void 0;A=void 0;A=void 0;r=void 0;H=void 0;j=void 0;var Va=void 0,va=0,Aa=0,Za=0,$a=0,Ja=0,La=0,ea=0,Ma=0,xa=0,C=0,Ba=0;H=r=0;var Ca=n.__vertexArray,fb=n.__uvArray,gb=n.__uv2Array,Qa=n.__normalArray,ha=n.__tangentArray,Da=n.__colorArray,ia=n.__skinVertexAArray,ja=n.__skinVertexBArray,ka=n.__skinIndexArray,la=n.__skinWeightArray,hb=n.__morphTargetsArrays,Ra=n.__webglCustomAttributes;j=void 0;var Na=n.__faceArray,Oa=n.__lineArray,qb=n.__needsSmoothNormals;W=n.__vertexColorType;
......
......@@ -87,7 +87,7 @@ THREE.SceneUtils = {
callback( n );
SceneUtils.traverseHierarchy( n, callback );
THREE.SceneUtils.traverseHierarchy( n, callback );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册