Multi Views documentation and more in deep example

Hi there,

Currently, I’m carrying out a project with involves a side-by-side view of a scene with some (A/B) variations. The scenes are generated by Blender and exported to GLTF/GLB. I’m implementing this with the aid of two canvases.

The aim of all this is that the user can check different branches of development (only two at the moment) on a building, being able to add contextual annotations over the geometries. The user can change the point of view on one version (ArcRotateCamera) and the other must mimic the same, so both versions show the scene from the same POV.

After searching through the docs, and as I’m using two canvases (one for version / GLTF file), I think this is a job for multi-views, isn’t it?

The case is that I find some lack of elaboration in the only document/example regarding this functionality. Indeed, I think that, this “Multi Views” subject, is not worked in the docs at the same exceptional level of the rest of documentation. I think it can be due to the fact that this a relatively new addition to the engine.

In this respect, the example shows a strange behavior on FF, with only a visible cube shown (first view) and the others empty, with the exception of the second one, which shows a corner of the same cube, from time to time:

I know this example shows the multi-views functionality in the case of the same scene (GLTF), but the docs says that a different scene approach is also possible.

Any help or comments on all this? Is available a more elaborated info on multi views over the web?

Thanks for your time.

Hi paleRider,

Thanks for calling attention to this! Yeah, that demo page is a bit funky; @PirateJC and I will take a look and figure out what should be done about that. The bizarreness you’re seeing, though, seems to come from the page having some strong assumptions about what size it is – or, more specifically, its aspect ratio. If I maximize the browser window on a 1080p device, I see roughly what you pasted there. However, if I unmaximize the window and adjust its width to be slightly narrower than it is tall, the different canvases adjust in a variety of ways, eventually looking like I think the demo is supposed to.

My guess is just that this demo wasn’t designed to be robust to changes in the window size, and that as long as you handle scaling logic correctly in your page, you should be able to get the effect you’re going for. Hope this helps, and best of luck!

1 Like

In fact there’s a bug in the current preview release, it works as intended in the stable release.

This PR should correct the problem:

4 Likes