Skip to content

Commit

Permalink
feat(wasm): update wasm file
Browse files Browse the repository at this point in the history
  • Loading branch information
jspanchu committed Mar 15, 2024
1 parent d970298 commit fc63f26
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .codespellrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[codespell]
skip = **/package-lock.json,**/vtkSceneManager-9.3.mjs
skip = **/package-lock.json,**/vtkWasmSceneManager-9.3.mjs
6 changes: 2 additions & 4 deletions trame_vtklocal/module/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
serve_path = str(Path(__file__).with_name("serve").resolve())
serve = {"__trame_vtklocal": serve_path}
module_scripts = [
"__trame_vtklocal/wasm/vtkSceneManager-9.3.mjs",
"__trame_vtklocal/wasm/vtkWasmSceneManager-9.3.mjs",
]
scripts = [
"__trame_vtklocal/js/trame_vtklocal.umd.js",
Expand Down Expand Up @@ -45,9 +45,7 @@ def __init__(self, *args, **kwargs):
def update(self):
self.vtk_object_manager.UpdateStatesFromObjects()
if self._debug_state:
self.vtk_object_manager.DumpGlobalState(
f"snapshot-{self._debug_state_counter}"
)
self.vtk_object_manager.Export(f"snapshot-{self._debug_state_counter}")
self._debug_state_counter += 1

@property
Expand Down
15 changes: 0 additions & 15 deletions trame_vtklocal/module/serve/wasm/vtkSceneManager-9.3.mjs

This file was deleted.

16 changes: 16 additions & 0 deletions trame_vtklocal/module/serve/wasm/vtkWasmSceneManager-9.3.mjs

Large diffs are not rendered by default.

Binary file not shown.
2 changes: 2 additions & 0 deletions trame_vtklocal/widgets/vtklocal.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def __init__(self, render_window, **kwargs):
self._window_id = self.object_manager.RegisterObject(render_window)
render_window.Render()
self.object_manager.UpdateStatesFromObjects()
if self.api._debug_state:
self.object_manager.Export(f"snapshot-{self.api._debug_state_counter}")

self._attributes["rw_id"] = f':render-window="{self._window_id}"'
self._attributes["ref"] = f'ref="{self.__ref}"'
Expand Down
4 changes: 2 additions & 2 deletions vue-components/src/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export async function createModule(canvas) {
const module = {
canvas,
locateFile() {
return "__trame_vtklocal/wasm/vtkSceneManager-9.3.wasm";
return "__trame_vtklocal/wasm/vtkWasmSceneManager-9.3.wasm";
},
print() {
console.info(Array.prototype.slice.call(arguments).join(" "));
Expand All @@ -11,7 +11,7 @@ export async function createModule(canvas) {
console.error(Array.prototype.slice.call(arguments).join(" "));
},
};
const objectManager = await window.createVTKSceneManager(module);
const objectManager = await window.createVTKWasmSceneManager(module);
objectManager.initialize();
return objectManager;
}

0 comments on commit fc63f26

Please sign in to comment.