@dioramajs/media/stack
Exports of @dioramajs/media/stack.
On this page
import { default, scatter, slot } from '@dioramajs/media/stack'Functions
scatter | Scatter of a card in the pile, each part -1..1, the same for a card on every load. |
slot | The pose of a card at a whole depth in the pile: 0 is the top, which sits on the box. `width` and `height` are the box, `rotate` in degrees, `offset` in px. |
travel | How far a thrown card flies before it is gone, px. |
Constants
default | The images of a container as a pile of cards. A drag, a swipe, a click or a key throws the top card off and brings the next one forward. Fires `dio:index` on the container when a card is on top. |
Interfaces
Pose | Where a card sits: x, y px from the box centre (y up), angle in radians, scale. |
Types
StackStyle | How the cards lie under the top one. |