manifold-3d
    Preparing search index...

    Embedding manifoldCAD

    There are three ways to use manifold in your own projects:

    1. Using the manifoldCAD worker. The worker adds overhead, but it will sandbox scripts. It also makes it possible to include packages at runtime.
    2. Using manifoldCAD libraries directly. ManifoldCAD implements importers, exporters, and garbage collection amongst other utilities. These modules are reasonably light and can be used outside of manifoldCAD.
    3. Using the manifold WASM module directly without any of the above.

    The worker is a code evaluation sandbox intended to run as a web worker. It will bundle a script, include any dependencies, and even fetch those dependencies from a CDN if required. At run time, it will evaluate the script as a dynamically created function.

    See:

    Note

    There are slight behaviour differences between scripts running inside the manifoldCAD worker, and those outside.

    See our import integration tests for examples.

    When evaluated through the worker, isManifoldCAD() will return true. Otherwise it returns false.