Getting p5.gif.js working in the p5.js web editor

Hi All,

I’m trying to get the example here:

Working in the p5.js web editor. You can see it not running here:

It’s currently erroring with:

“InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable (sketch: line 10)”

I don’t think the gif image is getting loaded properly. Does anyone have any ideas?



Thanks for this, were you referring to the already old bug filed on the repo for the library?

Or something else? It also errors in Chrome:

“Uncaught DOMException: Failed to execute ‘drawImage’ on ‘CanvasRenderingContext2D’: The image argument is a canvas element with a width or height of 0.”