@visactor/vrender-animate
Version:
This module provides a graph-based animation system for VRender.
38 lines (37 loc) • 1.21 kB
TypeScript
import { ACustomAnimate } from '../custom-animate';
import type { IRichTextCharacter, IAnimate, IStep, EasingType } from '@visactor/vrender-core';
export declare class OutputRichText extends ACustomAnimate<{
textConfig: IRichTextCharacter[];
}> {
valid: boolean;
private fromTextConfig;
private toTextConfig;
private originalTextConfig;
private showCursor;
private cursorChar;
private blinkCursor;
private beforeText;
private afterText;
private fadeOutChars;
private fadeOutDuration;
private direction;
constructor(from: {
textConfig: IRichTextCharacter[];
}, to: {
textConfig: IRichTextCharacter[];
}, duration: number, easing: EasingType, params?: {
showCursor?: boolean;
cursorChar?: string;
blinkCursor?: boolean;
beforeText?: string;
afterText?: string;
fadeOutChars?: boolean;
fadeOutDuration?: number;
direction?: 'forward' | 'backward';
});
onFirstRun(): void;
onEnd(cb?: (animate: IAnimate, step: IStep) => void): void;
onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
private applyFadeEffect;
private addCursor;
}