<!-- RUBY-BACKUP · part 552 -->
ar rel = angle - camAngle;
        var arrow = document.getElementById('compassarrow');
        if(arrow) arrow.style.transform = 'rotate(' + (rel * 180/Math.PI) + 'deg)';
        // distance
        var dist = Math.sqrt(dx*dx + dz*dz);
        compassEl.title = 'Creator Block: ' + dist.toFixed(0) + 'm';
      }
      // street map: draw streets top-down
      if(mapCanvas && window._streets){
        var ctx = mapCanvas.getContext('2d');
        var _ms = 80; // canvas size
        ctx.clearRect(0, 0, _ms, _ms);
        ctx.fillStyle = '#0a0a0a';
        ctx.fillRect(0, 0, _ms, _ms);
        var scale = _ms / 2400; // map is 2400 units (±1200)
        var cx = _ms/2, cy = _ms/2;
        // draw streets
        window._streets.children.forEach(function(child){
          if(child.name && child.name.indexOf('street')===0){
            ctx.strokeStyle = '#333';
            ctx.lineWidth = 2;
            // simplified: draw as lines from center
          }
        });
        // draw plaza
        ctx.fillStyle = '#d8a920';
        ctx.beginPath();
        ctx.arc(cx, cy, 4, 0, Math.PI*2);
        ctx.fill();
        // draw player
        if(typeof mePos!=='undefined'){
          var px = cx + mePos.x * scale;
          var py = cy + mePos.z * scale;
          ctx.fillStyle = '#00ff00';
          ctx.beginPath();
          ctx.arc(Math.max(2, Math.min(118, px)), Math.max(2, Math.min(118, py)), 3, 0, Math.PI*2);
          ctx.fill();
        }
        // draw creator block
        if(window._creatorBlock){
          var qx = cx + window._creatorBlock.position.x * scale;
          var qy = cy + window._creatorBlock.position.z * scale;
          ctx.fillStyle = '#cc0000';
          ctx.beginPath();
          ctx.arc(Math.max(2, Math.min(118, qx)), Math.max(2, Math.min(118, qy)), 4, 0, Math.PI*2);
          ctx.fill();
        }
      }
    }catch(e){}
    requestAnimationFrame(update);
  }
  setTimeout(init, 3000);
})();
/* CREATOR BLOCK — black and red, ultra-dense intaglio linework, permanent */
function buildCreatorBlock(){
  try{
    // remove old if exists
    if(window._creatorBlock && typeof scene!=='undefined'){
      scene.remove(window._creatorBlock);
    }
    var g = new THREE.Group();
    // black base block
    var blackMat = new THREE.MeshStandardMaterial({color:0x0a0a0a, roughness:0.3, metalness:0.6});
    var block = new THREE.Mesh(new THREE.BoxGeometry(3, 3, 3), blackMat);
    block.name = 'creator-block';
    g.add(block);
    // red intaglio inlay — ultra-dense linework
    var redMat = new THREE.MeshStandardMaterial({color:0xcc0000, emissive:0x550000, emissiveIntensity:0.5, roughness:0.4});
    // ultra-dense: many thin lines carved across all faces
    var lineCount = 40;
    for(var i=0; i<lineCount; i++){
      var t = (i / (lineCount-1)) - 0.5; // -0.5 to 0.5
      // front/back faces — horizontal lines
      var h1 = new THREE.Mesh(new THREE.BoxGeometry(3.02, 0.02, 0.02), redMat);
      h1.position.set(0, t*3, 1.51);
      h1.name = 'intaglio-h';
      g.add(h1);
      var h2 = h1.clone();
      h2.position.z = -1.51;
      g.add(h2);
      // left/right faces — vertical lines
      var v1 = new THREE.Mesh(new THREE.BoxGeometry(0.02, 0.02, 3.02), redMat);
      v1.position.set(1.51, t*3, 0);
      v1.name = 'intaglio-v';
      g.add(v1);
      var v2 = v1.clone();
      v2.position.x = -1.51;
      g.add(v2);
      // top/bottom — crosshatch
      var c1 = new THREE.Mesh(new THREE.BoxGeometry(3.02, 0.02, 0.03), redMat);
      c1.position.set(0, 1.51, t*3);
      c1.rotation.y = Math.PI/4;
      c1.name = 'intaglio-x';
      g.add(c1);
      var c2 = c1.clone();
      c2.position.y = -1.51;
      g.add(c2);
    }
    // gold core — the heart
    var core = new THREE.Mesh(
      new THREE.OctahedronGeometry(0.5),
      new THREE.MeshStandardMaterial({color:0xffd700, emissive:0xffd700, emissiveIntensity:0.8})
    );
    core.position.y = 0;
    core.name = 'creator-core';
    g.add(core);
    // position near spawn
    g.position.set(10, 2, 10);
    g.userData.isPrimitive = true;
    g.userData.isCreatorBlock = true;
    if(typeof scene!=='undefined') scene.add(g);
    window._creatorBlock = g;
    // tap to pick up — wire into grab mode
    // (handled by the grab mode tap detector via isPrimitive)
    // THE PLAYA 2.0 BOX — tap it to engage block building (opens the Creator)
    g.userData.isPlayaBox = true;
    block.userData.isPlayaBox = true;
    var sceneRef = (typeof scene!=='undefined') ? scene : null;
    pushCommand({
      name: 'build creator block',
      execute: function(){ if(sceneRef) sceneRef.add(g); },
      undo: function(){ if(sceneRef) sceneRef.remove(g); }
    });
    // permanent button — opens the Creator
    var btn = document.getElementById('creatorblockbtn');
    if(!btn){
      btn = document.createElement('button');
      btn.id = 'creatorblockbtn';
      btn.textContent = '◈';
      btn.title = 'The Creator';
      btn.style.c