UNPKG

@osbjs/osbjs

Version:

a minimalist osu! storyboarding framework

37 lines (36 loc) 1.39 kB
import { Component } from '../Core'; import { ILyricsOptions, IFontOptions } from './Interfaces'; export declare class Lyrics extends Component { name: string; folderPath: string; osbFolderPath: string; options: { fadeDuration: number; opacity: number; fontName: string; fontSize: number; fontScale: number; perCharacter: boolean; y: number; additive: boolean; color: { r: number; g: number; b: number; }; }; private _textureGenerator; private _subtitleCollection; /** * Generate lyrics from a .srt/.vtt/.json file. * @param folderPath full path to beatmap folder. * @param osbFolderPath relative path to the folder that will be used to save generated text images. For example: `sb/lyrics`. * @param subtitlePath full path to the subtitle file. For example, `./lyrics.srt` if your lyrics file is same folder with your script file. * @param options Additional options. * @param registerFontOptions In case you want to use a non-system font. */ constructor(folderPath: string, osbFolderPath: string, subtitlePath: string, options?: ILyricsOptions, registerFontOptions?: IFontOptions); generate(): void; private _generatePerChar; private _generatePerLine; }