import type { IUniform, ShaderMaterial } from "three"; import { Matrix3, Matrix4, Texture, Vector2, Vector3, Vector4 } from "three"; import type { UITransparencyMode } from "../UITransparencyMode"; import { UIColor } from "../color/UIColor"; export type UIProperty = Texture | UIColor | Vector2 | Vector3 | Vector4 | Matrix3 | Matrix4 | number; export type UIPropertyName = "Texture" | "UIColor" | "Vector2" | "Vector3" | "Vector4" | "Matrix3" | "Matrix4" | "number"; export type UIPropertyConstructor = typeof Texture | typeof UIColor | typeof Vector2 | typeof Vector3 | typeof Vector4 | typeof Matrix3 | typeof Matrix4 | NumberConstructor; export type UIPropertyCopyTo = UIColor | Vector2 | Vector3 | Vector4 | Matrix3 | Matrix4; export type UIPropertyCopyFrom = UIColor & Vector2 & Vector3 & Vector4 & Matrix3 & Matrix4; export interface GLTypeInfo { glslTypeName: string; bufferSize: number; instantiable: boolean; } export interface GLProperty { value: UIProperty; glslTypeInfo: GLTypeInfo; } export interface PlaneData { source: string; properties: Record; transform: Matrix4; visibility: boolean; transparency: UITransparencyMode; } /** Per-instance HSL adjustment in shader space (matches the instanceHSL attribute). */ export interface HSLAdjustment { /** Hue shift in turns (degrees / 360); wrapped with fract() in the shader. */ h: number; /** Saturation multiplier. */ s: number; /** Lightness offset. */ l: number; } export declare function resolveGLSLTypeInfo(value: UIProperty | UIPropertyName | UIPropertyConstructor): GLTypeInfo; export declare function resolvePropertyUniform(name: string, material: ShaderMaterial): IUniform; export declare function arePropertiesPartiallyCompatible(full: Readonly>>, partial: Readonly>>): boolean; export declare function convertUIPropertiesToGLProperties(uiProperties: Record): Record; export declare function cloneProperty(property: T): T; export declare function cloneProperties(properties: Record): Record; export declare function cloneGLProperties(properties: Record): Record; /** Extracts zIndex from transform matrix (translation.z component) */ export declare function extractZIndex(transform: Matrix4): number; /** Extracts zIndex from transform buffer at given instance index */ export declare function extractZIndexFromBuffer(buffer: Float32Array, instanceIndex: number): number; export declare function buildGenericPlaneFragmentShader(uniformDeclarations: string[], varyingDeclarations: string[], source: string, alphaTestValue: number, usePremultipliedAlpha: boolean): string;