Elius94 / react-photo-sphere-viewer

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

[Support]: Visible area settings. #27

Closed yusufarsln98 closed 1 year ago

yusufarsln98 commented 1 year ago

What are you trying to do?

Hello, I have a partial panoramic photo, but there are some dark areas at the back and top of the image. Can you advise me on what settings I should use to hide them?

Sandbox Link

https://codesandbox.io/s/partial-panorama-react-photo-sphere-viewer-z7f3mk?file=/src/App.js

Library Version

3.3.3-psv5.1.1

What operating system are you using?

Windows

Thank you!

Elius94 commented 1 year ago

Hi. Your test image is 1x1, to work, the panorama must be 2x1, alternatively you should use it differently by following the main library guide. Also, your image already contains empty areas, top and bottom, and this is the reason for the black circles at the top and bottom.

yusufarsln98 commented 1 year ago

Sir, thank you for your answers. I know that my image has empty areas. Maybe I expressed myself incorrectly. What I actually want to do is to limit the area that the user can see. For example, I want to restrict the horizontal view between -90 and 90 degrees and prevent any vertical movement. I followed the original documentation, but I could not find any guide on how to achieve this. If such a guide exists, I would appreciate it if you could please show it to me. Thank you.

Elius94 commented 1 year ago

Hi! ok I got it. In truth I have never done this, maybe you should open an issue in the original repository of the library "photo-sphere-viewer". good luck

yusufarsln98 commented 1 year ago

I found VisibleRangePlugin, and it solved my problem. Thanks for being interested.