mpetroff / pannellum

Pannellum is a lightweight, free, and open source panorama viewer for the web.
https://pannellum.org/
MIT License
4.15k stars 710 forks source link

Add option to show clamped offscreen hotspots #1193

Open Malgalad opened 6 months ago

Malgalad commented 6 months ago

I wonder if it would be reasonable to add an option to show offscreen hotspots at the edges of the screen? In a way GUI usually works in games, if an important marker is not visible in FoV it is stickied to the edge until you rotate camera to look at it. This way you know it exists in a scene and which way to rotate camera to look at it. Just googling random clip, like here you can see that "P" marker for platform is always on screen no matter how camera is rotated, with direction shown when camera is looking away.

From a technical perspective, I imagine it would look like an option that if hotspot(s) is not currently visible, clamp target yaw/pitch to -1/1 relative to current view...