
Security News
Open Source Maintainers Demand Ability to Block Copilot-Generated Issues and PRs
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
geom-export-obj
Advanced tools
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).
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).
npm install geom-export-obj
import geomExportObj from "geom-export-obj";
import { cube } from "primitive-geometry";
console.log(geomExportObj(cube()).output);
object
Geometry definition. All optional.
object
Offsets to for cells. Useful if appending to another obj string. Used internally.
object
Options for exporter.
object
GeomExportObjReturnValue
βParse one or more simplicial complex geometry and return an obj string and vertices offsets.
Kind: Exported function
Param | Type | Default |
---|---|---|
geometries | SimplicialComplex | Array.<SimplicialComplex> | |
[options] | GeomExportObjOptions | {} |
string
Parse a simplicial complex and return an obj string
Kind: static method of geomExportObj
See
Param | Type | Default | Description |
---|---|---|---|
geometry | SimplicialComplex | ||
[offsets] | GeomExportObjOffsets | { positions: 0, normals: 0, uvs: 0 }} | |
[defaultName] | string | A name for the object if geometry.name is not specified. | |
[precision] | number | Decimal digit precision for positions/normals/uvs/vertexColors. |
object
Geometry definition. All optional.
Kind: global typedef Properties
Name | Type | Description |
---|---|---|
positions | Array.<number> | |
normals | Array.<number> | |
uvs | Array.<number> | |
cells | Array.<number> | |
name | string | The object name. |
[materialName] | string | The object material name. |
object
Offsets to for cells. Useful if appending to another obj string. Used internally.
Kind: global typedef Properties
Name | Type |
---|---|
positions | number |
normals | number |
uvs | number |
object
Options for exporter.
Kind: global typedef Properties
Name | Type | Default | Description |
---|---|---|---|
[header] | string | "# geom-export-obj\n" | Header to be prepended to the file. |
[prefix] | string | "Mesh_" | Prefix for object names. |
[offsets] | GeomExportObjOffsets | { positions: 0, normals: 0, uvs: 0 } | The initial offsets for cells. |
[precision] | number | Decimal digit precision for positions/normals/uvs/vertexColors. |
object
Kind: global typedef Properties
Name | Type | Description |
---|---|---|
output | string | The obj as a string. |
offsets | GeomExportObjOffsets |
MIT. See license file.
FAQs
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).
The npm package geom-export-obj receives a total of 2 weekly downloads. As such, geom-export-obj popularity was classified as not popular.
We found that geom-export-obj demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
Research
Security News
Malicious Koishi plugin silently exfiltrates messages with hex strings to a hardcoded QQ account, exposing secrets in chatbots across platforms.
Research
Security News
Malicious PyPI checkers validate stolen emails against TikTok and Instagram APIs, enabling targeted account attacks and dark web credential sales.