<!-- SAGA2 · part 106 -->
-1; lz<=1; lz+=2){
    var leg = new THREE.Mesh(new THREE.BoxGeometry(0.6, 3, 0.6), woodMat);
    leg.position.set(lx*5.2, 1.5, lz*3.2); creatorTable.add(leg);
  }
  // Hourglass V-Core (centerpiece)
  var hgTop = new THREE.Mesh(new THREE.ConeGeometry(1.5, 1.8, 4), goldMat);
  hgTop.rotation.x = Math.PI; hgTop.position.set(0, 4.6, 0); creatorTable.add(hgTop);
  var hgBot = new THREE.Mesh(new THREE.ConeGeometry(1.5, 1.8, 4), goldMat);
  hgBot.position.set(0, 3.0, 0); creatorTable.add(hgBot);
  // Primitive blocks laid out (left to right)
  var blocks = [
    {g:new THREE.BoxGeometry(1,1,1), x:-4.5},
    {g:new THREE.SphereGeometry(0.6,16,12), x:-3},
    {g:new THREE.CylinderGeometry(0.5,0.5,1.2,12), x:-1.5},
    {g:new THREE.ConeGeometry(0.6,1.2,12), x:1.5},
    {g:new THREE.TorusGeometry(0.5,0.2,10,16), x:3},
    {g:new THREE.TetrahedronGeometry(0.8), x:4.5},
  ];
  blocks.forEach(function(b){
    var m = new THREE.Mesh(b.g, metalMat);
    m.position.set(b.x, 3.8, 2.2); m.castShadow = true; creatorTable.add(m);
  });
  // Holographic screen (back)
  var screen = new THREE.Mesh(new THREE.PlaneGeometry(8, 4.5),
    new THREE.MeshBasicMaterial({color:0x00ccff, transparent:true, opacity:0.25, side:THREE.DoubleSide}));
  screen.position.set(0, 6.5, -3.2); creatorTable.add(screen);
  var frame = new THREE.Mesh(new THREE.BoxGeometry(8.4, 4.9, 0.15), metalMat);
  frame.position.set(0, 6.5, -3.3); creatorTable.add(frame);
  // Position the table in the world (near spawn, visible)
  creatorTable.position.set(15, 0, 115);
  creatorTable.visible = false;
  scene.add(creatorTable);
})();
// CREATOR button → opens THE CREATOR STUDIO (v205)
(function(){
  var b = document.createElement('button');
  b.id = 'cbtn';
  b.textContent = 'CREATOR';
  b.style.cssText = 'position:fixed;top:130px;right:12px;z-index:100;background:#c9a54f;color:#111;'+
    'border:none;font-weight:bold;font-size:14px;padding:12px 16px;border-radius:10px;min-height:48px;';
  b.addEventListener('click', function(){
    window.open('https://epistles.xyz/playa', '_blank');
  });
  document.body.appendChild(b);
})();

// ===== SOLID COIN AI BUTTON (v207) — flips! =====
(function(){
  var b = document.createElement('button');
  b.id = 'aibtn';
  var flipped = false;
  b.style.cssText = 'position:fixed;top:12px;left:12px;z-index:100;width:72px;height:72px;min-width:72px;min-height:72px;'+
    'border:none;border-radius:50%;padding:0;cursor:pointer;'+
    'background:url(solid-coin-btn.png) center/cover no-repeat;'+
    'box-shadow:0 0 20px rgba(201,165,79,0.6);transition:transform 0.4s;';
  b.addEventListener('click', function(){
    // Flip the coin
    flipped = !flipped;
    b.style.transform = 'rotateY(' + (flipped ? '180' : '0') + 'deg)';
    var that = b;
    setTimeout(function(){
      that.style.backgroundImage = 'url(' + (flipped ? 'epistolary-coin-btn.png' : 'solid-coin-btn.png') + ')';
      that.style.transform = 'rotateY(' + (flipped ? '360' : '180') + 'deg)';
      setTimeout(function(){ that.style.transform = 'rotateY(0deg)'; }, 400);
    }, 200);
  });
  // Long-press opens AI chat
  var pressTimer;
  b.addEventListener('touchstart', function(){ pressTimer = setTimeout(function(){ window.open('https://epistles.xyz/ai','_blank'); }, 800); }, {passive:true});
  b.addEventListener('touchend', function(){ clearTimeout(pressTimer); });
  document.body.appendChild(b);
})();

// ===== REAL LAT/LON (v209) — updates #latlon div from HTML =====
(function(){
  // Update every 100ms (Cloud 9: world(500,500) = LAT 9, LON 8)
  setInterval(function(){
    var d = document.getElementById('latlon');
    if(!d) return;
    try {
      var lat = (camera.position.z / 55.56).toFixed(2);
      var lon = (camera.position.x / 62.5).toFixed(2);
      d.textContent = 'LAT ' + lat + '  LON ' + lon;
    } catch(e) { d.textContent = 'LAT -- LON --'; }
  }, 100);
})();
// ===== ECONOMY OVERLAY (improved: smart-poll + connection status) =====
(function(){
  if(typeof EconomyOverlay === 'undefined'){ console.warn('economy overlay not loaded'); return; }
  var ok = EconomyOverlay.init(scene, camera);
  if(!ok) return;
  // Feed player position each frame
  var origAnimate = window.requestAnimationFrame;
  (function econLoop(){
    if(window.camera){
      EconomyOverlay.setPlayerPos(window.camera.position.x, window.camera.position.y, window.camera.position.z);
      if(EconomyOverlay.animate) EconomyOverlay.animate();
    }
    requestAnimationFrame(econLoop);
  })();
  console.log('economy overlay live on saga2');
})();
})();


===== FILE: public/saga2/three.min.js =====
/**
 * @license
 * Copyright 2010-2021 Three.js Authors
 * SPDX-License-Identifier: MIT
 */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).THREE={})}(this,(function(t){"use strict";const e="128",n=100,i=300,r=301,s=302,a=303,o=304,