Browse Source

Object.assign()ed loaders.

Mr.doob 9 years ago
parent
commit
db347a39f5

+ 2 - 4
src/loaders/AnimationLoader.js

@@ -8,9 +8,7 @@ THREE.AnimationLoader = function ( manager ) {
 
 };
 
-THREE.AnimationLoader.prototype = {
-
-	constructor: THREE.AnimationLoader,
+Object.assign( THREE.AnimationLoader.prototype, {
 
 	load: function ( url, onLoad, onProgress, onError ) {
 
@@ -41,4 +39,4 @@ THREE.AnimationLoader.prototype = {
 
 	}
 
-};
+} );

+ 2 - 4
src/loaders/AudioLoader.js

@@ -8,9 +8,7 @@ THREE.AudioLoader = function ( manager ) {
 
 };
 
-THREE.AudioLoader.prototype = {
-
-	constructor: THREE.AudioLoader,
+Object.assign( THREE.AudioLoader.prototype, {
 
 	load: function ( url, onLoad, onProgress, onError ) {
 
@@ -30,4 +28,4 @@ THREE.AudioLoader.prototype = {
 
 	}
 
-};
+} );

+ 2 - 4
src/loaders/BinaryTextureLoader.js

@@ -13,9 +13,7 @@ THREE.DataTextureLoader = THREE.BinaryTextureLoader = function ( manager ) {
 
 };
 
-THREE.BinaryTextureLoader.prototype = {
-
-	constructor: THREE.BinaryTextureLoader,
+Object.assign( THREE.BinaryTextureLoader.prototype, {
 
 	load: function ( url, onLoad, onProgress, onError ) {
 
@@ -86,4 +84,4 @@ THREE.BinaryTextureLoader.prototype = {
 
 	}
 
-};
+} );

+ 2 - 4
src/loaders/BufferGeometryLoader.js

@@ -8,9 +8,7 @@ THREE.BufferGeometryLoader = function ( manager ) {
 
 };
 
-THREE.BufferGeometryLoader.prototype = {
-
-	constructor: THREE.BufferGeometryLoader,
+Object.assign( THREE.BufferGeometryLoader.prototype, {
 
 	load: function ( url, onLoad, onProgress, onError ) {
 
@@ -95,4 +93,4 @@ THREE.BufferGeometryLoader.prototype = {
 
 	}
 
-};
+} );

+ 2 - 5
src/loaders/CompressedTextureLoader.js

@@ -13,10 +13,7 @@ THREE.CompressedTextureLoader = function ( manager ) {
 
 };
 
-
-THREE.CompressedTextureLoader.prototype = {
-
-	constructor: THREE.CompressedTextureLoader,
+Object.assign( THREE.CompressedTextureLoader.prototype, {
 
 	load: function ( url, onLoad, onProgress, onError ) {
 
@@ -132,4 +129,4 @@ THREE.CompressedTextureLoader.prototype = {
 
 	}
 
-};
+} );

+ 2 - 4
src/loaders/CubeTextureLoader.js

@@ -8,9 +8,7 @@ THREE.CubeTextureLoader = function ( manager ) {
 
 };
 
-THREE.CubeTextureLoader.prototype = {
-
-	constructor: THREE.CubeTextureLoader,
+Object.assign( THREE.CubeTextureLoader.prototype, {
 
 	load: function ( urls, onLoad, onProgress, onError ) {
 
@@ -64,4 +62,4 @@ THREE.CubeTextureLoader.prototype = {
 
 	}
 
-};
+} );

+ 2 - 4
src/loaders/FontLoader.js

@@ -8,9 +8,7 @@ THREE.FontLoader = function ( manager ) {
 
 };
 
-THREE.FontLoader.prototype = {
-
-	constructor: THREE.FontLoader,
+Object.assign( THREE.FontLoader.prototype, {
 
 	load: function ( url, onLoad, onProgress, onError ) {
 
@@ -46,4 +44,4 @@ THREE.FontLoader.prototype = {
 
 	}
 
-};
+} );

+ 2 - 4
src/loaders/ImageLoader.js

@@ -8,9 +8,7 @@ THREE.ImageLoader = function ( manager ) {
 
 };
 
-THREE.ImageLoader.prototype = {
-
-	constructor: THREE.ImageLoader,
+Object.assign( THREE.ImageLoader.prototype, {
 
 	load: function ( url, onLoad, onProgress, onError ) {
 
@@ -48,4 +46,4 @@ THREE.ImageLoader.prototype = {
 
 	}
 
-};
+} );

+ 2 - 4
src/loaders/JSONLoader.js

@@ -18,9 +18,7 @@ THREE.JSONLoader = function ( manager ) {
 
 };
 
-THREE.JSONLoader.prototype = {
-
-	constructor: THREE.JSONLoader,
+Object.assign( THREE.JSONLoader.prototype, {
 
 	// Deprecated
 
@@ -552,4 +550,4 @@ THREE.JSONLoader.prototype = {
 
 	}
 
-};
+} );

+ 2 - 4
src/loaders/MaterialLoader.js

@@ -9,9 +9,7 @@ THREE.MaterialLoader = function ( manager ) {
 
 };
 
-THREE.MaterialLoader.prototype = {
-
-	constructor: THREE.MaterialLoader,
+Object.assign( THREE.MaterialLoader.prototype, {
 
 	load: function ( url, onLoad, onProgress, onError ) {
 
@@ -152,4 +150,4 @@ THREE.MaterialLoader.prototype = {
 
 	}
 
-};
+} );

+ 2 - 4
src/loaders/ObjectLoader.js

@@ -9,9 +9,7 @@ THREE.ObjectLoader = function ( manager ) {
 
 };
 
-THREE.ObjectLoader.prototype = {
-
-	constructor: THREE.ObjectLoader,
+Object.assign( THREE.ObjectLoader.prototype, {
 
 	load: function ( url, onLoad, onProgress, onError ) {
 
@@ -614,4 +612,4 @@ THREE.ObjectLoader.prototype = {
 
 	}()
 
-};
+} );

+ 2 - 4
src/loaders/TextureLoader.js

@@ -8,9 +8,7 @@ THREE.TextureLoader = function ( manager ) {
 
 };
 
-THREE.TextureLoader.prototype = {
-
-	constructor: THREE.TextureLoader,
+Object.assign( THREE.TextureLoader.prototype, {
 
 	load: function ( url, onLoad, onProgress, onError ) {
 
@@ -48,4 +46,4 @@ THREE.TextureLoader.prototype = {
 
 	}
 
-};
+} );

+ 2 - 4
src/loaders/XHRLoader.js

@@ -8,9 +8,7 @@ THREE.XHRLoader = function ( manager ) {
 
 };
 
-THREE.XHRLoader.prototype = {
-
-	constructor: THREE.XHRLoader,
+Object.assign( THREE.XHRLoader.prototype, {
 
 	load: function ( url, onLoad, onProgress, onError ) {
 
@@ -120,4 +118,4 @@ THREE.XHRLoader.prototype = {
 
 	}
 
-};
+} );