/** * Options of the `screen` component accepted by {@link ScreenComponentSystem} that differ from the * properties of {@link ScreenComponent}. Each replaces the same-named property of the options that * {@link Entity#addComponent} derives from the component class; see * {@link ComponentOptionsOverrides}. */ export type ScreenComponentOptionsOverrides = { /** * - Same as * {@link ScreenComponent#referenceResolution}, also accepting an `[width, height]` array. */ referenceResolution?: Vec2 | number[]; /** * - Same as {@link ScreenComponent#resolution}, also * accepting an `[width, height]` array. */ resolution?: Vec2 | number[]; }; /** * @import { AppBase } from '../../app-base.js' * @import { Entity } from '../../entity.js' */ /** * Options of the `screen` component accepted by {@link ScreenComponentSystem} that differ from the * properties of {@link ScreenComponent}. Each replaces the same-named property of the options that * {@link Entity#addComponent} derives from the component class; see * {@link ComponentOptionsOverrides}. * * @typedef {object} ScreenComponentOptionsOverrides * @property {Vec2 | number[]} [referenceResolution] - Same as * {@link ScreenComponent#referenceResolution}, also accepting an `[width, height]` array. * @property {Vec2 | number[]} [resolution] - Same as {@link ScreenComponent#resolution}, also * accepting an `[width, height]` array. * @ignore */ /** * Manages the {@link ScreenComponent}s of an application. Reach it through `app.systems.screen`; * components are created with {@link Entity#addComponent}, never by calling the system directly. * * @category User Interface */ export class ScreenComponentSystem extends ComponentSystem { id: string; ComponentType: typeof ScreenComponent; windowResolution: Vec2; _drawOrderSyncQueue: IndexedList; initializeComponentData(component: any, data: any, properties: any): void; _updateDescendantElements(entity: any, screenEntity: any): void; _onUpdate(dt: any): void; _onResize(width: any, height: any): void; cloneComponent(entity: any, clone: any): import("../component.js").Component; onBeforeRemove(entity: any, component: any): void; processDrawOrderSyncQueue(): void; queueDrawOrderSync(id: any, fn: any, scope: any): void; } import { Vec2 } from '../../../core/math/vec2.js'; import { ComponentSystem } from '../system.js'; import { ScreenComponent } from './component.js'; import { IndexedList } from '../../../core/indexed-list.js';