Add presentation-only camera.zoom so standing motions fit the canvas
The rig is ~211 canvas units tall standing but the canvas has 152 above
the ground line - every motion to date is seated or on the floor. A
per-motion "camera": {"zoom": ...} now scales the drawn output (figure,
props, mat, stroke widths) about the ground-center anchor in both the
reference renderer and the in-app view. Pure view transform: pins, prop
coordinates, and the Swift-solver fixtures stay in full-size authored
units; zoom 1 is byte-identical to before.
Claude-Session: https://claude.ai/code/session_01HJDQQDA9QdP8zByg43H5v3
This commit is contained in:
@@ -80,6 +80,16 @@ never touches a motion script** — proportions are the skeleton's problem.
|
||||
camera also orbits while the motion loops (`--orbit`; the in-app renderer
|
||||
slowly orbits **every** exercise, machines included — props have
|
||||
world-space 3D form and turn with the figure).
|
||||
- **Zoom** — the skeleton is ~211 canvas units tall standing but the canvas
|
||||
has only 152 above the ground line, so standing motions author full-size
|
||||
anatomy (coordinates may run past the canvas top) and set
|
||||
`"camera": {"zoom": 0.7}` to fit. Zoom is **presentation-only**: a uniform
|
||||
scale of the drawn output (geometry, props, mat, stroke widths) about the
|
||||
ground-center anchor `(160, 152)`, applied after all solving — pins, prop
|
||||
coordinates, and the Swift-solver fixtures stay in full-size authored
|
||||
units, and the ground line maps to itself so planted feet stay planted.
|
||||
Typical values: ~0.7 standing tall, ~0.75–0.85 hanging or seated with arms
|
||||
overhead; omit it (1) for lying, kneeling, seated, and bent-over motions.
|
||||
- **Elevation & the mat** — the default viewpoint pitches down 10°
|
||||
(`CAMERA_PITCH`; override per motion via `"camera": {"pitch": ...}`), and
|
||||
the ground is drawn as an **exercise mat**: a world-space quad sized to the
|
||||
|
||||
Reference in New Issue
Block a user