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