# pixi.js-legacy

> The HTML5 Creation Engine: Create beautiful digital content with the fastest, most flexible 2D WebGL renderer.

Latest version **7.4.3** (published 2025-03-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install pixi.js-legacy
pnpm add pixi.js-legacy
yarn add pixi.js-legacy
bun add pixi.js-legacy
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high maintenance score; popular repo.

Warnings: low downloads; large bundle.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 7.4.3 |
| Published | 2025-03-06 |
| First published | 2018-03-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 11 |
| Unpacked size | 13.2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 48232 |
| Author | Mat Groves |
| Maintainers | bigtimebuddy |

## Links

- npm: https://www.npmjs.com/package/pixi.js-legacy
- Repository: https://github.com/pixijs/pixijs
- Homepage: http://www.pixijs.com/
- Issues: https://github.com/pixijs/pixijs/issues
- Funding: https://opencollective.com/pixijs
- npm.io page: https://npm.io/package/pixi.js-legacy

## Dependencies (11)

- [pixi.js](https://npm.io/package/pixi.js.md) 7.4.3
- [@pixi/canvas-mesh](https://npm.io/package/@pixi/canvas-mesh.md) 7.4.3
- [@pixi/canvas-text](https://npm.io/package/@pixi/canvas-text.md) 7.4.3
- [@pixi/canvas-sprite](https://npm.io/package/@pixi/canvas-sprite.md) 7.4.3
- [@pixi/canvas-display](https://npm.io/package/@pixi/canvas-display.md) 7.4.3
- [@pixi/canvas-extract](https://npm.io/package/@pixi/canvas-extract.md) 7.4.3
- [@pixi/canvas-prepare](https://npm.io/package/@pixi/canvas-prepare.md) 7.4.3
- [@pixi/canvas-graphics](https://npm.io/package/@pixi/canvas-graphics.md) 7.4.3
- [@pixi/canvas-renderer](https://npm.io/package/@pixi/canvas-renderer.md) 7.4.3
- [@pixi/canvas-sprite-tiling](https://npm.io/package/@pixi/canvas-sprite-tiling.md) 7.4.3
- [@pixi/canvas-particle-container](https://npm.io/package/@pixi/canvas-particle-container.md) 7.4.3

## Recent versions

- 7.4.3 (latest) — 2025-03-06
- 7.3.0-rc.2 (prerelease) — 2023-08-11
- 6.5.10 (latest-6.x) — 2023-07-06
- 5.3.12 (latest-5.3.x) — 2022-03-23
- 5.2.5 (latest-5.2.x) — 2020-12-11
- 5.1.6 (latest-5.1.x) — 2020-02-13
- 7.4.2 — 2024-03-20
- 7.4.0 — 2024-01-27
- 7.3.3 — 2024-01-01
- 7.3.2 — 2023-10-20
- 7.3.1 — 2023-09-22
- 7.3.0 — 2023-09-18
- 7.3.0-rc — 2023-07-12
- 7.2.4 — 2023-04-06
- 7.2.3 — 2023-03-24
- … 106 more at https://npm.io/package/pixi.js-legacy/versions

## README

PixiJS — The HTML5 Creation Engine
=============

![PixiJS logo](https://files.pixijs.download/branding/pixijs-banner.png)

The aim of this project is to provide a fast lightweight 2D library that works
across all devices. The PixiJS renderer allows everyone to enjoy the power of
hardware acceleration without prior knowledge of WebGL. Also, it's fast. Really fast.

**We are now a part of the [Open Collective](https://opencollective.com/pixijs) and with your support you can help us make PixiJS even better. To make a donation, simply click the button below and we'll love you forever!**

<br>
<div align="center">
  <a href="https://opencollective.com/pixijs/donate" target="_blank">
    <img src="https://opencollective.com/pixijs/donate/button@2x.png?color=blue" width=250 />
  </a>
</div>
<br>

This package is the same as **pixi.js**, but provides fallback support for browsers that do not support WebGL or more modern JavaScript features.

### Setup

PixiJS can be installed with [npm](https://docs.npmjs.com/getting-started/what-is-npm) to integrate with [Webpack](https://webpack.js.org/), [Browserify](http://browserify.org/), [Rollup](https://rollupjs.org/), [Electron](https://electron.atom.io/), [NW.js](https://nwjs.io/) or other module backed environments.

#### Install

```
npm install pixi.js-legacy
```

There is no default export. The correct way to import PixiJS is:

```js
import * as PIXI from 'pixi.js-legacy';
```

#### CDN Install

Via jsDelivr:

```html
<script src="https://cdn.jsdelivr.net/npm/pixi.js-legacy@7.x/dist/pixi-legacy.min.js"></script>
```

Or via unpkg:

```html
<script src="https://unpkg.com/pixi.js-legacy@7.x/dist/pixi-legacy.min.js"></script>
```

### Basic Usage Example

```js
import { Application, Assets, Sprite } from 'pixi.js-legacy';

// The application will create a renderer using WebGL, if possible,
// with a fallback to a canvas render. It will also setup the ticker
// and the root stage PIXI.Container
const app = new Application();

// The application will create a canvas element for you that you
// can then insert into the DOM
document.body.appendChild(app.view);

// load the texture we need
const texture = await Assets.load('bunny.png');

// This creates a texture from a 'bunny.png' image
const bunny = new Sprite(texture);

// Setup the position of the bunny
bunny.x = app.renderer.width / 2;
bunny.y = app.renderer.height / 2;

// Rotate around the center
bunny.anchor.x = 0.5;
bunny.anchor.y = 0.5;

// Add the bunny to the scene we are building
app.stage.addChild(bunny);

// Listen for frame updates
app.ticker.add(() => {
    // each frame we spin the bunny around a bit
    bunny.rotation += 0.01;
});
```

### License

This content is released under the (http://opensource.org/licenses/MIT) MIT License.

---
_Source: https://npm.io/package/pixi.js-legacy · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
