Skip to content

Commit 977cf79

Browse files
committed
LottieLoader: Convert to ES6 class
1 parent c642d2e commit 977cf79

1 file changed

Lines changed: 5 additions & 13 deletions

File tree

examples/jsm/loaders/LottieLoader.js

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,15 @@ import {
55
NearestFilter
66
} from "../../../build/three.module.js";
77

8-
var LottieLoader = function ( manager ) {
8+
class LottieLoader extends Loader {
99

10-
Loader.call( this, manager );
11-
12-
};
13-
14-
LottieLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
15-
16-
constructor: LottieLoader,
17-
18-
setQuality: function ( value ) {
10+
setQuality( value ) {
1911

2012
this._quality = value;
2113

22-
},
14+
}
2315

24-
load: function ( url, onLoad, onProgress, onError ) {
16+
load( url, onLoad, onProgress, onError ) {
2517

2618
const quality = this._quality || 1;
2719

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

7769
}
7870

79-
} );
71+
}
8072

8173
export { LottieLoader };

0 commit comments

Comments
 (0)