From 977cf79c8cad32d31958cf14ee8ed5aafc6e88c4 Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Thu, 3 Dec 2020 17:10:11 +0000 Subject: [PATCH] LottieLoader: Convert to ES6 class --- examples/jsm/loaders/LottieLoader.js | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/examples/jsm/loaders/LottieLoader.js b/examples/jsm/loaders/LottieLoader.js index 1fd8e3e6600e5..f2c8427ac0904 100644 --- a/examples/jsm/loaders/LottieLoader.js +++ b/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 };