geom-export-obj
Version:
Convert one (or more) simplicial complex geometry (positions/cells/normals/uvs/vertexColors) into an OBJ string (optionally optimized with number precision to reduce its size).
25 lines (24 loc) • 1.46 kB
TypeScript
export default geomExportObj;
export * from "./types.js";
/** @module geomExportObj */
/**
* Parse a simplicial complex and return an obj string
*
* @see http://paulbourke.net/dataformats/obj/
* @see https://paulbourke.net/dataformats/obj/colour.html
* @param {import("./types.js").SimplicialComplex} geometry
* @param {import("./types.js").GeomExportObjOffsets} [offsets={ positions: 0, normals: 0, uvs: 0 }}]
* @param {string} [defaultName] A name for the object if geometry.name is not specified.
* @param {number} [precision] Decimal digit precision for positions/normals/uvs/vertexColors.
* @returns {string}
*/
export function parse({ positions, normals, uvs, cells, vertexColors, name, materialName }: import("./types.js").SimplicialComplex, offsets?: import("./types.js").GeomExportObjOffsets, defaultName?: string, precision?: number): string;
/**
* Parse one or more simplicial complex geometry and return an obj string and vertices offsets.
*
* @alias module:geomExportObj
* @param {import("./types.js").SimplicialComplex|import("./types.js").SimplicialComplex[]} geometries
* @param {import("./types.js").GeomExportObjOptions} [options={}]
* @returns {import("./types.js").GeomExportObjReturnValue}
*/
declare function geomExportObj(geometries: import("./types.js").SimplicialComplex | import("./types.js").SimplicialComplex[], options?: import("./types.js").GeomExportObjOptions): import("./types.js").GeomExportObjReturnValue;