Skip to content
/ gif Public
forked from pixijs-userland/gif

Plugin to support playback of animated GIF images in PixiJS.

License

Notifications You must be signed in to change notification settings

Redgeioz/gif

 
 

Repository files navigation

PixiJS Animated GIF

Node.js CI

Plugin to support playback of animated GIF images in PixiJS. Unlike normal GIF playback in the browser, this plugins allows you to stop, loop, change speed, or go to a specific frame.

Usage

Load an animated GIF image with Assets:

import '@pixi/gif';
import { Assets } from 'pixi.js';

const app = new Application();
const image = await Assets.load('image.gif');
app.stage.addChild(image);

To use a gif without Assets:

import { Application } from 'pixi.js';
import { AnimatedGIF } from '@pixi/gif';

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

About

Plugin to support playback of animated GIF images in PixiJS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%