import { BlendMode, ConwayGeometryWasm, MaterialObject } from "../../dependencies/conway-geom/index.js"; export type ColorRGBA = [ number, number, number, number ]; /** * Convert a specular exponent (e.g. phong or blinn) to roughness * * Uses the conversion from - http://simonstechblog.blogspot.com/2011/12/microfacet-brdf.html * * @param shininess The shinyness exponent/𝛼 to convert to roughness * @return {number} The resultant roughness. */ export declare function exponentToRoughness(shininess: number): number; /** * Convert a roughness to specular exponent * * Uses the conversion from - http://simonstechblog.blogspot.com/2011/12/microfacet-brdf.html * * @param roughness The roughness to convert to shinyness/exponent * @return {number} The resultant shinyness. */ export declare function roughnessToExponent(roughness: number): number; /** * A canonical material represents the internal material type we pass * around and support wiring up to gltf like properties. */ export interface CanonicalMaterial { /** * The name of this material, which may be procedurally generated. */ readonly name: string; /** * The base color of this material (in PBR terms) */ readonly baseColor: ColorRGBA; /** * Legacy color to match web-ifc display */ readonly legacyColor: ColorRGBA; /** * How metallic is this surface? 0 for dialletric, 1 for metal. */ readonly metalness?: number; /** * How rough is this surface vs how shiny (1 for maximum rougness, 0 for full specular) */ readonly roughness?: number; /** * The index of refraction of this surface. */ readonly ior?: number; /** * The specular color of this surface (F0, overrides the F0 that would * be produced by baseColor, metalness and index of refraction). */ readonly specular?: ColorRGBA; /** * Is this material double sided or is it back face culled? */ readonly doubleSided: boolean; /** * The blend mode for this surface (should probably be opaque). */ readonly blend: BlendMode; } /** * Serialize a canonical material to a stable string for hashing or comparison. * * @param mat The canonical material to serialize. * @return {string} A pipe-delimited string representation of the material. */ export declare function canonicalMaterialToString(mat: CanonicalMaterial): string; /** * A material name cleaned for OBJ syntax * * @param from The material to get a clean name for * @return {string} The cleaned name */ export declare function getMTLCleanName(from: CanonicalMaterial): string; /** * Dump a material to MTL format. * * @param from The material to dump. * @return {string} The MTL formatted string. */ export declare function dumpMTL(from: CanonicalMaterial): string; export declare const defaultCanonicalMaterial: CanonicalMaterial; /** * Convert a canonical material to a native material * * @param wasm The wasm object to use for conversion. * @param from The material to convert. * @return {MaterialObject} The native material object. */ export declare function toNativeMaterial(wasm: ConwayGeometryWasm, from: CanonicalMaterial): MaterialObject; //# sourceMappingURL=canonical_material.d.ts.map