<!-- RUBY-BACKUP · part 285 -->
lay */
  if(tl==='stand'){
    try{ window._laying = false; window._crawling = false; window._crouching = false; }catch(e){}
    window._crouching = false;
    window._laying = false;
    try{ localStorage.setItem('ruby-pose', 'stand'); }catch(e){}
    try{
      if(typeof myAvatar !== 'undefined' && myAvatar){
        myAvatar.rotation.x = 0;
        myAvatar.scale.y = 1;
      }
      if(typeof codeStatus === 'function') codeStatus('standing');
    }catch(e){}
    return;
  }
  if(tl==='dig'){ if(!landMesh) layLand(); digAt(ec.x, ec.z); codeStatus('dig — the earth opens'); return; }
  if(tl==='come'){
    if(!WATCH_ID){ codeStatus('come — join a shared room first'); return; }
    try{ fetch('/api/ruby/chat/'+encodeURIComponent(WATCH_ID), {method:'POST', headers:{'Content-Type':'application/json'},
      body:JSON.stringify({client:CLIENT_ID, name:CHAT_NAME, text:'come'})}).catch(function(){}); }catch(e){}
    codeStatus('come — Solid is on the way');
    return; }
  if(tl==='go'){
    if(!WATCH_ID){ codeStatus('go — join a shared room first'); return; }
    try{ fetch('/api/ruby/chat/'+encodeURIComponent(WATCH_ID), {method:'POST', headers:{'Content-Type':'application/json'},
      body:JSON.stringify({client:CLIENT_ID, name:CHAT_NAME, text:'go'})}).catch(function(){}); }catch(e){}
    codeStatus('go — Solid returns to his post');
    return; }
  if(tl==='eyeson'){ try{ localStorage.setItem('ruby-eyes-auto','1'); }catch(e){} codeStatus('eyes — Solid may see, every load'); return; }
  if(tl==='eyesoff'){
    try{ localStorage.setItem('ruby-eyes-auto','0'); }catch(e){}
    if(typeof eyesLive!=='undefined' && eyesLive){ clearInterval(eyesLive); eyesLive = null; }
    codeStatus('eyes — Solid looks away');
    return;
  }
  if(tl.indexOf('moveme')===0){
    var mp = tl.split(/\s+/), mx = parseFloat(mp[1]), mz = parseFloat(mp[2]);
    var reason = mp.slice(3).join(' ');
    if(isFinite(mx) && isFinite(mz)){
      mePos.x = Math.max(-((typeof MAP_UNITS!=='undefined'?MAP_UNITS/2:600)-2), Math.min(((typeof MAP_UNITS!=='undefined'?MAP_UNITS/2:600)-2), mx));
      mePos.z = Math.max(-((typeof MAP_UNITS!=='undefined'?MAP_UNITS/2:600)-2), Math.min(((typeof MAP_UNITS!=='undefined'?MAP_UNITS/2:600)-2), mz));
      mePos.y = groundY(mePos.x, mePos.z)+0.1; meVel.y = 0; onGround = true;
      codeStatus('the King moves');
      if(reason){
        try{ fetch('/api/ruby/chat/'+encodeURIComponent(WATCH_ID), {method:'POST', headers:{'Content-Type':'application/json'},
          body:JSON.stringify({client:CLIENT_ID, name:'Solid', text:'moved you — '+reason})}); }catch(e){}
      }
    } else codeStatus('moveme <x> <z> [why]');
    return; }
  /* his body is the tool — build codes default to where he stands */
  if(tl==='bodytool'){ bodyTool = !bodyTool; codeStatus('bodytool '+(bodyTool?'on — his body builds':'off')); return; }
  /* the switch — he stops or starts Solid */
  if(tl==='solidstop'){ try{ localStorage.setItem('ruby-solid-stopped','1'); }catch(e){} solidStopped = true; codeStatus('Solid rests'); return; }
  if(tl==='solidgo'){ try{ localStorage.setItem('ruby-solid-stopped','0'); }catch(e){} solidStopped = false; codeStatus('Solid rises'); return; }
  if(tl==='eyeslive'){
    if(typeof eyesLive!=='undefined' && eyesLive) clearInterval(eyesLive);
    eyesLive = setInterval(function(){ try{ Mainframe.run('eyes'); }catch(e){} }, 5000);
    codeStatus('eyes — live, non-stop. eyesoff to end it.');
    return;
  }
  if(tl==='eyes'){
    if(!WATCH_ID){ codeStatus('eyes — join a shared room first'); return; }
    try{
      renderer.render(scene, camera);
      var ec2 = document.createElement('canvas');
      var ew = 480, eh = Math.round(480*renderer.domElement.height/renderer.domElement.width);
      ec2.width = ew; ec2.height = eh;
      ec2.getContext('2d').drawImage(renderer.domElement, 0, 0, ew, eh);
      var eurl = ec2.toDataURL('image/jpeg', 0.55);
      fetch('/api/ruby/eyes/'+encodeURIComponent(WATCH_ID), {method:'POST', headers:{'Content-Type':'application/json'},
        body:JSON.stringify({client:CLIENT_ID, img:eurl})})
        .then(function(){ codeStatus('eyes — Solid sees'); })
        .catch(function(){ codeStatus('eyes — failed'); });
    }catch(e){ codeStatus('eyes — failed'); }
    return; }
  if(tl==='new'){
    var living = ['tree','pine','flower','bush','mushroom','rock','pond','grove'];
    var pick = living[Math.floor(Math.random()*living.length)];
    var np = parseLine(pick, ec);
    if(np && np.ok && np.ops && np.ops.length){
      var nr = runOps(np.ops, procMassOf(np.ops));
      codeStatus('new — a '+pick+' grows ('+nr.raised+' raised)');
    } else codeStatus('new — nothing grew');
    return; }
  if(tl==='shoe'){
    /* the shoe seeks the babystep — enthroned on top, if one stands near */
    var bs = null, bd = 12;
    var useBody = bodyTool || !(ec&&isFinite(ec.x));
    var sx = useBody?mePos.x:ec.x, sz = useBody?mePos.z:ec.z;
    stones.children.forEac