pixijs-scene-sprite

Render PixiJS v8 sprites with AnimatedSprite, NineSliceSprite, and TilingSprite.

16|8|Updated May 20, 2020
One-click install
npx skills add https://github.com/encounterplus/web-client --skill pixijs-scene-sprite-encounterplus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pixijs-scene-sprite
Source: https://github.com/encounterplus/web-client/tree/main/.agents/skills/pixijs-scene-sprite
Command: npx skills add https://github.com/encounterplus/web-client --skill pixijs-scene-sprite-encounterplus

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

PixiJS users need a reliable way to render and animate sprites in the Scene API without common mistakes around loading, anchoring, and choosing the right sprite class.

Core Features & Use Cases

  • Choose the right sprite leaf: Sprite for static images, AnimatedSprite for frame-based animation, NineSliceSprite for resizable UI panels, and TilingSprite for repeating/scrolling backgrounds.
  • Avoid rendering and positioning pitfalls: correct handling of anchor vs pivot, safe texture loading patterns (Assets-first), and guidance for runtime sizing behaviors (9-slice width/height, tiling region dimensions).
  • Support practical animation and UI workflows: AnimatedSprite frame playback patterns, NineSlice panel resize and crisp borders, and TilingSprite tilePosition scrolling for parallax.

Quick Start

Load a texture with Assets.load, construct a Sprite with anchor and tint options, set its x/y position based on the live screen size, and add it to app.stage.

Frequently Asked Questions about pixijs-scene-sprite

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I render PixiJS sprites correctly without loading errors?

To render PixiJS sprites correctly, you must use Assets.load to fetch textures before constructing Sprite instances, ensuring proper Scene API rendering and preventing undefined texture errors.

What is the difference between anchor and pivot for PixiJS sprite positioning?

Anchor and pivot differ in PixiJS sprite positioning because anchor sets the normalized 0-1 draw origin, while pivot uses pixel coordinates. Using anchor correctly avoids common positioning pitfalls.

When should I use NineSliceSprite vs TilingSprite for PixiJS UI backgrounds?

Use NineSliceSprite for resizable UI panels requiring crisp borders without distortion, and use TilingSprite for repeating or scrolling backgrounds needing tilePosition adjustments for parallax effects.

How do I animate sprites with frame playback in PixiJS v8?

To animate sprites with frame playback in PixiJS v8, use the AnimatedSprite class, which supports frame-based animation playback with configurable animationSpeed options for game and UI layers.

Why does my PixiJS sprite resize incorrectly when scaling UI panels?

Your PixiJS sprite resizes incorrectly because standard scaling distorts the entire image. NineSliceSprite solves this by applying left, top, right, and bottom slice widths to keep borders crisp during resizing.