pixijs-scene-particle-container

Render large numbers of similar sprites with PixiJS ParticleContainer.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When you need to display thousands of similar sprites (like bullets or particles) in PixiJS, performance collapses if you treat every sprite as a full Container child; this Skill provides an efficient ParticleContainer-based approach for fast rendering.

Core Features & Use Cases

  • Batch rendering with ParticleContainer: Render very large numbers of lightweight particles in a single draw call using shared texture constraints.
  • Particle-first child management: Use addParticle/removeParticle and the particleChildren array instead of addChild, with an update() flow for static property changes.
  • Controlled GPU upload via dynamicProperties: Mark only the attributes you animate (position, rotation, uvs, color, vertex) for per-frame GPU re-uploads and keep everything else static for speed.
  • Production-focused use cases: Particle effects, bullet patterns, and any scene element where objects share the same base texture and you can accept ParticleContainer limitations (no per-particle filters/masks, no nested particle hierarchies).

Quick Start

Create a ParticleContainer with a shared texture and a correctly sized boundsArea, then add many Particle instances via addParticle and attach the ParticleContainer to the stage.

Frequently Asked Questions about pixijs-scene-particle-container

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

FAQPage Schema
How do I render thousands of sprites efficiently in PixiJS?

Use a ParticleContainer in PixiJS to batch thousands of similar sprites into a single GPU draw call. This approach requires shared base texture sources and the particleChildren array for management instead of standard addChild methods.

What is the best way to optimize bullet pattern rendering performance in PixiJS?

The best way to optimize bullet pattern rendering in PixiJS is using ParticleContainer with selective GPU attribute uploads. Configure dynamicProperties to mark only animated attributes like position and rotation for per-frame re-uploads, keeping everything else static.

Does ParticleContainer in PixiJS support per-particle filters or nested hierarchies?

ParticleContainer in PixiJS does not support per-particle filters, per-particle masks, or nested particle hierarchies. It is designed strictly for batch rendering large numbers of lightweight particles that share the same base texture source.

How do I update static properties on particles in a PixiJS ParticleContainer?

Update static properties on particles in a PixiJS ParticleContainer by modifying the Particle instances and explicitly calling the container.update() method. Use addParticle and removeParticle for managing the particleChildren array instead of standard addChild.

When should I use dynamicProperties in a PixiJS ParticleContainer?

Use dynamicProperties in a PixiJS ParticleContainer when you need to animate specific particle attributes like position, rotation, uvs, color, or vertex data. This marks only those attributes for per-frame GPU re-uploads while keeping other properties static for rendering speed.

Why does culling fail for sprites in a PixiJS ParticleContainer?

Culling fails for sprites in a PixiJS ParticleContainer when the boundsArea is not correctly sized. You must define a properly sized boundsArea on your particles to ensure the container calculates accurate culling boundaries for the scene.