feat(family): mouse parallax + neighbor hover-lift (4a)#9
Open
ffllyygod wants to merge 1 commit into
Open
Conversation
Desktop-only: cursor pans ring ±0.18 rad; non-active packs lift on hover (scale 0.72→0.78, z+0.1). Both gate on hover:hover+pointer:fine + !reducedMotion. snapTo/nudge pause parallax 150ms to avoid fighting click-to-snap easing. - use-family-controls: parallaxRef, pausedUntilRef, setParallax, getParallax, needsParallax. Reduced-motion zeros + ignores writes. - CanvasScene: Ring useFrame adds clamped parallax offset; hoveredIndex state bumps non-active pack scale + z. frameloop "always" when hovering. - TheFamilyClient: matchMedia probe for desktop-hover; onPointerMove + onPointerLeave wired to setParallax. - +3 vitest cases covering setParallax write, post-snap pause window, reduced-motion no-op. Spec: docs/superpowers/specs/2026-05-18-the-family-r3f-cinema-design.md §7.2 PRD: 002_the-family-r3f-cinema Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task 4a — Mouse parallax + neighbor hover-lift
Brief:
.karimo/prds/002_the-family-r3f-cinema/briefs/4a_the-family-r3f-cinema.mdWave 7 · Complexity 4/10 · Model opus
Spec ref:
docs/superpowers/specs/2026-05-18-the-family-r3f-cinema-design.md§7.2Summary
Desktop-only cinematic affordances on the §05 The Family ring.
(hover:hover) and (pointer:fine)+!reducedMotion— touch / coarse-pointer / reduced-motion users see none of it.snapTo/nudgeopen a 150ms pause window during whichgetParallax()returns{0,0}so the cursor doesn't fight click-to-snap easing.Files
components/about/TheFamily/use-family-controls.ts—parallaxRef,pausedUntilRef,setParallax,getParallax,needsParallax,PARALLAX_PAUSE_MS(= 150ms). Reduced-motion zeros + ignores writes;needsTickextended.components/about/TheFamily/use-family-controls.test.ts(new) — 3 vitest cases: setParallax write, post-snap pause window, reduced-motion no-op.components/about/TheFamily/CanvasScene.tsx— Ring useFrame adds clamped parallax offset; per-packhoveredIndexstate lifts non-active packs;enableHoverprop gates hover handler attachment. Frameloop "always" while hover is active.components/about/TheFamily/TheFamilyClient.tsx—matchMedia('(hover: hover) and (pointer: fine)')probe;onPointerMovechained (drag + parallax);onPointerLeaveresets to {0,0}.Evidence
3 new cases under
useFamilyControls — parallax (PRD 002 task 4a):setParallax writes (x, y) into parallaxRef.currentsnapTo opens a 150ms pause window during which getParallax returns {0,0}reducedMotion=true: setParallax is a no-op (ref stays at {0,0})Downstream
needsParallax+parallaxRefexports are stable. No API removals.Closes karimo task 4a
🤖 Generated with Claude Code