/** * @import { Material } from './material.js' * @import { MeshInstance, MeshInstanceParameter } from '../mesh-instance.js' * @import { UniformBufferFormat } from '../../platform/graphics/uniform-buffer-format.js' */ /** * Initializes the debug state of a material, recording where it was created when the * TRACEID_MATERIAL_UPDATE trace channel is enabled. * * @param {Material} material - The material. * @ignore */ export function initMaterialDebug(material: Material): void; /** * Records where a typed property of the material was changed or exposed, when the * TRACEID_MATERIAL_UPDATE trace channel is enabled. * * @param {Material} material - The material. * @ignore */ export function recordMaterialChange(material: Material): void; /** * Returns the names of the typed properties changed since the last {@link Material#update}: * assigned, or exposed by a getter and mutated in place. * * @param {Material} material - The material. * @returns {string[]} The names of the changed properties. * @ignore */ export function getUnappliedMaterialProperties(material: Material): string[]; /** * Warns about typed properties changed without a subsequent {@link Material#update}, identifying * the material by its name, id and the nodes rendering it. When the TRACEID_MATERIAL_UPDATE trace * channel is enabled, the warning includes where the material was created and last changed. * * @param {Material} material - The material. * @param {string[]} names - The names of the changed properties. * @ignore */ export function warnUnappliedMaterialProperties(material: Material, names: string[]): void; /** * Initializes the debug state of a mesh instance. * * @param {MeshInstance} meshInstance - The mesh instance. * @ignore */ export function initMeshInstanceDebug(meshInstance: MeshInstance): void; /** * Records the array values of the overrides just applied to a mesh instance's copy of the material * uniform buffer, to detect changes made in place afterwards. Numbers cannot change in place and * are not recorded. * * @param {MeshInstance} meshInstance - The mesh instance. * @param {MeshInstanceParameter[]} overrides - The applied overrides. * @ignore */ export function recordAppliedOverrides(meshInstance: MeshInstance, overrides: MeshInstanceParameter[]): void; /** * Returns the names of the overrides whose array values changed in place since they were applied. * * @param {MeshInstance} meshInstance - The mesh instance. * @param {MeshInstanceParameter[]} overrides - The overrides. * @returns {string[]} The names of the changed overrides. * @ignore */ export function getMutatedOverrides(meshInstance: MeshInstance, overrides: MeshInstanceParameter[]): string[]; /** * Warns about overrides changed in place without a subsequent {@link MeshInstance#setParameter}, * identifying the mesh instance by its node and material. Like the material warning, one report * per message is enough to point at the bug, so the message is deduplicated for the session: the * warned version kept by the mesh instance limits the cost of the detection, not the output. * * @param {MeshInstance} meshInstance - The mesh instance. * @param {string[]} names - The names of the changed overrides. * @ignore */ export function warnMutatedOverrides(meshInstance: MeshInstance, names: string[]): void; /** * Warns about the parameters of a material named like a uniform of the view uniform buffer of the * pass. The renderer uploads that buffer once per pass, before any draw, so a value set on the * material is ignored. * * @param {Material} material - The material. * @param {UniformBufferFormat|undefined} viewUniformFormat - The format of the view uniform buffer * of the pass. * @ignore */ export function warnViewUniformMaterialParameters(material: Material, viewUniformFormat: UniformBufferFormat | undefined): void; /** * Warns about the parameters of a mesh instance named like a uniform of the view uniform buffer * of the pass, which the renderer uploads once per pass, so a value set on the mesh instance is * ignored. * * @param {MeshInstance} meshInstance - The mesh instance. * @param {UniformBufferFormat|undefined} viewUniformFormat - The format of the view uniform buffer * of the pass. * @ignore */ export function warnViewUniformMeshInstanceParameters(meshInstance: MeshInstance, viewUniformFormat: UniformBufferFormat | undefined): void; import type { Material } from './material.js'; import type { MeshInstance } from '../mesh-instance.js'; import type { MeshInstanceParameter } from '../mesh-instance.js'; import type { UniformBufferFormat } from '../../platform/graphics/uniform-buffer-format.js';