Snap scroll
snap-scrollA vertical reel of cards scrolls past in 3D and snaps onto B; neighbours dim and tilt away.
Install
$ npx paper-motion add snap-scrollCopies the code to moves/ in your project, yours to edit.
Tune it, then add it to your kit
0.0s
Parameters
duration
count
gap
perspective
import { snapScroll } from './moves/snap-scroll.js';
// in s.update(t)
snapScroll(a, b, p);Defaults
Notes
- A vertical reel of cards (copies of A and B between them) scrolls past in 3D and snaps onto B; neighbours dim, shrink and tilt away.
- Stack A and B in one positioned slot (their parent); give the slot overflow:hidden to keep travel inside it.
- Pass the real duration in seconds and call it through p = 1: that is when it hides the layers it made.
- Render with --motion-blur 5.
- Draws live copies of the card: a Paper shader canvas inside comes out blank.
Spec
- Id
- snap-scroll
- Type
- Component transitions
- Version
- 1.0.0
- Engine
- >=0.2.0
- License
- MIT