UNPKG

@visactor/vrender-animate

Version:

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

52 lines (51 loc) 1.67 kB
import { type IGraphic, type IGroup, type EasingType } from '@visactor/vrender-core'; import type { IPointLike } from '@visactor/vutils'; import { ACustomAnimate } from './custom-animate'; interface IAnimationParameters { width: number; height: number; group: IGroup; elementIndex: number; elementCount: number; view: any; } type TypeAnimation<T extends IGraphic> = (graphic: T, options: any, animationParameters: IAnimationParameters) => { from?: { [channel: string]: any; }; to?: { [channel: string]: any; }; }; export interface IGrowPointsAnimationOptions { orient?: 'positive' | 'negative'; } export interface IGrowPointsOverallAnimationOptions extends IGrowPointsAnimationOptions { center?: IPointLike; } export declare const growPointsIn: TypeAnimation<IGraphic>; export declare const growPointsOut: TypeAnimation<IGraphic>; export declare class GworPointsBase extends ACustomAnimate<Record<string, number>> { valid: boolean; constructor(from: null, to: null, duration: number, easing: EasingType, params?: any); onUpdate(end: boolean, ratio: number, out: Record<string, any>): void; } export declare class GrowPointsIn extends GworPointsBase { onBind(): void; } export declare class GrowPointsOut extends GworPointsBase { onBind(): void; } export declare class GrowPointsXIn extends GworPointsBase { onBind(): void; } export declare class GrowPointsXOut extends GworPointsBase { onBind(): void; } export declare class GrowPointsYIn extends GworPointsBase { onBind(): void; } export declare class GrowPointsYOut extends GworPointsBase { onBind(): void; } export {};