These examples are self-contained and serve the purpose of demonstrating how to utilize VTK for rendering tasks, all within a browser environment through the utilization of WebAssembly.
These examples were contributed by Rostyslav Lyulinetskyy and Ilya Volkov from https://about.dicehub.com/.
Please refer to Documentation/dev/build_wasm_emscripten.md for detailed instructions.
- AsyncClipper App that uses a clip widget to clip a mesh asynchronously without blocking main UI thread.
- Cone Shows how to write an extremely simple 3D object viewer that runs in the browser using VTK that targets WebAssembly architecture.
- ConeMultiBackend Shows how to write a 3D object viewer for WebAssembly . Notably, it offers the flexibility to select the rendering backend, either OpenGL or WebGPU, during runtime.
- ConeWebXR Shows how to write a simple 3D object viewer for XR devices that runs in the browser using WebXR.
- GeometryViewer Load files from popular formats and adjust rendering options.
- ModuleTesting Illustrates necessary CMake code and directory structure to enable and run WASM tests for custom modules.
- MultiCone Shows to render multiple viewports in a HTML canvas using a VTK wasm module per viewport.
- MultipleCanvases Shows how to use multiple canvases in a single WASM module.
- WrappedAsyncClipper Same as AsyncClipper but without a
main()function and instead uses wrapped methods. - WrappedMace Shows how to write a 3D object viewer in JavaScript using wrapped VTK C++ classes.