<!-- RUBY-BACKUP · part 555 -->
  try{
      var cc = window.handleCheatCode || (typeof handleCheatCode!=='undefined' ? handleCheatCode : null);
      switch(fn){
        case 'hourglass': if(cc) cc('hourglass'); break;
        case 'pylon': if(cc) cc('pylon'); break;
        case 'tetra': if(cc) cc('hollowtetra'); break;
        case 'pyramid': if(cc) cc('layeredpyramid'); break;
        case 'cube': if(typeof codeStatus==='function') codeStatus('standard cube'); break;
        case 'undo': if(typeof undoCommand==='function') undoCommand(); break;
        case 'undo2': if(typeof undoCommand==='function') undoCommand(); break;
        case 'export': if(cc) cc('export'); break;
        case 'select': if(typeof codeStatus==='function') codeStatus('select mode'); break;
        case 'move': if(cc) cc('trim'); break;
        case 'rotate': if(cc) cc('trim'); break;
        case 'scale': if(cc) cc('trim'); break;
        case 'grab': if(typeof toggleGrabMode==='function') toggleGrabMode(); break;
        default: if(typeof codeStatus==='function') codeStatus(fn);
      }
    }catch(e){}
  }
  function close(){
    OPEN = false;
    var c = document.getElementById('creator');
    if(c) c.remove();
    var s = document.getElementById('creator-css');
    if(s) s.remove();
    el = null;
  }
  window._creator = { open: open, close: close, toggle: function(){ OPEN ? close() : open(); } };
})();
/* DIRECTIONAL WEB — 8 directions, smooth fade */
(function(){
  // the web: each node has 8 directional exits
  var WEB = {
    'center': {
      label: '✋',
      up: 'move', up_right: 'build', right: 'build', down_right: 'camera',
      down: 'camera', down_left: 'world', left: 'world', up_left: 'move'
    },
    'move': {
      label: '🏃',
      up: 'fly', right: 'jump', down: 'center', left: 'speed',
      fn_up: function(){ if(typeof handleCheatCode==='function') try{handleCheatCode('fly');}catch(e){} },
      fn_right: function(){ if(typeof jump==='function') jump(); },
      fn_left: function(){ if(typeof codeStatus==='function') codeStatus('speed up'); }
    },
    'build': {
      label: '🧱',
      up: 'grab', right: 'streets', down: 'center', left: 'primitives',
      fn_up: function(){ if(typeof toggleGrabMode==='function') toggleGrabMode(); },
      fn_right: function(){ if(typeof buildStreets==='function') buildStreets(); },
      fn_left: function(){ if(typeof handleCheatCode==='function') try{handleCheatCode('hourglass');}catch(e){} }
    },
    'camera': {
      label: '📷',
      up: 'center', right: 'zoomin', down: 'home', left: 'zoomout',
      fn_up: function(){ if(typeof codeStatus==='function') codeStatus('camera up'); },
      fn_right: function(){ if(typeof camDist!=='undefined') camDist = Math.max(0.3, camDist-1); },
      fn_down: function(){ var b=document.getElementById('homebtn'); if(b) b.click(); },
      fn_left: function(){ if(typeof camDist!=='undefined') camDist = Math.min(60, camDist+1); }
    },
    'world': {
      label: '🌍',
      up: 'sky', right: 'center', down: 'ground', left: 'time',
      fn_up: function(){ if(typeof handleCheatCode==='function') try{handleCheatCode('dawn');}catch(e){} },
      fn_down: function(){ if(typeof handleCheatCode==='function') try{handleCheatCode('floor');}catch(e){} },
      fn_left: function(){ if(typeof handleCheatCode==='function') try{handleCheatCode('night');}catch(e){} }
    },
    'fly': { label: '🕊️', down: 'move', fn_down: function(){ if(typeof handleCheatCode==='function') try{handleCheatCode('fly');}catch(e){} } },
    'jump': { label: '⬆️', down: 'move', fn_down: function(){ if(typeof jump==='function') jump(); } },
    'speed': { label: '⚡', right: 'move', fn_right: function(){ if(typeof codeStatus==='function') codeStatus('speed'); } },
    'grab': { label: '✋', down: 'build', fn_down: function(){ if(typeof toggleGrabMode==='function') toggleGrabMode(); } },
    'streets': { label: '🛣️', left: 'build', fn_left: function(){ if(typeof buildStreets==='function') buildStreets(); } },
    'primitives': { label: '🔷', right: 'build', fn_right: function(){ if(typeof handleCheatCode==='function') try{handleCheatCode('hourglass');}catch(e){} } },
    'zoomin': { label: '🔍', left: 'camera', fn_left: function(){ if(typeof camDist!=='undefined') camDist = Math.max(0.3, camDist-2); } },
    'zoomout': { label: '🔭', right: 'camera', fn_right: function(){ if(typeof camDist!=='undefined') camDist = Math.min(60, camDist+2); } },
    'home': { label: '🏠', up: 'camera', fn_up: function(){ var b=document.getElementById('homebtn'); if(b) b.click(); } },
    'sky': { label: '☁️', down: 'world', fn_down: function(){ if(typeof handleCheatCode==='function') try{handleCheatCode('dawn');}catch(e){} } },
    'ground': { label: '🟫', up: 'world', fn_up: function(){ if(typeof handleCheatCode==='function') try{handleCheatCode('floor');}catch(e){} } },
    'time': { label: '🕐', right: 'world', fn_right: function(){ if(typeof handleCheatCode==='function') try{ha