返回卡带目录下载 BYOK 离线包 (.JSON)
CLS-01 · 像素与 2D 美术VERSION 1.3.0 · 1,421 INSTALLS
像素角色序列帧与网格切图器
锁定 16 色调色板与等距基准线,生成零杂色(No Mixels)的四方向行走/攻击序列帧并导出引擎图集。
ENGINE: godot4ENGINE: unityENGINE: phaserAI: imageAI: code
npx aigameskills add pixel-sprite-animatorSKILL.MD · INSTRUCTION MANUAL
## 核心目标 彻底解决 AI 直接生成像素序列帧时常见的「像素颗粒大小不一(Mixels)」、「角色每帧身高漂移」以及「半透明抗锯齿脏边」三大痛点。 ## 执行准则 1. **先锁网格与色板**:调用图像接口前,显式声明单帧尺寸(`32x32` 或 `64x64`)、视角(俯视 3/4 JRPG 或横版平台)及最多 16 色的 Hex 色板。 2. **纯色品红底零羽化轮廓**:强制指定纯平 `#FF00FF` 背景与硬边缘(1px 深色外轮廓),禁止环境雾气与柔光溢出。 3. **像素质心对齐切帧**:执行 `scripts/slice-spritesheet.ts` 对齐脚底基准线(Baseline Pixel),直接导出 Godot 4 `SpriteFrames` 或 Phaser 图集 JSON。
BUNDLED SCRIPTS & REFERENCES (1)
scripts/generate-spritesheet.ts
// __AGS_RUNTIME_CONFIG__
export async function requestSpriteStrip(characterPrompt: string): Promise<string> {
const response = await fetch(`${AGS_API_BASE}/images/generations`, {
method: 'POST',
headers: {
Authorization: `Bearer ${AGS_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
skillSlug: 'pixel-sprite-animator',
prompt: `16-bit pixel art 4-frame horizontal sprite strip, ${characterPrompt}, flat #FF00FF background, crisp 1px outline, nearest-neighbor`,
size: '1024x256',
}),
});
if (!response.ok) throw new Error(`Sprite generation failed: ${response.status}`);
const payload = (await response.json()) as { data: Array<{ url: string }> };
return payload.data[0]?.url ?? '';
}
CRT 街机实时演练场
COST: 8 MANA