pyvista-wasm#
PyVista-like API for VTK.wasm — bring intuitive 3D visualization to the browser using WebAssembly.
Table of Contents#
Install#
pip install pyvista-wasm
For Pyodide/stlite:
import micropip
await micropip.install("pyvista-wasm")
Usage#
import pyvista_wasm as pv
plotter = pv.Plotter()
plotter.add_mesh(pv.Sphere(), color="red")
plotter.show()
Differences from pyvista-js#
This project replaces the vtk.js rendering backend used in pyvista-js with VTK.wasm (@kitware/vtk-wasm npm package).
Key differences:
Rendering backend: VTK.wasm (WebAssembly port of VTK C++) instead of vtk.js (pure JavaScript reimplementation)
API style: VTK.wasm uses
vtk.vtkRenderer()factory functions on a namespace object, vs vtk.js’svtk.Rendering.Core.vtkRenderer.newInstance()hierarchyInitialization: VTK.wasm requires async initialization via
vtkWASM.createNamespace()to load the WASM binaryFeature parity: VTK.wasm provides access to the full VTK C++ API, enabling features not available in vtk.js
Contributing#
Contributions are welcome! Please open an issue or pull request on GitHub.
License#
Apache License 2.0 © Tetsuo Koyama
Topic driven themed lessons.
Focused guides for common tasks.
Deeper understanding awaits.
No fuss facts.
Choose your approach to learning and pyvista-wasm knowledge discovery
(Diátaxis).


