
Pixijs 2d
Implement PixiJS v8+ 2D canvas apps using documented patterns from minimal apps through particles, shaders, and mobile tuning.
Overview
PixiJS 2D is an agent skill for the Build phase that supplies production-oriented PixiJS examples and patterns for 2D canvas applications and games.
Install
npx skills add https://github.com/freshtechbro/claudedesignskills --skill pixijs-2dWhat is this skill?
- 12-section table of contents from basic apps through framework integration and mobile optimization
- PixiJS v8+ init flow with async Application, Assets.load, ticker-based animation
- Coverage: particles, filters, custom shaders, UI components, and game development patterns
- Responsive canvas and performance optimization sections for production-minded setups
- Real-world code snippets for interactive elements and advanced techniques
- 12 major pattern sections in table of contents
Adoption & trust: 870 installs on skills.sh; 227 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need a PixiJS v8 canvas or game feature but lack copy-paste patterns for init, assets, ticker loops, and performance on real devices.
Who is it for?
Solo builders shipping browser games, visual demos, or interactive marketing experiences on PixiJS.
Skip if: Three.js 3D scenes, native mobile game engines, or backend-only APIs with no canvas layer.
When should I use this skill?
User is implementing or debugging PixiJS 2D graphics, games, or interactive canvas features.
What do I get? / Deliverables
You implement working PixiJS modules—sprites, interactions, effects, or UI—using v8-aligned snippets and section-specific guidance from the skill catalog.
- PixiJS application modules
- Interactive canvas or game loop code
Recommended Skills
Journey fit
How it compares
Frontend pattern reference for PixiJS 2D, not a full game engine project scaffold or art pipeline tool.
Common Questions / FAQ
Who is pixijs-2d for?
Developers using Claude Code or similar agents to write PixiJS canvas code for games, toys, or rich interactive UIs in the browser.
When should I use pixijs-2d?
During Build frontend work when adding sprites, particles, shaders, or mobile-responsive canvas to a web game or interactive page.
Is pixijs-2d safe to install?
It is documentation and example JavaScript; review Security Audits on this Prism page and vet any generated asset URLs or dependencies before production use.
SKILL.md
READMESKILL.md - Pixijs 2d
# PixiJS Examples and Patterns Comprehensive real-world examples and patterns for building production-ready PixiJS applications. ## Table of Contents 1. [Basic Applications](#basic-applications) 2. [Interactive Elements](#interactive-elements) 3. [Particle Systems](#particle-systems) 4. [Filters and Effects](#filters-and-effects) 5. [Custom Shaders](#custom-shaders) 6. [Animation Patterns](#animation-patterns) 7. [Performance Optimization](#performance-optimization) 8. [Game Development](#game-development) 9. [UI Components](#ui-components) 10. [Framework Integration](#framework-integration) 11. [Mobile Optimization](#mobile-optimization) 12. [Advanced Techniques](#advanced-techniques) --- ## Basic Applications ### 1. Minimal PixiJS Application The absolute minimum code to get started with PixiJS v8+: ```javascript (async () => { const app = new PIXI.Application(); await app.init({ width: 800, height: 600, backgroundColor: 0x1099bb }); document.body.appendChild(app.canvas); // Create a sprite const texture = await PIXI.Assets.load('bunny.png'); const bunny = new PIXI.Sprite(texture); bunny.anchor.set(0.5); bunny.position.set(400, 300); app.stage.addChild(bunny); // Animation loop app.ticker.add((ticker) => { bunny.rotation += 0.05 * ticker.deltaTime; }); })(); ``` ### 2. Responsive Canvas Application Canvas that automatically resizes to fill the window: ```javascript (async () => { const app = new PIXI.Application(); await app.init({ width: window.innerWidth, height: window.innerHeight, backgroundColor: 0x1a1a2e, antialias: true, resolution: window.devicePixelRatio || 1, autoDensity: true }); document.body.appendChild(app.canvas); // Handle window resize window.addEventListener('resize', () => { app.renderer.resize(window.innerWidth, window.innerHeight); // Reposition elements if needed updateLayout(); }); function updateLayout() { // Center content or adjust layout based on new dimensions const centerX = app.screen.width / 2; const centerY = app.screen.height / 2; // Update element positions... } })(); ``` ### 3. Asset Loading with Progress Load multiple assets with loading screen: ```javascript (async () => { const app = new PIXI.Application(); await app.init({ width: 800, height: 600 }); document.body.appendChild(app.canvas); // Create loading text const loadingText = new PIXI.Text({ text: 'Loading: 0%', style: { fontSize: 32, fill: 0xffffff } }); loadingText.anchor.set(0.5); loadingText.position.set(400, 300); app.stage.addChild(loadingText); // Assets to load const assets = [ { alias: 'bunny', src: 'bunny.png' }, { alias: 'spritesheet', src: 'spritesheet.json' }, { alias: 'background', src: 'background.jpg' } ]; // Load assets with progress PIXI.Assets.load(assets, (progress) => { loadingText.text = `Loading: ${Math.round(progress * 100)}%`; }).then((textures) => { // Remove loading screen app.stage.removeChild(loadingText); // Start application with loaded assets startApp(textures); }); function startApp(textures) { const bunny = new PIXI.Sprite(textures.bunny); bunny.position.set(400, 300); app.stage.addChild(bunny); } })(); ``` ### 4. Multi-Scene Application Manage multiple scenes/screens: ```javascript class SceneManager { constructor(app) { this.app = app; this.scenes = new Map(); this.currentScene = null; } addScene(name, scene) { this.scenes.set(name, scene); scene.visible = false; this.app.stage.addChild(scene); } switchTo(name) { if (this.currentScene) { this.currentScene.visible = false;