Browse Source

Add VR support to publish zip

Wolfgang Meyers 5 năm trước cách đây
mục cha
commit
5473f78bd4
2 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 3 0
      editor/js/Menubar.File.js
  2. 2 0
      editor/js/libs/app/index.html

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

@@ -416,6 +416,9 @@ var MenubarFile = function ( editor ) {
 			zip.file( 'js/three.module.js', content );
 
 		} );
+		loader.load( '../examples/jsm/webxr/VRButton.js', function ( content ) {
+			zip.file( 'js/VRButton.js', content );
+		} );
 
 	} );
 	options.add( option );

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

@@ -21,8 +21,10 @@
 
 			import * as THREE from './js/three.module.js';
 			import { APP } from './js/app.js';
+			import { VRButton } from './js/VRButton.js';
 
 			window.THREE = THREE; // Used by APP Scripts.
+			window.VRButton = VRButton; // Used by APP Scripts.
 
 			var loader = new THREE.FileLoader();
 			loader.load( 'app.json', function ( text ) {