Scroll velocity: 3D planes
A 3D carousel with scroll velocity-linked wave effect using Motion for React.
Introduction
The "Scroll velocity: 3D planes" example creates an immersive 3D carousel, creating a wave-like effect that ripples through the gallery with an intensity linked to the current scroll velocity. When you hover over an image, it lifts toward you and reveals an animated label with Motion's ScrambledText component.
This example uses several Motion APIs to achieve these effects:
useMotionValue– tracks scroll position.useMotionValueEvent– subscribes to motion value changes.useSpring– creates smooth, physics-based animations.useVelocity– detects scroll speed.useTransform– calculates 3D transforms.wrap– wraps values within a range for infinite looping.AnimatePresence– handles exit animations.- Motion+
ScrambleText– animates the text reveal effect. onPan– enables touch/drag interactions.
