addController attaches controller HTML elements to the FullscreenRenderWindow’s rootContainer, which in the default case is <body>. As a result, the controllers get stacked on top of each other, so your first controller is actually underneath the second one. You can work around this by creating two div elements and styling them to be split-screen, and then set the rootContainer for each fullscreen render window like so:
fullscreen1 = new vtkFullscreenRenderWindow({ rootContainer: topDivElement });
fullscreen2 = new vtkFullscreenRenderWindow({ rootContainer: bottomDivElement });
Thank you @Forrest, actually I tried to do that in the way you mentioned, seems like the constructor should be called like vtkFullScreenRenderWindow.newInstance(), but then putting { rootContainer: topDivElement } is not working.
This is what I tried:
fullScreenRenderer was meant to simplify code in the examples so the main code is about the example purpose not the rendering setup. If you want to have full control, you should setup the rendering part yourself like done in that example.
Thanks, helpful to know.
then how can I add the controller? when I follow like the code in the link you mentioned, and call addController on any of the renderWindow, rendere, or openGLRenderWindow, I get Uncaught TypeError: addController is not a function
The add controller part is just adding a div in your DOM with some css. You just implement it yourself using the JS core features. vtk.js aims to enable visualization not control the dom like vue, react, angular…