Repository navigation
feat(avatar): every hair piece colored and built-in headpieces (0.9.0) - #17
Conversation
Asset version 4 adds bangs, back hair and strand colors that default to the hair color, a single strand piece, and built-in ears, horns, halo and head wings in the headpiece slot, worn alongside an accessory, with the base behind the hair and the far side hidden when turned. withPieces upgrades only on edit and moves a headpiece accessory into the slot, so saved recipes render unchanged. Released as 0.9.0. Refs: BotHarness/DeepSeekBot#1217 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 (8)
✨ 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 |
Refs: BotHarness/DeepSeekBot#1219 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 review Generated by Claude Code |
|
…mpotent Version 4 always uses the owner-based piece recolor, so a no-op color changes nothing; owned pixels exclude headpiece, drawn-over, eye and glasses pixels, and a flower's petals ignore the back hair color. Variants are rendered once per color. A strand is hidden without bangs, never covers bangs or side hair, and no longer moves the hair shading. withPieces returns a version 4 recipe unchanged. Refs: BotHarness/DeepSeekBot#1217 Agent-Task: claude/cloud/session_01MozvQ2eMvqX1MzSqm9G2o8 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MozvQ2eMvqX1MzSqm9G2o8
|
CodeRabbit is rate-limited (one review per hour), so an independent review agent checked this diff instead. Confirmed: v1–v3 validate and render unchanged, and older consumers reject v4. It found no holes in the v4 key accounting or in Fixed in c961f22, with regression tests:
Generated by Claude Code |
Summary
This is the rendering side of BotHarness/DeepSeekBot#1217, released as
@botharness/pixel-avatar0.9.0. It adds asset version 4.bangsColor,backHairColorandstrandColorjoinleftSideHairColor/rightSideHairColor, and each defaults tohairColor. A piece is recolored only on the pixels it owns: visible back-hair pixels, or that piece's live hair pixels, plus the outline next to them. Recipes that set only side colors keep the previous algorithm byte for byte.strand(ahoge,curl,double) is split out of today's ahoge into its own piece. It is shaded like hair and hidden wherever the hair is hidden (hiddenChoiceslistsstrand).catears,bunnyears,horseears,horns,haloor the newwings, or a Custom Part, worn together with any accessory.withPieces(recipe)raises a recipe to version 4 and moves an accessory that is now a headpiece into the empty headpiece slot. It runs only when the Human edits. Saved recipes keep the old accessory and render byte-identically.withBuiltInHeadpiece/builtInHeadpieceset and read the built-in headpiece.withCustomPartkeeps a version 4 recipe at version 4.wornPartignores a built-in headpiece.Older consumers reject version 4 through
isPixelAvatarRecipe, so they can show a saved snapshot.Verification
pnpm verifypassed: format, lint, typecheck, and 99 tests.botharness-golden,species*,custom-part) are unchanged.pieces.test.tscovers:withPiecespieces-golden.jsonentries for every headpiece and strand (front, turns and mouth layers), plus per-piece colorsRefs: BotHarness/DeepSeekBot#1217
🤖 Generated with Claude Code
https://claude.ai/code/session_01MozvQ2eMvqX1MzSqm9G2o8
Generated by Claude Code