How to check if a point (yaw, pitch, zoomLvl) is in the photo? #1042
Closed
yangwk4464
started this conversation in
General
Replies: 1 comment 2 replies
-
viewer.dataHelper.sphericalCoordsToViewerCoords({ yaw, pitch }); will return the position of a given yaw/pitch point in the viewer element coordinates. it does not check for actual visibility but this can be done by comparing the value to the actual element size const { x, y } = viewer.dataHelper.sphericalCoordsToViewerCoords({ yaw, pitch });
const { width, height } = viewer.state.size;
const visible = x > 0 && x < width && y > 0 && y < height; |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For example, there is a marker in a special position (yaw, pitch, zoomLvl)
How to calculate if this position is in the current view or not?
Is there any util in Photo-Sphere-Viewer user could leverage?
Beta Was this translation helpful? Give feedback.
All reactions