Jelajahi Sumber

Examples: Fix lgtm alerts.

Mugen87 4 tahun lalu
induk
melakukan
75427aad01

+ 1 - 1
examples/webgl_animation_skinning_blending.html

@@ -508,7 +508,7 @@
 
 				// Get the time elapsed since the last frame, used for mixer update (if not in single step mode)
 
-				const mixerUpdateDelta = clock.getDelta();
+				let mixerUpdateDelta = clock.getDelta();
 
 				// If in single step mode, make one step and then do nothing (until the user clicks again)
 

+ 3 - 3
examples/webgl_geometry_extrude_shapes2.html

@@ -274,7 +274,7 @@
 
 								// step 2, using x2 as cx'
 
-								const norm = Math.sqrt( ( rx * rx * ry * ry - rx * rx * y1 * y1 - ry * ry * x1 * x1 ) /
+								let norm = Math.sqrt( ( rx * rx * ry * ry - rx * rx * y1 * y1 - ry * ry * x1 * x1 ) /
 									 ( rx * rx * y1 * y1 + ry * ry * x1 * x1 ) );
 
 								if ( laf === sf ) norm = - norm;
@@ -290,7 +290,7 @@
 								const u = new THREE.Vector2( 1, 0 );
 								const v = new THREE.Vector2( ( x1 - x2 ) / rx, ( y1 - y2 ) / ry );
 
-								const startAng = Math.acos( u.dot( v ) / u.length() / v.length() );
+								let startAng = Math.acos( u.dot( v ) / u.length() / v.length() );
 
 								if ( ( ( u.x * v.y ) - ( u.y * v.x ) ) < 0 ) startAng = - startAng;
 
@@ -298,7 +298,7 @@
 								u.x = ( - x1 - x2 ) / rx;
 								u.y = ( - y1 - y2 ) / ry;
 
-								const deltaAng = Math.acos( v.dot( u ) / v.length() / u.length() );
+								let deltaAng = Math.acos( v.dot( u ) / v.length() / u.length() );
 
 								// This normalization ends up making our curves fail to triangulate...