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

Android magic window #4363

Merged
merged 1 commit into from
Dec 19, 2019
Merged

Android magic window #4363

merged 1 commit into from
Dec 19, 2019

Conversation

dmarcos
Copy link
Member

@dmarcos dmarcos commented Dec 19, 2019

No description provided.

… 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>
// 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) {
Copy link
Contributor

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?

Copy link
Member Author

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) {
Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

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

Successfully merging this pull request may close these issues.

3 participants