Integrating vtk.wasm with angular

I have an app that uses vtk.js inside angular, and it’s working well. I am trying to migrate to vtk.wasm and am wondering if there are any examples available of integrating angular and vtk.wasm. I think I’m having problems with events getting passed through to the vtk code (mouse, expose, etc).

Thanks in advance…

@jaswantp

Hi @wayne-christopher-an

There are examples of how to setup the build system and code for VTK.wasm in general. However, I cannot think of anything with angular.

  1. There are many examples in VTK itself. See Examples/Emscripten/Cxx
  2. The vtk-wasm-docker/README.md shows how one might structure a dev/production toolset using kitware/vtk-wasm docker image.
  3. The vtkWasmBenchmark is a complete example that uses more JavaScript and HTML, less C++.

I think the last example can give you ideas for better integration and functionality.

About events and mouse, you might want the canvas to have focus. See vtkWasmBenchmark/blob/main/web/index.js#L448