Skip to content

Follow the body, and let the room set the stage - #31

Merged
WWStoryMode merged 1 commit into
mainfrom
feat/follow-camera
Oct 19, 2026
Merged

WWStoryMode merged 1 commit into
mainfrom
feat/follow-camera

Conversation

@WWStoryMode

Copy link
Copy Markdown
Owner

The camera follows the body

The stage camera was framed on a body at the origin, and real models do not stay there — a line covers 2.11 m on Kimodo and 3.89 m on SnapMoGen. Simulated against the installed three, on a body covering that 3.89 m at the renderer's own 3.55 m and 46°:

  without follow   body on screen  55.1% of frames
  with follow      body on screen 100.0% of frames

  worst lag behind the body    0.266 m
  orbit angle/distance drift   3.6e-15 m     (the viewer's framing preserved exactly)
  spread over 30/60/120 Hz     1.0 cm

So for nearly half of a travelling phrase the body was off screen — and out of its own spotlight, which is a radial gradient pinned to the centre of the viewport.

It moves the viewpoint and never the motion. Displacement is a finding in this project — how far a body goes is part of how the model read the prompt — so nothing is subtracted: the floor still streams past underneath and the floor-path register still carries the whole trace. That is a different thing from pelvis-aligning the motion, which stays parked.

Option A of the three that were surveyed — the lazy pan. The orbit target eases toward the pelvis's x/z and the camera position moves by the same delta, which is what keeps it a pan and preserves whatever angle and distance you had orbited to. The dead-zone variant is this plus a zone test on the same function, not a rewrite.

The arithmetic is in follow.ts, out of the animation loop, because a camera that overshoots, or that eases differently on a 60 Hz laptop and a 120 Hz projector, is wrong in a way that is hard to see and easy to argue about. 1 - exp(-rate · dt) composes exactly, so two half-steps land where one whole step does.

Not applied to the triptych: equalising travel across the panels would hide the difference between a model that covers 3.89 m and one that covers 0.09 m, which is the comparison those panels exist to make. Not applied to the bench either, where travel is easier to judge against ground that holds still.

Three controls, because a room's needs are decided in the room

key control default
Camera follow F follow checkbox on in performance, off on the bench
Phrase overlay O phrase checkbox on
Speed T cycles · [ ] step speed select 0.1 · 0.25 · 0.5 · 0.75 · 1 · 1.5 · 2

Boot flags for a projector nobody should have to type at: ?follow=0, ?phrase=0, ?speed=0.25, read after the mode flags so ?perform=1&follow=0 opens the stage with a still camera.

#app.performing .toggle { display: none } hides the transport's toggles, so the visible controls serve the bench and the keys do the work in the room — the same reason esc is always live. The overlay's footer now lists them.

One list of speeds. There were briefly two — a short cycle for T and the full set for the select — and the only thing that bought was 1.5× and 2× being unreachable by the key whose whole job is changing the speed. tempo.ts is extracted and tested for exactly that: the first test asserts the set of speeds reachable by repeated cycling equals the full list, which two lists could not survive.

Performance opens at real time, not half speed

The argument for 0.5× still holds — a body has to be able to follow and re-embody what it sees — but it is the performer's judgement rather than something the instrument imposes on arrival, and it only became reasonable to drop once every speed was one keypress away.

This reverses a documented rationale. README.md, docs/usage.md and docs/lecture-performance.md all stated half speed; all are corrected rather than left contradicting the code.

Two legibility fixes for a projector, both measured

  • The keyboard hints rendered at 1.73:1 against the performance background — --ink-faint at opacity: 0.55, where text that small wants 4.5:1, and the base colour alone only reaches 3.22:1 so the opacity was not the whole problem. The whole meta row is --ink-dim now at 7.63:1, and 11px → 12px.
  • A long line covered the body it described. Day 4's level-E prompts average 38.7 words, so a line really can be a paragraph. The phrase is capped at 30vh at 24px — and when it is genuinely cut it fades out rather than ending on a clean edge, because a clean edge reads as a finished sentence and misrepresents what the body is answering. The fade is set from scrollHeight vs clientHeight at each line boundary, so short phrases are untouched.

What this does not settle

  • The ghost-cloud. It follows the selected body, so the far siblings leave the frame — and the far siblings are where roughly three quarters of the spread between them lives. Recorded as open in roadmap.md, to be decided from the back of a room rather than at a desk.
  • The spotlight still does not travel. Following the body centres it and therefore lights it, which fixes the symptom and not the cause. A body deliberately left off-centre would still be outside the light.
  • No way to scroll to a clipped phrase. The overlay is pointer-events: none so it cannot intercept drags on the stage; the full line is readable in the poem rail.

Verification

tsc clean; 100 pass, 0 fail — 13 of them new (6 in follow.test.ts, 7 in tempo.test.ts).

Not verified by hand in a browser. The pan is simulated headlessly and the arithmetic is unit-tested; the controls, the key bindings, the clipped-phrase fade and the contrast change are verified by inspection and measurement only. The speed default, the 24px and the FOLLOW_RATE of 1.8 are all judgements about feel that want a projector.

🤖 Generated with Claude Code

https://claude.ai/code/session_014yJSPiRjB5WvTH2x4LB8V6

The stage camera was framed on a body at the origin and real models do not stay
there: a line covers 2.11 m on Kimodo and 3.89 m on SnapMoGen. Measured on a
body covering that 3.89 m, it was on screen for 55% of the phrase and walked out
of its own spotlight, which is a radial gradient pinned to the centre of the
viewport. The camera now eases after the pelvis in x and z, trailing it by at
most 0.27 m so it reads as an operator following a dancer rather than a body
pinned to the glass.

It moves the viewpoint and never the motion. Displacement is a finding in this
project — how far a body goes is part of how the model read the prompt — so
nothing is subtracted, the floor still streams past underneath and the floor
path still carries the whole trace. That is a different thing from
pelvis-aligning, which stays parked.

The pan arithmetic is in follow.ts, out of the animation loop, because a camera
that overshoots or that eases differently on a 60 Hz laptop and a 120 Hz
projector is wrong in a way that is hard to see. 1 - exp(-rate * dt) composes
exactly, so two half-steps land where one whole step does; measured drift of the
viewer's own angle and distance while following is 3.6e-15 m.

Then three controls, because what a room needs is decided in the room:

- F, and a checkbox, for the camera follow. On entering performance, off
  leaving, overridable at any point.
- O, and a checkbox, for the phrase under the body. Hiding it leaves the body
  alone on the stage.
- A speed control, T to cycle and [ ] to step. ONE list of speeds: there were
  briefly two, a short cycle for T and the full set for the select, and the only
  thing that bought was 1.5x and 2x being unreachable by the key whose job is
  changing the speed. tempo.ts is tested for exactly that.

The transport's toggles are hidden while performing, so the visible controls
serve the bench and the keys do the work in the room — the same reason esc is
always live. The overlay now lists them.

Performance opens at real time rather than half speed. The argument for 0.5x
still holds, but it is the performer's judgement and not something to impose on
arrival, and it only became reasonable to drop once every speed was a keypress
away. README.md, usage.md and lecture-performance.md all claimed half speed and
are corrected rather than left contradicting the code.

Two legibility fixes for a projector, both measured against the performance
background:

- The keyboard hints rendered at 1.73:1 — --ink-faint at opacity 0.55, where
  text that small wants 4.5:1, and the base colour alone only reaches 3.22:1.
  The whole meta row is --ink-dim now at 7.63:1, 11px to 12px.
- A long line covered the body it was describing. Day 4's level-E prompts
  average 38.7 words, so a line really can be a paragraph. The phrase is capped
  at 30vh at 24px, and when it is genuinely cut it fades out instead of ending
  on a clean edge, because a clean edge reads as a finished sentence and
  misrepresents what the body is answering.

What this does not settle: with the ghost-cloud on it follows the selected body
only, so the far siblings leave the frame — and the far siblings are where
roughly three quarters of the spread lives. That stays a research decision,
recorded in roadmap.md, to be made from the back of a room. The spotlight still
does not travel either; following the body centres it and therefore lights it,
which fixes the symptom and not the cause.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yJSPiRjB5WvTH2x4LB8V6
@WWStoryMode
WWStoryMode merged commit 4ca2e78 into main Oct 19, 2026
2 checks passed
@WWStoryMode
WWStoryMode deleted the feat/follow-camera branch October 19, 2026 14:37
Sign up for free to 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