diff --git a/editor/index.html b/editor/index.html index f9f0d763625782739202f3a15cb947cd5ebaa3b0..3005314467aec5516298185c2bc8b7a9a3b32939 100644 --- a/editor/index.html +++ b/editor/index.html @@ -251,6 +251,27 @@ onWindowResize(); + // + + var hash = window.location.hash; + + if ( hash.substr( 1, 4 ) === 'app=' ) { + + if ( confirm( 'Any unsaved data will be lost. Are you sure?' ) ) { + + var loader = new THREE.XHRLoader(); + loader.crossOrigin = ''; + loader.load( hash.substr( 5 ), function ( text ) { + + var json = JSON.parse( text ); + editor.fromJSON( json ); + + } ); + + } + + } +