Skip to content

AI Quick Start

This is the entry point for AI coding agents. Read /llms.txt for the index, or /llms-full.txt for standalone context. The README.md, STABILITY.md, and llms-full.txt in each GitHub repository are authoritative for package APIs.

Open the Sprite Playground to inspect the PixiJS/ai*js editor. The hosted build is a read-only procedural demo; image generation and frame submission use the local AI Sprite Studio.

  • Sprite state graphs and PixiJS v8: aispritejs, aispritejs/pixi
  • Game data: aiecsjs
  • Game logic FSM: aifsmjs
  • Events: aieventjs
  • Audio: aiaudiojs, plus its howler peer dependency
  • Object reuse: aipooljs
  • 2D broadphase: aiquadtreejs
  • Cross-context iframe or Flutter WebView communication: aibridgejs

The packages do not require one another. Do not install the whole family to use one module.

For Cocos Creator projects, read the Cocos Creator integration guide first for compatibility per build target and the AbortController polyfill.

終端機視窗
npm install aispritejs pixi.js
import { createPixiSpriteAnimator } from "aispritejs/pixi";
const animator = createPixiSpriteAnimator(sprite, graph, spritesheet);
animator.setInput("speed", 1);
animator.update(deltaMs);

AI Sprite Studio provides atlas generation, QA, packing, and a web editor. Its existing generated artwork is failed test material, not shippable output or a style reference. Deterministic and visual QA must both pass before packing.

  1. Read package exports before choosing a subpath.
  2. Use the repository’s package manager and run its typecheck, test, and build scripts.
  3. Treat external atlases, bridge messages, and snapshots as untrusted boundary input.
  4. Keep renderer binding separate from game-state logic and install only required packages.
  5. Since 0.6.0, misuse throws the package’s own error class with a <pkg>: <subject> must be <constraint> message; match on the class plus a regex, not the exact text. When upgrading from 0.5.x, read the Breaking section of each package’s CHANGELOG.md first.

Image generation and frame submission go through AI Sprite Studio’s local MCP server. See MCP and AI Tools for installation, per-client configuration, tool call order, the trust boundary, and the browser agent interface.