Skip to content

feat(avatar): drawn outfit, accessory, beard, glasses, nose, cheeks, petals and flower base - #15

Merged
DoodleBears merged 1 commit into
mainfrom
claude/festive-gauss-gv7xu2
Oct 8, 2026
Merged

DoodleBears merged 1 commit into
mainfrom
claude/festive-gauss-gv7xu2

Conversation

@DoodleBears

Copy link
Copy Markdown
Contributor

Summary

This is the BotPixel half of BotHarness/DeepSeekBot#1240: every remaining part slot can hold a Human-drawn Custom Part that starts from the built-in style.

New slots (REPLACE_PART_SLOTS, front layer only): outfit, accessory, beard, glasses, nose, cheeks, petals, flowerBase. The recipe keys are <slot>Part.

Rendering: a drawn part replaces the built-in part in the layer the built-in part paints into, so outlines, shading and grouping work out as before.

Slots Layer
outfit, flower base body
petals back
beard, accessory over the shaded head
nose, cheeks face features
glasses glasses
  • The built-in choice stays saved underneath.
  • Face parts shift like the face features through turns; the others shift with the head.

Starting point: replacePartStart(recipe, slot) diffs that layer with and without the built-in part in the front pose.

  • Each pixel that is exactly an appearance color at a tone becomes that color slot, so it recolors with the Avatar. Any other pixel becomes a fixed color.
  • An unchanged copy renders identically, including the SVG grouping and every speech mouth layer.
  • A flattened outfit can need up to 17 fixed colors (kimono), so MAX_PART_FIXED_COLORS rises from 16 to 32.

Keep-out: drawn beard, nose, cheeks and glasses are never painted on a pixel that any speaking mouth (saved, closed, half-open, open) uses. Eyes stay on top of everything except glasses.

Hiding:

  • Drawn parts follow hiddenChoices. On a flower, the outfit, accessory, beard, glasses, nose and cheeks are hidden; a dwarf's nose is hidden; petals and base show only on a flower.
  • A drawn accessory replacing a helmet or hood is not headwear, so the hair shows again. hiddenChoices reflects that.

The version goes to 0.7.0.

Verification

  • pnpm verify passes: format, lint, typecheck and 83 tests. Every existing golden fixture is unchanged.
  • New replace-part.test.ts:
    • an unchanged flattened copy renders identically (SVG and mouth layers) for every outfit, every accessory except helmet and hood, every beard, glasses, nose and cheeks style, and every petal and base;
    • flattened cells keep appearance colors, so they recolor;
    • drawn face parts painted over the mouth area never hide any mouth state;
    • flower, dwarf-nose and non-flower petal hiding;
    • a helmet replaced by a drawn accessory shows the hair, and taking it off restores the helmet;
    • turns.

Refs BotHarness/DeepSeekBot#1240 · Agent-Task: claude/cloud/session_01MozvQ2eMvqX1MzSqm9G2o8

🤖 Generated with Claude Code

https://claude.ai/code/session_01MozvQ2eMvqX1MzSqm9G2o8


Generated by Claude Code

…petals and flower base

Each of these slots takes a Custom Part that replaces the built-in part
in the layer it paints into, while the built-in choice stays saved.
replacePartStart flattens the worn part for the front pose to
appearance-color cells where exact and fixed colors elsewhere, so an
unchanged copy renders identically. Drawn face parts never cover the
pixels a speaking mouth uses; hiding follows hiddenChoices, and a drawn
accessory that replaces a helmet or hood shows the hair. The fixed-color
bound rises to 32.

Refs: BotHarness/DeepSeekBot#1240
Agent-Task: claude/cloud/session_01MozvQ2eMvqX1MzSqm9G2o8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MozvQ2eMvqX1MzSqm9G2o8
@coderabbitai

coderabbitai Bot commented Oct 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 25 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: eabe9be4-91de-4141-8edb-862522c38d23
📥 Commits

Reviewing files that changed from the base of the PR and between 5e66a8d and aa1b45e.

📒 Files selected for processing (8)
  • CHANGELOG.md
  • packages/avatar/README.md
  • packages/avatar/package.json
  • packages/avatar/src/figure.ts
  • packages/avatar/src/index.ts
  • packages/avatar/src/part.ts
  • packages/avatar/src/recipe.ts
  • packages/avatar/test/replace-part.test.ts
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@DoodleBears
DoodleBears merged commit 300a857 into main Oct 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants