UNPKG

threepipe

Version:

A modern 3D viewer framework built on top of three.js, written in TypeScript, designed to make creating high-quality, modular, and extensible 3D experiences on the web simple and enjoyable.

20 lines 1.52 kB
import { IMaterial } from '../core'; import { WebGLRenderer } from 'three'; import { MaterialExtension, MaterialExtensionShader } from './MaterialExtension'; export declare class MaterialExtender { static VoidMain: string; static ApplyMaterialExtensions(material: IMaterial, shader: MaterialExtensionShader, materialExtensions: MaterialExtension[], renderer: WebGLRenderer): void; static ApplyMaterialExtension(material: IMaterial, shader: MaterialExtensionShader, materialExtension: MaterialExtension, renderer: WebGLRenderer): void; static CacheKeyForExtensions(material: IMaterial, materialExtensions: MaterialExtension[]): string; static CacheKeyForExtension(material: IMaterial, materialExtension: MaterialExtension): string; static RegisterExtensions(material: IMaterial, customMaterialExtensions?: MaterialExtension[]): MaterialExtension[]; static UnregisterExtensions(material: IMaterial, customMaterialExtensions?: MaterialExtension[]): void; } export declare function updateMaterialDefines(defines: MaterialExtension['extraDefines'], material: IMaterial): void; /** * Creates a {@link MaterialExtension} with getUiConfig that also caches the config for the material based on uuid * @param getUiConfig - function that returns a ui config. make sure its static. * @param uuid uuid to use. */ export declare function uiConfigMaterialExtension(getUiConfig: Required<MaterialExtension>['getUiConfig'], uuid?: string): MaterialExtension; //# sourceMappingURL=MaterialExtender.d.ts.map