Skip to content

feat: add Person, procedural characters with styles and skins - #7

Open
anistark wants to merge 1 commit into
mainfrom
feat/npc-component
Open

feat: add Person, procedural characters with styles and skins#7
anistark wants to merge 1 commit into
mainfrom
feat/npc-component

Conversation

@anistark

Copy link
Copy Markdown
Contributor
  • New person component: a seeded, clothed, articulated human figure with kind role presets (villager, merchant, guard, sailor, farmer, noble, scholar, traveler), gender/age/height/build silhouettes, hair, facial hair, outfits, hats, accessories, and poses
  • style templates set the whole look: anime (default, big lit eyes, ~6-head proportions) or realistic (canonical 7.5-head figure)
  • skin swaps a full cosmetic loadout (clothes, colors, headwear, accessories) as one JSON prop; nine named presets ship as PERSON_SKINS, from festival to pirate
  • Figures breathe, blink, shift their weight, and turn their head to watch you; detail drops to a cheap silhouette past ~18 units
  • physics={false} turns one into a bare visual, which is how Player gets its new third-person body
  • Trait precedence is explicit prop > skin > kind > seed, so <Person seed={3} /> is a complete villager and every prop narrows it

For devs:

  • Geometry is lathe profiles (tapered limbs, one-piece elliptical torso), built in one useMemo and animated via joint groups in useFrame; one capsule collider
  • New styles are one StyleSpec record; skins are PersonSkin bundles resolved by name or object
  • Registered in index.ts, registry.ts, registry/registry.json (category character); manifest and component doc regenerated; gallery preview + SEEDED entry
  • The docs library world places a librarian and a traveler and hands Player a Person avatar

- New `person` component: a seeded, clothed, articulated human figure with `kind` role presets (villager, merchant, guard, sailor, farmer, noble, scholar, traveler), gender/age/height/build silhouettes, hair, facial hair, outfits, hats, accessories, and poses
- `style` templates set the whole look: `anime` (default, big lit eyes, ~6-head proportions) or `realistic` (canonical 7.5-head figure)
- `skin` swaps a full cosmetic loadout (clothes, colors, headwear, accessories) as one JSON prop; nine named presets ship as `PERSON_SKINS`, from `festival` to `pirate`
- Figures breathe, blink, shift their weight, and turn their head to watch you; detail drops to a cheap silhouette past ~18 units
- `physics={false}` turns one into a bare visual, which is how `Player` gets its new third-person body
- Trait precedence is explicit prop > `skin` > `kind` > seed, so `<Person seed={3} />` is a complete villager and every prop narrows it
For devs:
- Geometry is lathe profiles (tapered limbs, one-piece elliptical torso), built in one `useMemo` and animated via joint groups in `useFrame`; one capsule collider
- New styles are one `StyleSpec` record; skins are `PersonSkin` bundles resolved by name or object
- Registered in `index.ts`, `registry.ts`, `registry/registry.json` (category `character`); manifest and component doc regenerated; gallery preview + `SEEDED` entry
- The docs library world places a librarian and a traveler and hands `Player` a `Person` avatar
Sign up for freeto 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.

1 participant

@anistark