A simple solution is to use vtkGenericRenderWindowInteractor
and translate all events from JavaScript to VTK style events. Also, one needs to listen to CreateTimerEvent
and DestroyTimerEvent
. To do all this one needs to wrap VTK functionality to JavaScript using Emscripten.