<!-- SOLID CITY · part 2102 -->
esh(new T.BoxGeometry(10,3,4),boatHullM);
      hull.position.set(bx,-2.5,bz);hull.name='boat';root.add(hull);
      var mast=new T.Mesh(new T.CylinderGeometry(0.3,0.3,12,6),boatMastM);
      mast.position.set(bx,2,bz);root.add(mast);
      var sail=new T.Mesh(new T.PlaneGeometry(7,9),sailM);
      sail.position.set(bx,5,bz+0.5);root.add(sail);
    }
  });

  // animated bits
  var beaconM=null,beamM=null,fw=null,fj=null;
  root.traverse(function(m){
    if(m.name==='beacon')beaconM=m;
    if(m.name==='beam')beamM=m;
    if(m.name==='fountainwater')fw=m;
    if(m.name==='fountainjet')fj=m;
  });
  var boats=[];root.traverse(function(m){if(m.name==='boat')boats.push(m);});
  root.userData={
    footprint:foot,center:{x:0,z:0},radius:260,height:580,
    elevators:elevators, standFloors:standFloors,
    update:function(t,dt,A){
      if(beaconM){var p=0.6+0.4*Math.sin(t*2.4);beaconM.scale.setScalar(p);}
      if(beamM){beamM.material.opacity=0.2+0.12*Math.sin(t*2.4);}
      if(fw){fw.position.y=2.6+Math.sin(t*3)*0.15;}
      if(fj){fj.scale.y=1+Math.sin(t*5)*0.12;}
      for(var b=0;b<boats.length;b++){boats[b].position.y=-2.5+Math.sin(t*1.2+b*1.7)*0.5;boats[b].rotation.z=Math.sin(t*0.9+b)*0.04;}
      if(window._hyperPortholes){ for(var ph=0; ph<window._hyperPortholes.length; ph++){ var hm=window._hyperPortholes[ph]; hm.material.opacity=0.85+0.15*Math.sin(t*2+ph*0.7); hm.rotation.z=t*0.3+ph; } }
      // elevators: animate cabs, carry the rider
      if(dt&&A&&A.S){
        var S=A.S;
        for(var e=0;e<elevators.length;e++){
          var el=elevators[e];
          if(el.moving){
            el.t+=dt;
            var dur=3.0, k=Math.min(1,el.t/dur);
            var ease=k<0.5?2*k*k:1-Math.pow(-2*k+2,2)/2; // easeInOut
            var y=el.from+(el.to-el.from)*ease;
            el.cab.position.y=y+1.75;
            // carry the player if inside the cab (world coords)
            var dx=S.p.x-(P.x+el.x), dz=S.p.z-(P.z+el.z);
            if(Math.abs(dx)<3&&Math.abs(dz)<3&&Math.abs(S.p.y-(P.y+y))<4){
              S.p.y=P.y+y+0.2;
            }
            if(k>=1){ el.moving=false; el.idx=el.toIdx; }
          }
        }
      }
    },
    actHere:function(wx,wz){
      // near an elevator cab? offer the ride
      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){
          var nf=(el.idx+1)%el.floors.length;
          var names=['LOBBY','FLOOR 2','FLOOR 3','FLOOR 4','FLOOR 5','OBSERVATORY','ROOF'];
          return '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 createHyperCity;


===== FILE: public/city/hyper-city.js.bak-broken-20261011 =====
/*
    }},
 SOLID CITY — HYPER CITY (2026-10-11, by order of the King)
 * "You going to build a hyper building city here"
 * A district of futuristic megatowers on the west coast: 24 towers 150-400m,
 * the Hyper Spire (460m), street grid, central plaza, waterfront promenade.
 * Design law: science grown into beautiful art — golden-ratio setbacks,
 * symmetrical crowns, the skyline a composition.
 * True names: THE HYPER CITY (district), THE HYPER SPIRE.
 * Self-contained ES module. Local frame: +X = east (city side), -X = west (ocean).
 */
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, w){
  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;
}
// g