/** * Options of the `light` component accepted by {@link LightComponentSystem} that differ from the * properties of {@link LightComponent}. Each replaces the same-named property of the options that * {@link Entity#addComponent} derives from the component class; see * {@link ComponentOptionsOverrides}. */ export type LightComponentOptionsOverrides = { /** * - Same as {@link LightComponent#color}, also accepting an * `[r, g, b]` array. */ color?: Color | number[]; /** * - Same as {@link LightComponent#cookieOffset}, also * accepting an `[x, y]` array. */ cookieOffset?: Vec2 | number[]; /** * - Same as {@link LightComponent#cookieScale}, also * accepting an `[x, y]` array. */ cookieScale?: Vec2 | number[]; /** * - Deprecated alias of `enabled`. */ enable?: boolean; }; /** * @import { AppBase } from '../../app-base.js' * @import { Entity } from '../../entity.js' */ /** * Options of the `light` component accepted by {@link LightComponentSystem} that differ from the * properties of {@link LightComponent}. Each replaces the same-named property of the options that * {@link Entity#addComponent} derives from the component class; see * {@link ComponentOptionsOverrides}. * * @typedef {object} LightComponentOptionsOverrides * @property {Color | number[]} [color] - Same as {@link LightComponent#color}, also accepting an * `[r, g, b]` array. * @property {Vec2 | number[]} [cookieOffset] - Same as {@link LightComponent#cookieOffset}, also * accepting an `[x, y]` array. * @property {Vec2 | number[]} [cookieScale] - Same as {@link LightComponent#cookieScale}, also * accepting an `[x, y]` array. * @property {boolean} [enable] - Deprecated alias of `enabled`. * @ignore */ /** * Manages the {@link LightComponent}s of an application. Reach it through `app.systems.light`; * components are created with {@link Entity#addComponent}, never by calling the system directly. * * @category Graphics */ export class LightComponentSystem extends ComponentSystem { id: string; ComponentType: typeof LightComponent; initializeComponentData(component: any, _data: any): void; onBeforeRemove(entity: any, component: any): void; cloneComponent(entity: any, clone: any): import("../component.js").Component; } import { Color } from '../../../core/math/color.js'; import { Vec2 } from '../../../core/math/vec2.js'; import { ComponentSystem } from '../system.js'; import { LightComponent } from './component.js';