UNPKG

@visactor/vrender-animate

Version:

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

39 lines (38 loc) 1.27 kB
import { ACustomAnimate } from '../custom-animate'; import type { IRichTextCharacter, IAnimate, IStep, EasingType } from '@visactor/vrender-core'; export declare class SlideOutRichText extends ACustomAnimate<{ textConfig: IRichTextCharacter[]; }> { valid: boolean; private fromTextConfig; private toTextConfig; private originalTextConfig; private singleCharConfig; private fadeOutDuration; private slideDirection; private slideDistance; private wordByWord; private wordRegex; private wordGroups; private reverseOrder; constructor(from: { textConfig: IRichTextCharacter[]; }, to: { textConfig: IRichTextCharacter[]; }, duration: number, easing: EasingType, params?: { fadeOutDuration?: number; slideDirection?: 'up' | 'down' | 'left' | 'right'; slideDistance?: number; wordByWord?: boolean; wordRegex?: RegExp; reverseOrder?: boolean; }); onFirstRun(): void; private calculateWordGroups; private getTargetDx; private getTargetDy; onEnd(cb?: (animate: IAnimate, step: IStep) => void): void; onUpdate(end: boolean, ratio: number, out: Record<string, any>): void; private updateByWord; private updateByCharacter; }