如何为 Web 游戏团队构建 Agent 就绪的 VFX 工作流
Building Agent-Ready VFX Workflows for Web Game Teams
面向 PixiJS 项目的 NixieFX 工作流提出让 AI 智能体参与 VFX 制作的四个条件:可检视编辑的源文件、确定性验证、显式导出步骤和人工视觉审核。效果以 JSON 存于 particle-data/effects/,通过 `npx nixie-fx validate ./vfx` 验证后导出到 out/vfx 供游戏消费,使智能体无需从零编写粒子效果 schema。
Visual effects are an awkward part of an AI-assisted development workflow.
A coding agent can modify TypeScript, update tests, and refactor a component because the inputs and outputs are visible in the repository. VFX work often looks different: editor state, binary assets, renderer-specific settings, and visual decisions that cannot be judged from a diff alone.
So simply giving an agent access to a particle editor is not enough.
For agent ready VFX tools to be genuinely useful, the workflow needs four things:
- source files an agent can inspect and edit;
- deterministic validation before anything reaches the game;
- an explicit build or export step;
- human visual review before the result is accepted.
Here is what that can look like in a PixiJS project.
1. Keep the authoring source in the repository
Start with a dedicated VFX project structure:
vfx/
├── vfx-editor.prj
├── particle-data/
│ └── effects/
├── assets/
└── out/
└── vfx/
The important separation is between authoring files and runtime files.
The effect source lives under particle-data/effects/. The game should consume the generated out/vfx bundle instead.
That gives an AI agent something concrete to modify while keeping a build boundary between authored content and what actually ships.
For NixieFX specifically, effects are stored as JSON and exported into a bundle containing a manifest, compiled effect definitions, and any referenced assets. The broader runtime and backend behavior is documented in the NixieFX editor and runtime reference.
2. Create a minimal project
Install the runtime alongside PixiJS:
npm install nixie-fx pixi.js
Create a vfx directory:
mkdir -p vfx/particle-data/effects
mkdir -p vfx/assets
Then add vfx/vfx-editor.prj:
{
"app": "vfx-editor",
"kind": "project",
"version": 1,
"id": "agent-vfx-demo",
"name": "Agent VFX Demo",
"settings": {
"effectDataPath": "particle-data/effects",
"assetRootPath": "assets",
"outputPath": "out/vfx",
"materialsFolder": "materials",
"allowExternalOutput": false
},
"createdAt": "2026-10-02T00:00:00.000Z",
"updatedAt": "2026-10-02T00:00:00.000Z"
}
Now scaffold an effect for the PixiJS backend:
npx nixie-fx effect create \
--project ./vfx \
--name "Agent Burst" \
--profile pixi-ui-2d
This gives the workflow an important property: the agent does not need to invent an entire particle-effect schema from memory.
It starts from a valid effect and modifies a known source file.
3. Make validation part of the agent loop
The workflow should not be:
prompt -> edit -> ship
It should be:
prompt
↓
edit effect JSON
↓
validate
↓
fix errors
↓
export
↓
visual review
↓
accept
Run validation after each meaningful change:
npx nixie-fx validate ./vfx
Validation is useful because it gives both humans and agents a machine-readable boundary.
A visual effect can still look bad while being technically valid, but basic structural and backend problems should not require somebody to discover them manually inside a running game.
You can also make validation part of the normal project scripts:
json
{
"scripts": {
"vfx:check": "nixie-fx validate ./vfx
来源:Google AI:DEV 作者专属(RSS) · dev.to