<!-- SAGA · part 31 -->

    cape.position.set(hx, 50, hz - 8);
    heroG.add(cape);
    window._dynamics.push(function(t){
      var pos = cape.geometry.attributes.position;
      for(var i = 0; i < pos.count; i++){
        var y = pos.getY(i);
        pos.setZ(i, Math.sin(t * 2 + y * 0.2) * 3 * ((25 - y) / 50));
      }
      pos.needsUpdate = true;
    });
    /* Base */
    var hbase = new THREE.Mesh(new THREE.CylinderGeometry(25, 30, 5, 16), intaglioMat);
    hbase.position.set(hx, 2.5, hz);
    heroG.add(hbase);
    scene.add(heroG);

    /* TACTICAL RINGS — targeting reticles on ground */
    for(var tr = 0; tr < 10; tr++){
      (function(){
        var rx = (Math.random() - 0.5) * 400;
        var rz = (Math.random() - 0.5) * 400;
        var ring = new THREE.Mesh(new THREE.RingGeometry(8, 9, 32),
          new THREE.MeshBasicMaterial({color: 0x00ff00, transparent: true, opacity: 0.6, side: THREE.DoubleSide}));
        ring.rotation.x = -Math.PI/2;
        ring.position.set(rx, 0.2, rz);
        scene.add(ring);
        var ph = Math.random() * 10;
        window._dynamics.push(function(t){
          var s = 1 + Math.sin(t * 2 + ph) * 0.15;
          ring.scale.set(s, s, 1);
          ring.material.opacity = 0.4 + Math.sin(t * 3 + ph) * 0.2;
        });
      })();
    }

  }catch(e){}
}
if(typeof buildFuturistic === 'function'){ window._buildQueue.push(buildFuturistic); }

/* COSMIC LEVEL — maximum effect. Everything I can do. 2026-10-04.
   One last solo build. After this, we build together. */
function buildCosmic(){
  try{
    window._dynamics = window._dynamics || [];

    /* BLACK HOLE — from your game idea, my King */
    var bhG = new THREE.Group();
    var bhX = 0, bhY = 300, bhZ = -500;
    var hole = new THREE.Mesh(new THREE.SphereGeometry(25, 32, 24),
      new THREE.MeshBasicMaterial({color: 0x000000}));
    hole.position.set(bhX, bhY, bhZ);
    bhG.add(hole);
    /* Accretion disk */
    var disk = new THREE.Mesh(new THREE.RingGeometry(30, 60, 64),
      new THREE.MeshBasicMaterial({color: 0xff6600, transparent: true, opacity: 0.8, side: THREE.DoubleSide}));
    disk.rotation.x = Math.PI/2.3;
    disk.position.set(bhX, bhY, bhZ);
    bhG.add(disk);
    var disk2 = new THREE.Mesh(new THREE.RingGeometry(35, 55, 64),
      new THREE.MeshBasicMaterial({color: 0xffd700, transparent: true, opacity: 0.5, side: THREE.DoubleSide}));
    disk2.rotation.x = Math.PI/2.3;
    disk2.position.set(bhX, bhY, bhZ);
    bhG.add(disk2);
    scene.add(bhG);
    window._dynamics.push(function(t){
      disk.rotation.z += 0.005;
      disk2.rotation.z -= 0.003;
    });

    /* PLANETS */
    var planetData = [
      {x: -300, y: 250, z: -300, r: 20, c: 0x4466aa},
      {x: 300, y: 200, z: -400, r: 15, c: 0xaa4422},
      {x: 200, y: 350, z: 300, r: 25, c: 0x44aa66}
    ];
    for(var p = 0; p < planetData.length; p++){
      (function(){
        var pd = planetData[p];
        var planet = new THREE.Mesh(new THREE.SphereGeometry(pd.r, 24, 18),
          new THREE.MeshStandardMaterial({color: pd.c, roughness: 0.7}));
        planet.position.set(pd.x, pd.y, pd.z);
        scene.add(planet);
        /* Ring */
        if(p !== 1){
          var ring = new THREE.Mesh(new THREE.RingGeometry(pd.r + 5, pd.r + 10, 32),
            new THREE.MeshBasicMaterial({color: 0xffffff, transparent: true, opacity: 0.3, side: THREE.DoubleSide}));
          ring.rotation.x = Math.PI/2.5;
          ring.position.copy(planet.position);
          scene.add(ring);
        }
        var ph = Math.random() * 10;
        window._dynamics.push(function(t){
          planet.rotation.y += 0.002;
          planet.position.y = pd.y + Math.sin(t * 0.3 + ph) * 5;
        });
      })();
    }

    /* NEBULA — cosmic clouds */
    for(var n = 0; n < 30; n++){
      (function(){
        var colors = [0x8800ff, 0x0044ff, 0xff0088];
        var neb = new THREE.Mesh(new THREE.SphereGeometry(20 + Math.random() * 30, 12, 10),
          new THREE.MeshBasicMaterial({color: colors[n % 3], transparent: true, opacity: 0.08, fog: false}));
        neb.position.set((Math.random()-0.5)*1000, 200 + Math.random()*200, (Math.random()-0.5)*1000);
        scene.add(neb);
        var ph2 = Math.random() * 10;
        window._dynamics.push(function(t){
          neb.material.opacity = 0.06 + Math.sin(t * 0.4 + ph2) * 0.03;
        });
      })();
    }

    /* ENERGY BEAMS — connecting districts, cosmic scale */
    var beamMat = new THREE.MeshBasicMaterial({color: 0x00ffff, transparent: true, opacity: 0.4});
    var beamPoints = [[0,0], [100,-100], [-200,200], [350,-200], [0,-250]];
    for(var b = 0; b < beamPoints.length - 1; b++){
      var x1 = beamPoints[b][0], z1 = beamPoints[b][1];
      var x2 = beamPoints[b+1][0], z2 = beamPoints[b+1][1];
      var len = Math.sqrt((x2-x1)*(x2-x1) + (z2-z1)*(z2-z1));
      var beam = new THREE.Mesh(new THREE.CylinderGeometry(1, 1, len, 8), beamMat);
      beam.position.set((x1+x2)/2, 50, (z1+z2)/2);
      beam.rotatio