/** * Options of the `element` component accepted by {@link ElementComponentSystem} that differ from * the properties of {@link ElementComponent}. Each replaces the same-named property of the options * that {@link Entity#addComponent} derives from the component class; see * {@link ComponentOptionsOverrides}. */ export type ElementComponentOptionsOverrides = { /** * - Same as {@link ElementComponent#anchor}, also accepting an * `[x, y, z, w]` array. */ anchor?: Vec4 | number[]; /** * - Same as {@link ElementComponent#batchGroupId}. `null` * selects no batch group. */ batchGroupId?: number | null; /** * - Same as {@link ElementComponent#color}, also accepting an * `[r, g, b]` array. */ color?: Color | number[]; /** * - Same as {@link ElementComponent#margin}, also accepting an * `[x, y, z, w]` array. */ margin?: Vec4 | number[]; /** * - Same as {@link ElementComponent#pivot}, also accepting an * `[x, y]` array. */ pivot?: Vec2 | number[]; }; /** * @import { AppBase } from '../../app-base.js' * @import { Entity } from '../../entity.js' */ /** * Options of the `element` component accepted by {@link ElementComponentSystem} that differ from * the properties of {@link ElementComponent}. Each replaces the same-named property of the options * that {@link Entity#addComponent} derives from the component class; see * {@link ComponentOptionsOverrides}. * * @typedef {object} ElementComponentOptionsOverrides * @property {Vec4 | number[]} [anchor] - Same as {@link ElementComponent#anchor}, also accepting an * `[x, y, z, w]` array. * @property {number | null} [batchGroupId] - Same as {@link ElementComponent#batchGroupId}. `null` * selects no batch group. * @property {Color | number[]} [color] - Same as {@link ElementComponent#color}, also accepting an * `[r, g, b]` array. * @property {Vec4 | number[]} [margin] - Same as {@link ElementComponent#margin}, also accepting an * `[x, y, z, w]` array. * @property {Vec2 | number[]} [pivot] - Same as {@link ElementComponent#pivot}, also accepting an * `[x, y]` array. * @ignore */ /** * Manages the {@link ElementComponent}s of an application. Reach it through `app.systems.element`; * components are created with {@link Entity#addComponent}, never by calling the system directly. * * @category User Interface */ export class ElementComponentSystem extends ComponentSystem { id: string; ComponentType: typeof ElementComponent; _unicodeConverter: any; _rtlReorder: any; _defaultTexture: Texture; defaultImageMaterial: StandardMaterial; defaultImage9SlicedMaterial: StandardMaterial; defaultImage9TiledMaterial: StandardMaterial; defaultImageMaskMaterial: StandardMaterial; defaultImage9SlicedMaskMaterial: StandardMaterial; defaultImage9TiledMaskMaterial: StandardMaterial; defaultScreenSpaceImageMaterial: StandardMaterial; defaultScreenSpaceImage9SlicedMaterial: StandardMaterial; defaultScreenSpaceImage9TiledMaterial: StandardMaterial; defaultScreenSpaceImageMask9SlicedMaterial: StandardMaterial; defaultScreenSpaceImageMask9TiledMaterial: StandardMaterial; defaultScreenSpaceImageMaskMaterial: StandardMaterial; _defaultTextMaterials: {}; defaultImageMaterials: any[]; initializeComponentData(component: any, data: any, properties: any): void; onAddComponent(entity: any, component: any): void; onBeforeRemove(entity: any, component: any): void; cloneComponent(entity: any, clone: any): import("../component.js").Component; getTextElementMaterial(screenSpace: any, msdf: any, textAttributes: any): any; _createBaseImageMaterial(): StandardMaterial; getImageElementMaterial(screenSpace: any, mask: any, nineSliced: any, nineSliceTiled: any): StandardMaterial; registerUnicodeConverter(func: any): void; registerRtlReorder(func: any): void; getUnicodeConverter(): any; getRtlReorder(): any; } import { Vec4 } from '../../../core/math/vec4.js'; import { Color } from '../../../core/math/color.js'; import { Vec2 } from '../../../core/math/vec2.js'; import { ComponentSystem } from '../system.js'; import { ElementComponent } from './component.js'; import { Texture } from '../../../platform/graphics/texture.js'; import { StandardMaterial } from '../../../scene/materials/standard-material.js';