Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
pixijs avatar

Pixijs Scene Sprite

  • 3k installs
  • 293 repo stars
  • Updated June 4, 2026
  • pixijs/pixijs-skills

pixijs-scene-sprite is a PixiJS v8 skill for Sprite, AnimatedSprite, NineSliceSprite, and TilingSprite drawing and animation patterns.

About

The pixijs-scene-sprite skill covers PixiJS v8 sprite classes for drawing images on canvas. Sprite is the default single-texture leaf, AnimatedSprite cycles frames, NineSliceSprite preserves border art for resizable UI panels, and TilingSprite repeats textures for scrolling backgrounds. Quick start loads textures with Assets.load, constructs sprites via options objects with anchor and tint, and positions after construction when depending on renderer screen size. Variant table maps use cases to trade-offs and reference files for sprite, animated-sprite, nineslice, and tiling variants. Guidance contrasts anchor versus pivot, requires Assets.load before Sprite.from cache reads, and notes dynamic texture update patterns. Common mistakes include Texture.from URL loading, pivot misuse when centering, NineSlicePlane rename to NineSliceSprite, and adding children to leaf sprites that require a wrapping Container. Related skills point to assets loading, particle containers, graphics, and performance batching references.

  • Sprite, AnimatedSprite, NineSliceSprite, and TilingSprite variant routing.
  • Constructor options with anchor, tint, and Assets.load prerequisites.
  • Anchor versus pivot centering guidance for sprites.
  • NineSliceSprite resizable UI panel border preservation.
  • TilingSprite tilePosition scrolling background patterns.

Pixijs Scene Sprite by the numbers

  • 3,050 all-time installs (skills.sh)
  • +222 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #162 of 2,277 Frontend Development skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

pixijs-scene-sprite capabilities & compatibility

Capabilities
sprite construction with anchor and tint options · animatedsprite frame cycling from spritesheets · nineslicesprite resizable ui panel borders · tilingsprite scrolling and parallax backgrounds · anchor versus pivot positioning guidance · leaf node constraints and container wrapping pat
Use cases
frontend · ui design
Pricing
Free
From the docs

What pixijs-scene-sprite says it does

`Sprite.from(id)` only reads the Assets cache; it does not fetch.
SKILL.md
`anchor` shifts only the draw origin. `pivot` shifts the transform origin AND the visual position
SKILL.md
`NineSlicePlane` was renamed to `NineSliceSprite` in v8
SKILL.md
npx skills add https://github.com/pixijs/pixijs-skills --skill pixijs-scene-sprite

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs3k
repo stars293
Security audit3 / 3 scanners passed
Last updatedJune 4, 2026
Repositorypixijs/pixijs-skills

How do I choose and configure the right PixiJS sprite type for images, UI panels, animations, and scrolling backgrounds?

Draw and animate images in PixiJS v8 with Sprite, AnimatedSprite, NineSliceSprite, and TilingSprite patterns.

Who is it for?

PixiJS v8 projects rendering 2D images, UI chrome, frame animations, or parallax backgrounds.

Skip if: Skip for vector Graphics drawing, ParticleContainer mass sprites, or asset loading setup without scene sprites.

When should I use this skill?

User mentions Sprite, AnimatedSprite, NineSliceSprite, TilingSprite, anchor, tint, or tilePosition in PixiJS v8.

What you get

Correct sprite variant selection, texture loading, anchor setup, and patterns for animation or tiling without leaf-child mistakes.

  • AnimatedSprite scene object
  • Configured spritesheet animation
  • Stage-ready frame loop

Files

SKILL.mdMarkdownGitHub ↗

PixiJS has three sprite classes for different drawing tasks. Sprite is the default image-drawing leaf; NineSliceSprite is a resizable UI-panel variant that preserves corner art; TilingSprite repeats a texture across an area. The AnimatedSprite subclass of Sprite cycles through texture frames for frame-based animation.

Assumes familiarity with pixijs-scene-core-concepts. All sprite classes are leaf nodes; they cannot have children. Wrap multiple sprites in a Container to group them.

Quick Start

const texture = await Assets.load("bunny.png");

const sprite = new Sprite({
  texture,
  anchor: 0.5,
  tint: 0xff8888,
});
sprite.x = app.screen.width / 2;
sprite.y = app.screen.height / 2;

