Mugen87 7 年之前
父节点
当前提交
8213851a45
共有 4 个文件被更改,包括 13 次插入13 次删除
  1. 1 1
      examples/js/QuickHull.js
  2. 1 1
      examples/js/loaders/ColladaLoader.js
  3. 9 9
      examples/js/loaders/GLTFLoader.js
  4. 2 2
      src/renderers/WebGLRenderer.js

+ 1 - 1
examples/js/QuickHull.js

@@ -470,7 +470,7 @@
 
 				// 3. The next vertex 'v3' is the one farthest to the plane 'v0', 'v1', 'v2'
 
-				maxDistance = -1;
+				maxDistance = - 1;
 				plane.setFromCoplanarPoints( v0.point, v1.point, v2.point );
 
 				for ( i = 0, l = this.vertices.length; i < l; i ++ ) {

+ 1 - 1
examples/js/loaders/ColladaLoader.js

@@ -1759,7 +1759,7 @@ THREE.ColladaLoader.prototype = {
 			};
 
 			var mesh = getElementsByTagName( xml, 'mesh' )[ 0 ];
-			
+
 			// the following tags inside geometry are not supported yet (see https://github.com/mrdoob/three.js/pull/12606): convex_mesh, spline, brep
 			if ( mesh === undefined ) return;
 

+ 9 - 9
examples/js/loaders/GLTFLoader.js

@@ -800,12 +800,12 @@ THREE.GLTFLoader = ( function () {
 
 					} else {
 
-							// <= r87. Remove when reasonable.
+						// <= r87. Remove when reasonable.
 
-							offset = uvScaleMap.offset;
-							repeat = uvScaleMap.repeat;
+						offset = uvScaleMap.offset;
+						repeat = uvScaleMap.repeat;
 
-							uniforms.offsetRepeat.value.set( offset.x, offset.y, repeat.x, repeat.y );
+						uniforms.offsetRepeat.value.set( offset.x, offset.y, repeat.x, repeat.y );
 
 					}
 
@@ -2067,7 +2067,7 @@ THREE.GLTFLoader = ( function () {
 
 		} else if ( cameraDef.type === 'orthographic' ) {
 
-			camera = new THREE.OrthographicCamera( params.xmag / -2, params.xmag / 2, params.ymag / 2, params.ymag / -2, params.znear, params.zfar );
+			camera = new THREE.OrthographicCamera( params.xmag / - 2, params.xmag / 2, params.ymag / 2, params.ymag / - 2, params.znear, params.zfar );
 
 		}
 
@@ -2242,7 +2242,7 @@ THREE.GLTFLoader = ( function () {
 
 		// Nothing in the node definition indicates whether it is a Bone or an
 		// Object3D. Use the skins' joint references to mark bones.
-		for ( var skinIndex =  0; skinIndex < skins.length; skinIndex ++ ) {
+		for ( var skinIndex = 0; skinIndex < skins.length; skinIndex ++ ) {
 
 			var joints = skins[ skinIndex ].joints;
 
@@ -2259,7 +2259,7 @@ THREE.GLTFLoader = ( function () {
 		// references and rename instances below.
 		//
 		// Example: CesiumMilkTruck sample model reuses "Wheel" meshes.
-		for ( var nodeIndex =  0; nodeIndex < nodes.length; nodeIndex ++ ) {
+		for ( var nodeIndex = 0; nodeIndex < nodes.length; nodeIndex ++ ) {
 
 			var nodeDef = nodes[ nodeIndex ];
 
@@ -2271,7 +2271,7 @@ THREE.GLTFLoader = ( function () {
 
 				}
 
-				meshReferences[ nodeDef.mesh ]++;
+				meshReferences[ nodeDef.mesh ] ++;
 
 			}
 
@@ -2297,7 +2297,7 @@ THREE.GLTFLoader = ( function () {
 
 					if ( meshReferences[ nodeDef.mesh ] > 1 ) {
 
-						mesh.name += '_instance_' + meshUses[ nodeDef.mesh ]++;
+						mesh.name += '_instance_' + meshUses[ nodeDef.mesh ] ++;
 
 					}
 

+ 2 - 2
src/renderers/WebGLRenderer.js

@@ -1026,7 +1026,7 @@ function WebGLRenderer( parameters ) {
 		if ( isAnimating ) return;
 
 		var device = vr.getDevice();
-		
+
 		if ( device && device.isPresenting ) {
 
 			device.requestAnimationFrame( loop );
@@ -1046,7 +1046,7 @@ function WebGLRenderer( parameters ) {
 		if ( onAnimationFrame !== null ) onAnimationFrame( time );
 
 		var device = vr.getDevice();
-		
+
 		if ( device && device.isPresenting ) {
 
 			device.requestAnimationFrame( loop );