import type { Component, ComponentConstructor } from "./Component"; import type { Entity } from "./Entity"; import type { Mechanism } from "./Mechanism"; import { PublicSetView } from "./PublicSetView"; import type { System } from "./System"; declare const NoComponent: { isNoComponent: boolean; }; export declare class App { protected _entities: Set; entities: PublicSetView; protected impureSystems: System[]; protected allSystems: System[]; protected mechanisms: Mechanism[]; private lastRender; private _time; private componentUpdateMap; componentsMap: { [key: string]: ComponentConstructor; }; lastUpdate: number; entityId: number; constructor(); addSystem(system: System): App; removeSystem(system: System): App; addMechanism(mechanism: Mechanism): App; dispose(): void; add(entity: Entity): boolean; remove(entity: Entity): boolean; /** * Should be called when an entity's component is updated. This will trigger * the checking of systems that care about the component. */ entityComponentUpdated(entity: Entity, component: typeof Component | typeof NoComponent): void; /** * Registers a component constructor. This is only required if the * component may be hydrated via fromJSON before it is ever used. */ registerComponent(component: ComponentConstructor, warnOnDuplicate?: boolean): void; protected _render(): void; render(): void; protected _update(e: { time: number; }): void; /** * The logical loop. */ update(e: { time: number; }): void; get time(): number; } export {};