<!-- SAGA · part 47 -->
*/
  var blade = new THREE.Mesh(new THREE.BoxGeometry(0.3, 0.1, 4),
    new THREE.MeshStandardMaterial({color: 0xcccccc, metalness: 0.9, roughness: 0.2}));
  blade.position.z = 2;
  _flySword.add(blade);
  /* Tip */
  var tip = new THREE.Mesh(new THREE.ConeGeometry(0.2, 1, 4),
    new THREE.MeshStandardMaterial({color: 0xffffff, metalness: 0.9, roughness: 0.1}));
  tip.rotation.x = Math.PI/2;
  tip.position.z = 4.5;
  _flySword.add(tip);
  /* Guard */
  var guard = new THREE.Mesh(new THREE.BoxGeometry(1, 0.2, 0.3),
    new THREE.MeshStandardMaterial({color: 0xd4a017, metalness: 0.8}));
  _flySword.add(guard);
  /* Hilt */
  var hilt = new THREE.Mesh(new THREE.CylinderGeometry(0.15, 0.15, 1.2, 8),
    new THREE.MeshStandardMaterial({color: 0x5a3a1a, roughness: 0.8}));
  hilt.rotation.x = Math.PI/2;
  hilt.position.z = -0.7;
  _flySword.add(hilt);
  /* Glow */
  var glow = new THREE.Mesh(new THREE.BoxGeometry(0.5, 0.3, 5),
    new THREE.MeshBasicMaterial({color: 0x00ffff, transparent: true, opacity: 0.3}));
  glow.position.z = 2;
  _flySword.add(glow);
  _flySword.visible = false;
  scene.add(_flySword);
}
/* Show/hide sword based on moveMode, position it ahead */
(function(){
  var _origAnimate = window._animate || null;
  window._dynamics = window._dynamics || [];
  window._dynamics.push(function(t){
    try{
      ensureFlySword();
      if(typeof moveMode !== 'undefined' && moveMode === 'fly'){
        _flySword.visible = true;
        /* Position ahead of player, pointing in camera direction */
        var fwdX = -Math.cos(camYaw), fwdZ = -Math.sin(camYaw);
        _flySword.position.set(
          kingPos.x + fwdX * 6,
          kingPos.y + 2,
          kingPos.z + fwdZ * 6
        );
        _flySword.rotation.y = Math.atan2(fwdX, fwdZ);
      } else {
        _flySword.visible = false;
      }
    }catch(e){}
  });
})();












/* 10,000 PASSES — maximum detail. Every surface, every edge. 2026-10-04. */
function detailEverything(){
  try{
    window._dynamics = window._dynamics || [];

    /* STARS in the black sky */
    var starGeo = new THREE.BufferGeometry();
    var starPos = new Float32Array(1000 * 3);
    for(var s = 0; s < 1000; s++){
      starPos[s*3] = (Math.random() - 0.5) * 1500;
      starPos[s*3+1] = 100 + Math.random() * 400;
      starPos[s*3+2] = (Math.random() - 0.5) * 1500;
    }
    starGeo.setAttribute('position', new THREE.BufferAttribute(starPos, 3));
    var starMat = new THREE.PointsMaterial({color: 0xffffff, size: 1.5, transparent: true, opacity: 0.8});
    var stars = new THREE.Points(starGeo, starMat);
    scene.add(stars);
    window._dynamics.push(function(t){
      starMat.opacity = 0.6 + Math.sin(t * 0.5) * 0.2;
    });

    /* DETAILED: Towers get doors, trim, antennas */
    scene.traverse(function(obj){
      if(obj.isMesh && obj.geometry && obj.geometry.type === 'BoxGeometry'){
        var p = obj.geometry.parameters;
        if(p && p.height > 8 && p.width < 10 && p.width > 5){
          /* Door */
          var door = new THREE.Mesh(new THREE.PlaneGeometry(2, 3),
            new THREE.MeshStandardMaterial({color: 0x0a0a0a, roughness: 0.9}));
          door.position.set(0, -p.height/2 + 1.5 + 0.13, p.depth/2 + 0.06);
          obj.add(door);
          /* Trim at top */
          var trim = new THREE.Mesh(new THREE.BoxGeometry(p.width + 0.5, 0.3, p.depth + 0.5),
            new THREE.MeshStandardMaterial({color: 0xd4a017, metalness: 0.6, roughness: 0.4}));
          trim.position.set(0, p.height/2 - 0.5, 0);
          obj.add(trim);
          /* Antenna */
          if(Math.random() > 0.5){
            var ant = new THREE.Mesh(new THREE.CylinderGeometry(0.1, 0.1, 4, 4),
              new THREE.MeshStandardMaterial({color: 0x888888}));
            ant.position.set(0, p.height/2 + 2, 0);
            obj.add(ant);
            var tip = new THREE.Mesh(new THREE.SphereGeometry(0.3, 6, 5),
              new THREE.MeshBasicMaterial({color: 0xff0000}));
            tip.position.set(0, p.height/2 + 4, 0);
            obj.add(tip);
            window._dynamics.push((function(tip){
              return function(t){ tip.material.color.setHSL(0, 1, 0.5 + Math.sin(t * 4) * 0.3); };
            })(tip));
          }
        }
      }
    });

    /* DETAILED: Trees get branches */
    if(window._trees){
      var branchMat = new THREE.MeshStandardMaterial({color: 0x3a2a0a, roughness: 0.9});
      for(var ti = 0; ti < window._trees.length; ti++){
        var tree = window._trees[ti];
        for(var br = 0; br < 3; br++){
          var branch = new THREE.Mesh(new THREE.CylinderGeometry(0.15, 0.25, 2.5, 5), branchMat);
          var ba = (br / 3) * Math.PI * 2;
          branch.position.set(Math.cos(ba) * 1.2, -1, Math.sin(ba) * 1.2);
          branch.rotation.z = Math.cos(ba) * 0.6;
          branch.rotation.x = Math.sin(ba) * 0.6;
          tree.add(branch);
        }
      }
    }

    /* DETAILED: Flowers get petals */
    scene.traverse(function