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:
div1 = document.createElement("div");
document.body.appendChild(div1);
fullScreenRenderer = vtkFullScreenRenderWindow.newInstance({rootContainer: div1});
console.log(fullScreenRenderer.rootContainer)
this prints out undefined
.