import { DIVE } from '../../../index.ts'; import { OrbitController } from '../../orbitcontroller/index.ts'; import { ActionPayload, ActionReturn } from '../types/index.ts'; export type ActionSubscriber = (payload: ActionPayload) => void; export type ActionUnsubscribe = () => void; export declare class State { private static __instances; private engine; private controller; /** The only way from here into the engine, see {@link EngineGateway}. */ private gateway; /** * modules, each loaded on first use * the promise is cached, not the instance, and stored before anything is * awaited, or two callers in the same tick each build their own */ private _mediaCreator?; private getMediaCreator; private _arSystem?; private getARSystem; private _assetExplorer?; private getAssetExporter; private _animationSystem?; private getAnimationSystem; private _toolbox?; private getToolbox; /** Every entity this state holds. See {@link EntityRegistry}. */ private registry; private listeners; constructor(dive: DIVE, controller: OrbitController); /** * Tears this state down and forgets it. * * @returns Whether it was still registered. */ destroyInstance(): boolean; performAction(action: ActionType, ...args: ActionPayload extends void ? [] : [ActionPayload]): ActionReturn; subscribe(type: ActionType, listener: ActionSubscriber): ActionUnsubscribe; private dispatch; private getDependencies; } export * from './ActionRegistry.ts'; export * from './EngineGateway.ts'; export * from './actions/index.ts'; export * from '../types/index.ts'; export type { ActionTypes };