From 91eb9e53ffc2aa99a244ae9a692428d842f4fce0 Mon Sep 17 00:00:00 2001 From: Matt Karl Date: Fri, 16 Feb 2024 08:10:21 -0500 Subject: [PATCH] Fix rendering hook --- .eslintrc.json | 3 +++ src/AnimatedGIF.ts | 15 ++------------- 2 files changed, 5 insertions(+), 13 deletions(-) create mode 100644 .eslintrc.json diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..8400ea2 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "@pixi/eslint-config" +} \ No newline at end of file diff --git a/src/AnimatedGIF.ts b/src/AnimatedGIF.ts index 3df42e3..9b52101 100644 --- a/src/AnimatedGIF.ts +++ b/src/AnimatedGIF.ts @@ -294,6 +294,8 @@ class AnimatedGIF extends Sprite { this.play(); } + + this.onRender = () => this.updateFrame(); } /** Stops the animation. */ @@ -419,19 +421,6 @@ class AnimatedGIF extends Sprite this.dirty = false; } - /** - * Renders the object using the WebGL renderer - * - * @param {PIXI.Renderer} renderer - The renderer - * @private - */ - // _render(renderer: Renderer): void - // { - // this.updateFrame(); - - // super._render(renderer); - // } - /** * Whether to use PIXI.Ticker.shared to auto update animation time. * @default true