-
Notifications
You must be signed in to change notification settings - Fork 588
Add vtk-wasm backend support for Jupyter and documentation rendering #7720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This commit introduces VTK WebAssembly (vtk-wasm) as a new rendering backend option for PyVista in Jupyter environments and documentation generation. Key changes: - Add 'vtk-wasm' to JupyterBackendOptions type definitions - Implement show_vtk_wasm() function with HTML/IFrame integration - Add vtk-wasm dependency validation and error handling - Include comprehensive documentation for the new backend - Add optional 'wasm' dependency group in pyproject.toml The vtk-wasm backend provides native VTK performance in browsers without requiring server connections, offering an alternative to existing Trame-based client/server rendering approaches. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
7ad00c1
to
a5755cf
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #7720 +/- ##
==========================================
- Coverage 96.39% 96.33% -0.06%
==========================================
Files 150 150
Lines 32668 32688 +20
Branches 4116 4118 +2
==========================================
+ Hits 31489 31491 +2
- Misses 573 589 +16
- Partials 606 608 +2 |
# TODO: Integrate actual VTK scene data with vtk-wasm viewer | ||
|
||
# Export the VTK scene data | ||
with tempfile.NamedTemporaryFile(mode='w', suffix='.html', delete=False) as f: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See https://kitware.github.io/vtk-wasm/guide/viewer/data.html but we don't have a self contained html+data option.
Summary
This PR introduces VTK WebAssembly (vtk-wasm) as a new rendering backend option for PyVista in Jupyter environments and documentation generation.
Key Features
The vtk-wasm backend provides:
pip install pyvista[wasm]
Installation
The vtk-wasm backend requires VTK version 9.4 or higher and
trame-vtklocal
:pip install vtk>=9.4 trame-vtklocal
Or install with PyVista's wasm extras:
Usage
Test plan
Generated with Claude Code