import type { Document, Material } from '@gltf-transform/core'; import { type ToonSlot } from './mtoon'; import type { Texture } from '@gltf-transform/core'; /** * HELIX materials -> `VRMC_materials_mtoon` 1.0. * * When a material carries the HELIX toon extension (lane vrm-toon: `HELIX_materials_toon`, deliberately the * same field names, units and linear colour space as MToon) it is renamed and its texture slots re-indexed. * When it carries none - every avatar published before the toon path - MToon is derived from the base colour: * the lit colour is the PBR base colour, the shade colour is that colour darkened, the shade multiplies the * same texture, and there is no outline. That is a faithful *toon rendering of what HELIX shows*, not a * recovery of authored shade colours the atlas flattened away. */ export type ToonSlots = Partial>; export interface ToonMaterial { /** MToon fields other than texture slots, exactly as MToon names them. */ json: Record; slots: ToonSlots; } /** Linear-space darkening of the base colour for the shaded side (no authored shade colour to recover). */ export declare const DERIVED_SHADE_FACTOR = 0.72; export declare function derivedMToon(material: Material): ToonMaterial; /** Give every material without MToon values (no HELIX toon extension) the base-colour derivation. */ export declare function ensureMToon(doc: Document): { fromHelixToon: number; derived: number; };