Skip to content

Plugin to support playback of animated GIF images in PixiJS.

License

Notifications You must be signed in to change notification settings

q1998763/pixi-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

Install the loader for handle GIF images.

import { AnimatedGIFLoader } from '@pixi/gif';
import { Loader } from '@pixi/loaders';

Loader.registerPlugin(AnimatedGIFLoader);

Load an animated GIF image.

import { Application } from 'pixi.js';

const app = new Application();
app.loader.add('image', 'image.gif');
app.loader.load((loader, resources) => {
    const image = resources.image.animation;
    app.stage.addChild(image);
});

About

Plugin to support playback of animated GIF images in PixiJS.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 92.6%
  • JavaScript 7.4%