@visactor/vrender-animate
Version:
This module provides a graph-based animation system for VRender.
41 lines (40 loc) • 1.33 kB
TypeScript
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 interface IGrowRadiusAnimationOptions {
orient?: 'inside' | 'outside';
overall?: boolean | number;
}
export declare const growRadiusIn: TypeAnimation<IGraphic>;
export declare const growRadiusOut: TypeAnimation<IGraphic>;
export declare class GrowPointsBase 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 GrowRadiusIn extends GrowPointsBase {
onBind(): void;
}
export declare class GrowRadiusOut extends GrowPointsBase {
onBind(): void;
}
export {};