import { type Document } from '@gltf-transform/core'; import { TOON_DEFAULTS } from './helixToon'; /** * READ A VRM'S MToon MATERIALS INTO `HELIX_materials_toon`. * * A VRM 1.0 file carries `VRMC_materials_mtoon` on each material; a VRM 0.x file carries Unity's MToon properties in * the root `VRM.materialProperties` list. Both reduce to the same 1.0 parameter set. The 0.x -> 1.0 conversion * below is a port of `@pixiv/three-vrm-materials-v0compat` (`VRMMaterialsV0CompatPlugin`, MIT, (c) pixiv Inc.) so the * published avatar is shaded from exactly the numbers the reference renderer derives, including its shade-shift / * toony remap, `gammaEOTF` on colours, centimetre outline widths, and the glTF fields it rebuilds from MToon * (alpha mode, cutoff, sidedness, base colour). * * Runs on a freshly read document, before any stage that disposes or merges materials: the extension property * rides on its `Material`, so decimation, atlasing and pruning carry it with no bookkeeping of their own. */ export interface VrmToonReport { /** glTF materials in the source. */ materials: number; /** Materials that received `HELIX_materials_toon`. */ toon: number; warnings: string[]; } /** * Attach `HELIX_materials_toon` to every MToon (or VRM-unlit) material of `document`, read from its raw glTF JSON. * `document` must be the one just read from the same bytes: materials and textures are matched by position. */ export declare function attachVrmToon(document: Document, gltfJson: unknown): Promise; export { TOON_DEFAULTS };