import { Interpolation, Theme } from '@emotion/react'; import { Animation, Animations } from '@gamepark/react-client'; import { GridBoundaries, ItemMove, ItemMoveType, MaterialGame, MaterialMove, MaterialRules } from '@gamepark/rules-api'; import { ItemContext, Locator } from '../../../locators'; import { MaterialDescription } from '../MaterialDescription'; import { ItemAnimations } from './ItemAnimations'; import { MaterialGameAnimationContext } from './MaterialGameAnimations'; import { Trajectory } from './Trajectory'; export declare class MaterialAnimations
extends Animations , P> {
protected readonly animations: Partial );
getDuration(move: ItemMove , context: MaterialGameAnimationContext ): number;
getItemAnimation(context: ItemContext , animation: Animation = {
/** How long an item takes to reach the place a move sends it to. Defaults to a second. */
duration?: number;
/**
* How long an item the player has dropped themselves takes to settle. Much shorter than the rest: the item
* is already where the hand left it, and all that is left to animate is the snap onto its place.
*/
droppedItemDuration?: number;
/** The path items follow rather than the straight line: its arc, its waypoints, its easing. */
trajectory?: Trajectory ;
/**
* How long a shuffle lasts. Not a displacement from A to B: it needs to last long enough for the random
* movement to read as "the items were mixed up", hence a default of its own rather than {@link duration}.
*/
shuffleDuration?: number;
/**
* How long items created together fly for. Creating items at once is what a game does to lay out a whole
* setup in one small payload, so it animates nothing by default (see {@link defaultCreateAtOnceDuration}):
* a game that wants those creations seen asks for it, on the moves it wants it on.
*/
createAtOnceDuration?: number;
};
export type ItemAnimationContext = {
material: Record ;
player?: P;
};