Commit Graph

19 Commits

Author SHA1 Message Date
tfrere 7b7c537426 feat: soccer-ball look for the kickable ball
Replace the beach-ball CanvasTexture with an equirectangular soccer
pattern: off-white base, a black cap at each texture pole (full-width
strips, dodging the equirect pinch) and two staggered rings of five
pentagons with 1/cos(lat) horizontal stretch compensation. Sphere
segments bumped to 48x32 and max anisotropy enabled so the pole caps
stay round up close.

Also set condim=6 on the ball geom: with the default condim 3 the
rolling/torsional friction coefficients were silently ignored and a
rolling ball never decelerated (verified: now 0.27 -> 0.001 m/s in 6 s).

Cache-buster bumped to 27.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 14:44:11 +02:00
tfrere bbe381e114 feat: kickable ball (B / pad Y) and detachable chase camera (C)
Ball: a light free sphere injected into the MJCF after the robot body
(keyframe qpos grown 21 -> 28, ball parked 50 m away by default). B or
gamepad Y pops/respawns it ~0.35 m in front of the duck with a small
jitter; a watchdog teleports it back when it rolls past the grid fade
(3 m); R re-parks it. Rendered as a procedural beach ball, local-only
(not shared with multiplayer ghosts).

Camera: chase mode on by default eases the camera behind the duck's
heading at the current orbit distance (wheel zoom preserved); dragging
detaches back to free orbit-follow, C toggles chase back on. HUD keycaps,
welcome modal and README updated; cache-buster bumped to 26.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 14:29:07 +02:00
tfrere ef74255166 feat: one-shot kick moves from the runtime's ball-kick policies
ball_kick_left/right.onnx (same 61-dim obs interface) run for a fixed
0.5 s window with zeroed commands, then hand back to walking - same
mechanics as the robot runtime. F on the keyboard alternates feet,
RB / LB on the gamepad pick explicitly. Kicks only launch from a
standing walk and are mutually locked with the roll.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 14:07:29 +02:00
tfrere 14440e0fbe fix: harden mode state machine + per-duck randomized chirps
State machine:
- sit/stand hand-over timers are now cancellable and cleared by every
  transition entry point (setMode, triggerRoll, resetSim); a stale 2 s
  stand-up timer could previously flip a sitting or rolling duck to the
  walking policy mid-motion
- resetSim cancels any roll in flight and pending timers, always lands
  on walk (R mid-roll no longer replays the roll on the reset duck)
- rolls only launch from a standing walk, not from a sit
- RT quack uses a Schmitt trigger (fire at 0.35, re-arm below 0.2):
  analog jitter around a single threshold caused multiple quacks

Sound:
- ship the runtime's four chirp voice banks (12 takes each); each
  colourway has its own duck voice and every quack picks a random take

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 14:02:45 +02:00
tfrere 201c372933 feat: duck-head modal logo, input lockout mid-roll, quieter quack
- welcome modal uses the site's duck-head mark (open variant on hover)
  instead of the wordmark sticker
- all movement/mode inputs are ignored while a roll is in flight; the
  existing deterministic completion check (tipped then upright, 3 s cap)
  releases the lock, no arbitrary timer
- quack.wav only plays on the gamepad right trigger; mode/colour changes
  keep the silent jaw flap

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 13:55:16 +02:00
tfrere ee2d470a87 feat: ZQSD turn keys + wordmark-only welcome modal
- physical A/D keys (Q/D on AZERTY) now turn instead of strafing;
  strafe moves to the physical Q/E row (A/E on AZERTY)
- welcome modal drops the floating duck sticker, keeps the wordmark

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 13:48:26 +02:00
tfrere ab9dec213e feat: modal logo artwork + sync colour variants from pollen site
- welcome modal now uses the Microduck sticker + wordmark press assets
  (LFS-tracked PNGs, signed like every other private-Space subresource)
- variants.js replaced with the site's 3d-module version: dedicated
  tongue/hips/sideShells slots, black leg motors, uniform yellow/orange
  shoe, and orange lower beak on the blue scheme
- swatches honour the per-variant swatch override (purple dot is purple)
- duck.js/variants.js dynamic imports reuse rl.js's ?v= cache-buster

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 13:40:59 +02:00
tfrere 3e94349c2c feat: show welcome modal on every load
Drop the localStorage first-visit gate: the modal now opens on each
startup and stays reopenable from the top-left brand.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 13:22:11 +02:00
tfrere 16963004d2 feat: welcome modal explaining the playground
Blurred-backdrop dialog shown on first visit: what runs in the browser
(MuJoCo WASM + ONNX policies), controls, gamepad and multiplayer ghosts.
Dismiss via button, Escape or backdrop click; stored in localStorage,
reopenable by clicking the top-left brand.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 12:36:45 +02:00
tfrere a8ad7ec412 feat: live multiplayer ghosts over WebRTC (Trystero/Nostr)
Every open tab broadcasts its duck pose (trunk + joints + jaw + colour)
at 10 Hz over WebRTC data channels with serverless Nostr signaling, and
renders other visitors as translucent ducks (capped at 3). Peers online
count shows in the telemetry line.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 12:11:30 +02:00
tfrere 2a64b171ba feat: per-key hint highlighting, no default forward command, rename roulade to roll in UI and internals
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 11:22:47 +02:00
tfrere a67f56b984 feat: HUD UX pass - state label with slot-machine roll, keycap hints, per-device highlighting, quack sound from the runtime
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 11:15:19 +02:00
tfrere 65860b2623 feat: gamepad support mirroring the robot runtime mapping
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 10:37:29 +02:00
tfrere ee81e70ae5 feat: one-shot roulade on Space with auto-return to walk, drop reset button
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 10:30:47 +02:00
tfrere 5937cda5be fix: propagate private-space __sign JWT to all same-origin requests
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 10:12:58 +02:00
tfrere 073d6283e9 feat: infinite shader grid, edge-anchored UI, drop hero title
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 10:06:57 +02:00
tfrere c9f7a6483c feat: follow camera keeps constant distance to the duck
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 09:59:08 +02:00
tfrere db84791e5b feat: standalone Microduck RL playground (MuJoCo WASM + ONNX policies)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 09:55:45 +02:00
frere thibaud df95ff0a28 initial commit 2026-08-20 07:53:36 +00:00