import { Extension, ExtensionProperty, PropertyType, TextureInfo, type Document, type Material, type ReaderContext, type Texture, type WriterContext } from '@gltf-transform/core'; import type { IProperty } from '@gltf-transform/core'; /** * MToon, as glTF-Transform sees it: an extension property on a Material that carries the * `VRMC_materials_mtoon` JSON verbatim plus its texture slots as real texture references (so a texture only the * toon material uses survives pruning, and the writer gives it a texture index). * * Two ways in. A material from the HELIX toon path carries `HELIX_materials_toon` (lane vrm-toon), which is * deliberately MToon's own schema - same names, units and linear colour space - so reading it is a rename. * Anything else gets values derived from its base colour (see `materialExport.ts`). */ export declare const MTOON = "VRMC_materials_mtoon"; export declare const HELIX_TOON = "HELIX_materials_toon"; export declare const TEXTURE_SLOTS: readonly ["shadeMultiplyTexture", "shadingShiftTexture", "matcapTexture", "rimMultiplyTexture", "outlineWidthMultiplyTexture", "uvAnimationMaskTexture"]; export type ToonSlot = typeof TEXTURE_SLOTS[number]; interface IMToon extends IProperty { json: Record; [slot: string]: unknown; } export declare class MToon extends ExtensionProperty { static EXTENSION_NAME: string; extensionName: typeof MTOON; propertyType: 'MToon'; parentTypes: string[]; protected init(): void; protected getDefaults(): IMToon; getJson(): Record; setJson(json: Record): this; getSlot(slot: ToonSlot): Texture | null; getSlotInfo(slot: ToonSlot): TextureInfo | null; setSlot(slot: ToonSlot, texture: Texture | null): this; } /** Write-side extension: emits `VRMC_materials_mtoon` on every material that has an MToon property. */ export declare class MToonExtension extends Extension { static EXTENSION_NAME: string; readonly extensionName = "VRMC_materials_mtoon"; readonly prewriteTypes: PropertyType[]; createMToon(): MToon; read(_context: ReaderContext): this; write(_context: WriterContext): this; prewrite(context: WriterContext): this; } /** Read-side extension: turns `HELIX_materials_toon` into MToon properties. Disposed after the read. */ export declare class HelixToonReader extends Extension { static EXTENSION_NAME: string; readonly extensionName = "HELIX_materials_toon"; write(_context: WriterContext): this; /** Runs after the core objects exist (materials and textures are resolved by then). */ read(context: ReaderContext): this; } export declare function setMToon(doc: Document, material: Material, json: Record, slots: Partial>): void; export {};