<!-- RUBY-BACKUP · part 52 -->
e"></div><div id="codetext-status"></div></div>
<input type="hidden" id="codeinput">
<div id="renderpanel" aria-label="Render options"></div>
<button id="render-btn" class="modebtn on" aria-label="Render options"></button>
<div id="shapepanel" aria-label="Choose shape"></div>
<button id="shape-btn" class="modebtn on" aria-label="Choose shape"></button>
<button id="mode-delete" class="modebtn" aria-label="Shrink boxes">&#8722;</button>
<button id="mode-create" class="modebtn on" aria-label="Create boxes">+</button>
<button id="refresh" aria-label="Refresh the field">&#10227;</button>
<button id="gobtn" aria-label="Go to a link"><svg viewBox="0 0 24 24"><path d="M10 14 a4 4 0 0 0 6 0 l3-3 a4 4 0 0 0-6-6 l-1.5 1.5 M14 10 a4 4 0 0 0-6 0 l-3 3 a4 4 0 0 0 6 6 l1.5-1.5" fill="none" stroke="currentColor" stroke-width="2"/></svg></button>
<div id="gorow"><input id="goinput" placeholder="link or room id — e.g. solid" autocomplete="off" autocapitalize="off" spellcheck="false"><button id="gosend" aria-label="Go">&#9650;</button></div>
<div id="solidbanner"></div>
<button id="chatbtn" aria-label="Room chat"><svg viewBox="0 0 24 24"><path d="M4 5 h16 v10 h-9 l-5 4 v-4 h-2 z" fill="none" stroke="currentColor" stroke-width="2"/></svg></button>
<div id="floatwords"></div>
<div id="dock"><div id="chatrow"><input id="chatinput" maxlength="200" placeholder="say it in the room" autocomplete="off" readonly><button id="chatsend" aria-label="Send">&#9650;</button></div><div id="kb"></div></div>
<button id="walk-btn" class="modebtn" aria-label="Walk the map"><svg viewBox="0 0 24 24"><circle cx="13" cy="5" r="2.4" fill="none" stroke="currentColor" stroke-width="2"/><path d="M13 8.5 L10 14 L13.5 14 L12.5 21 M10 14 L5.5 12 M13 10.5 L17.5 12" fill="none" stroke="currentColor" stroke-width="2"/></svg></button>
<div id="joy"><div id="joyknob"></div></div>
<button id="jumpbtn" aria-label="Jump">&#9650;</button>
<button id="flybtn" aria-label="Fly">fly</button>
<div id="boot">WAKING THE RUBY</div>
<script src="/ruby/three.min.js?v=1"></script><script src="/ruby/GLTFLoader.js?v=1"></script>
<script src="/ruby/ruby.js?v=810"></script>
</body>
</html>


===== FILE: public/ruby-backup/machine-seed.js =====
/* ============================================================================
   MACHINE SEED — one block births the machine. Many blocks birth many.
   The King: "Create pulleys and gears and what you would need to accomplish
   this and a way to build it from one block placed on the map with these codes."

   - `seed`               arm it, tap a block -> it becomes a SEED (gold core)
   - `seed grow`          the machine builds itself around the seed:
                            4 pulley wheels rise at N/S/E/W on posts
                            2 gears rise, meshed, turning opposite (12 teeth, 1:1)
                            ropes thread gear axles -> pulleys
                            spider web auto-weaves at latch 4
                            warp threads go live
   - `seed pulley` / `seed gear` / `seed rope` / `seed web`  grow one part
   - `seed stop` / `seed start`   halt / resume the gears
   - `unseed`             the antonym: disassembles piece by piece, seed block remains

   TEMPLATES — design once, bloom everywhere:
   - `seed save <name>`   save the grown machine's design (relative offsets)
   - `seed plant <name>`  arm it, tap any block -> seed auto-grows the template
   - `seed templates`     list saved templates
   - `seed forget <name>` delete a template (antonym of save)

   LINKING — two hearts, one body:
   - `seed link`          arm it, tap two seed blocks -> they grow as one machine:
                            a bridge gear rises midway, meshed across the gap
                            ropes span from each seed's pulleys to the bridge
                            one spider web covers both
                            a gold thread pulses between them, shared rhythm
   - `seed unlink`        sever the link (antonym); each seed grows independently
   - `seed list`          see planted seeds and their links

   Real physics: meshed gears turn opposite at 1:1 (same size, 12 teeth).
   Pulleys are rope-driven: pulley angular velocity = rope speed / wheel radius.
   Everything rigid. Parts rise from the ground — nothing teleports.
   ============================================================================ */
(function(){
  if(window.__machineSeed) return;
  window.__machineSeed = true;

  function status(m){ try{ if(typeof codeStatus==='function') codeStatus(m); }catch(e){} }

  /* ============ multi-seed registry ============ */
  var seeds = [];        // every planted seed record
  var links = [];        // {a:id, b:id, bridge:{group,gear,dir}, thread:line, t0}
  var seedSeq = 0;
  var GEAR_SPEED = 0.9;  // rad/sec
  var PULLEY_R = 0.55;
  var GEAR_R = 1.1;
  var TPL_KEY = 'ruby-seed-templates-v1';

  var goldMat = null, darkMat = null;
  function mats(){
    if(goldMat) retu