Multiple Canvases and Multiple Scenes

Hey all! It’s been a while since I posted and even had to create a new account, so it’s been that long.

The topic is rendering multiple canvases with multiple scenes, referencing: Using Multiple Canvases | Babylon.js Documentation

I originally had a question on how to do what I was attempting to do because I struggled to adapt the documentation. My goal was to have a main canvas that renders a scene, and then have another canvas with it’s own scene as a popup that, in application, would be temporary.

I was able to finally figure it out and since I struggled finding an example on how to do this, I figured I’d post what I did here:

It might be worth adding a similar example to the documentation, since the document only has an example for multiple scenes, but not multiple canvases and scenes.

Hope this is helpful.

Note: I know there is a performance hit since the canvases are not the same.

4 Likes

Thank you very much for sharing your solution! I’m sure this will be of great help to others :smiley:
Would you like to be the one to add it to the docs? BabylonJS/Documentation: Babylon.js’s documentation website (github.com) it’s ok if you don’t want to but we love getting contributions ^^

3 Likes

Yea, let me take a stab at it! Thanks for pointing to it.

1 Like