Skip to content

Commit

Permalink
LottieLoader: Convert to ES6 class
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Dec 3, 2020
1 parent c642d2e commit 977cf79
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions examples/jsm/loaders/LottieLoader.js
Expand Up @@ -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;

Expand Down Expand Up @@ -76,6 +68,6 @@ LottieLoader.prototype = Object.assign( Object.create( Loader.prototype ), {

}

} );
}

export { LottieLoader };

0 comments on commit 977cf79

Please sign in to comment.