pixijs / gif

Plugin to support playback of animated GIF images in PixiJS.

Home Page:https://pixijs.io/gif/docs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Frame index out of the range

AgustinLaValla opened this issue · comments

First of all, thanks for the plugin. really help me in my current project.
I'm having this issue when following the steps shown in the documentation:
image

I cannot figure out what's going on.
Here is an example of the code: https://codesandbox.io/s/pjijs-gif-frnug

I've found the issue. It is in the static fromBuffer method. There is an iteration over the gifFrames, in which the frame delay is being used to make a time calculation. But in same cases, the delay value is undefined so the that the result is 'NaN'. Since I need this working asap for my project I copied the plugin code and added this line of code:

image

If the issue ever get fixed, I will install the module again. By the way, thanks so much for the plugin, It has been a great help to me

Fixed in 1.0.2 👍 thanks for letting me know.

This was caused by this: matt-way/gifuct-js#18

I also updated the demo to add this GIF. https://pixijs.io/gif/demo/