Created
April 5, 2020 16:30
-
-
Save heaversm/0f3f083411ec0f9515faa61196a87999 to your computer and use it in GitHub Desktop.
Fixes for some weird but crucial bugs in JS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Polyfill for aframe/threejs raycasting | |
//navigator.xr.requestDevice is not a function | |
//see https://github.com/aframevr/aframe/issues/4354#issuecomment-567052948 | |
navigator.xr.requestDevice = navigator.xr.requestDevice || function () { | |
return new Promise((resolve, reject) => { | |
resolve({ | |
supportsSession: new Promise((resolve, reject) => { | |
resolve({ | |
immersive: true, | |
exclusive: true | |
}); | |
}) | |
}); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment