import type { EasingType } from 'leviar'; import type { BackgroundKeysOf } from '../types/config'; export type BackgroundFitPreset = 'stretch' | 'contain' | 'cover' | 'inherit'; /** * 배경을 전환한다 * * @example * { type: 'background', name: 'classroom', duration: 1500, fit: 'cover' } */ export interface BackgroundCmd { /** 전환할 배경 이미지의 에셋 키(config.backgrounds에 정의됨)입니다. */ name: BackgroundKeysOf; /** 배경 이미지의 화면 맞춤 방식(stretch, cover 등)입니다. */ fit?: BackgroundFitPreset; /** 배경 전환 시 크로스페이드(Fade)되는 시간(ms 단위)입니다. (기본값: 1000) */ duration?: number; /** 대상 에셋을 비디오(video)로 처리할지 여부입니다. (기본값: false) */ isVideo?: boolean; /** 애니메이션의 이징 함수 이름입니다. */ ease?: EasingType; /** 대상 에셋이 비디오인 경우 자동재생 여부입니다. (기본값: true) */ autoplay?: boolean; } export interface BackgroundSchema { /** @internal 현재 배경 키 */ _key: string | undefined; /** @internal 현재 fit 모드 */ _fit: string; /** @internal 최근 전환 시간 (ms) */ _lastDuration: number; /** @internal parallax 여부 */ _parallax: boolean; /** @internal 비디오 여부 */ _isVideo: boolean; /** @internal 최근 이징 함수 */ _lastEase?: string; /** @internal 자동재생 여부 */ _autoplay: boolean; } /** * 배경 모듈. `novel.config`의 `modules: { 'background': backgroundModule }` 형태로 등록합니다. */ declare const backgroundModule: import("..").NovelModule, BackgroundSchema, import("..").DefaultHook>; export default backgroundModule;