Manifold WASM Developer Guide
    Preparing search index...

    This guide and the ManifoldCAD User Guide are built using TypeDoc.

    Documentation can be built using NPM:

    cd bindings/wasm
    npm install
    npm run build
    npm run docs

    After this, the User and Developer docs will be in docs/jsuser and docs/jsapi respectively.

    The ManifoldCAD User Guide is generated from the declaration files present in types/. These mostly re-export declarations, allowing the User Guide to inherit from the Developer Guide.

    TypeDoc reflections (comments) flagged as @internal will not be visible in the User Guide, but will be present in the Developer Guide. Reflections tagged as @hidden will not be visible in either guide.

    The manifold library itself is documented in three files:

    • manifold-global-types.d.ts: Defines lower level types and interfaces like Vec2, Mat3, &c.
    • manifold-encapsulated-types.d.ts: Declares objects and types that are implemented in C++, and compiled to WASM. Definitions of classes like Manifold and CrossSection can be found here.
    • manifold-root.d.ts: Defines the ManifoldToplevel interface, and re-exports the above two files.

    These three files are consolidated into manifold.d.ts using API Extractor. This is automatically run before each build as an npm lifecycle hook. It can be run manually as npm run prebuild.

    These are general guidelines, not hard rules. The aim of this section is to encourage consistent documentation, not to institute brand standards.

    • When referring to the library, manifold should generally be lowercase. Manifold can be capitalized when grammatically correct, for example at the start of a sentence. If unclear, manifold can be marked up as code to distinguish it from the manifold property.
    • The Manifold class should generally be capitalized. Where appropriate, it can be linked directly to the Manifold class documentation.
    • ManifoldCAD should be capitalized. ManifoldCAD.org should be a link.