Elius94 / react-photo-sphere-viewer

Photosphere Viewer for React.JS
MIT License
65 stars 21 forks source link

[Bug]: setPanorama() fade-in effect does not work. #26

Closed yusufarsln98 closed 1 year ago

yusufarsln98 commented 1 year ago

What happened?

Hello, when changing the screen by setPanorama() fade-in effect does not work. After I changed the screen, it wait for a time and then opens the new screen suddenly. I don't know if it is my bad but I follow the original documentation, I also create an issue for the original library, and the author said it suppose to work. Is there any solution or working example? Thank you!

What should have happened?

The fade-in effect should be shown.

Code

export function loadPanorama(psvRef, pano) {
 psvRef.current.setPanorama(pano, {
    panoData: panoData,
  });
}

Version

react-photo-sphere-viewer 3.3.3-psv5.1.1.

Elius94 commented 1 year ago

Hi! thanks for the issue. Can you build a sandbox that reproduces this issue?

https://codesandbox.io/

Thanks

yusufarsln98 commented 1 year ago

Hello again! When I tried small-sized images, the fade-in effect worked perfectly but not with my images. The problem can be the image size.

Here is the link: setPanoramaExample

yusufarsln98 commented 1 year ago

I attached the link, thank you again!

Elius94 commented 1 year ago

This is normal! If you want to increase the loading performance of large panoramic, you should split image into multiple tiles (like maps engines)

This is possible using the official Equirectangular Tiles Adapter

yusufarsln98 commented 1 year ago

Okey sir, thank you!