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

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.

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

License:MIT License


Languages

Language:TypeScript 92.6%Language:JavaScript 7.4%