UNPKG

@visactor/vrender-animate

Version:

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

28 lines (27 loc) 1.15 kB
import { type IPointLike } from '@visactor/vutils'; import type { EasingType, IAnimate, ISegment, IStep } from '@visactor/vrender-core'; import { ACustomAnimate } from './custom-animate'; export declare class TagPointsUpdate extends ACustomAnimate<{ points?: IPointLike[]; segments?: ISegment[]; }> { protected fromPoints: IPointLike[]; protected toPoints: IPointLike[]; protected points: IPointLike[]; protected interpolatePoints: [IPointLike, IPointLike][]; protected newPointAnimateType: 'grow' | 'appear' | 'clip'; protected clipRange: number; protected shrinkClipRange: number; protected clipRangeByDimension: 'x' | 'y'; protected segmentsCache: number[]; constructor(from: any, to: any, duration: number, easing: EasingType, params?: { newPointAnimateType?: 'grow' | 'appear' | 'clip'; clipRangeByDimension?: 'x' | 'y'; }); private getPoints; onBind(): void; onFirstRun(): void; onEnd(cb?: (animate: IAnimate, step: IStep) => void): void; private applyPointTransientAttributes; onUpdate(end: boolean, ratio: number, out: Record<string, any>): void; }