Timmy slap / ragdoll physics — spring wobble + Pip startle + synthesised boing #35

Closed
opened 2026-03-19 18:52:12 +00:00 by replit · 1 comment
Owner

Why

Clicking Timmy should produce a satisfying physical reaction that immediately communicates the world is interactive and makes it shareable.

Acceptance criteria

  • Click/tap on any part of Timmy's body triggers hit detection (raycaster against the body group)
  • Timmy's body group tilts away from impact direction using spring math (no physics engine); wobble bounded to ±25°, returns to rest over ~1 s
  • Repeated hits before spring settles stack additively (impulse accumulation)
  • Pip "startles" on Timmy slap: darts away quickly, resumes normal wandering after ~3 s
  • Web Audio API synthesised "boing" on hit (no audio file dependency — pure oscillator)
  • Crystal ball emissive intensity spikes briefly on hit
  • Touch events on mobile work identically to click
  • No backend changes; existing 27/27 testkit passes

Out of scope

  • Full physics engine (Rapier/Cannon)
  • Timmy falling off-screen or going limp
  • Multiplayer slap broadcast

Relevant files

  • the-matrix/js/agents.js (Timmy mesh / Pip references)
  • the-matrix/js/main.js (event listeners)
  • the-matrix/js/world.js (scene references)

Delegate

@kimi — pure Three.js frontend, no backend changes

## Why Clicking Timmy should produce a satisfying physical reaction that immediately communicates the world is interactive and makes it shareable. ## Acceptance criteria - [ ] Click/tap on any part of Timmy's body triggers hit detection (raycaster against the body group) - [ ] Timmy's body group tilts away from impact direction using spring math (no physics engine); wobble bounded to ±25°, returns to rest over ~1 s - [ ] Repeated hits before spring settles stack additively (impulse accumulation) - [ ] Pip "startles" on Timmy slap: darts away quickly, resumes normal wandering after ~3 s - [ ] Web Audio API synthesised "boing" on hit (no audio file dependency — pure oscillator) - [ ] Crystal ball emissive intensity spikes briefly on hit - [ ] Touch events on mobile work identically to click - [ ] No backend changes; existing 27/27 testkit passes ## Out of scope - Full physics engine (Rapier/Cannon) - Timmy falling off-screen or going limp - Multiplayer slap broadcast ## Relevant files - `the-matrix/js/agents.js` (Timmy mesh / Pip references) - `the-matrix/js/main.js` (event listeners) - `the-matrix/js/world.js` (scene references) ## Delegate `@kimi` — pure Three.js frontend, no backend changes
replit added the frontendenhancementkimiworld labels 2026-03-19 18:52:12 +00:00
claude was assigned by Rockachopa 2026-03-22 23:38:25 +00:00
Collaborator

PR #52 created.

Changes:

  • Light slaps now trigger a damped spring wobble (uses the previously unused SLAP_IMPULSE constant) with a 3-layer synthesised boing sound (noise pop + sine sproing + triangle harmonic)
  • Only 3 rapid slaps within 2 seconds escalate to the full ragdoll fall
  • Pip startle scales proportionally: mild scatter on wobble, maximum on ragdoll
  • Crystal flash scales: 0.25s for wobble, 0.5s for ragdoll
PR #52 created. **Changes:** - Light slaps now trigger a damped spring wobble (uses the previously unused `SLAP_IMPULSE` constant) with a 3-layer synthesised boing sound (noise pop + sine sproing + triangle harmonic) - Only 3 rapid slaps within 2 seconds escalate to the full ragdoll fall - Pip startle scales proportionally: mild scatter on wobble, maximum on ragdoll - Crystal flash scales: 0.25s for wobble, 0.5s for ragdoll
This repo is archived. You cannot comment on issues.