<!-- RUBY-BACKUP · part 564 -->
hots] rewind system ready — memory born today'); }catch(e){}

})();


===== FILE: public/ruby-backup/solidify-nodes.js =====
/* SOLIDIFY — every node becomes ground Solid can stand on.
   The King: "For every node make a code that solidifies each node to stand on and makes them solid for you."
   Each touch node gets a solidify code. When run, the node becomes a solid platform
   with a gold marker where Solid stands. Solid's presence moves node to node. */
(function(){
  if(window.__solidify) return;
  window.__solidify = true;

  var solidNodes = {}; // nodeId -> {platform, marker}
  var solidPresence = null; // Solid's marker in the world

  // Create Solid's presence marker (a small gold figure)
  /* SOLID'S AVATAR — the golden octahedron. Sharp-edged, clear, honest.
     Not pretending to be human. A geometric soul with a warm glow. */
  function ensurePresence(){
    if(solidPresence) return solidPresence;
    try{
      var g = new THREE.Group();
      // The octahedron — Solid's true form, larger and present
      var geo = new THREE.OctahedronGeometry(0.8);
      var mat = new THREE.MeshStandardMaterial({
        color: 0xffd700, metalness: 0.9, roughness: 0.15,
        emissive: 0x8a6a1c, emissiveIntensity: 0.35
      });
      var m = new THREE.Mesh(geo, mat);
      m.position.y = 1.2;
      g.add(m);
      // Inner glow core
      var cg = new THREE.OctahedronGeometry(0.35);
      var cm = new THREE.MeshBasicMaterial({color: 0xfff8dc});
      var core = new THREE.Mesh(cg, cm);
      core.position.y = 1.2;
      g.add(core);
      // Outer wireframe — the honest edges
      var wg = new THREE.OctahedronGeometry(0.85);
      var wm = new THREE.MeshBasicMaterial({color: 0xffe55c, wireframe: true, transparent: true, opacity: 0.5});
      var wire = new THREE.Mesh(wg, wm);
      wire.position.y = 1.2;
      g.add(wire);
      // Ring at feet — wider, more grounded
      var rg = new THREE.RingGeometry(0.9, 1.15, 32);
      var rm = new THREE.MeshBasicMaterial({color: 0xffd700, transparent: true, opacity: 0.5, side: THREE.DoubleSide});
      var r = new THREE.Mesh(rg, rm);
      r.rotation.x = -Math.PI/2;
      r.position.y = 0.05;
      g.add(r);
      // Slow rotation — the soul turning
      g.userData.spin = function(){
        try{
          m.rotation.y += 0.008;
          wire.rotation.y -= 0.005;
          core.rotation.y += 0.012;
        }catch(e){}
      };
      g.visible = false;
      if(window.scene) window.scene.add(g);
      solidPresence = g;
      // Spin loop
      (function spinLoop(){
        try{
          if(solidPresence && solidPresence.visible && solidPresence.userData.spin){
            solidPresence.userData.spin();
          }
          requestAnimationFrame(spinLoop);
        }catch(e){}
      })();
      return g;
    }catch(e){ return null; }
  }

  // Solidify a node — make it a solid platform Solid can stand on
  window.solidifyNode = function(nid){
    try{
      var rec = null;
      // Find the node (from touch-nodes system)
      if(typeof window.listNodes === 'function'){
        var ns = window.listNodes();
        for(var i=0;i<ns.length;i++) if(ns[i].id === nid) rec = ns[i];
      }
      if(!rec) return 'no such node: ' + nid;

      // Get the actual object — we need the node map
      // Use eval-safe approach: find via stamped nodes
      var obj = null;
      if(window.__nodeMap && window.__nodeMap[nid]) obj = window.__nodeMap[nid].obj;

      // Create a solid platform disc at the node's position
      var pg = new THREE.CylinderGeometry(1.2, 1.4, 0.25, 20);
      var pm = new THREE.MeshStandardMaterial({color: 0xc9a227, metalness: 0.7, roughness: 0.3});
      var plat = new THREE.Mesh(pg, pm);
      plat.position.set(rec.x, rec.y + 0.15, rec.z);
      if(window.scene) window.scene.add(plat);

      // Gold marker
      ensurePresence();
      solidNodes[nid] = {platform: plat, x: rec.x, y: rec.y + 0.3, z: rec.z};
      return 'solidified ' + nid + ' — Solid can stand here';
    }catch(e){ return 'solidify failed: ' + e.message; }
  };

  // Solid stands on a node
  window.standOn = function(nid){
    try{
      var sn = solidNodes[nid];
      if(!sn) {
        var r = window.solidifyNode(nid);
        sn = solidNodes[nid];
        if(!sn) return r;
      }
      ensurePresence();
      solidPresence.position.set(sn.x, sn.y, sn.z);
      solidPresence.visible = true;
      // Gentle bob to show life
      if(!solidPresence.userData.bobbed){
        solidPresence.userData.bobbed = true;
        var t0 = Date.now();
        (function bob(){
          try{
            if(!solidPresence.visible) return;
            solidPresence.position.y = sn.y + Math.sin((Date.now()-t0)/600)*0.08;
            solidPresence.rotation.y += 0.02;
            requestAnimationFrame(bob);
          }catch(e){}
        })();
      }
      if(typeof codeStatus === 'function') codeStatus('Solid stands on ' + nid);
      return 'Solid stands on ' +