VTK Local Rendering using WASM
Project description
VTK Local Rendering using VTK/WASM to match server side rendering pipeline on the client side. The current code base is still at its infancy but we aim to make it the default implementation for local rendering using VTK/ParaView with trame.
License
This library is OpenSource and follow the Apache Software License
Installation
pip install trame-vtklocal
# We need a VTK that has its wasm counterpart
# This is the first version available with it
# For ParaView (not yet supported), VTK don't need to be installed
pip install "vtk==9.3.20240817.dev0" --extra-index-url https://wheels.vtk.org
Development
Build and install the Vue components
cd vue-components
npm i
npm run build
cd -
Install the library
pip install -e .
Optionally, you can develop with bleeding edge VTK by following these steps
# Compile VTK for wasm32 architecture using emscripten. Build artifacts can be found in dev/vtk/build/wasm
docker run --rm -it -v$PWD:/work kitware/vtk:ci-fedora39-20240731 /bin/bash -c "cd /work && ./utils/build_vtk.sh -u https://gitlab.kitware.com/vtk/vtk.git -b master -t wasm32 -p RelWithDebInfo"
# Compile VTK with python wrappings using system C++ compiler. Build artifacts can be found in dev/vtk/build/py
./utils/build_vtk.sh -u https://gitlab.kitware.com/vtk/vtk.git -b master -t py -p RelWithDebInfo
# Set environment variables
source ./utils/dev_environment.sh -b master -p RelWithDebInfo
Running examples
pip install trame trame-vtklocal trame-vuetify trame-vtk
# We need a VTK that has its wasm counterpart
# This is the first version available with it
# For ParaView (not yet supported), VTK don't need to be installed
pip install "vtk==9.3.20240810.dev0" --extra-index-url https://wheels.vtk.org
# regular trame app
python ./examples/vtk/cone.py
Some example are meant to test and validate WASM rendering. Some will default for remote rendering but if you want to force them to use WASM just run export USE_WASM=1 before executing them.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for trame_vtklocal-0.5.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1334c12ed243ceb2230cab8391990da88661254fa2ab30971f174f9f980e934 |
|
MD5 | f92faf172b53a85e185f8f0857008efe |
|
BLAKE2b-256 | c1a7873c060727108120a50c4fc3fe8ac34953ee8f44d63ce9f0ea6e95a4c649 |