|
@@ -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 );
|
|
|
|
|