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.

feat: update widget links to include .html extension and add new widgets page

nirholas454632542d8c
diff --git a/agent-home.html b/agent-home.html
index 436b23e97..25d65c317 100644
--- a/agent-home.html
+++ b/agent-home.html
@@ -955,7 +955,7 @@
<h4 class="h-footer-link-heading">Product</h4>
<a href="/create">Create</a>
<a href="/studio">Studio</a>
- <a href="/widgets">Widgets</a>
+ <a href="/widgets.html">Widgets</a>
<a href="/discover">Discover</a>
</div>
<div class="h-footer-link-col">
diff --git a/home.html b/home.html
index 87cc09d07..dc76ea767 100644
--- a/home.html
+++ b/home.html
@@ -116,7 +116,7 @@
>
</li>
<li role="none">
- <a href="/widgets" role="menuitem"
+ <a href="/widgets.html" role="menuitem"
><span class="nav-mi-title">Widgets gallery</span
><span class="nav-mi-sub">Embeddable showcases</span></a
>
@@ -879,7 +879,7 @@
<h4 class="h-footer-link-heading">Product</h4>
<a href="/create">Create</a>
<a href="/studio">Studio</a>
- <a href="/widgets">Widgets</a>
+ <a href="/widgets.html">Widgets</a>
<a href="/discover">Discover</a>
</div>
<div class="h-footer-link-col">
diff --git a/index.html b/index.html
index 710f3e913..b3951bea7 100644
--- a/index.html
+++ b/index.html
@@ -818,7 +818,7 @@
>
</li>
<li role="none">
- <a href="/widgets" role="menuitem"
+ <a href="/widgets.html" role="menuitem"
><span class="nav-mi-title">Widgets gallery</span
><span class="nav-mi-sub">Embeddable showcases</span></a
>
@@ -1329,7 +1329,7 @@
<h4 class="h-footer-link-heading">Product</h4>
<a href="/create">Create</a>
<a href="/studio">Studio</a>
- <a href="/widgets">Widgets</a>
+ <a href="/widgets.html">Widgets</a>
<a href="/discover">Discover</a>
</div>
<div class="h-footer-link-col">
diff --git a/pumpfun-widget.html b/pumpfun-widget.html
index f0ff0ab6b..31de33e54 100644
--- a/pumpfun-widget.html
+++ b/pumpfun-widget.html
@@ -38,13 +38,138 @@
.entry .token-details { flex: 1; min-width: 0; }
.entry .meta-row { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: #666; margin-top: 3px; }
.entry .mcap { color: #b366ff; font-weight: bold; }
+ body.bg-dark {
+ background: #0b0d10;
+ }
+ body.bg-light {
+ background: #f5f5f5;
+ }
+ body.bg-light .entry {
+ border-bottom-color: #eee;
+ }
+ body.bg-light .name {
+ color: #333;
+ }
+ body.bg-light .symbol {
+ color: #666;
+ }
+ body.bg-light .mcap {
+ color: #999;
+ }
</style>
</head>
<body>
<div id="root"></div>
<script type="module">
- // Coming soon
- document.getElementById('root').innerHTML = '<h1>Coming soon</h1>';
+ const params = new URL(location.href).searchParams;
+ const bg = params.get('bg') || 'dark';
+ if (bg === 'dark') document.body.classList.add('bg-dark');
+ if (bg === 'light') document.body.classList.add('bg-light');
+ const maxEntries = parseInt(params.get('max') || '50', 10);
+
+ const RPC_ENDPOINTS = [
+ { url: 'wss://pumpportal.fun/api/data', protocol: 'pumpportal', label: 'PumpPortal' },
+ { url: 'wss://pump-fun-websocket-production.up.railway.app/ws', protocol: 'relay', label: 'Relay Server' },
+ ];
+ let rpcIndex = 0;
+ let ws = null;
+
+ function connect() {
+ const ep = RPC_ENDPOINTS[rpcIndex % RPC_ENDPOINTS.length];
+ rpcIndex++;
+ ws = new WebSocket(ep.url);
+
+ ws.onopen = () => {
+ if (ep.protocol === 'pumpportal') {
+ ws.send(JSON.stringify({ method: 'subscribeNewToken' }));
+ }
+ };
+
+ ws.onmessage = (evt) => {
+ let msg;
+ try { msg = JSON.parse(evt.data); } catch { return; }
+
+ if (ep.protocol === 'relay') {
+ if (msg.type === 'token-launch' || msg.mint) {
+ const info = {
+ mint: msg.mint || 'unknown',
+ name: msg.name || null,
+ symbol: msg.symbol || null,
+ imageUrl: msg.imageUri || null,
+ marketCapSol: msg.marketCapSol || 0,
+ };
+ renderEntry(info);
+ }
+ return;
+ }
+
+ if (ep.protocol === 'pumpportal') {
+ if (msg && msg.mint) {
+ const vSol = msg.vSolInBondingCurve || 0;
+ const vTok = msg.vTokensInBondingCurve || 0;
+ const supply = msg.tokenTotalSupply || (vTok > 0 ? 1e15 : 0);
+ let mcap = msg.marketCapSol || 0;
+ if (!mcap && vTok > 0 && vSol > 0) {
+ mcap = (vSol / vTok) * supply / 1e9;
+ }
+ const info = {
+ mint: msg.mint,
+ name: msg.name || null,
+ symbol: msg.symbol || null,
+ marketCapSol: mcap,
+ imageUrl: null, // PumpPortal does not provide image directly
+ };
+ renderEntry(info);
+ }
+ return;
+ }
+ };
+
+ ws.onclose = () => {
+ setTimeout(connect, 1000);
+ };
+ }
+
+ function renderEntry(info) {
+ const div = document.createElement('div');
+ div.className = 'entry';
+
+ const displayName = info.name || 'Unknown';
+ const displaySymbol = info.symbol ? '$' + info.symbol : '';
+ const mcap = info.marketCapSol ? fmtMcap(info.marketCapSol) : null;
+
+ let html = `<div class="token-row">`;
+ html += `<img class="token-img" src="${info.imageUrl || ''}" alt="" style="${info.imageUrl ? '' : 'display:none'}" onerror="this.style.display='none'" />`;
+ html += `<div class="token-details">`;
+ html += `<div><span class="name">${esc(displayName)}</span> <span class="symbol">${esc(displaySymbol)}</span></div>`;
+ html += `<div class="meta-row">`;
+ if (info.mint) html += `<span><a href="https://pump.fun/coin/${info.mint}" target="_blank">View on Pump.fun</a></span>`;
+ if (mcap) html += `<span>MCap: <span class="mcap">${mcap}</span></span>`;
+ html += `</div>`;
+ html += `</div></div>`;
+
+ div.innerHTML = html;
+ const root = document.getElementById('root');
+ root.prepend(div);
+ while (root.children.length > maxEntries) {
+ root.removeChild(root.lastChild);
+ }
+ }
+
+ function fmtMcap(sol) {
+ if (!sol || sol <= 0) return null;
+ if (sol >= 1000) return (sol / 1000).toFixed(1) + 'k';
+ if (sol >= 1) return sol.toFixed(2);
+ return sol.toFixed(4);
+ }
+
+ function esc(s) {
+ const d = document.createElement('div');
+ d.textContent = s || '';
+ return d.innerHTML;
+ }
+
+ connect();
</script>
</body>
</html>
diff --git a/widgets.html b/widgets.html
new file mode 100644
index 000000000..df436a5d6
--- /dev/null
+++ b/widgets.html
@@ -0,0 +1,53 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <title>Widgets · three.ws</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <meta name="description" content="Embeddable widgets for your website." />
+ <meta name="theme-color" content="#000000" />
+ <link rel="canonical" href="https://three.ws/widgets" />
+ <link rel="shortcut icon" href="/favicon.ico" />
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
+ <link rel="stylesheet" href="/style.css" />
+ <link rel="stylesheet" href="/marketplace.css" />
+ <link
+ href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"
+ rel="stylesheet"
+ />
+ </head>
+ <body class="market-page">
+ <aside class="market-sidebar" id="market-sidebar">
+ <a href="/" class="market-logo">
+ <img src="/three.svg" alt="three.ws" />
+ <span>Widgets</span>
+ </a>
+ <nav class="market-nav">
+ <a href="/" data-nav="home"><span class="ico">⌂</span> Home</a>
+ <a href="/widgets" data-nav="widgets" class="active"><span class="ico">▣</span> Widgets</a>
+ </nav>
+ </aside>
+
+ <main class="market-main" id="market-main">
+ <section class="market-discovery" id="market-discovery">
+ <header class="market-topbar">
+ <h1>Widgets</h1>
+ </header>
+ <div class="market-body">
+ <div class="market-grid" id="widget-grid">
+ <div class="market-item">
+ <div class="market-item-thumb">
+ <iframe src="/pumpfun-widget.html?bg=dark" width="100%" height="200px" style="border:none;"></iframe>
+ </div>
+ <div class="market-item-meta">
+ <h3>Pump.fun Live Feed</h3>
+ <p>A live feed of new tokens on Pump.fun.</p>
+ </div>
+ </div>
+ </div>
+ </div>
+ </section>
+ </main>
+ </body>
+</html>