UNPKG

scrptly

Version:

Scrptly is a Video Development Kit (VDK) for programmatically generating AI-powered videos.

37 lines (33 loc) 967 B
import TextualLayer, { TextualLayerProperties, TextualLayerSettings } from './TextualLayer'; export interface TextLayerProperties extends TextualLayerProperties { text?: string; } export interface TextLayerSettings extends TextualLayerSettings { } export default class TextLayer extends TextualLayer { static type = 'text'; declare properties: TextLayerProperties; declare settings: TextLayerSettings; constructor(parent: any, properties: TextLayerProperties = {}, settings: TextLayerSettings = {}) { super(parent, properties, settings); } static get defaultSettings(): Partial<TextLayerSettings> { return { ...super.defaultSettings, }; } static get defaultProperties(): Partial<TextLayerProperties> { return { ...super.defaultProperties, }; } static get propertiesDefinition() { return { ...super.propertiesDefinition, 'text': { cssProperty: false, default: 'Type your text here', animatable: false, }, }; } }