Polygon Mesh Processing Library
No Matches
Building JavaScript Apps

PMP supports seamless cross-compilation to JavaScript using emscripten. This allows you to build applications that run in a browser, just like we do with our mesh processing demo application.

In order to build JavaScript applications, download the SDK from https://github.com/kripken/emscripten and follow the installation instructions.

Next, source the emscripten SDK environment setup script:

source <path_to_install_dir>/emsdk_env.sh

Create a separate build directory:

mkdir embuild
cd embuild

Run cmake through the emcmake wrapper and build:

emcmake cmake ..

Finally, start a local web server and open the corresponding app:

emrun mpview.html