Browse Source

Editor: Implemented #scene=. See #5843.

Mr.doob 10 years ago
parent
commit
c4e7b11cf5
1 changed files with 6 additions and 2 deletions
  1. 6 2
      editor/index.html

+ 6 - 2
editor/index.html

@@ -239,15 +239,19 @@
 
 
 			//
 			//
 
 
+			var file = null;
 			var hash = window.location.hash;
 			var hash = window.location.hash;
 
 
-			if ( hash.substr( 1, 4 ) === 'app=' ) {
+			if ( hash.substr( 1, 4 ) === 'app=' ) file = hash.substr( 5 );
+			if ( hash.substr( 1, 6 ) === 'scene=' ) file = hash.substr( 7 );
+
+			if ( file !== null ) {
 
 
 				if ( confirm( 'Any unsaved data will be lost. Are you sure?' ) ) {
 				if ( confirm( 'Any unsaved data will be lost. Are you sure?' ) ) {
 
 
 					var loader = new THREE.XHRLoader();
 					var loader = new THREE.XHRLoader();
 					loader.crossOrigin = '';
 					loader.crossOrigin = '';
-					loader.load( hash.substr( 5 ), function ( text ) {
+					loader.load( file, function ( text ) {
 
 
 						var json = JSON.parse( text );
 						var json = JSON.parse( text );