import type { WebGLRenderer } from "three"; import type { UILayer } from "../../layers/UILayer/UILayer"; import { UIColor } from "../../miscellaneous/color/UIColor"; import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal"; import { UIInsets } from "../../miscellaneous/insets/UIInsets"; import type { UIInsetsConfig } from "../../miscellaneous/insets/UIInsets.Internal"; import { UITextSpan } from "../../miscellaneous/text-span/UITextSpan"; import { UITextStyle } from "../../miscellaneous/text-style/UITextStyle"; import { UIElement } from "../UIElement/UIElement"; import type { UITextContent } from "./UIText.Interfaces"; import type { UITextOptions } from "./UIText.Internal"; import { UITextDirection, UITextResizeMode } from "./UIText.Internal"; /** Canvas-based text rendering element */ export declare class UIText extends UIElement { /** Default style applied to all text spans */ readonly commonStyle: UITextStyle; private readonly colorInternal; private readonly paddingInternal; private readonly canvas; private readonly context; private texture; private contentInternal; private contentDirty; private maxLineWidthInternal; private maxLineWidthDirty; private resizeModeInternal; private resizeModeDirty; private directionInternal; private directionDirty; private isRTL; private lastWidth; private lastHeight; private textChunks; /** * Creates a new UIText instance. * * @param layer - Layer containing this element * @param content - Text content as string or styled spans * @param options - Configuration options */ constructor(layer: UILayer, content: UITextContent, options?: Partial); /** Multiplicative tint. Alpha channel controls opacity. */ get color(): UIColor; /** Text content as array of styled spans */ get content(): UITextSpan[]; /** Maximum line width before wrapping in pixels */ get maxLineWidth(): number; /** Text padding in world units */ get padding(): UIInsets; /** Controls how text adapts to element size */ get resizeMode(): UITextResizeMode; /** Base direction used for bidirectional text reordering */ get direction(): UITextDirection; /** Multiplicative tint. Alpha channel controls opacity. */ set color(value: UIColorConfig); /** Text content as string, span config, or array */ set content(value: UITextContent); /** Maximum line width before wrapping in pixels */ set maxLineWidth(value: number); /** Text padding in world units */ set padding(value: UIInsetsConfig); /** Controls how text adapts to size constraints */ set resizeMode(value: UITextResizeMode); /** Base direction used for bidirectional text reordering */ set direction(value: UITextDirection); /** Removes element and frees resources */ destroy(): void; protected onWillRender(renderer: WebGLRenderer, deltaTime: number): void; private tryToRenderTextScaleMode; private tryToRenderTextBreakMode; private updateProperties; private buildTextChunks; private checkDimensionsDirty; private setDimensionsDirtyFalse; private checkContentDirty; private setContentDirtyFalse; }