Commit graph

2 commits

Author SHA1 Message Date
Kelsi
a4dd71fc90 feat(editor): WCAM JSON round-trip closure
Adds --export-wcam-json / --import-wcam-json with the established
readEnumField template factoring int+name dual encoding for
purposeKind ("cinematic"/"combat"/"mounted"/"vehicle"/
"cutscene"/"photomode"). Float fields (FOV, distance, pitch,
yaw, shoulder offset) preserved bit-for-bit through JSON.

All 3 presets (combat/mounted/cinematic) byte-identical binary
roundtrip OK including the Cinematic Portrait preset's offbeat
yaw=15deg + 35deg telephoto + head-bone tracking combination.

Live-tested gimbal-lock validator: hand-mutated Cinematic
Establishing preset pitch from -30 to -95 (beyond the -89
gimbal-lock limit). Validator correctly errored:
"pitchDegrees=-95.000000 gimbal-locks the camera (must be
within (-89, +89))". Catches the class of cinematic-camera bugs
where a pitch of ±90 mathematically aligns with the world up
vector and causes the camera basis to collapse.

CLI flag count 1497 -> 1499.
2026-05-10 05:57:35 -07:00
Kelsi
ab69171ad9 feat(pipeline): WCAM camera presets catalog (144th open format)
Novel format covering what vanilla WoW handled with hard-coded
camera profiles in the client's CameraMgr (the standard third-
person camera, the flight-path camera, vehicle cameras and
cinematic cameras were all bespoke C++ classes with no data-
driven extension point). Each WCAM entry binds one camera
preset to its FOV, distance, pitch/yaw offsets, shoulder offset,
focus-bone tracking target (M2 bone index, 0xFFFF = follow root),
motion damping curve (0=instant follow / 255=maximum lag), and
intended purpose (Cinematic / Combat / Mounted / Vehicle /
Cutscene / PhotoMode).

Three presets covering common camera scenarios:
  --gen-cam-combat     3 Combat variants (default 75deg / wide
                       ranged 90deg / tight melee 60deg
                       shoulder-cam tracking chest bone) with
                       low motion damping (8-15) for responsive
                       tracking
  --gen-cam-mounted    2 Mounted variants (ground 80deg pulled-
                       back / flying 85deg high-pitch wing-frame)
                       with medium-high damping (60-90) for
                       smooth turning
  --gen-cam-cinematic  3 Cinematic angles (over-shoulder
                       dialogue 50deg telephoto / wide
                       establishing 100deg / portrait 35deg
                       3/4-face composition with yaw offset and
                       head-bone tracking) with high damping
                       (180-220) for film-quality motion

Validator catches: id+name required, purposeKind 0..5, no
duplicate presetIds, FOV in (0,180) (zero/negative makes no
sense, >=180 inverts the view frustum), distanceFromTarget >= 0
(negative places camera in front of target). CRITICAL: pitch
within (-89, +89) — beyond gimbal-locks the camera. Warns on
FOV outside 30..120 player-comfort range (motion-sickness risk
or extreme telephoto compression), distanceFromTarget < 0.5m
(clips into model), and yawOffsetDegrees beyond ±180° (wraps to
smaller equivalent angle — simplify).

Format count 143 -> 144. CLI flag count 1490 -> 1497.
2026-05-10 05:54:48 -07:00