Add async vtk.wasm examples with web worker and vtkAlgorithm abort
- Adds two new examples demonstrating usage of web workers in vtk.wasm. They both use vtkAlgorithm abort functionality to enable more responsive VTK web applications.
- The basic example
AsyncClipper
uses amain()
function and the-sPROXY_TO_PTHREAD
link flag which does all the heavy lifting of runningmain()
itself on a new thread and transferring the canvas for offscreen rendering. - The second example
WrappedAsyncClipper
doesn't have amain()
and is entirely driven from javascript through custom bindings. It shows in detail how to transfer the canvas offscreen to the newly created pthread.
Edited by Jaswant Panchumarti (Kitware)