Skip to content

Commit f28a255

Browse files
wondopamineclaude
andcommitted
feat(world): consistent object-peek flow with companion close-up + walk animation
Every world object now routes through the same Hover → Peek modal → "Find out more" → camera close-up on the companion flow. Trees (values) and fruits (skills) gain KIND_CONFIG entries that mirror flower/mailbox/ telescope, so a click on a tree no longer shortcuts past the peek modal into a wandering-Kira narration. When the lore panel is open Kira holds position and turns to face the camera — same yaw-tween shape KiraNarrator already uses, shared via a new KiraTurnState alias and a _isTalking gate that the engine wander loop now respects via objectPeek.step === 'pickup'. While walking she gets a gentle step-synced wing flap (~10°, half the narration flap amplitude) reusing the same module-scope quaternion scratch so no per-frame allocations land. The mohawk hair tufts are now palette-driven (palette.body, tinted via the MB_HairTuft material name so species switches recolor them) and graded clearly bigger→smaller from front to back so the crest reads from any 3/4 angle. Removed the floating n/threshold sprout badge — the count was distracting and frequently mis-anchored; it now lives in the click-to-peek panel only. Removed the procedural-flower _spawnPickup that lifted a copy of the bloom onto Kira's chest during lore (read as a bug). Deleted the now-unreachable TREE_/FLOWER_/FRUIT_NARRATION tables and their branches in narrationFor() — those click paths route through ObjectPeek now and narrationFor() only handles `kira` herself. Bug fixes surfaced by code review: ObjectPeekController.open() now clears _kiraTurn + _kiraRestYaw on entry so rapid open→close→open within ZOOM_DURATION can't capture a tween-intermediate rotation as "rest" and leave Kira stuck camera-facing; dispose() nulls step/_kiraTurn/ _kiraRestYaw so a late RAF tick can't keep wander frozen on a dead controller; ObjectPeekController.update() keeps kira.facing in sync with rotation.y during the turn so resuming wander doesn't snap. Small polish: flower eyebrow flips from FLOWER → INTEREST to match the VALUE / SKILL parallel; fruit peekAnchorLift drops from 0.5 → 0.35 so the click-peek anchor lines up with the host-aware hover lift for bush berries; _isTalking() drops its underscore to become a public method; the empty sprouts-badge-layer DOM container + dead CSS selector are gone. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 3211829 commit f28a255

4 files changed

Lines changed: 345 additions & 287 deletions

File tree

0 commit comments

Comments
 (0)