|
@@ -14,8 +14,16 @@ LottieLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
|
|
|
|
|
|
constructor: LottieLoader,
|
|
|
|
|
|
+ setQuality: function ( value ) {
|
|
|
+
|
|
|
+ this._quality = value;
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
load: function ( url, onLoad, onProgress, onError ) {
|
|
|
|
|
|
+ const quality = this._quality || 1;
|
|
|
+
|
|
|
const texture = new CanvasTexture();
|
|
|
|
|
|
const loader = new FileLoader( this.manager );
|
|
@@ -40,7 +48,7 @@ LottieLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
|
|
|
loop: true,
|
|
|
autoplay: true,
|
|
|
animationData: data,
|
|
|
- rendererSettings: { dpr: 1 }
|
|
|
+ rendererSettings: { dpr: quality }
|
|
|
} );
|
|
|
|
|
|
texture.animation = animation;
|