/** * Type augmentations and utilities for three.js r183. * * Some properties exist at runtime but were removed or changed in @types/three r183. * This module provides type-safe access without `as any` casts. */ import type { Interpolant, Texture } from 'three'; declare module 'three' { interface Material { /** Unique ID for this material instance. Exists at runtime via Object.defineProperty. */ readonly id: number; } interface KeyframeTrack { /** Creates an interpolant for sampling this track. Exists at runtime. */ createInterpolant(): Interpolant; } } /** Checks if a texture image has width/height dimensions (ImageBitmap, HTMLImageElement, HTMLCanvasElement, etc.) */ export declare function hasImageDimensions(image: unknown): image is { width: number; height: number; }; /** Get the width/height from a texture, checking image, source.data, and direct properties (e.g. render targets) */ export declare function getTextureDimensions(texture: Texture): { width: number; height: number; }; /** Checks if a texture image has pixel data (typed array from DataTexture) */ export declare function hasPixelData(image: unknown): image is { data: ArrayBufferView; width: number; height: number; }; /** Get the source data of a texture as a dimension-bearing object, or null */ export declare function getSourceDimensions(texture: Texture): { width: number; height: number; } | null; /** Checks if a value is a renderable image (ImageBitmap, HTMLImageElement, HTMLCanvasElement, etc.) */ export declare function isTextureImage(image: unknown): image is TexImageSource | OffscreenCanvas;