Selaa lähdekoodia

Loaders: Clean up. (#23411)

Michael Herzog 3 vuotta sitten
vanhempi
commit
e9d7faa24c

+ 3 - 3
examples/jsm/loaders/ColladaLoader.js

@@ -1470,11 +1470,11 @@ class ColladaLoader extends Loader {
 
 		function parseEffectExtraTechniqueBump( xml ) {
 
-			var data = {};
+			const data = {};
 
-			for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {
+			for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) {
 
-				var child = xml.childNodes[ i ];
+				const child = xml.childNodes[ i ];
 
 				if ( child.nodeType !== 1 ) continue;
 

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 214 - 211
examples/jsm/loaders/EXRLoader.js


+ 4 - 4
examples/jsm/loaders/lwo/LWO2Parser.js

@@ -13,8 +13,8 @@ LWO2Parser.prototype = {
 		this.IFF.debugger.offset = this.IFF.reader.offset;
 		this.IFF.debugger.closeForms();
 
-		var blockID = this.IFF.reader.getIDTag();
-		var length = this.IFF.reader.getUint32(); // size of data in bytes
+		const blockID = this.IFF.reader.getIDTag();
+		let length = this.IFF.reader.getUint32(); // size of data in bytes
 		if ( length > this.IFF.reader.dv.byteLength - this.IFF.reader.offset ) {
 
 			this.IFF.reader.offset -= 4;
@@ -235,7 +235,7 @@ LWO2Parser.prototype = {
 				break;
 
 			case 'IMAG':
-				var index = this.IFF.reader.getVariableLengthIndex();
+				const index = this.IFF.reader.getVariableLengthIndex();
 				this.IFF.currentForm.imageIndex = index;
 				break;
 
@@ -303,7 +303,7 @@ LWO2Parser.prototype = {
 
 			// LWO2 Spec chunks: these are needed since the SURF FORMs are often in LWO2 format
 			case 'SMAN':
-				var maxSmoothingAngle = this.IFF.reader.getFloat32();
+				const maxSmoothingAngle = this.IFF.reader.getFloat32();
 				this.IFF.currentSurface.attributes.smooth = ( maxSmoothingAngle < 0 ) ? false : true;
 				break;
 

+ 4 - 4
examples/jsm/loaders/lwo/LWO3Parser.js

@@ -13,8 +13,8 @@ LWO3Parser.prototype = {
 		this.IFF.debugger.offset = this.IFF.reader.offset;
 		this.IFF.debugger.closeForms();
 
-		var blockID = this.IFF.reader.getIDTag();
-		var length = this.IFF.reader.getUint32(); // size of data in bytes
+		const blockID = this.IFF.reader.getIDTag();
+		const length = this.IFF.reader.getUint32(); // size of data in bytes
 
 		this.IFF.debugger.dataOffset = this.IFF.reader.offset;
 		this.IFF.debugger.length = length;
@@ -204,7 +204,7 @@ LWO3Parser.prototype = {
 				break;
 
 			case 'IMAG':
-				var index = this.IFF.reader.getVariableLengthIndex();
+				const index = this.IFF.reader.getVariableLengthIndex();
 				this.IFF.currentForm.imageIndex = index;
 				break;
 
@@ -272,7 +272,7 @@ LWO3Parser.prototype = {
 
 			// LWO2 Spec chunks: these are needed since the SURF FORMs are often in LWO2 format
 			case 'SMAN':
-				var maxSmoothingAngle = this.IFF.reader.getFloat32();
+				const maxSmoothingAngle = this.IFF.reader.getFloat32();
 				this.IFF.currentSurface.attributes.smooth = ( maxSmoothingAngle < 0 ) ? false : true;
 				break;
 

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä