New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Real-world compass headings - configuration? #1300
Comments
did you try this ? https://photo-sphere-viewer.js.org/plugins/gyroscope.html#absoluteposition |
TY I will! |
Ah, actually I do have that set. import { Viewer } from '@photo-sphere-viewer/core';
import { GyroscopePlugin } from '@photo-sphere-viewer/gyroscope-plugin';
import { StereoPlugin } from '@photo-sphere-viewer/stereo-plugin';
const baseUrl = '';//'https://jywarren.github.io/sfpcrr/';
let params = new URLSearchParams(document.location.search);
const viewer = new Viewer({
container: 'viewer',
panorama: baseUrl + (params.get("url") || 'spheres/providence.jpg'),
panoData: {
poseHeading: (params.get("heading") || 0), // 0 to 360
},
defaultZoomLvl: 0,
navbar: [
'stereo'
],
plugins: [
StereoPlugin,
[GyroscopePlugin, {
absolutePosition: true,
moveMode: 'fast',
}]
],
});
window.viewer = viewer;
viewer.addEventListener('ready', () => {
viewer.getPlugin(GyroscopePlugin).start();
}, { once: true }); Is there perhaps a load order issue? I.e. the Thank you!! |
Those are two totally different things, poseHeading is applied on the 3D sphere object itself, it rotates the sphere in the scene, after that it is locked. With You might be in the case explained in the big yellow WARNING box on the documentation page. For which I cannot do anything. |
Ok, I see - thank you! I'm going to research more about this, i found what seems like a good overview at https://leanpub.com/gyronormjs |
I was able to fix a bug which makes the heading remaining the same between gyroscope activations on the same session. However it does not changes the fact that if you reload the page, the initial device orientation will be used as the origin. Because the API is not meant to find where the North is, it is only relative positionning since activation. There is the geolocation API but it does not give a static compass value, only "heading" when the device is in movement, so not useable here. |
Found the "deviceorientationabsolute" event which seems promising, but of course iOS does not support it. |
This feature/bug fix has been released in version 5.7.4. |
Describe your problem
I'm trying to get my photospheres to display with their image north pointed to real-world north -- that is, if I go to that site today, and look at the photosphere, it'll line up.
I used
But as I turn my phone around to test, it starts with the same image direction visible no matter how I am standing regarding the real-world compass directions. Am I missing something about how to configure a panorama to be pegged to the true real-world compass directions?
Thank you so much! This is such a lovely library! <3
Online demo URL
No response
Photo Sphere Viewer version
5.7.3
Plugins loaded
Gyro, stereo
Additional context
No response
The text was updated successfully, but these errors were encountered: