docs: add follow mode highlight & command legend design

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-03-07 16:22:53 +00:00
parent 19922efd80
commit 93df418554
@@ -0,0 +1,48 @@
# Follow Mode Highlight & Command Legend
## Problem
With many NPCs on screen, it's hard to identify which NPC you're following. Follow mode also lacks a command legend (camera mode has one).
## Design
### Highlight Effect
- Phaser `postFX.addGlow(0xff0000, outlineSize)` on the followed NPC's sprite
- Toggle on/off with `1` key (only in follow mode)
- Default: OFF
- When cycling NPCs (left/right), move glow from old sprite to new sprite (if enabled)
- Clear glow when switching back to camera mode
### Mode-Specific Key Bindings
The `1` key already gates on camera mode (`if (this.mode !== 'camera') return`). Add a parallel follow-mode branch:
- Camera mode `1`: Spawn NPC (existing)
- Follow mode `1`: Toggle highlight
### Follow Mode Command Legend
Reuse existing `CommandPanel` class with a second instance:
| Key | Label |
|-----|-------|
| ← → | Cycle NPC |
| 1 | Highlight |
| TAB | Camera Mode |
- Title: "FOLLOW" (matching camera panel's "COMMANDS" style)
- Show when entering follow mode, hide when leaving
- Same position/styling as camera mode command panel
### State
- `highlightEnabled: boolean` on GameScene (default `false`)
- `followCommandPanel: CommandPanel` on GameScene (separate instance)
### Data Flow
1. Enter follow mode → show follow command panel, hide camera command panel
2. Press `1` in follow mode → toggle `highlightEnabled`, apply/remove glow on current sprite
3. Cycle NPC → if highlight enabled, remove glow from old sprite, add to new sprite
4. Exit follow mode → clear glow, reset `highlightEnabled`, hide follow command panel