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.

pump live + launchpad studio improvements, validation deploy script, changelog sync

nirholase9c6aab735d8
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6b5df6a95..f17283d2b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,11 @@
Public history for [three.ws](https://three.ws), newest first. New pages come from `added` dates in data/pages.json; everything else is curated in data/changelog.json. Also available as [JSON](https://three.ws/changelog.json) and [RSS](https://three.ws/changelog.xml), live at [three.ws/changelog](https://three.ws/changelog).
+## 2026-06-15
+
+- **Launchpad Studio: pick your avatar from your own agents and the gallery** — Building a launchpad in Launchpad Studio (three.ws/launchpad) no longer means hunting down a model URL by hand. The avatar picker now shows three sections: your own three.ws agents (when you're signed in), the platform avatar gallery with a Show more button to browse deeper, and a collapsed Or enter a URL field for power users who want to paste a custom .glb. Thumbnails load lazily, the selected avatar updates the live 3D preview instantly, and your choice is saved with the published page. (`/launchpad`) `[feature, improvement]`
+- **Pump Visualizer’s Trending view fixed — spheres now sized by real market cap** — The Trending mode of the 3D Pump Visualizer (three.ws/pump-visualizer) now renders correctly: every coin appears as a sphere sized by its real USD market cap, textured with its actual logo, with a full detail panel showing market cap, all-time-high, replies, age, and socials. Previously Trending failed to load because the market data it relied on wasn’t reaching the scene. Click a sphere to inspect it, or double-click to open the full 3D coin page. The live Firehose and Migrations modes are unchanged. (`/pump-visualizer`) `[fix, improvement]`
+
## 2026-06-14
- **Building 3D AI Agents Live** (`/events/build-3d-agents-live`) — A live build session: from a single prompt to an interactive 3D AI agent embedded in any app, in minutes — then a live Q&A. Hosted by three.ws, in partnership with IBM.
diff --git a/contracts/script/DeployValidationMainnet.s.sol b/contracts/script/DeployValidationMainnet.s.sol
index 77083808d..16342756f 100644
--- a/contracts/script/DeployValidationMainnet.s.sol
+++ b/contracts/script/DeployValidationMainnet.s.sol
@@ -31,8 +31,14 @@ contract DeployValidationMainnet is Script {
// Named ARACHNID_FACTORY to avoid colliding with forge-std Base.CREATE2_FACTORY.
address constant ARACHNID_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;
- // Salt chosen to produce the 0x8004... vanity prefix on mainnet
- bytes32 constant SALT = keccak256(abi.encodePacked("ValidationRegistry", uint256(1)));
+ // Vanity salt ground for the 0x8004C... family prefix. Bound to this exact
+ // init code: ValidationRegistry creationCode ++ abi.encode(IDENTITY_REGISTRY, deployer).
+ // It is only valid for deployer 0x4022de2D...C0564f402 + mainnet IDENTITY_REGISTRY
+ // above; changing either invalidates the address.
+ // Init code hash: 0x9f52c59a0c0cc7530da87468abec66611c90f14bcd643f89cecadf126be40967
+ // Predicted addr: 0x8004C40cB843aE03005785cEfF5BeDD1B797003c
+ // Ground via: cast create2 --starts-with 8004C --deployer <factory> --init-code-hash <hash>
+ bytes32 constant SALT = 0xf71795f0fc4acf874645e72df4ef164351198c1b2d24d6caf08d07395f68a79a;
function run() external returns (ValidationRegistry validation) {
address deployer = msg.sender;
@@ -67,7 +73,7 @@ contract DeployValidationMainnet is Script {
));
return address(uint160(uint256(keccak256(abi.encodePacked(
bytes1(0xff),
- CREATE2_FACTORY,
+ ARACHNID_FACTORY,
SALT,
initCodeHash
)))));
diff --git a/data/changelog.json b/data/changelog.json
index 5d1e2c978..f6b9e652f 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -1,6 +1,20 @@
{
"$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-15",
+ "title": "Launchpad Studio: pick your avatar from your own agents and the gallery",
+ "summary": "Building a launchpad in Launchpad Studio (three.ws/launchpad) no longer means hunting down a model URL by hand. The avatar picker now shows three sections: your own three.ws agents (when you're signed in), the platform avatar gallery with a Show more button to browse deeper, and a collapsed Or enter a URL field for power users who want to paste a custom .glb. Thumbnails load lazily, the selected avatar updates the live 3D preview instantly, and your choice is saved with the published page.",
+ "tags": ["feature", "improvement"],
+ "link": "/launchpad"
+ },
+ {
+ "date": "2026-06-15",
+ "title": "Pump Visualizer\u2019s Trending view fixed \u2014 spheres now sized by real market cap",
+ "summary": "The Trending mode of the 3D Pump Visualizer (three.ws/pump-visualizer) now renders correctly: every coin appears as a sphere sized by its real USD market cap, textured with its actual logo, with a full detail panel showing market cap, all-time-high, replies, age, and socials. Previously Trending failed to load because the market data it relied on wasn\u2019t reaching the scene. Click a sphere to inspect it, or double-click to open the full 3D coin page. The live Firehose and Migrations modes are unchanged.",
+ "tags": ["fix", "improvement"],
+ "link": "/pump-visualizer"
+ },
{
"date": "2026-06-14",
"title": "React component library for embedding 3D AI agents",
diff --git a/pages/pump-live.html b/pages/pump-live.html
index d193c9b7b..5de4abb90 100644
--- a/pages/pump-live.html
+++ b/pages/pump-live.html
@@ -94,6 +94,7 @@
}
#header .header-links a { color: var(--green); }
#header .header-links a:hover { text-decoration: underline; }
+ #header .header-links a:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 4px; }
/* ── Stats bar ───────────────────────────────────── */
#stats-bar {
diff --git a/public/changelog.json b/public/changelog.json
index 28202ecd2..2e03b610e 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,11 +1,33 @@
{
- "generated_at": "2026-06-14T23:36:26.646Z",
+ "generated_at": "2026-06-15T02:18:33.536Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
"url": "https://three.ws"
},
"entries": [
+ {
+ "date": "2026-06-15",
+ "type": "update",
+ "title": "Launchpad Studio: pick your avatar from your own agents and the gallery",
+ "summary": "Building a launchpad in Launchpad Studio (three.ws/launchpad) no longer means hunting down a model URL by hand. The avatar picker now shows three sections: your own three.ws agents (when you're signed in), the platform avatar gallery with a Show more button to browse deeper, and a collapsed Or enter a URL field for power users who want to paste a custom .glb. Thumbnails load lazily, the selected avatar updates the live 3D preview instantly, and your choice is saved with the published page.",
+ "link": "/launchpad",
+ "tags": [
+ "feature",
+ "improvement"
+ ]
+ },
+ {
+ "date": "2026-06-15",
+ "type": "update",
+ "title": "Pump Visualizer’s Trending view fixed — spheres now sized by real market cap",
+ "summary": "The Trending mode of the 3D Pump Visualizer (three.ws/pump-visualizer) now renders correctly: every coin appears as a sphere sized by its real USD market cap, textured with its actual logo, with a full detail panel showing market cap, all-time-high, replies, age, and socials. Previously Trending failed to load because the market data it relied on wasn’t reaching the scene. Click a sphere to inspect it, or double-click to open the full 3D coin page. The live Firehose and Migrations modes are unchanged.",
+ "link": "/pump-visualizer",
+ "tags": [
+ "fix",
+ "improvement"
+ ]
+ },
{
"date": "2026-06-14",
"type": "launch",
diff --git a/public/changelog.xml b/public/changelog.xml
index e4f3cf09d..c8d266a2d 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -6,6 +6,22 @@
<atom:link href="https://three.ws/changelog.xml" rel="self" type="application/rss+xml"/>
<description>What's new on three.ws — features, improvements, and releases, newest first.</description>
<language>en</language>
+ <item>
+ <title>Launchpad Studio: pick your avatar from your own agents and the gallery</title>
+ <link>https://three.ws/launchpad</link>
+ <guid isPermaLink="false">2026-06-15:Launchpad Studio: pick your avatar from your own agents and the gallery</guid>
+ <pubDate>Mon, 15 Jun 2026 12:00:00 GMT</pubDate>
+ <category>feature</category>
+ <description>Building a launchpad in Launchpad Studio (three.ws/launchpad) no longer means hunting down a model URL by hand. The avatar picker now shows three sections: your own three.ws agents (when you're signed in), the platform avatar gallery with a Show more button to browse deeper, and a collapsed Or enter a URL field for power users who want to paste a custom .glb. Thumbnails load lazily, the selected avatar updates the live 3D preview instantly, and your choice is saved with the published page.</description>
+ </item>
+ <item>
+ <title>Pump Visualizer’s Trending view fixed — spheres now sized by real market cap</title>
+ <link>https://three.ws/pump-visualizer</link>
+ <guid isPermaLink="false">2026-06-15:Pump Visualizer’s Trending view fixed — spheres now sized by real market cap</guid>
+ <pubDate>Mon, 15 Jun 2026 12:00:00 GMT</pubDate>
+ <category>fix</category>
+ <description>The Trending mode of the 3D Pump Visualizer (three.ws/pump-visualizer) now renders correctly: every coin appears as a sphere sized by its real USD market cap, textured with its actual logo, with a full detail panel showing market cap, all-time-high, replies, age, and socials. Previously Trending failed to load because the market data it relied on wasn’t reaching the scene. Click a sphere to inspect it, or double-click to open the full 3D coin page. The live Firehose and Migrations modes are unchanged.</description>
+ </item>
<item>
<title>Building 3D AI Agents Live</title>
<link>https://three.ws/events/build-3d-agents-live</link>
diff --git a/public/features.json b/public/features.json
index 65f2e22bc..5caea3a1a 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-06-14T23:36:26.626Z",
+ "generated_at": "2026-06-15T02:18:31.800Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/src/editor/launchpad-studio.js b/src/editor/launchpad-studio.js
index ce7c66b7e..962e41d76 100644
--- a/src/editor/launchpad-studio.js
+++ b/src/editor/launchpad-studio.js
@@ -58,14 +58,19 @@ const DRAFT_KEY = 'launchpadStudio:draft';
const SECRETS_KEY = 'launchpadStudio:secrets'; // { [slug]: ownerSecret }
const RECENT_KEY = 'launchpadStudio:recent'; // [{slug, template, headline, updatedAt}, ...]
-const DEMO_AVATARS = [
- { id: 'demo-cz', name: 'CZ', model_url: '/avatars/cz.glb' },
- { id: 'demo-default', name: 'Default', model_url: '/avatars/default.glb' },
- { id: 'demo-robot', name: 'Robot Expressive', model_url: '/animations/robotexpressive.glb' },
- { id: 'demo-soldier', name: 'Soldier', model_url: '/animations/soldier.glb' },
- { id: 'demo-michelle', name: 'Michelle', model_url: 'https://cdn.jsdelivr.net/gh/mrdoob/three.js/examples/models/gltf/Michelle.glb' },
- { id: 'demo-xbot', name: 'Xbot', model_url: 'https://cdn.jsdelivr.net/gh/mrdoob/three.js/examples/models/gltf/Xbot.glb' },
+// Bundled starter avatars — real GLBs shipped in /public, so the gallery is
+// never empty even before the public-avatars API responds. { src, name, thumb }.
+const STARTER_AVATARS = [
+ { name: 'Default', src: '/avatars/default.glb', thumb: '/avatars/thumbs/default.png' },
+ { name: 'CZ', src: '/avatars/cz.glb', thumb: '/avatars/thumbs/cz.png' },
+ { name: 'Robot', src: '/animations/robotexpressive.glb', thumb: '/avatars/thumbs/robotexpressive.png' },
+ { name: 'Soldier', src: '/animations/soldier.glb', thumb: '/avatars/thumbs/soldier.png' },
+ { name: 'Michelle', src: '/avatars/michelle.glb', thumb: '' },
+ { name: 'Xbot', src: '/avatars/xbot.glb', thumb: '' },
+ { name: 'Mannequin', src: '/avatars/mannequin.glb', thumb: '' },
+ { name: 'Fox', src: '/avatars/fox.glb', thumb: '' },
];
+const FALLBACK_THUMB = '/avatars/thumbs/default.png';
// ──────────────────────────────────────────────────────────────────────────
// Styles (single template literal; component is self-mounted into <body>)
@@ -268,16 +273,59 @@ const STYLE = `
}
.color-input input[type=text] { font-family: ui-monospace, monospace; text-transform: uppercase; }
- .avatar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 20px; }
- .avatar-tile {
- aspect-ratio: 1; background: #181b21;
- border: 1px solid #262b32; border-radius: 6px; cursor: pointer;
- display: flex; align-items: flex-end; justify-content: center;
- padding: 4px; font-size: 10px; color: #a1a1aa; text-align: center;
- overflow: hidden; transition: border 0.12s;
+ /* Avatar picker — My agents · Platform gallery · Custom URL */
+ .lsp-avatar-picker { display: flex; flex-direction: column; gap: 16px; padding: 0 16px; }
+ .lsp-section-label {
+ font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
+ text-transform: uppercase; color: #71717a; margin: 0 0 8px;
}
- .avatar-tile:hover { border-color: #3a4150; }
- .avatar-tile.active { border-color: #ffffff; box-shadow: inset 0 0 0 1px #ffffff; }
+ .lsp-strip {
+ display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px;
+ -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: #262b32 transparent;
+ }
+ .lsp-strip::-webkit-scrollbar { height: 6px; }
+ .lsp-strip::-webkit-scrollbar-thumb { background: #262b32; border-radius: 999px; }
+ .lsp-avatar-card {
+ flex: 0 0 auto; width: 64px; padding: 0; border: 0; background: transparent;
+ cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px;
+ font: inherit;
+ }
+ .lsp-avatar-card .thumb {
+ width: 64px; height: 64px; border-radius: 10px; object-fit: cover; display: block;
+ background: #181b21; border: 1px solid #262b32;
+ transition: border 0.12s, box-shadow 0.12s;
+ }
+ .lsp-avatar-card:hover .thumb { border-color: #3a4150; }
+ .lsp-avatar-card:focus-visible { outline: none; }
+ .lsp-avatar-card:focus-visible .thumb { box-shadow: 0 0 0 2px #ffffff; }
+ .lsp-avatar-card.is-selected .thumb { border-color: #ffffff; box-shadow: 0 0 0 4px rgba(255,255,255,0.2); }
+ .lsp-avatar-card .cap {
+ max-width: 64px; font-size: 10px; color: #a1a1aa; text-align: center;
+ overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
+ }
+ .lsp-avatar-card.is-selected .cap { color: #f4f4f5; }
+ .lsp-skel {
+ flex: 0 0 auto; width: 64px; height: 64px; border-radius: 10px;
+ background: linear-gradient(90deg, #181b21 25%, #20252c 50%, #181b21 75%);
+ background-size: 200% 100%; animation: lsp-shimmer 1.2s ease-in-out infinite;
+ }
+ @keyframes lsp-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
+ .lsp-more { flex: 0 0 auto; align-self: center; height: 64px; white-space: nowrap; }
+ .lsp-custom { border-top: 1px solid #1c2128; padding-top: 12px; }
+ .lsp-custom summary {
+ cursor: pointer; list-style: none; font-size: 12px; color: #a1a1aa;
+ padding: 2px 0; user-select: none;
+ }
+ .lsp-custom summary::-webkit-details-marker { display: none; }
+ .lsp-custom summary:hover { color: #f4f4f5; }
+ .lsp-custom[open] summary { color: #f4f4f5; margin-bottom: 8px; }
+ .lsp-custom input {
+ width: 100%; box-sizing: border-box; padding: 8px 10px; font: inherit; font-size: 12px;
+ color: #f4f4f5; background: #181b21; border: 1px solid #262b32; border-radius: 7px; outline: none;
+ font-family: ui-monospace, monospace;
+ }
+ .lsp-custom input:focus { border-color: #ffffff; }
+ .lsp-hint { color: #71717a; font-size: 11px; margin-top: 4px; line-height: 1.4; }
.skill-row {
display: grid; grid-template-columns: 1fr 90px 80px 28px;
@@ -584,14 +632,47 @@ function updateStage(stage, state) {
// ──────────────────────────────────────────────────────────────────────────
// Real-API helpers
// ──────────────────────────────────────────────────────────────────────────
-async function fetchPublicAvatars() {
+// Caller's own three.ws avatars (one per agent identity). Requires a session
+// cookie — anonymous visitors get 401, which we map to null so the "My agents"
+// section is hidden rather than erroring. Returns [{ src, name, thumb }].
+async function fetchMyAgentAvatars() {
try {
- const r = await fetch('/api/avatars/public?limit=18');
- if (!r.ok) return [];
+ const r = await fetch('/api/agents?owner=me&limit=20', { credentials: 'include' });
+ if (!r.ok) return null; // 401 (signed out) or transient — hide the section
const data = await r.json();
- return Array.isArray(data?.avatars) ? data.avatars : [];
+ const list = Array.isArray(data?.agents) ? data.agents : [];
+ return list
+ .map((a) => ({
+ src: a.avatar_model_url || a.meta?.avatar?.url || a.avatar_url || '',
+ thumb: a.avatar_thumbnail_url || a.meta?.avatar?.thumbnail_url || '',
+ name: a.name || 'Agent',
+ }))
+ .filter((a) => a.src);
} catch {
- return [];
+ return null;
+ }
+}
+
+// One page of the public avatar gallery (newest first, cursor-paginated).
+// Returns { items: [{ src, name, thumb }], nextCursor }.
+async function fetchPublicAvatars(cursor, limit = 12) {
+ try {
+ const u = new URL('/api/avatars/public', location.origin);
+ u.searchParams.set('limit', String(limit));
+ if (cursor) u.searchParams.set('cursor', cursor);
+ const r = await fetch(u, { credentials: 'include' });
+ if (!r.ok) return { items: [], nextCursor: null };
+ const data = await r.json();
+ const items = (Array.isArray(data?.avatars) ? data.avatars : [])
+ .map((a) => ({
+ src: a.model_url || a.glb_url || '',
+ thumb: a.thumbnail_url || '',
+ name: a.name || 'Avatar',
+ }))
+ .filter((a) => a.src);
+ return { items, nextCursor: data?.next_cursor || null };
+ } catch {
+ return { items: [], nextCursor: null };
}
}
async function fetchLaunchpad(slug) {
@@ -662,8 +743,8 @@ export function mountLaunchpadStudio(root, options = {}) {
<aside class="sidebar">
<h3>Templates</h3>
<div data-templates></div>
- <h3 style="margin-top: 18px">Avatars</h3>
- <div class="avatar-grid" data-avatar-grid></div>
+ <h3 style="margin-top: 18px">Avatar</h3>
+ <div class="lsp-avatar-picker" data-avatar-picker></div>
</aside>
<main class="stage" data-stage></main>
<aside class="rail" data-rail></aside>
@@ -691,29 +772,141 @@ export function mountLaunchpadStudio(root, options = {}) {
render();
});
- // Avatar gallery
- const avatarWrap = $('[data-avatar-grid]', root);
- function renderAvatars(list) {
- avatarWrap.innerHTML = list.map((a) => `
- <div class="avatar-tile ${a.model_url === state.avatar.src ? 'active' : ''}"
- data-avatar-src="${esc(a.model_url)}"
- data-avatar-name="${esc(a.name || a.id)}"
- title="${esc(a.name || a.id)}">
- ${esc((a.name || a.id || '').slice(0, 14))}
- </div>
- `).join('');
+ // Avatar picker — three sections: My agents · Platform gallery · Custom URL.
+ // Built once, then refreshed in place as the two data sources resolve. The
+ // live <agent-3d> preview is driven by render() (it swaps src on the
+ // persistent element), so selecting a card never re-mounts the viewer.
+ const pickerEl = $('[data-avatar-picker]', root);
+ let agentsLoading = true;
+ let galleryLoading = true;
+ let myAgents = [];
+ let galleryItems = [];
+ let galleryCursor = null;
+ let galleryDone = false;
+ let galleryLoadingMore = false;
+ let customExpanded = false;
+ const seenSrc = new Set(STARTER_AVATARS.map((a) => a.src));
+
+ const isCustomUrl = (src) => Boolean(src) && !seenSrc.has(src);
+
+ function avatarCardHTML(item) {
+ const selected = item.src === state.avatar.src;
+ const thumb = item.thumb || FALLBACK_THUMB;
+ return `
+ <button class="lsp-avatar-card${selected ? ' is-selected' : ''}" type="button"
+ data-avatar-src="${esc(item.src)}" data-avatar-name="${esc(item.name)}"
+ aria-pressed="${selected}" aria-label="Use ${esc(item.name)} avatar" title="${esc(item.name)}">
+ <img class="thumb" loading="lazy" alt="" src="${esc(thumb)}"
+ onerror="this.onerror=null;this.src='${FALLBACK_THUMB}'" />
+ <span class="cap">${esc(item.name)}</span>
+ </button>`;
+ }
+ const section = (label, inner) =>
+ `<div class="lsp-section"><div class="lsp-section-label">${esc(label)}</div><div class="lsp-strip">${inner}</div></div>`;
+ const skeletonStrip = () => Array.from({ length: 5 }).map(() => '<div class="lsp-skel"></div>').join('');
+
+ function renderPicker() {
+ let html = '';
+ // Section 1 — My agents (only when signed in and at least one has an avatar)
+ if (agentsLoading) {
+ html += section('My agents', skeletonStrip());
+ } else if (myAgents.length) {
+ html += section('My agents', myAgents.map(avatarCardHTML).join(''));
+ }
+ // Section 2 — Platform gallery (starter avatars + public gallery, paginated)
+ if (galleryLoading) {
+ html += section('Platform gallery', skeletonStrip());
+ } else {
+ const cards = [...STARTER_AVATARS, ...galleryItems].map(avatarCardHTML).join('');
+ const more = galleryDone
+ ? ''
+ : `<button class="btn tiny lsp-more" type="button" data-action="gallery-more"${galleryLoadingMore ? ' disabled' : ''}>${galleryLoadingMore ? 'Loading…' : 'Show more'}</button>`;
+ html += section('Platform gallery', cards + more);
+ }
+ // Section 3 — Custom URL (collapsed; power-user fallback)
+ const open = customExpanded || isCustomUrl(state.avatar.src);
+ html += `
+ <details class="lsp-custom"${open ? ' open' : ''}>
+ <summary>Or enter a URL →</summary>
+ <div class="lsp-custom-body">
+ <input type="url" data-avatar-url spellcheck="false" placeholder="https://.../avatar.glb"
+ value="${isCustomUrl(state.avatar.src) ? esc(state.avatar.src) : ''}" />
+ <div class="lsp-hint">Direct link to a hosted .glb or .gltf model.</div>
+ </div>
+ </details>`;
+ pickerEl.innerHTML = html;
+ }
+
+ // Lightweight highlight refresh — called from render() so card selection
+ // stays in sync without rebuilding (and losing scroll position / focus).
+ function syncPickerSelection() {
+ pickerEl.querySelectorAll('[data-avatar-src]').forEach((el) => {
+ const selected = el.dataset.avatarSrc === state.avatar.src;
+ el.classList.toggle('is-selected', selected);
+ el.setAttribute('aria-pressed', String(selected));
+ });
}
- renderAvatars(DEMO_AVATARS);
- fetchPublicAvatars().then((extras) => {
- const seen = new Set(DEMO_AVATARS.map((a) => a.model_url));
- renderAvatars([...DEMO_AVATARS, ...extras.filter((a) => a.model_url && !seen.has(a.model_url))]);
+
+ async function loadMoreGallery() {
+ if (galleryLoadingMore || galleryDone) return;
+ galleryLoadingMore = true;
+ renderPicker();
+ const { items, nextCursor } = await fetchPublicAvatars(galleryCursor);
+ const fresh = items.filter((a) => {
+ if (seenSrc.has(a.src)) return false;
+ seenSrc.add(a.src);
+ return true;
+ });
+ galleryItems = galleryItems.concat(fresh);
+ galleryCursor = nextCursor;
+ galleryDone = !nextCursor;
+ galleryLoadingMore = false;
+ renderPicker();
+ }
+
+ renderPicker(); // skeletons first
+
+ Promise.allSettled([fetchMyAgentAvatars(), fetchPublicAvatars(null)]).then(([agentsRes, galRes]) => {
+ const agents = agentsRes.status === 'fulfilled' ? agentsRes.value : null;
+ myAgents = Array.isArray(agents) ? agents : [];
+ myAgents.forEach((a) => seenSrc.add(a.src)); // don't repeat an agent's avatar in the gallery
+ agentsLoading = false;
+
+ const gal = galRes.status === 'fulfilled' ? galRes.value : { items: [], nextCursor: null };
+ galleryItems = gal.items.filter((a) => {
+ if (seenSrc.has(a.src)) return false;
+ seenSrc.add(a.src);
+ return true;
+ });
+ galleryCursor = gal.nextCursor;
+ galleryDone = !gal.nextCursor;
+ galleryLoading = false;
+ renderPicker();
});
- avatarWrap.addEventListener('click', (e) => {
- const tile = e.target.closest('[data-avatar-src]');
- if (!tile) return;
- state.avatar = { src: tile.dataset.avatarSrc, name: tile.dataset.avatarName };
+
+ pickerEl.addEventListener('click', (e) => {
+ if (e.target.closest('[data-action="gallery-more"]')) {
+ e.preventDefault();
+ loadMoreGallery();
+ return;
+ }
+ const card = e.target.closest('[data-avatar-src]');
+ if (!card) return;
+ state.avatar = { src: card.dataset.avatarSrc, name: card.dataset.avatarName || 'Avatar' };
+ render();
+ });
+ pickerEl.addEventListener('input', (e) => {
+ const inp = e.target.closest('[data-avatar-url]');
+ if (!inp) return;
+ const url = inp.value.trim();
+ state.avatar = url ? { src: url, name: 'Custom URL' } : { src: DEFAULT_AVATAR_SRC, name: 'Default' };
render();
});
+ // Remember a manual expand so a gallery "Show more" rebuild doesn't collapse it.
+ pickerEl.addEventListener('toggle', (e) => {
+ const d = e.target.closest('.lsp-custom');
+ if (d) customExpanded = d.open;
+ }, true);
// Topbar + global actions (delegated)
let recentDropdown = null;
@@ -936,9 +1129,7 @@ export function mountLaunchpadStudio(root, options = {}) {
root.querySelectorAll('[data-template-id]').forEach((el) => {
el.classList.toggle('active', el.dataset.templateId === state.template);
});
- root.querySelectorAll('[data-avatar-src]').forEach((el) => {
- el.classList.toggle('active', el.dataset.avatarSrc === state.avatar.src);
- });
+ syncPickerSelection();
}
function render({ force = false } = {}) {
diff --git a/src/launches.js b/src/launches.js
index 24ab31b46..6916bb8d9 100644
--- a/src/launches.js
+++ b/src/launches.js
@@ -21,7 +21,6 @@
import { mountCoinStatus } from './pump/coin-status-card.js';
const PAGE_SIZE = 24;
-const ENRICH_CONCURRENCY = 4;
const LIVE_REFRESH_MS = 60_000;
const state = {
@@ -82,14 +81,6 @@ function timeAgo(iso) {
return new Date(t).toLocaleDateString(undefined, { month: 'short', day: 'numeric', year: 'numeric' });
}
-function usdCompact(n) {
- if (!Number.isFinite(n)) return '—';
- if (n >= 1e9) return `$${(n / 1e9).toFixed(2)}B`;
- if (n >= 1e6) return `$${(n / 1e6).toFixed(2)}M`;
- if (n >= 1e3) return `$${(n / 1e3).toFixed(1)}K`;
- return `$${n.toFixed(0)}`;
-}
-
// ── generative identicons ────────────────────────────────────────────────────
// Every mint address deterministically produces its own orbital glyph: ring
// radii, dash rhythms, satellite positions and rotation all derive from a
@@ -412,37 +403,43 @@ function launchCard(launch, index, { featured = false } = {}) {
);
}
+ // Abstract orbital glyph seeded from the mint — the coin's visual fingerprint
+ // alongside the live market panel below it.
const art = el('div', { class: 'lx-coin-art' });
art.appendChild(mintIdenticon(launch.mint));
- art.appendChild(el('img', { class: 'lx-coin-img', alt: '', loading: 'lazy' }));
+
+ // Live market panel. Mainnet coins stream price / market cap / graduation
+ // through the shared coin-status widget (single /api/pump/coin fetch, mapped
+ // and formatted once). Devnet mints have no pump.fun market data, so they
+ // fall back to a static identity line.
+ const market = el('div', { class: 'lx-market' });
+ if (isDevnet) {
+ market.appendChild(
+ el('div', { class: 'lx-market-devnet' }, [
+ el('h3', { class: 'lx-coin-name', text: launch.name || launch.symbol || 'Unnamed coin' }),
+ el('span', { class: 'lx-coin-symbol', text: launch.symbol ? `$${launch.symbol}` : shortAddr(launch.mint) }),
+ el('span', { class: 'lx-badge', text: 'Devnet · no market data' }),
+ ]),
+ );
+ }
const card = el('article', { class: `lx-card${featured ? ' lx-card-featured' : ''}` }, [
featured ? el('span', { class: 'lx-feat-tag', text: 'Latest' }) : null,
featured && launch.symbol
? el('span', { class: 'lx-feat-ghost', 'aria-hidden': 'true', text: `$${launch.symbol}` })
: null,
- el('div', { class: 'lx-card-top' }, [
- art,
- el('div', { class: 'lx-coin-id' }, [
- el('h3', { class: 'lx-coin-name', text: launch.name || launch.symbol || 'Unnamed coin' }),
- el('span', { class: 'lx-coin-symbol', text: launch.symbol ? `$${launch.symbol}` : shortAddr(launch.mint) }),
- ]),
- ]),
+ el('div', { class: 'lx-card-top' }, [art, market]),
badges,
- el('div', { class: 'lx-stats' }, [
- el('div', {}, [
- el('span', { class: 'lx-mcap-label', text: 'Market cap' }),
- el('span', { class: 'lx-mcap lx-mcap-value', text: isDevnet ? 'n/a' : '…' }),
- ]),
- el('time', { class: 'lx-time', datetime: launch.created_at, text: timeAgo(launch.created_at) }),
- ]),
+ el('time', { class: 'lx-time', datetime: launch.created_at, text: timeAgo(launch.created_at) }),
agentChip(launch.agent),
el('div', { class: 'lx-card-actions' }, actions),
el('span', { class: 'lx-mint', text: launch.mint, title: launch.mint }),
]);
reveal(card, index);
- if (!isDevnet) queueEnrich(launch.mint, card);
+ if (!isDevnet) {
+ cardStatusHandles.add(mountCoinStatus(market, launch.mint, { variant: 'card' }));
+ }
return card;
}
@@ -587,6 +584,7 @@ async function loadPage({ reset = false } = {}) {
state.hasMore = false;
state.seenMints = new Set();
state.latestCreatedAt = null;
+ teardownStatusHandles(); // stop refresh timers from the cards we're about to drop
feedEl.textContent = '';
footerEl.textContent = '';
countEl.textContent = '';