@visactor/vrender-animate
Version:
This module provides a graph-based animation system for VRender.
35 lines (34 loc) • 1.3 kB
TypeScript
import type { IGraphic, IGroup, IAnimate, IStep, 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 declare const growWidthOut: TypeAnimation<IGraphic>;
export declare class GrowWidthIn extends ACustomAnimate<Record<string, number>> {
valid: boolean;
constructor(from: null, to: null, duration: number, easing: EasingType, params?: any);
onBind(): void;
onEnd(cb?: (animate: IAnimate, step: IStep) => void): void;
onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
}
export declare class GrowWidthOut extends ACustomAnimate<Record<string, number>> {
valid: boolean;
constructor(from: null, to: null, duration: number, easing: EasingType, params?: any);
onBind(): void;
onEnd(cb?: (animate: IAnimate, step: IStep) => void): void;
onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
}
export {};