Commit Graph

102 Commits (748c500f276d707151262b92ae4ffce8abb13571)
 

Author SHA1 Message Date
name 748c500f27 [auto] add sources.md with chart file references
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 17:21:57 -07:00
name 9d7b333fe8 merge worktree-ar-ground-threejs: debug app at /debug/, main app at /
- DebugApp.tsx: pose detection + gesture engine (from refactored branch)
- App.tsx: main game app (unchanged from main)
- Routes: /debug/* -> DebugApp, /* -> App

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 17:19:35 -07:00
name 259d255ade add routing: move current app to /debug/ path
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 17:12:38 -07:00
name ba80d19634 fix: engine cooldown returns null to prevent stacking with display timer
The cooldown was returning lastSignal every frame, which reset the
600ms display timer in usePoseLoop each frame — doubling the total
display time to ~1200ms. Now returns null during cooldown so only
the display timer controls visibility.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 17:07:25 -07:00
name 5afacc4030 remove jump and palms detection
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 17:05:51 -07:00
name 8682665e4c fix: restore 600ms detection cooldown in gesture engine
The old signalShowUntil suppressed all detection AND baseline adaptation
for 600ms after any signal. Removing it caused rapid re-triggering of
steps and baseline drift during active gestures.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 17:00:57 -07:00
name cece0630d5 remove upper framing margin: head just needs to be visible
Only the bottom boundary (feet at 85%) is enforced. The red box is now
a single bottom line instead of a full rectangle.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 16:55:53 -07:00
name cf63caa266 fix: VideoSource dispose only clears its own stream, fix StrictMode race
The dispose() was unconditionally nulling video.srcObject, which in
StrictMode double-fire would kill the second init's webcam stream.
Now only clears if video.srcObject still points to our stream.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 16:48:05 -07:00
name 6a46f00c15 fix: skip pose detection when video dimensions are zero
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 16:42:21 -07:00
name 81262ed15e refactor: modular gesture engine with callbacks, extract pose/video/UI
- gesture/types.ts: all shared types + GestureCallbacks interface
- gesture/detectors/: jumpDetector, stepDetector, palmsDetector, armsOutDetector
  as pure functions with per-detector state types
- gesture/CalibrationMachine.ts: standalone calibration state machine
- gesture/GestureEngine.ts: orchestrates detectors + calibration, fires callbacks
- gesture/GestureTelemetry.ts: graph/log sampling separated from detection
- pose/PoseDetector.ts: MediaPipe lifecycle wrapper
- pose/VideoSource.ts: webcam/file source management
- pose/usePoseLoop.ts: rAF loop calling engine.update() directly (no React in hot path)
- components/GestureOverlay.tsx: gesture label + calibration hints
- components/TransportBar.tsx: video playback controls
- App.tsx: slim orchestrator wiring hooks + components (~140 lines, down from 457)
- Delete old gestureDetector.ts monolith (511 lines)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 16:34:36 -07:00
name d57638950f [auto] add home screen menu between intro and song selection
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 16:32:55 -07:00
name 11925514b5 [auto] fix credits page to full viewport with no scrollbar
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 16:29:35 -07:00
name acc389a597 [auto] add Claude Code to team credits
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 16:29:08 -07:00
name 4799206576 [auto] fix game page to full viewport with no scrollbars
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 16:28:05 -07:00
name 8ce6b6e254 [auto] fix song select to be full page with no scrollbars
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 16:27:15 -07:00
name 49fdff5da4 [auto] add credits page, link from end game and leaderboard, fix layout padding
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 16:26:04 -07:00
name 037670976a [auto] remove navigation bar from all pages
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 16:24:13 -07:00
name 3e4e330142 [auto] fix supabase client crashing app when env vars are missing
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 16:22:16 -07:00
name df85de8778 [auto] wire complete game flow: intro → song select → game → end → leaderboard
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 16:20:06 -07:00
1102-Anderson-Ethann 293ad400b9 New UI for pages, added leaderboard and score (#3) 2026-04-11 16:13:16 -07:00
name e4d036a70e delete dead code: worldToCamera, DebugGraph, leg-raise, resizeARScene
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 16:06:56 -07:00
name 170de6636a add refactor plan for modular mediapipe + gesture callbacks
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 16:04:55 -07:00
name b1361e001f [auto] arms-out hysteresis: require arms down for 2s before re-triggering
Replaces cooldown timer with proper hysteresis. Arms must be lowered
and stay down for 2 seconds before arms-out can trigger again. This
prevents rapid toggling when arms hover near the threshold. The
pos-center and pause-resume arms-out checks don't require the
cooldown (they're one-shot transitions).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 14:11:00 -07:00
name 14fec1d0ef [auto] add 2s cooldown to arms-out to prevent rapid re-triggering
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 14:07:32 -07:00
name 741641d2cd [auto] require 15% bounds to resume from pause, show hints and red box
When paused after leaving the 10% zone, user must get back within
the tighter 15% bounds and raise arms to resume. Shows framing
hints during pause and the 15% red box.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 14:04:47 -07:00
name 2697f8761e [auto] show red box on pause, use 15% margins for framing vs 10% for gameplay
Framing requires tighter bounds (15% top/bottom) to enter.
Gameplay uses looser bounds (10%) before pausing. Red box shows
during both framing and paused states with the appropriate margins.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 14:04:03 -07:00
name fe0a50d3da [auto] simplify framing hints to 'head is out of bounds' / 'feet are out of bounds'
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 14:00:26 -07:00
name 0537a5b1cc [auto] auto-pause when body leaves red zone (head above 10% or toes below 90%)
Replaces separate head/ankle visibility checks with a unified
bounds check matching the framing red box. During gameplay, leaving
the zone triggers pause. During calibration, resets to framing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 13:59:14 -07:00
name 7cf993bd74 [auto] polish guidance text: red box reference, cleaner prompts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 13:56:50 -07:00
name d3cbaa39c3 [auto] add fullscreen toggle button in settings panel
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 13:55:58 -07:00
name 221b1c296f [auto] add fullscreen prompt on startup with Go Fullscreen / Skip buttons
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 13:55:15 -07:00
name 230437686e [auto] fix framing rectangle to 10% margins, remove floor grid
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 13:53:20 -07:00
John Montagu, the 4th Earl of Sandvich 07e5d4ee4d refactor: add common controller interface 2026-04-11 13:49:38 -07:00
name 753187b1b3 [auto] require full body within 10%-90% vertical zone, draw red target rectangle
Framing check now requires nose below top 10% and toes above bottom
10% (body fits in 80% of vertical space). Red dashed rectangle shows
the target zone during framing. Hints updated: 'head too high',
'step back', etc.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 13:47:49 -07:00
name cbceddffad [auto] revert arms-out to abs() check, widen tolerance from 0.10 to 0.15
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 13:46:13 -07:00
name bb02d40955 [auto] arms-out pauses gameplay, lower threshold to 20cm below shoulders
Arms-out during ready state triggers pause. Wrists now only need to
be within 20cm below shoulder height (was ±10cm around shoulder),
making it easier to trigger before arms are fully at shoulder level.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 13:43:55 -07:00
name 562f5b0950 [auto] fix step-right stuck: track which foot triggered, only check that foot for reset
Previously checked both feet's X displacement for step-left/right
reset, so a persistent offset in the non-stepping foot prevented
reset. Now tracks which foot triggered the step and only checks
that foot's displacement on the triggering axis.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 13:41:15 -07:00
name ef3529f950 [auto] fix step never resetting: check only the triggering axis for reset
stepsReset now checks only the X axis for left/right steps and only
the Z axis for forward/back steps. Previously used Euclidean distance
of both axes, so a persistent offset in the non-triggering axis
prevented reset indefinitely.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 13:31:42 -07:00
name 52d74bfb4e [auto] swap forward/back step labels to match actual direction
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 13:30:00 -07:00
name b32ed3310a [auto] full step log with raw toe positions, baselines, and displacements
Copy Log now exports unbounded StepLogEntry array from session start,
including: raw toe XZ (hip-relative), current baseline XZ, displacement
XZ, and active step signal per frame.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 13:27:54 -07:00
name 91d7255eae [auto] slowly adapt toe baseline when standing still to prevent drift
Applies 0.99/0.01 EMA to heelBaseL/R X and Z when no step is active,
same approach as the ankle Y baseline adaptation. Prevents the resting
position from drifting away from the threshold over time.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 13:25:46 -07:00
name 754b23010c [auto] require head visible at all times, reset to framing/paused if lost
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 13:24:37 -07:00
name e0780c4100 [auto] show specific framing hints: what's missing (head, ankles, toes, step back)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 13:20:18 -07:00
name f77297a2c9 [auto] require 10% gap below toes in framing check, revert bottom bar
Framing stage now checks toes are above 90% of frame height,
ensuring the person stands far enough back for room below feet.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 13:19:01 -07:00
name 896bb72886 [auto] add pause state on leaving frame, require arms-out to resume
Pauses when landmarks are lost during gameplay. Resumes when head,
ankles, toes are visible and arms-out is detected. Adds 100px
bottom bar below the video feed for the stage text.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 13:16:58 -07:00
name b133427f39 [auto] enlarge stage text to 48px and move to bottom of screen
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 13:13:25 -07:00
name 4ed6e679c4 [auto] add framing stage: wait for head + ankles + toes visible before calibration
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 13:12:15 -07:00
name 20ddb75708 [auto] update default step thresholds: L/R 0.17, F/B 0.12, reset 0.09
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 13:09:38 -07:00
name 13be862b79 [auto] hide graphs, coordinates, and copy log behind Show Debug toggle
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 13:08:29 -07:00
name 744a629bc4 [auto] use calibration-averaged toe positions as step baseline
Collect toe (31/32) X/Z positions during the 5s calibration and
average them for the step detection baseline. More stable than a
single snapshot. Switched from heels (29/30) to toes (31/32) for
step detection.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 13:02:24 -07:00