election-game/backend/packages/protocol/art/avatar/README.md

11 lines
968 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 頭像部件原圖(docs/24)
每張圖都畫在同一個 200×220 的標準畫布、標準臉(鵝蛋臉、臉寬臉長 1)上,原創,授權見 web/public/assets/LICENSES.md。
- **魔術色**(程式會換成玩家選的顏色):`#ff00ff` 主色、`#800080` 主色暗面、`#00ffff` 副色、`#008080` 副色暗面、
`#ffff00` 膚色、`#808000` 膚色暗面、`#0000ff` 衣服色、`#000080` 衣服暗面、`#00ff00` 襯衫色。其他顏色照原樣畫。
- **只能用**:`svg g path circle ellipse rect polygon polyline line`,屬性只能是形狀、顏色、線寬、透明度、transform。
不准有 script、style、外部連結、文字;不能超出畫布。字(號次、名字)寫在目錄的 `text` 欄位,由程式印。
- 要分前後兩層時用 `<g id="back">`(畫在頭和身體後面)、`<g id="front">`。
- 改完跑 `pnpm avatar:build`(在 backend/ 底下):檢查+轉成 `src/avatar/*.generated.ts`。