feat: Touch-to-interact, Ambient state, Streaming tokens (#44, #43, #16) #61

Merged
perplexity merged 1 commits from feat/touch-ambient-streaming into main 2026-03-19 16:52:15 -04:00
Owner

Three features in one sprint

#44 Touch-to-interact

  • Raycasting on tap/click (ignores drags)
  • Agent info popup: name, role, state, TALK button
  • Popup tracks agent screen position each frame
  • Click-away to dismiss

#43 Ambient state system

  • 5 moods: calm, focused, excited, contemplative, stressed
  • Smooth 2.5s eased transitions for fog, lighting, rain, stars
  • Effects.js consumes ambient multipliers
  • ambient_state WS message wired

#16 Streaming token display

  • startStreamingMessage() returns push()/finish() handle
  • Character-by-character reveal with blinking cursor
  • chat_stream WS message type for incremental tokens

New module: js/ambient.js (16th module)

Smoke test: 70/70 PASS

## Three features in one sprint ### #44 Touch-to-interact - Raycasting on tap/click (ignores drags) - Agent info popup: name, role, state, TALK button - Popup tracks agent screen position each frame - Click-away to dismiss ### #43 Ambient state system - 5 moods: calm, focused, excited, contemplative, stressed - Smooth 2.5s eased transitions for fog, lighting, rain, stars - Effects.js consumes ambient multipliers - `ambient_state` WS message wired ### #16 Streaming token display - `startStreamingMessage()` returns push()/finish() handle - Character-by-character reveal with blinking cursor - `chat_stream` WS message type for incremental tokens New module: `js/ambient.js` (16th module) **Smoke test: 70/70 PASS**
perplexity added 1 commit 2026-03-19 16:52:12 -04:00
#44 Touch-to-interact — tap/click agents to see info + start conversation:
  - Raycasting on pointer up (ignores drags/orbit)
  - Agent info popup: name, role, state, TALK button
  - Popup tracks agent screen position each frame
  - Click-away to dismiss

#43 Ambient state system — mood-driven scene atmosphere:
  - 5 moods: calm, focused, excited, contemplative, stressed
  - Smooth eased transitions (~2.5s) for fog, lighting, rain, stars
  - Effects.js consumes ambient rain speed/opacity multipliers
  - WebSocket ambient_state message wired to setAmbientState()

#16 Streaming token display — word-by-word chat reveal:
  - startStreamingMessage() returns push()/finish() handle
  - Character-by-character reveal with blinking cursor
  - WebSocket chat_stream message type for incremental tokens
  - Auto-finalizes on done=true, persists to transcript + history

New module: js/ambient.js (16th module, 70 smoke tests pass)
perplexity merged commit ade9cb72ea into main 2026-03-19 16:52:15 -04:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: perplexity/the-matrix#61