import type { AssetInfo, Logger, PlaybackStatus } from '../app'; import { EventDispatcher } from '../events'; import type { SignalValue } from '../signals'; import type { Thread, ThreadGenerator } from '../threading'; import type { Vector2 } from '../types'; import { LifecycleEvents } from './LifecycleEvents'; import type { CachedSceneData, FullSceneDescription, Scene, SceneDescriptionReload, SceneRenderEvent } from './Scene'; import { Shaders } from './Shaders'; import { Slides } from './Slides'; import type { Threadable } from './Threadable'; import { Variables } from './Variables'; export interface ThreadGeneratorFactory { (view: T): ThreadGenerator; } /** * The default implementation of the {@link Scene} interface. * * Uses generators to control the animation. */ export declare abstract class GeneratorScene implements Scene>, Threadable { readonly name: string; readonly playback: PlaybackStatus; readonly logger: Logger; readonly shaders: Shaders; readonly slides: Slides; readonly variables: Variables; creationStack?: string; previousOnTop: SignalValue; get firstFrame(): number; get lastFrame(): number; get onCacheChanged(): import("..").SubscribableValueEvent; private readonly cache; get onReloaded(): import("..").Subscribable>; private readonly reloaded; get onRecalculated(): import("..").Subscribable>; private readonly recalculated; get onThreadChanged(): import("..").SubscribableValueEvent; private readonly thread; get onRenderLifecycle(): import("..").Subscribable<[SceneRenderEvent, CanvasRenderingContext2D], import("..").EventHandler<[SceneRenderEvent, CanvasRenderingContext2D]>>; protected readonly renderLifecycle: EventDispatcher<[SceneRenderEvent, CanvasRenderingContext2D]>; get onReset(): import("..").Subscribable>; private readonly afterReset; readonly lifecycleEvents: LifecycleEvents; get LifecycleEvents(): LifecycleEvents; get previous(): Scene | null; getMediaAssets(): Array; stopAllMedia(): void; abstract adjustVolume(volumeScale: number): void; readonly experimentalFeatures: boolean; protected resolutionScale: number; private runnerFactory; private previousScene; private runner; private state; private cached; private counters; private size; constructor(description: FullSceneDescription>); abstract getView(): T; /** * Update the view. * * Invoked after each step of the main generator. * Can be used for calculating layout. * * Can modify the state of the view. */ update(): void; render(context: CanvasRenderingContext2D): Promise; protected abstract draw(context: CanvasRenderingContext2D): Promise; reload({ config, size, stack, resolutionScale, }?: SceneDescriptionReload>): void; recalculate(setFrame: (frame: number) => void): Promise; next(): Promise; reset(previousScene?: Scene | null): Promise; getSize(): Vector2; getRealSize(): Vector2; isAfterTransitionIn(): boolean; canTransitionOut(): boolean; isFinished(): boolean; enterInitial(): void; enterAfterTransitionIn(): void; enterCanTransitionOut(): void; isCached(): boolean; /** * Invoke the given callback in the context of this scene. * * @remarks * This method makes sure that the context of this scene is globally available * during the execution of the callback. * * @param callback - The callback to invoke. */ protected execute(callback: () => T): T; } //# sourceMappingURL=GeneratorScene.d.ts.map