gsots3d
Version:
Getting S**t On The Screen in 3D. A library for doing 3D graphics in the browser.
25 lines (23 loc) • 769 B
TypeScript
/**
* A "raw" material fetched from the MTL parser, don't use this directly
*/
type MtlMaterial = {
illum?: number;
ns?: number;
d?: number;
ka?: [number, number, number];
kd?: [number, number, number];
ks?: [number, number, number];
ke?: [number, number, number];
texDiffuse?: string;
texSpecular?: string;
texNormal?: string;
};
/**
* Parse an MTL file returning a map of materials.
* The returned {@link typescript!MtlMaterial} should be passed to new Material() to create a material
* @param {string} mtlFile - The MTL file as a string
* @returns {Map<string, MtlMaterial>} - A map of materials
*/
declare function parseMTL(mtlFile: string): Map<string, MtlMaterial>;
export { type MtlMaterial as M, parseMTL as p };