Repository navigation
fix(person): keep clothing layers apart and draw a hoodie as one - #77
Merged
Merged
Conversation
- No clothing layer passes through the one over it, while hems, necklines, sleeve ends and open fronts still show what is under them - A hoodie has its hood lying on the upper back and a pouch across the belly, each a fold shade of its color - A `belt` accessory goes under a hoodie or a jacket instead of round it, and stays over a tunic, coat, dress or robe [CONTRIBUTORS] - `drape(outer, under, unit)` in `person/sdf.ts` lifts a garment 3 mm over each layer under it wherever it covers that layer - `shapeFigure` drapes every layer over the ones before it, reading them from a 1 cm `lattice` - `BELTED_OVER` in `person/spec.ts` decides where a belt goes in the stack - Tests for `drape` and the belt order, the `Person` JSDoc and `CHANGELOG.md` updated, registry regenerated
This was referenced Nov 15, 2026
anistark
added a commit
that referenced
this pull request
Nov 15, 2026
**`Terrain` gains `shore`, a beach an avatar can walk up out of the sea.** A small island's bare coast is close to a cliff: on the workshop's "Island cove" it runs 30° to 66°, which testing the swimming in #76 showed an avatar can't climb. - `shore` is the width, in units, of a band past the land's edge where the ground falls 2 units at one slope, from 0.4 above the world ground to wading depth, then drops to the deep as before - So the beach is as gentle as it is wide: `shore: 6` is about 18°, and about 4.3 is the 25° mark - Land near the coast is lowered to meet the beach, so nothing steeper stands behind it - With a shore, `flatRadius` flattens the land alone (scaling the sea bed would steepen it), and a pad wider than the land pushes the beach out to its edge - The island grows outward by `shore`, so it needs room inside `size` **Worlds without `shore` keep every height they had** - The old path in `terrainHeight()` is untouched, and `shore` is read only on an island (one with `falloff`) - A test pins four shore-less shapes with `toBe` against heights recorded from `main` before the change **"Island cove" template** - Its terrain takes `shore: 6`: the steepest stretch between +0.3 m and -1.5 m on the collider mesh goes from 60.8° to 19.6° - `Dock` moves from `[0, 0, 19]` to `[0, 0, 9.4]` and the `Sailboat` from z 24 to z 15.5. The dock used to start 9 m out from the waterline over 7 m of water, and now starts on the sand - The campfire, rocks and person stay at height 0, and the palms move by 1 to 4 mm **Also** - `shore` slider range in the workshop, regenerated `registry/` and component docs - `person.md` picks up two prop descriptions from #77 that were not regenerated there Known limit: on a coarse grid (cells much wider than about 1.5 m) the crease at the bottom of the beach can show one steep triangle, 31° at `resolution: 32` on an 80 x 60 terrain. Testing: `just check` passes. In the workshop, a `Player` holding W walks from 1.6 m deep onto land in 2.5 s with `shore: 6`; on the old coast it slides to the bottom. Refs #76
anistark
added a commit
that referenced
this pull request
Nov 15, 2026
…es (#79) **`Pool`'s exit steps can be walked**, the stock `Player` climbs from the basin floor onto the deck and back down - The three 0.4 m blocks and the 0.47 m last rise stalled the avatar, which floats 0.3 m over the ground - The flight is now 0.25 m risers counted down from the coping, as many as `depth` needs, under one `ConvexHullCollider` wedge - The `steps` prop is unchanged **`Pool`'s basin walls are solid** - They were drawn without colliders, so an avatar on the basin floor walked out through them and fell - One `CuboidCollider` per wall, the size of its mesh **`Player` keeps its pace on a slope whichever way it walks** - ecctrl only turns its slope ray to the direction of travel under `autoBalance`, which `Player` turns off, so the ray stayed in front of the camera - `SlopeRay` in `packages/components/src/Player.tsx` turns it to follow the avatar's velocity; ecctrl is not patched - Backing down a 32° ramp goes 2.2 m/s (was 0.6), across it 2.5 (was 0.9), stairs backwards 1.7 down and 1.5 up (were 1.1 and 0.9); forward and flat-ground speeds are unchanged - Strafing straight up or down a slope now matches walking up or down it (2.0 and 2.2 m/s) instead of flat-ground speed **Also in the diff** - `apps/docs/src/content/docs/components/person.md` is regenerated: two `Person` prop descriptions changed in #77 without the page being rebuilt Testing: `just check` passes. Walked in the workshop with the stock `Player`: pool floor to deck and back, all four walls of the default pool and a `depth: 2.4` pool, and W/S/A/D on a 32° ramp, a `Staircase` and flat ground, in first and third person. Gamepad and touch joystick were not driven. Refs #76 (also edits `Player.tsx` and `Pool.tsx`)
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.
No clothing layer passes through another, as a rule of
Personitself, for every outfit and style.drape(outer, under, unit)inperson/sdf.ts: wherever a layer under a garment comes within 3 mm of its surface, or through it, the garment sits 3 mm over itlattice, which keeps a figure's build about 14% slower than beforeA hoodie reads as one
foldOf), since flat two-tone shading shows no edge where cloth lies on clothBelts go where they're worn
belt, so every hoodie and jacket had one round ittunic,coat,dressorrobe(BELTED_OVERinperson/spec.ts)Known gaps, not fixed here
Testing:
just checkpasses, with new tests fordrape(lifts where it covers, leaves a hem open, changes nothing elsewhere) and the belt order. Viewed a hoodie front and back in the docs gallery preview (stylized) and in a downstream world (punk).