I implemented a split view with linked cameras, similar to what paraview offers, using vtkjs. For this, I instantiated 2
divs that span half the screen.
left = vtkFullScreenRenderWindow.newInstance(); right = vtkFullScreenRenderWindow.newInstance(); left.getContainer().style.width = "50%" left.resize() right.getContainer().style.width = "50%" right.getContainer().style.left = "50%" right.resize()
Then I bounded the events of their interactors to the other divs:
Finally, once the polydatas are mapped and their actors are added to each renderer, I initialize the camera this way:
left.getRenderer().resetCamera() left.getRendererWindow().render() right.setActivateCamera(left.getActiveCamera()) right.getRendererWindow().render()
This works but I was wondering if this is the proper way to achieve my split view with linked cameras or if there was something less hackish available.
Also, I experience some weird (relatively minor) CameraClippingRange issues and was wondering if they could be related to my split view implementation.
Thanks in advance for your help and suggestions!