import { Extension, PropertyType, ReaderContext, WriterContext } from '@gltf-transform/core'; /** * NEEDLE_lightmaps gltf-transform extension. * * Handles both embedded (`/textures/N` pointer) and external (`sunrise.exr` pointer) lightmaps. * * - **preread(TEXTURE)**: Injects external EXR files into the JSON document so the core reader * creates proper Texture objects from them. * - **read()**: Resolves `/textures/N` pointers to Texture objects. Sets references so that * gltf-transform doesn't prune/dedup referenced textures. * - **write()**: Updates pointer strings: * - Embedded textures: resolves to the new `/textures/N` index in the output. * - External textures: uses the Texture's current URI (e.g. updated by PMREM to `.pmrem.ktx2`). */ export declare class NEEDLE_lightmaps_ext extends Extension { static readonly EXTENSION_NAME = "NEEDLE_lightmaps"; readonly extensionName = "NEEDLE_lightmaps"; readonly prereadTypes: PropertyType[]; readonly prewriteTypes: PropertyType[]; /** The raw extension JSON from the input (mutated in-place during write) */ private extensionData; /** Entries with resolved Texture references */ private resolved; /** Image indices injected during preread (for external EXR files) */ private injectedImageIndices; /** The ExtensionProperty that holds references to prevent dedup/prune */ private lightmapProp; preread(context: ReaderContext, _propertyType: PropertyType): this; read(context: ReaderContext): this; prewrite(context: WriterContext, _propertyType: PropertyType): this; write(context: WriterContext): this; private pointersResolved; private resolvePointers; /** * Find (or create) a texture def in the output JSON that references the given Texture. * This replicates the logic from the opaque system's TextureIndexResolver. */ private findOrCreateTextureIndex; }