浏览代码

LottieLoader: Convert to ES6 class

Mr.doob 4 年之前
父节点
当前提交
977cf79c8c
共有 1 个文件被更改,包括 5 次插入13 次删除
  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 };