UNPKG

@diffusionstudio/core-v4

Version:

2D motion graphics and video rendering engine

37 lines (36 loc) 993 B
import { Point, FillRule, Renderer } from '../../renderer'; import { MaskProps } from './interfaces'; import { Timestamp } from '../../models'; import { Serializer } from '../../services'; import { KeyframeOptions, Size } from '../../types'; import { MaskType } from './types'; type Clip = { start: Timestamp; stop: Timestamp; mask?: Mask; }; export declare class Mask extends Serializer { /** * Unique identifier of the mask */ id: string; readonly type: MaskType; width: number; height: number; x: number; y: number; fillRule?: FillRule; animations: KeyframeOptions<any, number>[]; clip?: Clip; protected renderer?: Renderer; constructor(props?: MaskProps); connect(clip: Clip): this; draw(renderer: Renderer): Path2D; animate(time: Timestamp): this; get start(): Timestamp; get stop(): Timestamp; get size(): Size; get bounds(): [Point, Point, Point, Point]; detach(): this; } export {};