So I worked up a React website that can make multiple BJS scenes at once with a single engine using the multicanvas engine. The rendering system is independent from the react components that display them so that way as the components scene does not have to build more then once. I noticed that as I started doing multiple scenes I was not sure how to “filter” which one displayed to which.
The documentation says to do
engine.activeView.target === view1
But HTMLCanvasElement and BABYLON.EngineView have no overlap so Im not sure how this is a comparable.
I tried to do
Context is actually the scene.
But when I did this and had multiple scenes rendering it seemed to only render the first scene in both elements.
Ill upload the react project to github here soon so others can see how that’s done, but I need to figure out how to accurately filter which scene is being rendered to which element.