Skip to content

Conversation

@abhinavsns
Copy link
Contributor

See Issue: #49
Linked PR: Kitware/vtk-wasm#20
Wire vtk-wasm progress into VtkLocal with an overlay during wasm load/sync; emit a progress event from the Vue component; expose progress in the Python widget and document how to drive a global app loader.
Usage (Python/trame global loader):

from trame.widgets import vtklocal, vuetify

state.app_loading = True
state._vtklocal_seen_active = False

def on_vtklocal_progress(event):
    if event.get("active"):
        state._vtklocal_seen_active = True
        state.app_loading = True
    elif state._vtklocal_seen_active:
        state.app_loading = False

with vuetify.VOverlay(v_model=("app_loading",), absolute=True):
    vuetify.VProgressCircular(indeterminate=True, size=64)

vtklocal.LocalView(render_window, progress=(on_vtklocal_progress, "[$event]"))

Usage (Vue):
<VtkLocal @progress="onProgress" />

@abhinavsns
Copy link
Contributor Author

@jspanchu I have reverted the build_vtk.py file.

@jspanchu
Copy link
Member

@abhinavsns Thanks. LGTM

@jourdain jourdain requested a review from jspanchu December 31, 2025 23:22
@jourdain
Copy link
Collaborator

Now that @kitware/vtk-wasm has been released with your changes, it might be good to update the package.json + lock to bring that feature into the pip package once the ci/release run.

Copy link
Member

@jspanchu jspanchu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. can you bump the version of vtk-wasm in package.json and the lock file as well?

@abhinavsns
Copy link
Contributor Author

Done!

@jourdain jourdain merged commit 5546dc6 into Kitware:master Jan 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants