Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

Add Oracle conviction + watchlist to coin3d HUD

nirholas7d97eadc6499
diff --git a/data/changelog.json b/data/changelog.json
index cb08f21b9..4a45322c1 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -1,6 +1,13 @@
{
"$comment": "Curated changelog entries for three.ws — the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.",
"entries": [
+ {
+ "date": "2026-06-16",
+ "title": "Coin 3D: Oracle conviction score and watchlist in the HUD",
+ "summary": "The Token in 3D page now shows Oracle conviction alongside the bonding-curve stats. After the scene loads, the panel fetches the coin's conviction score and tier (prime/strong/lean/watch/avoid) asynchronously — no scene-render delay. Tap the score badge to jump to the full Oracle breakdown. A new Watch button syncs the token directly into your watchlist across the radar, launches, and visualizer surfaces.",
+ "tags": ["improvement"],
+ "link": "/coin3d"
+ },
{
"date": "2026-06-16",
"title": "Sniper: Cumulative PnL chart in trade history",
diff --git a/pages/coin3d.html b/pages/coin3d.html
index a64e3a7cc..68c9c941a 100644
--- a/pages/coin3d.html
+++ b/pages/coin3d.html
@@ -229,6 +229,80 @@
}
}
+ /* Oracle conviction badge */
+ .c3d-oracle {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ padding: 10px 12px;
+ background: rgba(255, 255, 255, 0.04);
+ border: 1px solid rgba(255, 255, 255, 0.07);
+ border-radius: 8px;
+ margin: 12px 0 14px;
+ text-decoration: none;
+ color: inherit;
+ transition: background 0.12s;
+ }
+ .c3d-oracle:hover {
+ background: rgba(255, 255, 255, 0.08);
+ }
+ .c3d-oracle:focus-visible {
+ outline: 2px solid var(--accent);
+ outline-offset: 3px;
+ }
+ .c3d-oracle-label {
+ font-size: 11px;
+ text-transform: uppercase;
+ letter-spacing: 0.06em;
+ color: var(--muted);
+ flex-shrink: 0;
+ }
+ .c3d-oracle-score {
+ font-size: 22px;
+ font-weight: 700;
+ line-height: 1;
+ }
+ .c3d-oracle-tier {
+ font-size: 11px;
+ font-weight: 600;
+ text-transform: uppercase;
+ letter-spacing: 0.05em;
+ }
+ .c3d-oracle-arrow {
+ margin-left: auto;
+ color: var(--muted);
+ font-size: 13px;
+ }
+ .c3d-oracle-sk {
+ height: 42px;
+ background: rgba(255, 255, 255, 0.05);
+ border-radius: 8px;
+ margin: 12px 0 14px;
+ animation: c3dPulse 1.4s ease-in-out infinite;
+ }
+ @keyframes c3dPulse {
+ 0%, 100% { opacity: 0.4; }
+ 50% { opacity: 0.8; }
+ }
+ /* Watch button */
+ .c3d-watch-btn {
+ background: none;
+ border: none;
+ cursor: pointer;
+ padding: 0;
+ font-family: inherit;
+ font-size: 13px;
+ font-weight: 600;
+ color: var(--accent);
+ transition: opacity 0.15s ease;
+ }
+ .c3d-watch-btn:hover { opacity: 0.78; }
+ .c3d-watch-btn:focus-visible {
+ outline: 2px solid var(--accent);
+ outline-offset: 3px;
+ border-radius: 4px;
+ }
+
@media (max-width: 520px) {
#hud {
width: calc(100vw - 32px);
diff --git a/src/coin3d/main.js b/src/coin3d/main.js
index 63dacd80f..aa06e25fe 100644
--- a/src/coin3d/main.js
+++ b/src/coin3d/main.js
@@ -317,6 +317,77 @@ function buildGraduationRing(snapshot) {
spin.add(arc);
}
+// ── Watchlist (shared ld_watchlist key) ──────────────────────────────────────
+const WATCH_KEY = 'ld_watchlist';
+
+function isWatched(mintAddr) {
+ try {
+ return JSON.parse(localStorage.getItem(WATCH_KEY) || '[]').includes(mintAddr);
+ } catch {
+ return false;
+ }
+}
+
+function toggleWatch(mintAddr) {
+ try {
+ let list = JSON.parse(localStorage.getItem(WATCH_KEY) || '[]');
+ if (list.includes(mintAddr)) {
+ list = list.filter((m) => m !== mintAddr);
+ } else {
+ list = [mintAddr, ...list];
+ }
+ localStorage.setItem(WATCH_KEY, JSON.stringify(list));
+ return list.includes(mintAddr);
+ } catch {
+ return false;
+ }
+}
+
+// ── Oracle conviction ─────────────────────────────────────────────────────────
+const _c3dOracleCache = new Map();
+
+async function fetchOracleConviction(mintAddr, net) {
+ const key = `${net}:${mintAddr}`;
+ if (_c3dOracleCache.has(key)) return _c3dOracleCache.get(key);
+ try {
+ const r = await fetch(
+ `/api/oracle/coin?mint=${encodeURIComponent(mintAddr)}&network=${net}`,
+ { signal: AbortSignal.timeout(8000) },
+ );
+ if (!r.ok) return null;
+ const d = await r.json();
+ const cv = d?.conviction ? { score: d.conviction.score, tier: d.conviction.tier } : null;
+ _c3dOracleCache.set(key, cv);
+ return cv;
+ } catch {
+ return null;
+ }
+}
+
+const TIER_COLORS = {
+ prime: '#44e08a',
+ strong: '#6ea8ff',
+ lean: '#f0c040',
+ watch: '#ff9944',
+ avoid: '#ff5555',
+};
+
+function renderOracleSlot(cv, mintAddr) {
+ const el = document.getElementById('c3d-oracle');
+ if (!el) return;
+ if (!cv) {
+ el.style.display = 'none';
+ return;
+ }
+ const color = TIER_COLORS[cv.tier] || '#97a0c4';
+ el.innerHTML = `<a class="c3d-oracle" href="/oracle?mint=${encodeURIComponent(mintAddr)}" aria-label="Oracle conviction: ${cv.score} ${cv.tier}">
+ <span class="c3d-oracle-label">Oracle</span>
+ <span class="c3d-oracle-score" style="color:${color}">${cv.score}</span>
+ <span class="c3d-oracle-tier" style="color:${color}">${cv.tier}</span>
+ <span class="c3d-oracle-arrow">→</span>
+ </a>`;
+}
+
// ── HUD ───────────────────────────────────────────────────────────────────────
function renderHud(s) {
const cap = s.marketCapUsd !== null ? `$${compact(s.marketCapUsd)}` : '—';
@@ -326,6 +397,7 @@ function renderHud(s) {
? `${Math.round(s.graduationProgress * 100)}% to graduation`
: 'Bonding curve';
const conc = s.topHolderPercent !== null ? `${s.topHolderPercent.toFixed(1)}%` : '—';
+ const watching = s.mint ? isWatched(s.mint) : false;
hud.hidden = false;
hud.innerHTML = `
<div class="hud-head">
@@ -338,11 +410,21 @@ function renderHud(s) {
<div><dt>Status</dt><dd>${escapeHtml(grad)}</dd></div>
<div><dt>Top holders shown</dt><dd>${s.holders.length || 0}</dd></div>
</dl>
+ <div id="c3d-oracle"><div class="c3d-oracle-sk" aria-hidden="true"></div></div>
<div class="hud-links">
- <a class="hud-link" href="https://pump.fun/coin/${encodeURIComponent(s.mint)}" target="_blank" rel="noopener">View on pump.fun ↗</a>
+ ${s.mint ? `<button id="c3d-watch" class="c3d-watch-btn" type="button" aria-pressed="${watching}">${watching ? '★ Watching' : '☆ Watch'}</button>` : ''}
+ <a class="hud-link" href="https://pump.fun/coin/${encodeURIComponent(s.mint)}" target="_blank" rel="noopener">pump.fun ↗</a>
<a class="hud-link" href="/launches">All launches →</a>
${s.mint ? `<a class="hud-link" href="/communities/${encodeURIComponent(s.mint)}">3D world →</a>` : ''}
</div>`;
+
+ if (s.mint) {
+ document.getElementById('c3d-watch')?.addEventListener('click', function () {
+ const now = toggleWatch(s.mint);
+ this.textContent = now ? '★ Watching' : '☆ Watch';
+ this.setAttribute('aria-pressed', String(now));
+ });
+ }
}
function compact(n) {
@@ -390,6 +472,9 @@ async function main() {
setStatus(null);
document.title = `${snapshot.name}${snapshot.symbol ? ` ($${snapshot.symbol})` : ''} · 3D — three.ws`;
+ // Async — does not block scene render
+ fetchOracleConviction(mint, network).then((cv) => renderOracleSlot(cv, mint));
+
// Expose the live scene for embedders and host pages (e.g. to react to the
// loaded snapshot or drive the camera from the outside).
window.__coin3d = { renderer, scene, camera, controls, snapshot };