@henteko/kumiki
Version:
A video generation tool that creates videos from JSON configurations
51 lines • 1.47 kB
TypeScript
import type { Scene, SceneRenderOptions } from '../types/index.js';
export declare abstract class BaseScene<T extends Scene = Scene> {
protected scene: T;
protected options: SceneRenderOptions;
protected narrationPath?: string;
constructor(scene: T, options: SceneRenderOptions);
/**
* Render the scene to a static image (PNG)
*/
abstract renderStatic(): Promise<string>;
/**
* Render the scene to a video (MP4)
*/
abstract renderVideo(): Promise<string>;
/**
* Validate the scene configuration
*/
abstract validate(): boolean;
/**
* Get the output path for static image
*/
protected getStaticOutputPath(): string;
/**
* Get the output path for video
*/
protected getVideoOutputPath(): string;
/**
* Get the output path for narration audio
*/
protected getNarrationOutputPath(): string;
/**
* Set the narration audio path
*/
setNarrationPath(path: string): void;
/**
* Ensure the output directory exists
*/
protected ensureOutputDirectory(): Promise<void>;
/**
* Parse resolution string to width and height
*/
protected parseResolution(): {
width: number;
height: number;
};
/**
* Calculate position coordinates
*/
protected calculatePosition(pos: number | 'center', dimension: number, elementSize: number): number;
}
//# sourceMappingURL=base.d.ts.map