Skip to content

Replay 3D: FicTrac-style ball that rolls with the recorded data - #222

Merged
mbreiser merged 1 commit into
mainfrom
claude/arena-playback-port-5509fc
Sep 24, 2026
Merged

mbreiser merged 1 commit into
mainfrom
claude/arena-playback-port-5509fc

Conversation

@mbreiser

Copy link
Copy Markdown
Contributor

Lab request: make the replay ball realistic.

  • Ball rotation from FicTrac: the replay core integrates the ball orientation per sample (ballDelta/ballStep in js/studio-replay.js, kinematics.js conventions — yaw with heading changes, roll under forward and side steps; the tethered fly stays fixed facing the display). Gaps (>250 ms) and FicTrac-reset jumps are skipped; heading wrap at ±π handled. Sent to the viewer as state.ball (quaternion, validated in normalizeReplayState). Seek-priming integrates the same path, so seek == play (tested).
  • FicTrac-style markings drawn in the ball's shader: large black blobs + a few sharp-edged convex shapes (triangles, quad, pentagon, L) from a fixed seed — easy to track between frames, no texture seam, same lighting/LED glow.
  • A reloaded 3D window now re-links instead of being dropped.

Tests: rotation directions (forward, right turn, right side-step, forward along a 90° heading), gap/reset skipping, heading wrap, seek-vs-play ball equality, quaternion normalization in the viewer protocol. pixi run test green. Browser-verified in Chrome on Shubham's fu68da7q run.

🤖 Generated with Claude Code

- The replay core integrates the ball's orientation per FicTrac sample
  (ballDelta/ballStep, kinematics.js conventions: +Δheading about +Y,
  −forward about +Z, +side about +X; gaps/reset jumps skipped; heading wraps
  handled) and sends it as state.ball (quaternion) — seek-priming integrates
  the same path, so seeking and playing agree.
- The viewer applies it and draws FicTrac-like markings in the ball shader:
  large black blobs + sharp-edged convex shapes (triangles, quad, pentagon,
  L) from a fixed seed — no texture seam, lit like before (LED glow too).
- normalizeReplayState validates/carries the ball quaternion.
- A reloaded 3D window re-links instead of being forgotten.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mbreiser
mbreiser merged commit 86a6895 into main Sep 24, 2026
1 check passed
mbreiser added a commit that referenced this pull request Sep 25, 2026
Conflict: the arena_studio.html footer line — kept v0.89, refreshed the ET
timestamp. tests/test-studio-replay.js pinned the footer to v0.88 (added by
#222); bumped to v0.89 so the pixi test chain runs to the end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mbreiser
mbreiser deleted the claude/arena-playback-port-5509fc branch September 28, 2026 22:15
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