Mr.doob 8 年之前
父節點
當前提交
1c3609773d
共有 5 個文件被更改,包括 12 次插入18 次删除
  1. 2 5
      build/three.js
  2. 6 6
      build/three.min.js
  3. 2 5
      build/three.module.js
  4. 1 1
      package.json
  5. 1 1
      src/constants.js

+ 2 - 5
build/three.js

@@ -187,7 +187,7 @@
 
 	} );
 
-	var REVISION = '87dev';
+	var REVISION = '87';
 	var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 };
 	var CullFaceNone = 0;
 	var CullFaceBack = 1;
@@ -22682,10 +22682,6 @@
 
 					}
 
-				} else if ( material.isMeshNormalMaterial ) {
-
-					refreshUniformsCommon( m_uniforms, material );
-
 				} else if ( material.isMeshDepthMaterial ) {
 
 					refreshUniformsCommon( m_uniforms, material );
@@ -22698,6 +22694,7 @@
 
 				} else if ( material.isMeshNormalMaterial ) {
 
+					refreshUniformsCommon( m_uniforms, material );
 					refreshUniformsNormal( m_uniforms, material );
 
 				} else if ( material.isLineBasicMaterial ) {

+ 6 - 6
build/three.min.js

@@ -163,13 +163,13 @@ Z.useProgram(l.program)&&(h=g=f=!0);c.id!==T&&(T=c.id,g=!0);if(f||a!==P){k.setVa
 c.isShaderMaterial||c.skinning)&&k.setValue(E,"viewMatrix",a.matrixWorldInverse)}if(c.skinning&&(k.setOptional(E,d,"bindMatrix"),k.setOptional(E,d,"bindMatrixInverse"),a=d.skeleton))if(f=a.bones,ea.floatVertexTextures){if(void 0===a.boneTexture){var f=Math.sqrt(4*f.length),f=R.nextPowerOfTwo(Math.ceil(f)),f=Math.max(f,4),t=new Float32Array(f*f*4);t.set(a.boneMatrices);var v=new bb(t,f,f,1023,1015);a.boneMatrices=t;a.boneTexture=v;a.boneTextureSize=f}k.setValue(E,"boneTexture",a.boneTexture);k.setValue(E,
 "boneTextureSize",a.boneTextureSize)}else k.setOptional(E,a,"boneMatrices");g&&(k.setValue(E,"toneMappingExposure",J.toneMappingExposure),k.setValue(E,"toneMappingWhitePoint",J.toneMappingWhitePoint),c.lights&&(g=h,q.ambientLightColor.needsUpdate=g,q.directionalLights.needsUpdate=g,q.pointLights.needsUpdate=g,q.spotLights.needsUpdate=g,q.rectAreaLights.needsUpdate=g,q.hemisphereLights.needsUpdate=g),b&&c.fog&&(q.fogColor.value=b.color,b.isFog?(q.fogNear.value=b.near,q.fogFar.value=b.far):b.isFogExp2&&
 (q.fogDensity.value=b.density)),c.isMeshBasicMaterial?r(q,c):c.isMeshLambertMaterial?(r(q,c),c.emissiveMap&&(q.emissiveMap.value=c.emissiveMap)):c.isMeshPhongMaterial?(r(q,c),c.isMeshToonMaterial?(m(q,c),c.gradientMap&&(q.gradientMap.value=c.gradientMap)):m(q,c)):c.isMeshStandardMaterial?(r(q,c),c.isMeshPhysicalMaterial&&(q.clearCoat.value=c.clearCoat,q.clearCoatRoughness.value=c.clearCoatRoughness),q.roughness.value=c.roughness,q.metalness.value=c.metalness,c.roughnessMap&&(q.roughnessMap.value=
-c.roughnessMap),c.metalnessMap&&(q.metalnessMap.value=c.metalnessMap),c.emissiveMap&&(q.emissiveMap.value=c.emissiveMap),c.bumpMap&&(q.bumpMap.value=c.bumpMap,q.bumpScale.value=c.bumpScale),c.normalMap&&(q.normalMap.value=c.normalMap,q.normalScale.value.copy(c.normalScale)),c.displacementMap&&(q.displacementMap.value=c.displacementMap,q.displacementScale.value=c.displacementScale,q.displacementBias.value=c.displacementBias),c.envMap&&(q.envMapIntensity.value=c.envMapIntensity)):c.isMeshNormalMaterial?
-r(q,c):c.isMeshDepthMaterial?(r(q,c),c.displacementMap&&(q.displacementMap.value=c.displacementMap,q.displacementScale.value=c.displacementScale,q.displacementBias.value=c.displacementBias)):c.isMeshDistanceMaterial?(r(q,c),c.displacementMap&&(q.displacementMap.value=c.displacementMap,q.displacementScale.value=c.displacementScale,q.displacementBias.value=c.displacementBias),q.referencePosition.value.copy(c.referencePosition),q.nearDistance.value=c.nearDistance,q.farDistance.value=c.farDistance):c.isMeshNormalMaterial?
-(c.bumpMap&&(q.bumpMap.value=c.bumpMap,q.bumpScale.value=c.bumpScale),c.normalMap&&(q.normalMap.value=c.normalMap,q.normalScale.value.copy(c.normalScale)),c.displacementMap&&(q.displacementMap.value=c.displacementMap,q.displacementScale.value=c.displacementScale,q.displacementBias.value=c.displacementBias)):c.isLineBasicMaterial?(q.diffuse.value=c.color,q.opacity.value=c.opacity,c.isLineDashedMaterial&&(q.dashSize.value=c.dashSize,q.totalSize.value=c.dashSize+c.gapSize,q.scale.value=c.scale)):c.isPointsMaterial?
+c.roughnessMap),c.metalnessMap&&(q.metalnessMap.value=c.metalnessMap),c.emissiveMap&&(q.emissiveMap.value=c.emissiveMap),c.bumpMap&&(q.bumpMap.value=c.bumpMap,q.bumpScale.value=c.bumpScale),c.normalMap&&(q.normalMap.value=c.normalMap,q.normalScale.value.copy(c.normalScale)),c.displacementMap&&(q.displacementMap.value=c.displacementMap,q.displacementScale.value=c.displacementScale,q.displacementBias.value=c.displacementBias),c.envMap&&(q.envMapIntensity.value=c.envMapIntensity)):c.isMeshDepthMaterial?
+(r(q,c),c.displacementMap&&(q.displacementMap.value=c.displacementMap,q.displacementScale.value=c.displacementScale,q.displacementBias.value=c.displacementBias)):c.isMeshDistanceMaterial?(r(q,c),c.displacementMap&&(q.displacementMap.value=c.displacementMap,q.displacementScale.value=c.displacementScale,q.displacementBias.value=c.displacementBias),q.referencePosition.value.copy(c.referencePosition),q.nearDistance.value=c.nearDistance,q.farDistance.value=c.farDistance):c.isMeshNormalMaterial?(r(q,c),
+c.bumpMap&&(q.bumpMap.value=c.bumpMap,q.bumpScale.value=c.bumpScale),c.normalMap&&(q.normalMap.value=c.normalMap,q.normalScale.value.copy(c.normalScale)),c.displacementMap&&(q.displacementMap.value=c.displacementMap,q.displacementScale.value=c.displacementScale,q.displacementBias.value=c.displacementBias)):c.isLineBasicMaterial?(q.diffuse.value=c.color,q.opacity.value=c.opacity,c.isLineDashedMaterial&&(q.dashSize.value=c.dashSize,q.totalSize.value=c.dashSize+c.gapSize,q.scale.value=c.scale)):c.isPointsMaterial?
 (q.diffuse.value=c.color,q.opacity.value=c.opacity,q.size.value=c.size*N,q.scale.value=.5*ca,q.map.value=c.map,null!==c.map&&(b=c.map.offset,c=c.map.repeat,q.offsetRepeat.value.set(b.x,b.y,c.x,c.y))):c.isShadowMaterial&&(q.color.value=c.color,q.opacity.value=c.opacity),void 0!==q.ltcMat&&(q.ltcMat.value=L.LTC_MAT_TEXTURE),void 0!==q.ltcMag&&(q.ltcMag.value=L.LTC_MAG_TEXTURE),cb.upload(E,e.uniformsList,q,J));k.setValue(E,"modelViewMatrix",d.modelViewMatrix);k.setValue(E,"normalMatrix",d.normalMatrix);
 k.setValue(E,"modelMatrix",d.matrixWorld);return l}function r(a,b){a.opacity.value=b.opacity;b.color&&(a.diffuse.value=b.color);b.emissive&&a.emissive.value.copy(b.emissive).multiplyScalar(b.emissiveIntensity);b.map&&(a.map.value=b.map);b.alphaMap&&(a.alphaMap.value=b.alphaMap);b.specularMap&&(a.specularMap.value=b.specularMap);b.envMap&&(a.envMap.value=b.envMap,a.flipEnvMap.value=b.envMap&&b.envMap.isCubeTexture?-1:1,a.reflectivity.value=b.reflectivity,a.refractionRatio.value=b.refractionRatio);
 b.lightMap&&(a.lightMap.value=b.lightMap,a.lightMapIntensity.value=b.lightMapIntensity);b.aoMap&&(a.aoMap.value=b.aoMap,a.aoMapIntensity.value=b.aoMapIntensity);if(b.map)var c=b.map;else b.specularMap?c=b.specularMap:b.displacementMap?c=b.displacementMap:b.normalMap?c=b.normalMap:b.bumpMap?c=b.bumpMap:b.roughnessMap?c=b.roughnessMap:b.metalnessMap?c=b.metalnessMap:b.alphaMap?c=b.alphaMap:b.emissiveMap&&(c=b.emissiveMap);void 0!==c&&(c.isWebGLRenderTarget&&(c=c.texture),b=c.offset,c=c.repeat,a.offsetRepeat.value.set(b.x,
-b.y,c.x,c.y))}function m(a,b){a.specular.value=b.specular;a.shininess.value=Math.max(b.shininess,1E-4);b.emissiveMap&&(a.emissiveMap.value=b.emissiveMap);b.bumpMap&&(a.bumpMap.value=b.bumpMap,a.bumpScale.value=b.bumpScale);b.normalMap&&(a.normalMap.value=b.normalMap,a.normalScale.value.copy(b.normalScale));b.displacementMap&&(a.displacementMap.value=b.displacementMap,a.displacementScale.value=b.displacementScale,a.displacementBias.value=b.displacementBias)}console.log("THREE.WebGLRenderer","87dev");
+b.y,c.x,c.y))}function m(a,b){a.specular.value=b.specular;a.shininess.value=Math.max(b.shininess,1E-4);b.emissiveMap&&(a.emissiveMap.value=b.emissiveMap);b.bumpMap&&(a.bumpMap.value=b.bumpMap,a.bumpScale.value=b.bumpScale);b.normalMap&&(a.normalMap.value=b.normalMap,a.normalScale.value.copy(b.normalScale));b.displacementMap&&(a.displacementMap.value=b.displacementMap,a.displacementScale.value=b.displacementScale,a.displacementBias.value=b.displacementBias)}console.log("THREE.WebGLRenderer","87");
 a=a||{};var u=void 0!==a.canvas?a.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),x=void 0!==a.context?a.context:null,y=void 0!==a.alpha?a.alpha:!1,A=void 0!==a.depth?a.depth:!0,I=void 0!==a.stencil?a.stencil:!0,B=void 0!==a.antialias?a.antialias:!1,H=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,va=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,w=[],z=[],ba=null,D=[],C=[];this.domElement=u;this.context=null;this.sortObjects=this.autoClearStencil=this.autoClearDepth=
 this.autoClearColor=this.autoClear=!0;this.clippingPlanes=[];this.localClippingEnabled=!1;this.gammaFactor=2;this.physicallyCorrectLights=this.gammaOutput=this.gammaInput=!1;this.toneMappingWhitePoint=this.toneMappingExposure=this.toneMapping=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var J=this,Q=!1,ga=null,M=null,T=-1,K="",P=null,Y=null,V=new S,W=new S,X=null,G=0,U=u.width,ca=u.height,N=1,aa=new S(0,0,U,ca),ia=new S(0,0,U,ca),ha=!1,Vd=new kd,Ga=new pg,ja=!1,Wd=!1,ld=new O,Gb=new n,Xd={geometries:0,
 textures:0},Sa={frame:0,calls:0,vertices:0,faces:0,points:0};this.info={render:Sa,memory:Xd,programs:null};try{y={alpha:y,depth:A,stencil:I,antialias:B,premultipliedAlpha:H,preserveDrawingBuffer:va};var E=x||u.getContext("webgl",y)||u.getContext("experimental-webgl",y);if(null===E){if(null!==u.getContext("webgl"))throw"Error creating WebGL context with your selected attributes.";throw"Error creating WebGL context.";}void 0===E.getShaderPrecisionFormat&&(E.getShaderPrecisionFormat=function(){return{rangeMin:1,
@@ -862,8 +862,8 @@ zb;m.AxisHelper=Ld;m.CatmullRomCurve3=Ja;m.CubicBezierCurve3=ed;m.QuadraticBezie
 attach:function(a,b,c){a.applyMatrix((new O).getInverse(c.matrixWorld));b.remove(a);c.add(a)}};m.WebGLUtils=Qe;m.WireframeGeometry=Lb;m.ParametricGeometry=Cc;m.ParametricBufferGeometry=Mb;m.TetrahedronGeometry=Ec;m.TetrahedronBufferGeometry=Nb;m.OctahedronGeometry=Fc;m.OctahedronBufferGeometry=jb;m.IcosahedronGeometry=Gc;m.IcosahedronBufferGeometry=Ob;m.DodecahedronGeometry=Hc;m.DodecahedronBufferGeometry=Pb;m.PolyhedronGeometry=Dc;m.PolyhedronBufferGeometry=ua;m.TubeGeometry=Ic;m.TubeBufferGeometry=
 Qb;m.TorusKnotGeometry=Jc;m.TorusKnotBufferGeometry=Rb;m.TorusGeometry=Kc;m.TorusBufferGeometry=Sb;m.TextGeometry=Lc;m.TextBufferGeometry=Tb;m.SphereGeometry=Mc;m.SphereBufferGeometry=kb;m.RingGeometry=Nc;m.RingBufferGeometry=Ub;m.PlaneGeometry=vc;m.PlaneBufferGeometry=gb;m.LatheGeometry=Oc;m.LatheBufferGeometry=Vb;m.ShapeGeometry=Wb;m.ShapeBufferGeometry=Xb;m.ExtrudeGeometry=$a;m.ExtrudeBufferGeometry=Ea;m.EdgesGeometry=Yb;m.ConeGeometry=Pc;m.ConeBufferGeometry=Qc;m.CylinderGeometry=lb;m.CylinderBufferGeometry=
 Ta;m.CircleGeometry=Rc;m.CircleBufferGeometry=Zb;m.BoxGeometry=Eb;m.BoxBufferGeometry=fb;m.ShadowMaterial=$b;m.SpriteMaterial=Za;m.RawShaderMaterial=ac;m.ShaderMaterial=ya;m.PointsMaterial=ma;m.MeshPhysicalMaterial=mb;m.MeshStandardMaterial=Na;m.MeshPhongMaterial=Ha;m.MeshToonMaterial=nb;m.MeshNormalMaterial=ob;m.MeshLambertMaterial=pb;m.MeshDepthMaterial=Wa;m.MeshDistanceMaterial=Xa;m.MeshBasicMaterial=sa;m.LineDashedMaterial=qb;m.LineBasicMaterial=W;m.Material=P;m.Float64BufferAttribute=uc;m.Float32BufferAttribute=
-z;m.Uint32BufferAttribute=eb;m.Int32BufferAttribute=tc;m.Uint16BufferAttribute=db;m.Int16BufferAttribute=sc;m.Uint8ClampedBufferAttribute=rc;m.Uint8BufferAttribute=qc;m.Int8BufferAttribute=pc;m.BufferAttribute=K;m.REVISION="87dev";m.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2};m.CullFaceNone=0;m.CullFaceBack=1;m.CullFaceFront=2;m.CullFaceFrontBack=3;m.FrontFaceDirectionCW=0;m.FrontFaceDirectionCCW=1;m.BasicShadowMap=0;m.PCFShadowMap=1;m.PCFSoftShadowMap=2;m.FrontSide=0;m.BackSide=1;m.DoubleSide=2;m.FlatShading=
-1;m.SmoothShading=2;m.NoColors=0;m.FaceColors=1;m.VertexColors=2;m.NoBlending=0;m.NormalBlending=1;m.AdditiveBlending=2;m.SubtractiveBlending=3;m.MultiplyBlending=4;m.CustomBlending=5;m.AddEquation=100;m.SubtractEquation=101;m.ReverseSubtractEquation=102;m.MinEquation=103;m.MaxEquation=104;m.ZeroFactor=200;m.OneFactor=201;m.SrcColorFactor=202;m.OneMinusSrcColorFactor=203;m.SrcAlphaFactor=204;m.OneMinusSrcAlphaFactor=205;m.DstAlphaFactor=206;m.OneMinusDstAlphaFactor=207;m.DstColorFactor=208;m.OneMinusDstColorFactor=
+z;m.Uint32BufferAttribute=eb;m.Int32BufferAttribute=tc;m.Uint16BufferAttribute=db;m.Int16BufferAttribute=sc;m.Uint8ClampedBufferAttribute=rc;m.Uint8BufferAttribute=qc;m.Int8BufferAttribute=pc;m.BufferAttribute=K;m.REVISION="87";m.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2};m.CullFaceNone=0;m.CullFaceBack=1;m.CullFaceFront=2;m.CullFaceFrontBack=3;m.FrontFaceDirectionCW=0;m.FrontFaceDirectionCCW=1;m.BasicShadowMap=0;m.PCFShadowMap=1;m.PCFSoftShadowMap=2;m.FrontSide=0;m.BackSide=1;m.DoubleSide=2;m.FlatShading=1;
+m.SmoothShading=2;m.NoColors=0;m.FaceColors=1;m.VertexColors=2;m.NoBlending=0;m.NormalBlending=1;m.AdditiveBlending=2;m.SubtractiveBlending=3;m.MultiplyBlending=4;m.CustomBlending=5;m.AddEquation=100;m.SubtractEquation=101;m.ReverseSubtractEquation=102;m.MinEquation=103;m.MaxEquation=104;m.ZeroFactor=200;m.OneFactor=201;m.SrcColorFactor=202;m.OneMinusSrcColorFactor=203;m.SrcAlphaFactor=204;m.OneMinusSrcAlphaFactor=205;m.DstAlphaFactor=206;m.OneMinusDstAlphaFactor=207;m.DstColorFactor=208;m.OneMinusDstColorFactor=
 209;m.SrcAlphaSaturateFactor=210;m.NeverDepth=0;m.AlwaysDepth=1;m.LessDepth=2;m.LessEqualDepth=3;m.EqualDepth=4;m.GreaterEqualDepth=5;m.GreaterDepth=6;m.NotEqualDepth=7;m.MultiplyOperation=0;m.MixOperation=1;m.AddOperation=2;m.NoToneMapping=0;m.LinearToneMapping=1;m.ReinhardToneMapping=2;m.Uncharted2ToneMapping=3;m.CineonToneMapping=4;m.UVMapping=300;m.CubeReflectionMapping=301;m.CubeRefractionMapping=302;m.EquirectangularReflectionMapping=303;m.EquirectangularRefractionMapping=304;m.SphericalReflectionMapping=
 305;m.CubeUVReflectionMapping=306;m.CubeUVRefractionMapping=307;m.RepeatWrapping=1E3;m.ClampToEdgeWrapping=1001;m.MirroredRepeatWrapping=1002;m.NearestFilter=1003;m.NearestMipMapNearestFilter=1004;m.NearestMipMapLinearFilter=1005;m.LinearFilter=1006;m.LinearMipMapNearestFilter=1007;m.LinearMipMapLinearFilter=1008;m.UnsignedByteType=1009;m.ByteType=1010;m.ShortType=1011;m.UnsignedShortType=1012;m.IntType=1013;m.UnsignedIntType=1014;m.FloatType=1015;m.HalfFloatType=1016;m.UnsignedShort4444Type=1017;
 m.UnsignedShort5551Type=1018;m.UnsignedShort565Type=1019;m.UnsignedInt248Type=1020;m.AlphaFormat=1021;m.RGBFormat=1022;m.RGBAFormat=1023;m.LuminanceFormat=1024;m.LuminanceAlphaFormat=1025;m.RGBEFormat=1023;m.DepthFormat=1026;m.DepthStencilFormat=1027;m.RGB_S3TC_DXT1_Format=2001;m.RGBA_S3TC_DXT1_Format=2002;m.RGBA_S3TC_DXT3_Format=2003;m.RGBA_S3TC_DXT5_Format=2004;m.RGB_PVRTC_4BPPV1_Format=2100;m.RGB_PVRTC_2BPPV1_Format=2101;m.RGBA_PVRTC_4BPPV1_Format=2102;m.RGBA_PVRTC_2BPPV1_Format=2103;m.RGB_ETC1_Format=

+ 2 - 5
build/three.module.js

@@ -181,7 +181,7 @@ Object.assign( EventDispatcher.prototype, {
 
 } );
 
-var REVISION = '87dev';
+var REVISION = '87';
 var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 };
 var CullFaceNone = 0;
 var CullFaceBack = 1;
@@ -22676,10 +22676,6 @@ function WebGLRenderer( parameters ) {
 
 				}
 
-			} else if ( material.isMeshNormalMaterial ) {
-
-				refreshUniformsCommon( m_uniforms, material );
-
 			} else if ( material.isMeshDepthMaterial ) {
 
 				refreshUniformsCommon( m_uniforms, material );
@@ -22692,6 +22688,7 @@ function WebGLRenderer( parameters ) {
 
 			} else if ( material.isMeshNormalMaterial ) {
 
+				refreshUniformsCommon( m_uniforms, material );
 				refreshUniformsNormal( m_uniforms, material );
 
 			} else if ( material.isLineBasicMaterial ) {

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "three",
-  "version": "0.86.0",
+  "version": "0.87.0",
   "description": "JavaScript 3D library",
   "main": "build/three.js",
   "repository": "mrdoob/three.js",

+ 1 - 1
src/constants.js

@@ -1,4 +1,4 @@
-export var REVISION = '87dev';
+export var REVISION = '87';
 export var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 };
 export var CullFaceNone = 0;
 export var CullFaceBack = 1;