Animate between PhotoDomes

Hi!

I’m trying to create a panorama viewer.
I’ve got a simple PhotoDome working without a problem.
But now I would like to be able to switch between photodomes with some nice transitions.

I’m not sure how to best fade in the old dome, and at the same time fade in the new one?

What would be the best solution?

Ps. I’m quite new to BJS, so I hope this isn’t a too stupid question :slight_smile:

It looks like photodome uses background material which does not support visibility. Luckily making your own photodome isn’t much code, and you can use a standard material which supports visibility. See: Babylon.js Playground

2 Likes

Wingnut goofing-around: :slight_smile:
https://playground.babylonjs.com/#UW5XEZ#2

2 Likes

Thanks for the input.
I’ll give it a go :slight_smile:

Hey there, I have found a way to use the visibility property of the PhotoDom’s mesh. We can’t use PhotoDome.mesh.visibility to do the animation. I don’t know why ^^ But if we pick up the PhotoDome.mesh into a variable, we can use the visibility property: https://playground.babylonjs.com/#UW5XEZ#3.

1 Like

How is it different from @trevordev solution in post #2?

It’s the same result don’t worry ! It’s just the question at the begin was about using PhotoDom and animation. But I think we can’t use the visibility property of the PhotoDom’s mesh, on the screen, it’s like visibility = 0 or 1. But if you pick up the mesh and you set a texture , you can see the visibility change. @trevordev find a solution by creating his own photoDom object. But for those who want to use the Object PhotoDom and his property you can do with this way too :slight_smile: But the result is the same yeah !