-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Android magic window #4363
Android magic window #4363
Conversation
907e76f
to
3081935
Compare
… DeviceOrientationControls without the DeviceOrientationEvent.requestPermission logic that is handled by A-Frame (fix aframevr#4355) Co-authored-by: MK <maxence@lucidweb.io> Co-authored-by: Diego Marcos <diego.marcos@gmail.com>
3081935
to
4699cad
Compare
// Only on mobile devices and only enabled if DeviceOrientation permission has been granted. | ||
if (utils.device.isMobile()) { | ||
magicWindowControls = this.magicWindowControls = new THREE.DeviceOrientationControls(this.magicWindowObject); | ||
if (typeof DeviceOrientationEvent === 'undefined' && DeviceOrientationEvent.requestPermission) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the condition is always false. How can requestPermission exist if DeviceOrientationEvent is undefined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
magicWindowControls = this.magicWindowControls = new THREE.DeviceOrientationControls(this.magicWindowObject); | ||
if (typeof DeviceOrientationEvent === 'undefined' && DeviceOrientationEvent.requestPermission) { | ||
magicWindowControls.enabled = false; | ||
if (this.el.sceneEl.components['device-orientation-permission-ui'].premissionGranted) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is a typo here premissionGranted => permissionGranted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
No description provided.