import type { FerrsignView3 } from "ferrsign"; import { Matrix3, Texture, Vector2 } from "three"; import type { UITextureConfig, UITextureTrim } from "./UITextureView.Internal"; /** Wrapper for Three.js texture with atlas and trim support. Does not own the underlying texture; user must dispose it. */ export declare class UITextureView { private textureInternal; private sourceWidth; private sourceHeight; private frameX; private frameY; private frameWidth; private frameHeight; private rotatedInternal; private scaleInternal; private trimLeft; private trimRight; private trimTop; private trimBottom; private textureDirtyInternal; private uvTransformDirtyInternal; private trimDirtyInternal; private readonly signalDimensionsChangedInternal; /** @param config Texture or atlas configuration */ constructor(config?: UITextureConfig); /** Original width before trimming in world units */ get width(): number; /** Original height before trimming in world units */ get height(): number; /** Visible width after trimming in world units */ get trimmedWidth(): number; /** Visible height after trimming in world units */ get trimmedHeight(): number; /** Underlying Three.js texture */ get texture(): Texture; /** Whether sprite is rotated in atlas */ get rotated(): boolean; /** Scale factor for resolution independence */ get scale(): number; /** Transparent padding around visible content */ get trim(): Readonly; get textureDirty(): boolean; /** Whether UV transform inputs changed since last check */ get uvTransformDirty(): boolean; /** Whether trim values changed since last check */ get trimDirty(): boolean; get signalDimensionsChanged(): FerrsignView3; setTextureDirtyFalse(): void; /** * Calculates UV transform matrix for shader sampling. * @param result Matrix to store result in * @returns UV transform matrix */ calculateUVTransform(result?: Matrix3): Matrix3; /** * Gets original dimensions before trimming. * @param result Vector to store result in * @returns Width and height in world units */ getResolution(result?: Vector2): Vector2; /** * Replaces texture with new configuration. * @param config Texture or atlas configuration */ set(config: UITextureConfig): void; private setFromTexture; private setFromAtlasConfig; }