Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
A basic PixiJS example that creates a canvas and renders a rotating sprite.
# pixijs/demo/index.html
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pixi.js/7.2.4/pixi.min.js"></script>
</head>
<body>
<script>
const app = new PIXI.Application({ width: 800, height: 600 });
document.body.appendChild(app.view);
const sprite = PIXI.Sprite.from('https://pixijs.io/examples/examples/assets/bunny.png');
sprite.anchor.set(0.5);
sprite.x = app.screen.width / 2;
sprite.y = app.screen.height / 2;
app.stage.addChild(sprite);
app.ticker.add(() => { sprite.rotation += 0.01; });
</script>
</body>
</html>PixiJS is a fast, 2D rendering JavaScript library that leverages WebGL (with canvas fallback) to create interactive graphics, games, and applications for the web. It offers a high-performance API for sprites, textures, filters, and animations.
Origin & Creator
PixiJS was created by Mat Groves in 2013 and is maintained by the PixiJS team and community contributors.
Industrial Note
PixiJS is widely used in 2D web games, interactive experiences, data visualizations, advertising banners, HTML5 games, and creative web apps requiring fast, GPU-accelerated rendering.