/** * Resource handler for the `material` asset type. Loads material JSON into a * {@link StandardMaterial} and binds the texture assets it references. A custom parser may * produce another kind of {@link Material}. * * @category Asset */ export class MaterialHandler extends ResourceHandler { /** * Create a new MaterialHandler instance. * * @param {AppBase} app - The running {@link AppBase}. * @ignore */ constructor(app: AppBase); _assets: import("../asset/asset-registry.js").AssetRegistry; _placeholders: PlaceholderTextures; _parser: JsonStandardMaterialParser; patch(asset: any, assets: any): void; _onAssetUnload(asset: any): void; _assignTexture(parameterName: any, materialAsset: any, texture: any): void; /** * Returns the placeholder texture for a texture parameter of a material while its texture * asset loads. The placeholder decodes like the texture of the asset, and the parameters of * the material which reference the same texture asset get the same placeholder, as they get * the same texture, so the material is drawn with the same shader before and after the texture * loads. * * @param {string} parameterName - The name of the texture parameter. * @param {Asset} materialAsset - The material asset. * @param {Asset} textureAsset - The texture asset the parameter references. * @returns {Texture} The placeholder texture. * @private */ private _getPlaceholderTexture; _assignPlaceholderTexture(parameterName: any, materialAsset: any, textureAsset: any): void; _onTextureLoad(parameterName: any, materialAsset: any, textureAsset: any): void; _onTextureAdd(parameterName: any, materialAsset: any, textureAsset: any): void; _onTextureRemoveOrUnload(parameterName: any, materialAsset: any, textureAsset: any): void; _assignCubemap(parameterName: any, materialAsset: any, textures: any): void; _onCubemapLoad(parameterName: any, materialAsset: any, cubemapAsset: any): void; _onCubemapAdd(parameterName: any, materialAsset: any, cubemapAsset: any): void; _onCubemapRemoveOrUnload(parameterName: any, materialAsset: any, cubemapAsset: any): void; _bindAndAssignAssets(materialAsset: any, assets: any): void; } import { ResourceHandler } from './handler.js'; import { PlaceholderTextures } from './placeholder-textures.js'; import { JsonStandardMaterialParser } from '../parsers/material/json-standard-material.js'; import type { AppBase } from '../app-base.js';