<!-- SOLID CITY · part 2078 -->
ELEVATOR \u2192 '+(names[nf]||('FLOOR '+(nf+1)));
        }
      }
      return null;
    },
    boardElevator:function(wx,wz){
      for(var e=0;e<elevators.length;e++){
        var el=elevators[e];
        if(el.moving)continue;
        var dx=wx-(P.x+el.x), dz=wz-(P.z+el.z);
        if(Math.abs(dx)<4&&Math.abs(dz)<4){
          el.toIdx=(el.idx+1)%el.floors.length;
          el.from=el.floors[el.idx]; el.to=el.floors[el.toIdx];
          el.t=0; el.moving=true;
          return true;
        }
      }
      return false;
    }
  };
  return root;
}
export default createAnnex;


===== FILE: public/city/hyper-city-annex.js.bak-refine-20261012 =====
/* SOLID CITY — THE ANNEX (2026-10-11, by order of the King)
 * "If you tried to work on the towers to have 2 floors lets start fresh next to it."
 * "lets really build 1 inside and out."
 * ONE showcase building east of the Hyper City: 2 real interior floors, fully
 * fitted, with a distinctive crowned tower above and portholes on the facade.
 * The 36 existing Hyper City towers are untouched — this is new construction.
 * True name: THE ANNEX.
 * Self-contained ES module. Designed for interiors from scratch.
 */
function mulberry(a){return function(){a|=0;a=a+0x6D2B79F5|0;var t=Math.imul(a^a>>>15,1|a);t=t+Math.imul(t^t>>>7,61|t)^t;return((t^t>>>14)>>>0)/4294967296;};}
function textPlate(T, text){
  var c=document.createElement('canvas');c.width=512;c.height=128;
  var g=c.getContext('2d');g.fillStyle='#101418';g.fillRect(0,0,512,128);
  g.strokeStyle='#d8aa48';g.lineWidth=5;g.strokeRect(7,7,498,114);
  g.fillStyle='#e8c86a';g.textAlign='center';g.textBaseline='middle';
  g.font='bold 46px Georgia,serif';g.fillText(text,256,66);
  var t=new T.CanvasTexture(c);t.encoding=T.sRGBEncoding;t.anisotropy=4;return t;
}
function quietMarker(T,text){
  var grp=new T.Group();
  var stone=new T.Mesh(new T.BoxGeometry(4.4,0.6,2.2),new T.MeshLambertMaterial({color:0x1e2228}));
  stone.position.y=0.65;stone.rotation.x=-0.45;grp.add(stone);
  var face=new T.Mesh(new T.PlaneGeometry(4.0,1.0),new T.MeshBasicMaterial({map:textPlate(T,text)}));
  face.position.set(0,0.88,0.52);face.rotation.x=-0.45;grp.add(face);
  var base=new T.Mesh(new T.BoxGeometry(4.6,0.3,2.4),new T.MeshLambertMaterial({color:0x14171c}));
  base.position.y=0.15;grp.add(base);
  return grp;
}
function facadeTex(T){
  var c=document.createElement('canvas');c.width=128;c.height=256;
  var g=c.getContext('2d');
  var gr=g.createLinearGradient(0,0,0,256);
  gr.addColorStop(0,'#9fc4e8');gr.addColorStop(0.5,'#7aa8d8');gr.addColorStop(1,'#5a88c0');
  g.fillStyle=gr;g.fillRect(0,0,128,256);
  g.fillStyle='rgba(20,40,70,0.55)';
  for(var y=6;y<256;y+=14)for(var x=4;x<128;x+=12){ g.fillRect(x,y,8,9); }
  g.fillStyle='rgba(255,255,255,0.25)';
  for(var y2=6;y2<256;y2+=14)for(var x2=4;x2<128;x2+=12){ g.fillRect(x2,y2,8,2); }
  var t=new T.CanvasTexture(c);t.encoding=T.sRGBEncoding;
  t.wrapS=t.wrapT=T.RepeatWrapping;return t;
}
function portholeTex(T){
  var c=document.createElement('canvas');c.width=c.height=128;
  var g=c.getContext('2d');
  var gr=g.createRadialGradient(64,64,4,64,64,64);
  gr.addColorStop(0,'#fff8e8');gr.addColorStop(0.25,'#f2c86a');
  gr.addColorStop(0.5,'#9a6ae8');gr.addColorStop(0.75,'#4a6ae8');gr.addColorStop(1,'#1a1a3a');
  g.fillStyle=gr;g.beginPath();g.arc(64,64,64,0,7);g.fill();
  g.strokeStyle='#f2c86a';g.lineWidth=3;
  for(var r=12;r<64;r+=13){ g.beginPath();g.arc(64,64,r,0,7);g.stroke(); }
  var t=new T.CanvasTexture(c);t.encoding=T.sRGBEncoding;return t;
}

export function createAnnex(o){
  var T=o.THREE, P=o.position||{x:0,y:0,z:0};
  var root=new T.Group(); root.name='hyper-annex'; root.position.set(P.x,P.y,P.z);
  var foot=[]; var elevators=[]; var standFloors=[]; var portholeMeshes=[];
  var R=mulberry(777);

  // materials
  var glass=new T.MeshLambertMaterial({map:facadeTex(T),emissive:0x1a2a40,emissiveIntensity:0.35});
  var gold=new T.MeshLambertMaterial({color:0xd8aa48,emissive:0x4a2e08,emissiveIntensity:0.7});
  var goldTrim=new T.MeshBasicMaterial({color:0xd8aa48});
  var steel=new T.MeshLambertMaterial({color:0x3a4048});
  var darkSteel=new T.MeshLambertMaterial({color:0x23272e});
  var stoneM=new T.MeshLambertMaterial({color:0x8a8f98});
  var floorM=new T.MeshLambertMaterial({color:0xb8bcc4});
  var woodM=new T.MeshLambertMaterial({color:0x6a4a2a});
  var wallM=new T.MeshLambertMaterial({color:0xd8d4cc});
  var ceilM=new T.MeshLambertMaterial({color:0xf0ece4});
  var sofaM=new T.MeshLambertMaterial({color:0x4a6a8a});
  var leafM=new T.MeshLambertMaterial({color:0x2e6a34});
  var lampM=new T.MeshBasicMaterial({color:0xffe8a0});

  function box(w,h,d,mat,x,y,z){
    var m=new T.Mesh(new T.BoxGeometry(w,h,d),mat);
    m.position.set(x,y,z); root.add(m); return m;
  }
  function solid(x,z,w,d,y0,y1){ foot.push([x,z,w,d,y0,y1,0]); }

  var W=44, D=44; // base footprint

  /* ============ FLOOR 1: GRAND LOBBY (0-14) ============ */
  // floor slab
 