UNPKG

@visactor/vrender-animate

Version:

This module provides a graph-based animation system for VRender.

18 lines (17 loc) 761 B
import type { IGraphic } from '@visactor/vrender-core'; interface ITransitionResult { allowTransition: boolean; stopOriginalTransition: boolean; } export type TransitionFunction = (graphic: IGraphic, fromState: string) => ITransitionResult; export declare class AnimationTransitionRegistry { private static instance; private transitions; constructor(); static getInstance(): AnimationTransitionRegistry; private registerDefaultTransitions; isTransitionAllowed(fromState: string, toState: string, graphic: IGraphic): ITransitionResult; registerTransition(fromState: string, toState: string, transition: TransitionFunction): void; } declare const transitionRegistry: AnimationTransitionRegistry; export { transitionRegistry };