import { Scene } from "three"; import { PerspectiveCamera } from "../camera/perspective-camera"; import { Identifiable } from "../identifiable"; import { Renderer } from "../renderer"; import { Entity } from "./entity"; /** * The Stage represents a collection of objects as a hierarchy to be executed * by the Renderer. A Stage can be thought of as a single Level. * * Only one Stage can be active at any one time. */ export declare abstract class Stage extends Identifiable { private readonly _objects; private readonly _queue; private readonly _root; private readonly _camera; private readonly _threeScene; constructor(); /** * Access the top-most root entity for the Stage */ get root(): Entity; /** * Access the default camera for the Stage */ get camera(): PerspectiveCamera; /** * Access the three.js Scene backing for the Stage */ get threeScene(): Scene; /** * Queue a new object instance for creation * * @param instance The object instance to be created */ queue(instance: T): Promise; /** * Called automatically by the renderer when viewport size is changed * * @param newWidth - The new width of the renderer * @param newHeight - The new height of the renderer */ _resize(newWidth: number, newHeight: number, renderer: Renderer): void; _pause(renderer: Renderer): void; _destroy(renderer: Renderer): void; _resume(renderer: Renderer): void; /** * Called automatically every frame by the Renderer * * @param deltaTime The time difference between last and current frame in seconds */ _update(deltaTime: number, renderer: Renderer): void; }