Skip to content
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

Default longitude #1

Open
oliviervinot opened this issue Dec 24, 2018 · 1 comment
Open

Default longitude #1

oliviervinot opened this issue Dec 24, 2018 · 1 comment

Comments

@oliviervinot
Copy link

oliviervinot commented Dec 24, 2018

Hi,
many thanks for this great widget. But i still haven't found the solution to begin the view with the gyroscope at the curent camera orientation. In fact, with gyroscope = true, the panorama view always begin at the 0px in the left onload.
I tried :
onready: function() { window.PSV.toggleDeviceOrientation();}
and :
default_position, or default_long in the parmas without success.
Did you encountered the same issue ?
Thank you.

@oliviervinot
Copy link
Author

Found it.
in three.doc.jsf, it deals with th value of alpha:
var alpha = scope.deviceOrientation.alpha ? THREE.Math.degToRad( scope.deviceOrientation.alpha ) + this.alphaOffsetAngle : 0; // Z

Just adding the value of the current orientation of the device to alpha.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant