Skip to content
Components61 / 118

Spiral Deck

A deck of cards that uncoils into a 3D spiral as you scroll. It starts as one neat stack; the cards sweep out one after another along a curving arc and open into a vortex, small and far at its heart and large and close at its rim. Keep scrolling and it turns, then the camera flies into it until the cards surround you. The camera leans after the cursor and the card under it lifts. Or let it loop on its own.

Scroll-drivenThree.js3D spiralCard deckFly-throughGSAP
Scroll to uncoil the deck

Tweak

LIVE

Motion

Driven by

Spiral

1.55

Fly into it at the end

Props

7 props
  • cards{ src?; draw?; alt? }[]
    The cards: an image, or a draw(ctx, w, h) function that paints the face (512 x 640).
  • mode"scroll" | "loop"
    Scroll drives it, or it plays on its own.default "scroll"
  • scroll"page" | "self"
    With mode scroll: pin in the page, or scroll inside its own box.default "page"
  • lengthnumber
    Scroll length, in viewport heights.default 4
  • turnsnumber
    How many turns the spiral makes.default 1.55
  • flyThroughboolean
    Fly into the spiral at the end.default true
  • classNamestring
    Extra classes (give it a height with mode loop).