UNPKG

@diffusionstudio/core-v4

Version:

2D motion graphics and video rendering engine

20 lines (19 loc) 962 B
import { Shadow, Stroke, TextAlign, TextBaseline } from '../../renderer'; import { hex, Percent, KeyframeOptions } from '../../types'; import { ClipProps } from '../clip'; import { VisualMixinProps } from '../visual'; import { Background } from './types'; import { StyleOverride, TextStyle } from '../../primitives'; export type TextClipAnimationOptions = (KeyframeOptions<'opacity' | 'rotation' | 'scale' | 'scaleX' | 'scaleY' | 'fontSize' | 'leading' | 'x' | 'y' | 'translateX' | 'translateY', number> | KeyframeOptions<'text', string> | KeyframeOptions<'color', hex>)[]; export interface TextClipProps extends ClipProps, Omit<VisualMixinProps, 'height'>, Partial<TextStyle> { text?: string; align?: TextAlign; baseline?: TextBaseline; stroke?: Stroke; shadow?: Shadow | Shadow[]; leading?: number; background?: Background; styles?: StyleOverride[]; maxWidth?: number | Percent; animations?: TextClipAnimationOptions; }