pixijs / gif

Plugin to support playback of animated GIF images in PixiJS.
https://pixijs.io/gif/docs/
MIT License
41 stars 5 forks source link

TypeError: Cannot read properties of undefined (reading 'end') #14

Closed neridonk closed 1 year ago

neridonk commented 1 year ago

Version

    "pixi.js": "^6.2.0",
    "@pixi/gif" :"1.1.3"

I used the old docu


Install the loader for handle GIF images.

import { AnimatedGIFLoader } from '@pixi/gif';
import { Loader } from '@pixi/loaders';
Loader.registerPlugin(AnimatedGIFLoader);

function loadAsset(){
  const app = new Application();
  fetch('image.gif')
      .then(res => res.arrayBuffer())
      .then(AnimatedGIF.fromBuffer)
      .then(image => app.stage.addChild(image));
}

What does this message indicate?

neridonk commented 1 year ago

Hm ok no errors on that , but the path .animation is empty

              const loader = new PIXI.Loader();
                loader.add('gifi', assetPath);
                loader.load((loader, resources) => {
                    console.log(resources.gifi,  resources.gifi.animation);
                });
neridonk commented 1 year ago

nvm was no animated gif sry