UNPKG

@visactor/vrender-animate

Version:

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

44 lines (43 loc) 1.49 kB
import { type IGraphic, type IGroup, type EasingType } from '@visactor/vrender-core'; 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 IGrowAngleAnimationOptions { orient?: 'clockwise' | 'anticlockwise'; overall?: boolean | number; } export declare const growAngleIn: TypeAnimation<IGraphic>; export declare const growAngleOut: TypeAnimation<IGraphic>; export declare class GrowAngleBase extends ACustomAnimate<Record<string, number>> { valid: boolean; _updateFunction: (ratio: number) => void; constructor(from: null, to: null, duration: number, easing: EasingType, params?: any); determineUpdateFunction(): void; deleteSelfAttr(key: string): void; deleteSelfAttrs(keys: string[]): void; updateStartAngle(ratio: number): void; updateEndAngle(ratio: number): void; updateAngle(ratio: number): void; onUpdate(end: boolean, ratio: number, out: Record<string, any>): void; } export declare class GrowAngleIn extends GrowAngleBase { onBind(): void; } export declare class GrowAngleOut extends GrowAngleBase { onBind(): void; } export {};