---
name: pixel-layer-studio
description: Find, customize and compose Pixel Layer Studio characters, actions, props and scenes. Use for editable slice-stacked pixel art, cast sequences and age-compatible animation. 支持按年龄选角、搭配人物和编排像素动作。
license: MIT
---

# Pixel Layer Studio

Work in the checkout containing `preset-collection.js`, or pass its path with `--root`. Run the bundled `scripts/presets.cjs` with Node 22+. Commands emit JSON. [中文指南](guide.zh-CN.md)

## Cast a scene

Use `list people child --lang en`, `list actions tennis --actor look_court_club --lang en`, `list items` and `list scenes` to discover real IDs. Inspect an action such as `cradle` for its roles and props. The selected performer may occupy either slot in a duet.

```sh
node skills/pixel-layer-studio/scripts/presets.cjs compose --actor look_workshop_baby --partner look_workshop_mother --actions cradle,peekaboo --scene garden > family-garden.json
node skills/pixel-layer-studio/scripts/presets.cjs check family-garden.json
```

The exported `pine-cast` includes the character recipes. From JavaScript, `PinePresets.compose(actorId, actionIds, sceneId, partnerId)` supplies a playable plan. Sample actors with `plan.sample(t)` and props with `plan.scenery(t)`. Respect the clip’s role order, contact points and equipment counts.

## Edit and extend

- **Characters.** The character studio can roll, customize and exchange recipe JSON. For scripted edits, inspect a person and use `derive --from ID --id look_new_sage --label Sage --patch change.json`. A patch such as `{"colors":{"top":"#527f74"},"parts":{"bag":null}}` recolours the top and removes the bag. Pass the resulting recipe to `compose --person sage.json --actor look_new_sage --actions wave,walk`.
- **Actions.** Follow the solo and partner examples in `sport-clips.js` and `duet-clips.js`. Register a stable ID, bilingual label, roles and phase sampler. Keep clips around ten seconds or shorter. Declare hand props and fixtures with the action. Map its group to a domain in `studio-library.js`.
- **World.** Register a reusable object with `PineWorld.register(def, paint)`, place instances with `PineWorld.place`, then register the score with `PinePresets.addScene`. Interior props use parent-relative coordinates. Stair actions use a target.
- **Publishing.** Register a new character with `PinePresets.addPerson(recipe)`. Add display translations to `preset-locale.js`. Rotate the full body and face through a side view, sample preparation/contact/recovery poses and try either entry role in a duet. Run `node check-motion.cjs` and `node tests/check-presets.cjs`. The character, score and cast schemas live at the repository root. Include the project's MIT notice when redistributing original assets.
