@visactor/vrender-animate
Version:
This module provides a graph-based animation system for VRender.
25 lines (24 loc) • 1.6 kB
TypeScript
import type { IAnimate, IGraphic } from '@visactor/vrender-core';
import type { IAnimationState } from './types';
import { AnimationStateManager, AnimationStateStore } from './animation-state';
import type { IAnimationConfig } from '../executor/executor';
export declare class GraphicStateExtension {
_getAnimationStateManager(graphic: IGraphic): AnimationStateManager;
_getAnimationStateStore(graphic: IGraphic): AnimationStateStore;
trackAnimate(animate: IAnimate): void;
untrackAnimate(animateId: string | number): void;
forEachTrackedAnimate(cb: (animate: IAnimate) => void): void;
getTrackedAnimates(): Map<string | number, IAnimate>;
hasTrackedAnimate(): boolean;
registerAnimationState(state: IAnimationState): this;
applyAnimationState(state: string[], animationConfig: (IAnimationState | IAnimationState[])[], callback?: (empty?: boolean) => void): this;
applyAppearState(animationConfig: IAnimationConfig, callback?: () => void): this;
applyDisappearState(animationConfig: IAnimationConfig, callback?: () => void): this;
applyUpdateState(animationConfig: IAnimationConfig, callback?: () => void): this;
applyHighlightState(animationConfig: IAnimationConfig, callback?: () => void): this;
applyUnhighlightState(animationConfig: IAnimationConfig, callback?: () => void): this;
stopAnimationState(state: string, type?: 'start' | 'end' | Record<string, any>, deep?: boolean): this;
clearAnimationStates(): this;
reApplyAnimationState(state: string, deep?: boolean): this;
static extend(graphic: IGraphic): IGraphic;
}