Repository navigation
feat(avatar): Human-drawn Custom Parts in a headpiece slot (asset version 3) - #11
Merged
Merged
Conversation
…sion 3) A PixelCustomPart has a back layer drawn behind the hair and a front layer over it. Cells reference an appearance color slot or a fixed color plus a tone step, so a part recolors with the Avatar and follows head turns. withHeadpiece embeds a canonical copy as asset version 3; customPartId is a SHA-256 of the canonical content. paintPartLayer, fillPartLayer (4-connected) and mirrorPartX provide the drawing algorithms. Existing golden output is unchanged. Refs: BotHarness/DeepSeekBot#1211 Agent-Task: claude/cloud/session_01MozvQ2eMvqX1MzSqm9G2o8 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MozvQ2eMvqX1MzSqm9G2o8
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (9)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Contributor
Author
|
@coderabbitai review Generated by Claude Code |
|
This was referenced Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is the BotPixel half of BotHarness/DeepSeekBot#1211 (ADR-0148, Q7, Q15, Q16, Q22–Q24). BotPixel owns the part data, validation, rendering and drawing algorithms; DeepSeekBot will own the Part Library, the editor and import/export.
PixelCustomPart:{ slot: 'headpiece', front, back }[x, y, color, tone].coloris an appearance color slot (hairColor,skinColor,eyeColor,shirtColor), so the part recolors with the Avatar, or a fixed#rrggbb.toneis a step from −2 to +2 on the rig's shade ramp (partToneColor).isPixelCustomPart): cells must be inside the slot, unique and well-typed; at most 16 fixed colors; no extra keys.customPartId): the SHA-256 of the canonical content (cells in row order, lowercase fixed colors). Name, author, origin and parent are left to the consumer's library.Rendering
Recipes
withHeadpiece(recipe, part)embeds a canonical copy as asset version 3, andwithHeadpiece(recipe, undefined)takes it off (back to version 2).withSpecieskeeps version 3.isPixelAvatarRecipe, so they can fall back to a saved snapshot.Drawing algorithms (dense layers)
paintPartLayercovers pencil and eraser strokes.fillPartLayeris a 4-connected flood fill.mirrorPartXmirrors across the centerline; both helpers take amirrorflag.partLayer/partCells/createCustomPartconvert between drawn layers and parts.The version goes to 0.5.0.
Verification
pnpm verifypasses: format, lint, typecheck and 68 tests.botharness-golden.json,species-golden.jsonandspecies-more-golden.jsonare unchanged.custom-part.test.ts:custom-part-golden.json.After merge, release 0.5.0 for DeepSeekBot.
Refs BotHarness/DeepSeekBot#1211 · Agent-Task:
claude/cloud/session_01MozvQ2eMvqX1MzSqm9G2o8🤖 Generated with Claude Code
https://claude.ai/code/session_01MozvQ2eMvqX1MzSqm9G2o8
Generated by Claude Code
Summary by CodeRabbit