p5gif is a library to allow you play/use animated gif in p5.js and process GIF on top of p5.js. It can help artists easily handling GIF related operations. eg. making GIFs, splitting frames, etc.
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.2/p5.min.js"></script>
<script src="https://unpkg.com/p5.gif/dist/p5gif.min.js"></script>
git clone https://github.com/WenheLI/p5.gif.git ./node_modules/p5.gif
cd ./node_modules/p5.gif
yarn && yarn build
cd ../..
In your nodejs
import p5Gif from 'p5.gif/build/p5gif.min.js';