Skip to content

[feat] Eye-follow on hover (deferred polish from v0.1 spec) #8

Description

@ikseong00

Goal

When the cursor hovers over the pet, the pupils track the cursor position with a small offset.

Why

Deferred from the v0.1 spec (docs/specs/2026-05-15-pet-overlay-ui-design.md section "Hover"). Small detail but it makes the pet feel alive.

Acceptance

  • When cursor is inside the pet window and over the pet sprite, pupils translate 1-2px toward cursor.
  • Disable when not hovering (pupils return to neutral position).
  • Works across all 4 phase sprites (Egg might not have eyes — that's OK, just no-op).

Hints

  • Add id="left-eye-pupil" / id="right-eye-pupil" (or similar) to each phase[N].svg.
  • In renderer/components/Pet.tsx, on pointermove, compute cursor offset relative to pet center and apply transform: translate(...) to the pupil elements via inline style or a separate React effect.
  • Cap the offset (e.g. ±2px) so eyes don't fly off the face.
  • Use requestAnimationFrame throttle if it feels jittery.

Out of scope

  • Eyes blinking, eyes squinting on click, etc — those would be neat but separate.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions