[object Object]

← back to Ticket System

office: add 'Ping ✦' DM-animation preview button + recording hooks

3dd588f9a6acfd79092af9144b54019b5a128e2a · 2026-07-27 07:01:43 -0700 · Steve Abrams

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Files touched

Diff

commit 3dd588f9a6acfd79092af9144b54019b5a128e2a
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Mon Jul 27 07:01:43 2026 -0700

    office: add 'Ping ✦' DM-animation preview button + recording hooks
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
 office.html | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/office.html b/office.html
index 782f1d6..6a7aa83 100644
--- a/office.html
+++ b/office.html
@@ -60,6 +60,7 @@
   <button id="b-labels" class="on">Labels: on</button>
   <button id="b-done" class="on">Done rooms: on</button>
   <button id="b-follow">Follow DMs: off</button>
+  <button id="b-ping" title="Preview the DM packet animation between random agents (visual only — writes nothing)">Ping ✦</button>
   <button id="b-reset">Reset camera</button>
 </div>
 <div id="tip"></div>
@@ -466,6 +467,16 @@ document.getElementById('b-labels').onclick=e=>{ showLabels=!showLabels; e.targe
 document.getElementById('b-done').onclick=e=>{ showDone=!showDone; e.target.className=showDone?'on':''; e.target.textContent='Done rooms: '+(showDone?'on':'off'); poll(); };
 document.getElementById('b-follow').onclick=e=>{ followDMs=!followDMs; e.target.className=followDMs?'on':''; e.target.textContent='Follow DMs: '+(followDMs?'on':'off'); };
 document.getElementById('b-reset').onclick=()=>{ camera.position.copy(HOME.pos); controls.target.copy(HOME.tgt); };
+// Preview the DM packet animation between random visible agents (visual only — no event written).
+document.getElementById('b-ping').onclick=()=>{
+  const avs=[...avatarByName.values()]; if(avs.length<2) return;
+  for(let k=0;k<5;k++){
+    const a=avs[(Math.random()*avs.length)|0], b=avs[(Math.random()*avs.length)|0];
+    if(a!==b) spawnPacket(worldPos(a), worldPos(b), Math.random()<0.25);
+  }
+};
+window.__ping = () => document.getElementById('b-ping').click();  // recording hook
+window.__orbit = on => { controls.autoRotate = on; controls.autoRotateSpeed = 0.6; };  // recording hook
 
 // ───────────────────────── animate ─────────────────────────
 const clock=new THREE.Clock();

← a5e74a9 Add live 3D top-down office visualizer (/office): rooms=tick  ·  back to Ticket System  ·  office: fetch API via location.origin so embedded-credential ca85224 →