Multiple Scenes using one Engine

Hey, I was just wondering if we could declare multiple scenes using one engine, other than creating multiple engines on the same page.
A similar example is on: GitHub - google/model-viewer: Easily display interactive 3D models on the web and in AR! , this runs on three.js
Our company had a requirement where we had to run multiple viewers on the same page, and Safari has issues with multiple canvases.

Yes you can:

1 Like

@Deltakosh
can those scenes not just be views, but also be independent of one another.
Take a use case like, having multiple viewers created from the same engine and they respond to events on canvases independently without relying on each other.

They can obviously be independent. No problem at all

is there an example that has multiple canvases, with multiple having interactive cameras?
I’ll definitely try it out.

It is in the doc: Use Multiple Canvases with one Engine - Babylon.js Documentation :slight_smile:

You can change which canvas will get the events on click on it for instance: Use Multiple Canvases with one Engine - Babylon.js Documentation

Yes, but can they all get events simultaneously.

not simultaneously but you only have one mouse :wink: So the trick is to have one activated at a time and use the code in the doc to activate selected canvas

3 Likes

Valid thought, will definitely try out something and keep it updated on the forum.

1 Like