Open josealvarez97 opened 2 months ago
The fullScreenRenderWindow was made to shorten examples code so we could focus on what that example was for and not setting the rendering stack.
The fullScreenRenderWindow aim to be full screen and therefore don't have a container by default. Of course we broke that rule to allow us to inject a container at construction. But either way, that fullScreenRenderWindow should not be used outside of examples.
@jourdain should we modify the documentation https://kitware.github.io/vtk-js/docs/vtk_react.html to use a GenericRenderWindow
instead of a FullScreenRenderWindow
?
Thank you for the insight @jourdain
Actually @finetjul , yesterday it was very hard to adapt this example to React https://kitware.github.io/vtk-js/examples/ManyRenderers.html
Indeed the react example should not use FullScreenRenderWindow
. Using the core VTK classes should be the way to go. For real react showcase, you can look at https://github.com/Kitware/react-vtk-js
Bug description
The example Using vtk.js with React has
rootContainer
as the property, and indeed, if one doesn't specifyrootContainer
(but something else likecontainer
), the example will not work well.Steps to reproduce
But it was confusing because TypeScript complains that the
IFullScreenRenderWindowInitialValues
doesn't have therootContainer
property. It should have it, since the library source code actually expects it.There's no
rootContainer
on next-app/node_modules/@kitware/vtk.js/Rendering/Misc/FullScreenRenderWindow.d.tsDetailed Behavior
No response
Expected Behavior
But
rootContainer
is referenced multiple times innext-app/node_modules/@kitware/vtk.js/Rendering/Misc/FullScreenRenderWindow.js
Therefore, this is just a small TypeScript issue.
Environment