app.stage.addChild(sprite);

Position is set after construction because app.screen.width / 2 depends on the live renderer size. Literal positions can go directly in the options object via x/y (inherited from Container).

Related skills: pixijs-scene-core-concepts (leaves, transforms), pixijs-assets (texture loading), pixijs-scene-particle-container (thousands of sprites), pixijs-performance (spritesheets, batching).

Variants

VariantUse whenTrade-offsReference
SpriteDraw a single texture at a positionFixed size = texture sizereferences/sprite.md
AnimatedSpriteFrame-based animation from a texture array or spritesheetPre-rendered frames only; no tweeningreferences/animated-sprite.md
NineSliceSpriteResizable UI panels, buttons, dialog framesBorder width is fixed; center stretchesreferences/nineslice-sprite.md
TilingSpriteScrolling backgrounds, parallax, repeating patternsSingle texture repeated; tilePosition scrollsreferences/tiling-sprite.md

AnimatedSprite is a subclass of Sprite; all Sprite properties (anchor, tint, position) apply.

Each variant's constructor options are documented in its sub-reference file (references/{variant}.md). All variants also accept the Container options (position, scale, tint, label, filters, zIndex, etc.) — see skills/pixijs-scene-core-concepts/references/constructor-options.md.

When to use what

  • "I want to draw a single image at a position"Sprite. The default choice for 90% of 2D game and app content.
  • "I want to animate a character through a series of frames"AnimatedSprite. Load a spritesheet via Assets and pass sheet.animations['walk']. See references/animated-sprite.md.
  • "I want a UI button/panel that resizes without stretching the borders"NineSliceSprite. Set border widths, then set width/height. See references/nineslice-sprite.md.
  • "I want a scrolling repeating background"TilingSprite. Animate tilePosition to scroll. See references/tiling-sprite.md.
  • "I want thousands of identical sprites" → Use ParticleContainer with Particle instances (see pixijs-scene-particle-container), not plain sprites.
  • "I want to draw shapes or paths" → Use Graphics (see pixijs-scene-graphics), not a sprite.

Quick concepts

Anchor vs pivot

Sprite.anchor is normalized [0, 1] and shifts only the texture draw origin; no position offset. Container.pivot is pixel-space and shifts both the transform origin and the visual position. For centering a sprite, always use anchor.set(0.5).

Loading before creating

Sprite.from(id) only reads the Assets cache; it does not fetch. Always await Assets.load(...) first, or pass the returned Texture directly to new Sprite(texture).

Dynamic textures

Once a texture is loaded, modifying its frame or swapping its source does not automatically notify sprites. Set texture.dynamic = true once, or call sprite['onViewUpdate']() manually after changes.

Common Mistakes

[HIGH] Using Texture.from(url) to load

Wrong:

const texture = Texture.from("https://example.com/image.png");

Correct:

const texture = await Assets.load("https://example.com/image.png");

Texture.from() only reads the cache in v8. Use Assets.load() first; its return value is the texture.

[HIGH] Confusing anchor and pivot

Wrong:

sprite.pivot.set(sprite.width / 2, sprite.height / 2);

Correct:

sprite.anchor.set(0.5);

anchor shifts only the draw origin. pivot shifts the transform origin AND the visual position, causing the sprite to move unexpectedly.

[HIGH] Old NineSlicePlane name

NineSlicePlane was renamed to NineSliceSprite in v8 and switched to an options-object constructor: new NineSliceSprite({ texture, leftWidth, topHeight, rightWidth, bottomHeight }).

[MEDIUM] Adding children to a sprite

Sprite, NineSliceSprite, and TilingSprite all set allowChildren = false. Wrap in a Container to group sprites with other content.

API Reference

Related skills

How it compares

Use pixijs-scene-sprite for spritesheet frame playback; pair with pixijs-assets when animations must preload in the background across level transitions.

FAQ

When should I use NineSliceSprite?

For resizable UI panels and buttons that must stretch centers without distorting corner art.

How do I center a sprite correctly?

Use anchor.set(0.5) rather than pivot pixel offsets that also shift visual position unexpectedly.

Can sprites have child nodes?

No. Sprite leaf classes disallow children; wrap multiple sprites in a Container.

Is Pixijs Scene Sprite safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.