Browse Source

LottieLoader: Convert to ES6 class

Mr.doob 4 years ago
parent
commit
977cf79c8c
1 changed files with 5 additions and 13 deletions
  1. 5 13
      examples/jsm/loaders/LottieLoader.js

+ 5 - 13
examples/jsm/loaders/LottieLoader.js

@@ -5,23 +5,15 @@ import {
 	NearestFilter
 } from "../../../build/three.module.js";
 
-var LottieLoader = function ( manager ) {
+class LottieLoader extends Loader {
 
-	Loader.call( this, manager );
-
-};
-
-LottieLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
-
-	constructor: LottieLoader,
-
-	setQuality: function ( value ) {
+	setQuality( value ) {
 
 		this._quality = value;
 
-	},
+	}
 
-	load: function ( url, onLoad, onProgress, onError ) {
+	load( url, onLoad, onProgress, onError ) {
 
 		const quality = this._quality || 1;
 
@@ -76,6 +68,6 @@ LottieLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
 
 	}
 
-} );
+}
 
 export { LottieLoader };