Pixi Game Core
Use this skill for day-to-day PixiJS game engineering.
Respect repository-locked tooling first. For new setups, default to TypeScript + pnpm + Vite + PixiJS v8.
1) Read Official Pixi Sources in the Right Order
Before making API decisions, load:
references/pixi-llm-docs-policy.mdreferences/architecture.mdreferences/assets-and-rendering.mdreferences/testing-and-quality-gates.md
Use Pixi's official LLM docs as the primary source for API facts. Use guides and performance docs as the secondary source for engineering tradeoffs.
2) Lock the Project Boundaries Early
Structure the project around these directories unless the repo already has a stronger pattern:
boot/: startup, app creation, preload orchestration, scene registrationscenes/: gameplay scenes and transitionssystems/: non-visual domain servicesui/: HUD, overlays, reusable UI widgetsassets/: manifests, loaders, asset metadataplatform/: runtime boundary for browser or future mini-game adaptationshared/: types, constants, math, utilities with no platform side effects
Keep gameplay logic out of platform/. Keep Pixi display concerns out of systems/.
3) Use Stable Runtime and Scene Contracts
Keep these contracts explicit:
RuntimeTarget = 'web' | 'wechat-minigame' | 'douyin-minigame'GameBootConfigSceneContractAssetResolverInputAdapter
Separate:
- boot
- preload
- first interactive scene
- pause and resume
- teardown and destroy
Do not let scene code directly own browser globals, resource URL policy, or persistence details.
4) Keep Assets and Input Migration-Safe
Require manifest-driven assets. Do not scatter raw image or audio paths across gameplay code.
Require input normalization. Gameplay should consume semantic actions or a unified pointer adapter, not raw DOM events.
Default to canvas-first rendering. Allow HTML overlays only for debug shells, launcher chrome, or non-gameplay operations.
If the project may later target WeChat or Douyin mini-games, also load $pixi-mini-game-readiness for audit and readiness work.
If the project already maintains both Web and WeChat outputs, also load $pixi-web-wechat-dual-target for ongoing development, review, and regression rules.
5) Run Quality Gates After Behavior Changes
For new or refactored behavior, run the nearest equivalent of:
pnpm lintpnpm typecheckpnpm buildpnpm test- If no automated tests exist, run a documented smoke flow
If the repository has separate Web and WeChat outputs, prefer the explicit matrix:
pnpm lintpnpm typecheckpnpm build:webpnpm build:wechatpnpm test
Always report:
- architecture or boundary changes
- validation commands run
- manual smoke coverage
- remaining risks
Resource Map
references/pixi-llm-docs-policy.md: source-of-truth order for Pixi docsreferences/architecture.md: recommended module boundaries and contractsreferences/assets-and-rendering.md: asset, rendering, and input rulesreferences/testing-and-quality-gates.md: validation chain and smoke checklistassets/templates/docs/constraints.md: drop-in project constraints template