vhacd-js
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

A dead-simple wrapper API for V-HACD to decompose a 3d surface into a set of "near" convex parts. Consult V-HACD for details.

Usage:

import { ConvexMeshDecomposition } from "v-hacd-js";
// Create a mesh decomposer. It can be used to decompose as many meshes as you like.
const decomposer = await ConvexMeshDecomposition.create();
// Optionally configure how the decomposition is performed.
const options = { maxHulls: 32 };
// Produce an array of convex hulls from a mesh.
const hulls = decomposer.computeConvexHulls({ positions, indices }, options);

See vhacd.ts for full JavaScript API.

Package Sidebar

Install

npm i vhacd-js

Weekly Downloads

553

Version

0.0.1

License

BSD-3-Clause

Unpacked Size

42.4 MB

Total Files

89

Last publish

Collaborators

  • pmconne