import { Texture } from "three"; /** Represents the possible shapes of texture image/source data in three.js. * Source.data is typed as `{}` in r183 but at runtime can be ImageBitmap, HTMLImageElement, etc. */ export type TextureImageData = { width?: number; height?: number; depth?: number; data?: ArrayBufferView | null; }; /** Check if a value has image-like dimensions (width/height) */ export declare function hasImageDimensions(value: unknown): value is { width: number; height: number; }; /** Check if a value has pixel data (e.g. typed array from a DataTexture) */ export declare function hasPixelData(value: unknown): value is { data: ArrayBufferView; }; /** Get the source data of a texture, typed for dimension/data access */ export declare function getSourceData(tex: Texture): TextureImageData | null; /** Get the image of a texture, typed for dimension/data access. * In r183, Texture.image is typed as `{}` but at runtime is an ImageBitmap, HTMLImageElement, etc. */ export declare function getTextureImage(tex: Texture): TextureImageData | null; /** Get width/height of a texture from image or source data */ export declare function getTextureDimensions(tex: Texture): { width: number; height: number; }; export declare function isDebugMode(): string | boolean; export declare function getParam(name: string): boolean | string; export declare function resolveUrl(source: string | undefined, uri: string): string; /** Check if the current device is a mobile device. * @returns `true` if it's a phone or tablet */ export declare function isMobileDevice(): boolean; /** * Check if we are running in a development server (localhost or ip address). * @returns `true` if we are running in a development server (localhost or ip address). */ export declare function isDevelopmentServer(): boolean; export type SlotReturnValue = { use?: ((promise: Promise) => void); }; /** * A promise queue that limits the number of concurrent promises. * Use the `slot` method to request a slot for a promise with a specific key. The returned promise resolves to an object with a `use` method that can be called to add the promise to the queue. */ export declare class PromiseQueue { maxConcurrent: number; private readonly _running; private readonly _queue; debug: boolean; constructor(maxConcurrent: number, opts?: { debug?: boolean; }); private tick; /** * Request a slot for a promise with a specific key. This function returns a promise with a `use` method that can be called to add the promise to the queue. */ slot(key: string): Promise>; private add; private internalUpdate; } export declare function determineTextureMemoryInBytes(texture: Texture): number; /** * Detect the GPU memory of the current device. This is a very rough estimate based on the renderer information, and may not be accurate. It returns the estimated memory in MB, or `undefined` if it cannot be detected. */ export declare function detectGPUMemory(): number | undefined;