瀏覽代碼

Removed HelioWebXRPolyfill

Mr.doob 5 年之前
父節點
當前提交
f60a0eb7c8

+ 0 - 1
editor/index.html

@@ -42,7 +42,6 @@
 		<script src="js/libs/ternjs/doc_comment.js"></script>
 		<script src="js/libs/tern-threejs/threejs.js"></script>
 		<script src="js/libs/signals.min.js"></script>
-		<script src="../examples/js/vr/HelioWebXRPolyfill.js"></script>
 
 		<script type="module">
 

+ 0 - 5
editor/js/Menubar.File.js

@@ -446,11 +446,6 @@ function MenubarFile( editor ) {
 			zip.file( 'js/VRButton.js', content );
 
 		} );
-		loader.load( '../examples/js/vr/HelioWebXRPolyfill.js', function ( content ) {
-
-			zip.file( 'js/HelioWebXRPolyfill.js', content );
-
-		} );
 
 	} );
 	options.add( option );

+ 0 - 2
editor/js/libs/app/index.html

@@ -16,8 +16,6 @@
 		</style>
 	</head>
 	<body ontouchstart="">
-		<script src="./js/HelioWebXRPolyfill.js"></script>
-
 		<script type="module">
 
 			import * as THREE from './js/three.module.js';

+ 0 - 1
editor/sw.js

@@ -51,7 +51,6 @@ const assets = [
 
 	'../examples/jsm/geometries/TeapotBufferGeometry.js',
 
-	'../examples/js/vr/HelioWebXRPolyfill.js',
 	'../examples/jsm/webxr/VRButton.js',
 
 	'./manifest.json',

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

@@ -1,48 +0,0 @@
-/**
- * @author mvilledieu / http://github.com/mvilledieu
- */
-
-if ( /(Helio)/g.test( navigator.userAgent ) && 'xr' in navigator ) {
-
-	console.log( "Helio WebXR Polyfill (Lumin 0.98.0)" );
-
-	if ( 'isSessionSupported' in navigator.xr ) {
-
-		const tempIsSessionSupported = navigator.xr.isSessionSupported.bind( navigator.xr );
-
-		navigator.xr.isSessionSupported = function ( /*sessionType*/ ) {
-
-			// Force using immersive-ar
-			return tempIsSessionSupported( 'immersive-ar' );
-
-		};
-
-	}
-
-	if ( 'isSessionSupported' in navigator.xr && 'requestSession' in navigator.xr ) {
-
-		const tempRequestSession = navigator.xr.requestSession.bind( navigator.xr );
-
-		navigator.xr.requestSession = function ( /*sessionType*/ ) {
-
-			return new Promise( function ( resolve, reject ) {
-
-				var sessionInit = { optionalFeatures: [ 'local-floor', 'bounded-floor' ] };
-
-				tempRequestSession( 'immersive-ar', sessionInit ).then( function ( session ) {
-
-					resolve( session );
-
-				} ).catch( function ( error ) {
-
-					return reject( error );
-
-				} );
-
-			} );
-
-		};
-
-	}
-
-}

+ 0 - 2
examples/webxr_vr_ballshooter.html

@@ -12,8 +12,6 @@
 			<a href="https://threejs.org" target="_blank" rel="noopener">three.js</a> vr - ball shooter
 		</div>
 
-		<script src="js/vr/HelioWebXRPolyfill.js"></script>
-
 		<script type="module">
 
 			import * as THREE from '../build/three.module.js';

+ 0 - 2
examples/webxr_vr_cubes.html

@@ -12,8 +12,6 @@
 			<a href="https://threejs.org" target="_blank" rel="noopener">three.js</a> vr - interactive cubes
 		</div>
 
-		<script src="js/vr/HelioWebXRPolyfill.js"></script>
-
 		<script type="module">
 
 			import * as THREE from '../build/three.module.js';

+ 0 - 2
examples/webxr_vr_dragging.html

@@ -12,8 +12,6 @@
 			<a href="https://threejs.org" target="_blank" rel="noopener">three.js</a> vr - dragging
 		</div>
 
-		<script src="js/vr/HelioWebXRPolyfill.js"></script>
-
 		<script type="module">
 
 			import * as THREE from '../build/three.module.js';

+ 0 - 3
examples/webxr_vr_lorenzattractor.html

@@ -7,9 +7,6 @@
 		<link type="text/css" rel="stylesheet" href="main.css">
 	</head>
 	<body>
-
-		<script src="js/vr/HelioWebXRPolyfill.js"></script>
-
 		<script type="module">
 
 			import * as THREE from '../build/three.module.js';

+ 0 - 2
examples/webxr_vr_paint.html

@@ -12,8 +12,6 @@
 			<a href="https://threejs.org" target="_blank" rel="noopener">three.js</a> vr - paint
 		</div>
 
-		<script src="js/vr/HelioWebXRPolyfill.js"></script>
-
 		<script type="module">
 
 			import * as THREE from '../build/three.module.js';

+ 0 - 2
examples/webxr_vr_panorama.html

@@ -7,8 +7,6 @@
 		<link type="text/css" rel="stylesheet" href="main.css">
 	</head>
 	<body>
-		<script src="js/vr/HelioWebXRPolyfill.js"></script>
-
 		<script type="module">
 
 			import * as THREE from '../build/three.module.js';

+ 0 - 2
examples/webxr_vr_panorama_depth.html

@@ -14,8 +14,6 @@
 			Created by <a href="https://orfleisher.com" target="_blank" rel="noopener">@juniorxsound</a>. Panorama from <a href="https://krpano.com/examples/?depthmap" target="_blank" rel="noopener">krpano</a>.
 		</div>
 
-		<script src="js/vr/HelioWebXRPolyfill.js"></script>
-
 		<script type="module">
 
 			import * as THREE from '../build/three.module.js';

+ 0 - 3
examples/webxr_vr_rollercoaster.html

@@ -7,9 +7,6 @@
 		<link type="text/css" rel="stylesheet" href="main.css">
 	</head>
 	<body>
-
-		<script src="js/vr/HelioWebXRPolyfill.js"></script>
-
 		<script type="module">
 
 			import * as THREE from '../build/three.module.js';

+ 0 - 3
examples/webxr_vr_sandbox.html

@@ -7,9 +7,6 @@
 		<link type="text/css" rel="stylesheet" href="main.css">
 	</head>
 	<body>
-
-		<script src="js/vr/HelioWebXRPolyfill.js"></script>
-
 		<script type="module">
 
 			import * as THREE from '../build/three.module.js';

+ 0 - 2
examples/webxr_vr_sculpt.html

@@ -12,8 +12,6 @@
 			<a href="https://threejs.org" target="_blank" rel="noopener">three.js</a> vr - sculpt
 		</div>
 
-		<script src="js/vr/HelioWebXRPolyfill.js"></script>
-
 		<script type="module">
 
 			import * as THREE from '../build/three.module.js';

+ 0 - 2
examples/webxr_vr_video.html

@@ -14,8 +14,6 @@
 			stereoscopic panoramic render by <a href="http://pedrofe.com/rendering-for-oculus-rift-with-arnold/" target="_blank" rel="noopener">pedrofe</a>. scene from <a href="http://www.meryproject.com/" target="_blank" rel="noopener">mery project</a>.
 		</div>
 
-		<script src="js/vr/HelioWebXRPolyfill.js"></script>
-
 		<video id="video" loop muted crossOrigin="anonymous" playsinline style="display:none">
 			<source src="textures/MaryOculus.webm">
 			<source src="textures/MaryOculus.mp4">