import { Interpolation, Theme } from '@emotion/react'; import { Animation } from '@gamepark/react-client'; import { Shuffle } from '@gamepark/rules-api'; import { ItemContext } from '../../../locators'; import { ItemAnimations } from './ItemAnimations'; import { MaterialGameAnimationContext } from './MaterialGameAnimations'; /** * Default duration of the shuffle animation, in seconds. */ export declare const defaultShuffleDuration = 1.5; /** * Fine tuning of the riffle played when items are shuffled. */ export type ShuffleAnimationConfig = { /** * How many times the items are cut apart and let back in. * @default 2 */ riffles?: number; /** * How far the two packets pull apart, as a ratio of the item width. * @default 0.9 */ spread?: number; /** * How high (in em) the items rise above the table while they are out of the pile. * @default 4 */ lift?: number; /** * Sideways play given to the packets, as a ratio of the item height, so they don't look like two rigid blocks. * @default 0.15 */ jitter?: number; }; /** * Animation played when a {@link Shuffle} move is executed: the items are cut into two packets that pull * apart, then fall back into the pile one after the other, the way the two halves of a riffle shuffle * cascade back into each other. * * The shuffled items never actually change place on the front-end (the index swap only happens on the * back-end, unless the shuffle is visible), so the animation is pure show: what matters is that players * see the pile taken apart and put back together. * * The shape follows what card shuffles on the web settle on — an item leaves the pile along a single axis * and drops back into it at another depth, flat. Spinning the items on the way looked wrong here: a card * pulled out of a deck keeps its heading, and 20 of them turning at once reads as scattered debris rather * than as a shuffle. */ export declare class ShuffleAnimations
extends ItemAnimations
{
private duration;
private config;
constructor(duration?: number, config?: ShuffleAnimationConfig);
getPostDuration(_move: Shuffle ): number;
getItemAnimation(context: ItemContext , animation: Animation , animation: Animation , animation: Animation ): {
width: number;
height: number;
};
}