Browse Source

Merge pull request #17815 from yhuangbrowser/disable_polyfill

Disable polyfill for Helio.
Mr.doob 5 years ago
parent
commit
88056ee95f
1 changed files with 4 additions and 0 deletions
  1. 4 0
      examples/js/vr/HelioWebXRPolyfill.js

+ 4 - 0
examples/js/vr/HelioWebXRPolyfill.js

@@ -4,6 +4,10 @@
 
 
 if ( /(Helio)/g.test( navigator.userAgent ) && "xr" in navigator ) {
 if ( /(Helio)/g.test( navigator.userAgent ) && "xr" in navigator ) {
 
 
+	if ('isSessionSupported' in navigator.xr) {
+        return;
+    }
+
 	console.log( "Helio WebXR Polyfill (Lumin 0.97.0)" );
 	console.log( "Helio WebXR Polyfill (Lumin 0.97.0)" );
 
 
 	const isHelio96 = navigator.userAgent.includes( "Chrome/73" );
 	const isHelio96 = navigator.userAgent.includes( "Chrome/73" );