Browse Source

Clean up some lgtm warnings

Mugen87 7 years ago
parent
commit
1f3f3417f9

+ 1 - 1
examples/js/exporters/ColladaExporter.js

@@ -492,7 +492,7 @@ THREE.ColladaExporter.prototype = {
 
 			if ( o instanceof THREE.Mesh && o.geometry != null ) {
 
-				var meshid = processGeometry( o.geometry, meshid );
+				var meshid = processGeometry( o.geometry );
 
 				// ids of the materials to bind to the geometry
 				var matids = null;

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

@@ -2083,7 +2083,7 @@ THREE.GLTFLoader = ( function () {
 		var parser = this;
 		var json = this.json;
 		var extensions = this.extensions;
-		var materialDef = this.json.materials[ materialIndex ];
+		var materialDef = json.materials[ materialIndex ];
 
 		var materialType;
 		var materialParams = {};
@@ -2458,7 +2458,7 @@ THREE.GLTFLoader = ( function () {
 		var json = this.json;
 		var extensions = this.extensions;
 
-		var meshDef = this.json.meshes[ meshIndex ];
+		var meshDef = json.meshes[ meshIndex ];
 
 		return this.getMultiDependencies( [
 
@@ -2758,7 +2758,7 @@ THREE.GLTFLoader = ( function () {
 
 		var json = this.json;
 
-		var animationDef = this.json.animations[ animationIndex ];
+		var animationDef = json.animations[ animationIndex ];
 
 		return this.getMultiDependencies( [
 
@@ -2902,10 +2902,10 @@ THREE.GLTFLoader = ( function () {
 		var json = this.json;
 		var extensions = this.extensions;
 
-		var meshReferences = this.json.meshReferences;
-		var meshUses = this.json.meshUses;
+		var meshReferences = json.meshReferences;
+		var meshUses = json.meshUses;
 
-		var nodeDef = this.json.nodes[ nodeIndex ];
+		var nodeDef = json.nodes[ nodeIndex ];
 
 		return this.getMultiDependencies( [
 

+ 0 - 4
examples/webgl_materials_curvature.html

@@ -191,10 +191,6 @@
 								var posB_C = new THREE.Vector3().subVectors( posB, posC );
 								var posC_A = new THREE.Vector3().subVectors( posC, posA );
 
-								var normB_A = new THREE.Vector3().subVectors( normB, normA );
-								var normB_C = new THREE.Vector3().subVectors( normB, normC );
-								var normC_A = new THREE.Vector3().subVectors( normC, normA );
-
 								var b2a = normB.dot( posB_A.normalize() );
 								var b2c = normB.dot( posB_C.normalize() );
 								var c2a = normC.dot( posC_A.normalize() );

+ 1 - 6
examples/webgl_math_orientation_transform.html

@@ -30,7 +30,6 @@
 		</style>
 
 		<script src="../build/three.js"></script>
-		<script src="js/controls/OrbitControls.js"></script>
 		<script src="js/Detector.js"></script>
 
 	</head>
@@ -63,7 +62,7 @@
 
 			scene = new THREE.Scene();
 
-			var geometry = new THREE.ConeBufferGeometry( 0.2, 1, 8 );
+			var geometry = new THREE.ConeBufferGeometry( 0.1, 0.5, 8 );
 			geometry.rotateX( Math.PI * 0.5 );
 			var material = new THREE.MeshNormalMaterial();
 
@@ -97,10 +96,6 @@
 
 			//
 
-			var controls = new THREE.OrbitControls( camera, renderer.domElement );
-
-			//
-
 			generateTarget();
 
 		}

+ 3 - 3
examples/webgl_performance_nodes.html

@@ -22,7 +22,7 @@
 				text-align: center;
 				display:block;
 			}
-			
+
 			.white {
 				color: white;
 			}
@@ -59,7 +59,7 @@
 			<br>
 			<a id="bench" href="javascript:void(0);">Click to benchmark</a>
 		</div>
-		
+
 		<script type="module">
 
 			import './js/nodes/THREE.Nodes.js';
@@ -97,7 +97,7 @@
 
 				meshes = [];
 
-				for ( i = 0; i < 70; i ++ ) {
+				for ( i = 0; i < count; i ++ ) {
 
 					var material = new MaterialClass(),
 						color = 0xFFFFFF * Math.random();