Skip to content

MntiKor/VTK-WASM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VTK Examples compilation in WASM

It's a work in progress that you can see there.

Current state

doesntwork.txt contains all known examples that either can't build or crash, with details.

How to build examples

Works by topics: look for the Cxx topic you want from VTK Examples.

Then use Generator to create examples:

cd Generator
./GenerateExamplesWASM.sh <path_to_vtk> sources/<topic_name> ../<topic_name>

It's now time to use vtk-wasm docker image to build and try your example !

cd ../<topic_name>
docker run --rm --entrypoint /bin/bash -v $PWD:/work -it kitware/vtk-wasm
mkdir build && cd build

cmake -GNinja \
  -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} \
  -DVTK_DIR=/VTK-install/Release/lib/cmake/vtk \
  -DCMAKE_BUILD_TYPE=Release \
  ../<example_name>

cmake --build .
exit

Run

Now that your example was built, you only have to start a web server to get it from your browser

cd build
python -m http.server 2000

Open browser at localhost:2000 and boom (well... If you have the chance to have built a working example) !

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published