\n\t\t'; console.log('encodeJG', encode(encodeJG))*/ console.log("echo location hash"); console.log(window.location.hash); var defaultCode = decode( 'nVRbT9swFH5Of8Whe1g6BScgIU1tQdqgo5NAQ8BU7dGNTxOzxM4ch9Ai/vt8SaCFPUxUbeKey3cu3/GZ7p39OL39dTWDXJfFyWDqX8E0R8rMO5iWqCmkOVU16uNho1f7n4dOUet1gfYULCVbw6M9BUua/s6UbATbT2Uh1Rg+rNxn4tQlVRkXY0j8X3mPalXIdgw5ZwyFkz5Z8LhHn8ZdJlMbxQdOFa801Co9HuZaV+M41rlCvKurgq4zwchSUZGhWiq+IQJ1fFd7C1JyQe7q4YnBdyDvxztDjamW6hXcC547B3wFIezBs3WLy6yA0YuAMnaOeoHL84tLrGuaYThybbC/e6ogpSUqGkGdosAIFAqGCtWk12coDUVqHUFJNSpOiwiWhczkZNCbGOaaCo5h1YhUcykgHBm6HANWvTCqlgsmW8KFQLXgTOcRzF+J58izXHvi+iyMicAWbufXsxlxRVx3mq6KZ0tikrjhGwxhYaE7LZNpU6LQxJJLaFUZ69OcFyx8LpQwWc4KtFa9l2/JTuwrVHVlOsrv8dRpQzhKIljE8wgOzDdJkl1vUsma22aQjQE6SrqJdF3eQb6xkr6al4dtXEltV73Z99JQ91PzoiaFpOwWH3SjMPxISKz9eRM7WkjGVx9HFgMAgp6znZBmEPKvtObpZacNH22ssQv45FOxzj31u/lWuWnbeacKDw5NG/pHV4VN403A8O0gjbZ6Ygc1tI7bnfjf7LtVkDz4XRCZuVK4UoaIMWjV4JbgghskO4BjOOxKDUqD+K58wXka8cAvlv5CMEXbf98HhX8arPUXwQ2oUX2zOYXeYbtyx6SS2hkRy4ANtSs5M2kRIdtw9CkhZgCPJsFg9074Q9jf7W6uR5OtdN3d7cbPZhF67dYCm8Z+M5pNaXf3Xw==' ); var QueryString = function () { // This function is anonymous, is executed immediately and // the return value is assigned to QueryString! var query_string = {}; var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0;i'; embed.style.width = '400px'; embed.style.padding = '5px'; embed.style.marginTop = '20px'; embed.style.border = '0px'; div.appendChild( embed ); } popup.set( div ); popup.show(); surl.focus(); surl.select(); }, false ); menu.appendChild( buttonShare ); // Changed RESET BUTTON TO 'FORK' ------------------------------------------ ../n!ck var buttonFork = document.createElement( 'button' ); buttonFork.className = 'button'; buttonFork.textContent = 'Remix'; buttonFork.addEventListener( 'click', function ( event ) { var dom = document.createElement( 'div' ); dom.innerHTML = 'Hey! If you\'re new to the threejs_playGnd click here first to learn what it\'s all about.

Otherwise, click here to "fork" this sketch and edit your own variation'; dom.style.width = '400px'; dom.style.padding = '5px'; dom.style.marginTop = '20px'; dom.style.border = '0px'; popup.set( dom ); popup.show(); }, false ); menu.appendChild( buttonFork ); var buttonAbout = document.createElement( 'button' ); buttonAbout.className = 'button'; buttonAbout.textContent = 'about'; buttonAbout.addEventListener( 'click', function ( event ) { var dom = document.createElement( 'div' ); dom.style.width = '400px'; dom.style.padding = '5px'; dom.style.border = '0px'; dom.style.textAlign = 'center'; dom.innerHTML = '

_three.js playGnd
<\/h1>



built on the shoulders of these open source projects
three.js ++ HTML Editor, CodeMirror, and dat.GUI

inspired by the ideas/worx of
Ted Nelson and Mr.doob'; popup.set( dom ); popup.show(); }, false ); menu.appendChild( buttonAbout ); // popup var popup = ( function () { var scope = this; var element = document.getElementById( 'popup' ); element.style.display = 'none'; var buttonClose = ( function () { var svg = document.createElementNS( 'http://www.w3.org/2000/svg', 'svg' ); svg.setAttribute( 'width', 32 ); svg.setAttribute( 'height', 32 ); var path = document.createElementNS( 'http://www.w3.org/2000/svg', 'path' ); path.setAttribute( 'd', 'M 9,12 L 11,10 L 15,14 L 19,10 L 21,12 L 17,16 L 21,20 L 19,22 L 15,18 L 11,22 L 9,20 L 13,16' ); path.setAttribute( 'fill', 'rgb(255,255,255)' ); svg.appendChild( path ); return svg; } )(); buttonClose.style.position = 'absolute'; buttonClose.style.top = '5px'; buttonClose.style.right = '5px'; buttonClose.style.cursor = 'pointer'; buttonClose.addEventListener( 'click', function ( event ) { scope.hide(); }, false ); element.appendChild( buttonClose ); var content = document.createElement( 'div' ); element.appendChild( content ); var update = function () { element.style.left = ( ( window.innerWidth - element.offsetWidth ) / 2 ) + 'px'; element.style.top = ( ( window.innerHeight - element.offsetHeight ) / 2 ) + 'px'; }; window.addEventListener( 'load', update, false ); window.addEventListener( 'resize', update, false ); // this.show = function () { element.style.display = ''; update(); }; this.hide = function () { element.style.display = 'none'; }; this.set = function ( value ) { while ( content.children.length > 0 ) { content.removeChild( content.firstChild ); } content.appendChild( value ); }; return this; } )(); // actions var update = function () { var value = editor.getValue(); if ( preview.children.length > 0 ) { preview.removeChild( preview.firstChild ); } var iframe = document.createElement( 'iframe' ); iframe.style.width = '100%'; iframe.style.height = '100%'; iframe.style.border = '0'; preview.appendChild( iframe ); var content = iframe.contentDocument || iframe.contentWindow.document; // workaround for chrome bug // http://code.google.com/p/chromium/issues/detail?id=35980#c12 value = value.replace( '