UNPKG

@needle-tools/materialx

Version:

Web runtime support to load and display MaterialX materials in Needle Engine and three.js via the MaterialX WebAssembly library. glTF files containing the `NEEDLE_materials_mtlx` extension can be loaded with this package. There is also experimental suppor

16 lines (12 loc) 719 B
import { Context, GLTF, INeedleGLTFExtensionPlugin } from "@needle-tools/engine"; import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader.js"; import { GLTFExporter } from "three/examples/jsm/exporters/GLTFExporter.js"; import { MaterialXLoader } from "./loader.three.js"; export declare class MaterialXLoaderPlugin implements INeedleGLTFExtensionPlugin { readonly name: "MaterialXLoaderPlugin"; private loader: MaterialXLoader | null; onImport(loader: GLTFLoader, url: string, context: Context): void; onLoaded(url: string, gltf: GLTF, _context: Context): void; onExport(_exporter: GLTFExporter, _context: Context): void; } export declare function useNeedleMaterialX(): Promise<void>;