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(launches): expand launches page UI and interactions

nirholas10cf73d85887
diff --git a/pages/launches.html b/pages/launches.html
index c9b84944e..024d4dad2 100644
--- a/pages/launches.html
+++ b/pages/launches.html
@@ -45,20 +45,50 @@
<header><div id="nav-container"></div></header>
<script src="/nav.js"></script>
+ <!-- Ambient field — drifting particle constellation behind everything.
+ Decorative only: pointer-events none, paused on hidden tab and
+ prefers-reduced-motion. -->
+ <canvas id="lx-field" aria-hidden="true"></canvas>
+ <div class="lx-aurora" aria-hidden="true"></div>
+
<main class="lx-shell" aria-labelledby="lx-title">
<section class="lx-hero">
- <p class="lx-kicker">Live from the chain</p>
- <h1 id="lx-title">Agent Launches</h1>
+ <p class="lx-kicker">
+ <span class="lx-live-dot" aria-hidden="true"></span>
+ Live from the chain
+ </p>
+ <h1 id="lx-title" class="lx-title" data-text="LAUNCHES">
+ <span class="lx-title-line">AGENT</span>
+ <span class="lx-title-line lx-title-em">LAUNCHES</span>
+ </h1>
<p class="lx-sub">
- Every coin launched by a three.ws agent, newest first — with live market caps,
- graduation status, and a direct line to the agent behind it.
+ Every coin born from a three.ws agent, the moment it happens — live market caps,
+ graduation status, and a direct line to the mind behind each mint.
</p>
<div class="lx-hero-ctas">
<a class="lx-btn lx-btn-primary" href="/create-agent">Create an agent</a>
<a class="lx-btn" href="/agents">Browse agents</a>
</div>
+ <dl class="lx-stats-row" aria-label="Feed statistics">
+ <div class="lx-stat">
+ <dt>Launches</dt>
+ <dd id="lx-stat-count">—</dd>
+ </div>
+ <div class="lx-stat">
+ <dt>Latest</dt>
+ <dd id="lx-stat-latest">—</dd>
+ </div>
+ <div class="lx-stat">
+ <dt>Network</dt>
+ <dd id="lx-stat-network">mainnet</dd>
+ </div>
+ </dl>
</section>
+ <div id="lx-ticker" class="lx-ticker" aria-hidden="true" hidden>
+ <div class="lx-ticker-track" id="lx-ticker-track"></div>
+ </div>
+
<section class="lx-toolbar" aria-label="Feed filters">
<div class="lx-net-toggle" role="tablist" aria-label="Network">
<button
@@ -90,7 +120,7 @@
</main>
<script type="module" src="/src/launches.js"></script>
- <script defer src="/brand.js"></script>
+ <script src="/brand.js" defer></script>
<div id="footer-container"></div>
<script src="/footer.js"></script>
</body>
diff --git a/src/launches.css b/src/launches.css
index d7c721486..8b382318c 100644
--- a/src/launches.css
+++ b/src/launches.css
@@ -1,47 +1,192 @@
/* /launches — public feed of coins launched by three.ws agents.
- Token-driven (public/tokens.css via nav.css); no hardcoded palette. */
+ Token-driven (public/tokens.css via nav.css); no hardcoded palette.
+
+ Visual language: editorial monochrome futurism. Oversized kinetic display
+ type, an ambient particle field, glass cards lit by the cursor, generative
+ identicons seeded from each mint. Every effect degrades gracefully:
+ reduced-motion gets a calm static page, light theme remaps via tokens. */
body {
margin: 0;
background: var(--bg-0);
color: var(--ink);
font-family: var(--font-body);
+ overflow-x: hidden;
+}
+
+/* ── Ambient layers ───────────────────────────────────────────────────────── */
+
+#lx-field {
+ position: fixed;
+ inset: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 0;
+ pointer-events: none;
+ opacity: 0.85;
+}
+
+.lx-aurora {
+ position: fixed;
+ inset: -20%;
+ z-index: 0;
+ pointer-events: none;
+ background:
+ radial-gradient(38% 30% at 18% 12%, var(--accent-soft), transparent 70%),
+ radial-gradient(30% 26% at 84% 30%, var(--surface-3), transparent 70%),
+ radial-gradient(42% 36% at 55% 95%, var(--surface-2), transparent 72%);
+ filter: blur(48px);
+ animation: lx-aurora-drift 26s var(--ease-standard) infinite alternate;
+}
+
+@keyframes lx-aurora-drift {
+ from {
+ transform: translate3d(-1.5%, -1%, 0) scale(1);
+ }
+ to {
+ transform: translate3d(1.5%, 2%, 0) scale(1.06);
+ }
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .lx-aurora {
+ animation: none;
+ }
}
.lx-shell {
- max-width: 1120px;
+ position: relative;
+ z-index: 1;
+ max-width: 1180px;
margin: 0 auto;
- padding: calc(var(--header-h) + var(--space-xl)) var(--space-lg) var(--space-2xl);
+ padding: calc(var(--header-h) + var(--space-2xl)) var(--space-lg) var(--space-2xl);
}
/* ── Hero ─────────────────────────────────────────────────────────────────── */
.lx-hero {
- text-align: center;
+ position: relative;
margin-bottom: var(--space-xl);
}
.lx-kicker {
+ display: inline-flex;
+ align-items: center;
+ gap: var(--space-xs);
font-size: var(--text-sm);
font-weight: var(--weight-semibold);
- letter-spacing: 0.14em;
+ letter-spacing: 0.22em;
text-transform: uppercase;
- color: var(--ink-faint);
- margin: 0 0 var(--space-sm);
+ color: var(--ink-dim);
+ margin: 0 0 var(--space-md);
+ padding: var(--space-xs) var(--space-sm);
+ border: 1px solid var(--stroke);
+ border-radius: var(--radius-pill);
+ background: var(--surface-1);
+ backdrop-filter: blur(var(--blur-sm));
+}
+
+.lx-live-dot {
+ width: 7px;
+ height: 7px;
+ border-radius: 50%;
+ background: var(--success);
+ box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 55%, transparent);
+ animation: lx-pulse 2.4s var(--ease-out) infinite;
+}
+
+@keyframes lx-pulse {
+ 0% {
+ box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 55%, transparent);
+ }
+ 70% {
+ box-shadow: 0 0 0 9px transparent;
+ }
+ 100% {
+ box-shadow: 0 0 0 0 transparent;
+ }
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .lx-live-dot {
+ animation: none;
+ }
}
-.lx-hero h1 {
+/* Massive editorial display type. Two stacked lines; the second carries a
+ ghost echo (data-text) drifting behind it for depth. */
+.lx-title {
+ margin: 0 0 var(--space-md);
font-family: var(--font-display);
- font-size: var(--text-2xl);
font-weight: var(--weight-bold);
- line-height: var(--leading-tight);
+ line-height: 0.92;
+ letter-spacing: -0.035em;
+ font-size: clamp(3rem, 11vw, 7.5rem);
+ text-transform: uppercase;
color: var(--ink-bright);
- margin: 0 0 var(--space-sm);
+ position: relative;
+}
+
+.lx-title-line {
+ display: block;
+}
+
+.lx-title-em {
+ position: relative;
+ background: linear-gradient(
+ 100deg,
+ var(--ink-bright) 0%,
+ var(--ink-bright) 38%,
+ var(--ink-dim) 50%,
+ var(--ink-bright) 62%,
+ var(--ink-bright) 100%
+ );
+ background-size: 240% 100%;
+ -webkit-background-clip: text;
+ background-clip: text;
+ -webkit-text-fill-color: transparent;
+ animation: lx-sheen 7s var(--ease-standard) infinite;
+}
+
+@keyframes lx-sheen {
+ 0%,
+ 55% {
+ background-position: 120% 0;
+ }
+ 85%,
+ 100% {
+ background-position: -120% 0;
+ }
+}
+
+/* Ghost echo of the second line — pure outline, offset behind. */
+.lx-title::after {
+ content: attr(data-text);
+ position: absolute;
+ left: 0.18em;
+ bottom: -0.34em;
+ z-index: -1;
+ font-size: 1em;
+ line-height: 0.92;
+ color: transparent;
+ -webkit-text-stroke: 1px var(--stroke-strong);
+ opacity: 0.55;
+ pointer-events: none;
+ user-select: none;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .lx-title-em {
+ animation: none;
+ background: none;
+ -webkit-text-fill-color: currentColor;
+ color: var(--ink-bright);
+ }
}
.lx-sub {
- max-width: 560px;
- margin: 0 auto var(--space-lg);
+ max-width: 520px;
+ margin: 0 0 var(--space-lg);
font-size: var(--text-base);
line-height: var(--leading-normal);
color: var(--ink-dim);
@@ -50,8 +195,8 @@ body {
.lx-hero-ctas {
display: flex;
gap: var(--space-sm);
- justify-content: center;
flex-wrap: wrap;
+ margin-bottom: var(--space-lg);
}
.lx-btn {
@@ -65,19 +210,24 @@ body {
color: var(--ink);
font-size: var(--text-ui);
font-weight: var(--weight-medium);
+ font-family: var(--font-body);
text-decoration: none;
cursor: pointer;
+ backdrop-filter: blur(var(--blur-sm));
transition:
background var(--duration-fast) var(--ease-standard),
+ border-color var(--duration-fast) var(--ease-standard),
transform var(--duration-fast) var(--ease-standard);
}
.lx-btn:hover {
background: var(--surface-3);
+ border-color: var(--ink-faint);
+ transform: translateY(-1px);
}
.lx-btn:active {
- transform: translateY(1px);
+ transform: translateY(0);
}
.lx-btn:focus-visible {
@@ -100,6 +250,97 @@ body {
opacity: 0.88;
}
+/* The sitewide feature-discovery badge is unreadable on the accent-filled CTA
+ and redundant there (the button IS the call to the new page). */
+.lx-btn-primary .tws-disc-new {
+ display: none;
+}
+
+/* Hero stats — thin editorial data row */
+.lx-stats-row {
+ display: flex;
+ gap: var(--space-xl);
+ margin: 0;
+ padding: var(--space-md) 0 0;
+ border-top: 1px solid var(--stroke);
+ flex-wrap: wrap;
+}
+
+.lx-stat dt {
+ font-size: var(--text-2xs);
+ letter-spacing: 0.18em;
+ text-transform: uppercase;
+ color: var(--ink-faint);
+ margin: 0 0 var(--space-2xs);
+}
+
+.lx-stat dd {
+ margin: 0;
+ font-family: var(--font-mono);
+ font-size: var(--text-lg);
+ font-weight: var(--weight-semibold);
+ color: var(--ink-bright);
+ font-variant-numeric: tabular-nums;
+}
+
+/* ── Ticker ───────────────────────────────────────────────────────────────── */
+
+.lx-ticker {
+ position: relative;
+ margin: 0 calc(-1 * var(--space-lg)) var(--space-xl);
+ padding: var(--space-sm) 0;
+ border-top: 1px solid var(--stroke);
+ border-bottom: 1px solid var(--stroke);
+ overflow: hidden;
+ mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
+ -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
+}
+
+.lx-ticker-track {
+ display: inline-flex;
+ gap: var(--space-xl);
+ white-space: nowrap;
+ will-change: transform;
+ animation: lx-marquee var(--lx-marquee-duration, 40s) linear infinite;
+}
+
+.lx-ticker:hover .lx-ticker-track {
+ animation-play-state: paused;
+}
+
+@keyframes lx-marquee {
+ from {
+ transform: translateX(0);
+ }
+ to {
+ transform: translateX(-50%);
+ }
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .lx-ticker {
+ display: none;
+ }
+}
+
+.lx-tick {
+ display: inline-flex;
+ align-items: baseline;
+ gap: var(--space-sm);
+ font-family: var(--font-mono);
+ font-size: var(--text-sm);
+ color: var(--ink-dim);
+}
+
+.lx-tick b {
+ color: var(--ink-bright);
+ font-weight: var(--weight-semibold);
+}
+
+.lx-tick .up {
+ color: var(--success);
+}
+
/* ── Toolbar ──────────────────────────────────────────────────────────────── */
.lx-toolbar {
@@ -108,6 +349,15 @@ body {
gap: var(--space-md);
flex-wrap: wrap;
margin-bottom: var(--space-lg);
+ position: sticky;
+ top: calc(var(--header-h) + var(--space-xs));
+ z-index: 5;
+ padding: var(--space-xs);
+ margin-left: calc(-1 * var(--space-xs));
+ margin-right: calc(-1 * var(--space-xs));
+ border-radius: var(--radius-lg);
+ background: color-mix(in srgb, var(--bg-0) 72%, transparent);
+ backdrop-filter: blur(var(--blur-md));
}
.lx-net-toggle {
@@ -188,8 +438,10 @@ body {
.lx-count {
margin-left: auto;
+ font-family: var(--font-mono);
font-size: var(--text-sm);
color: var(--ink-faint);
+ font-variant-numeric: tabular-nums;
}
/* ── Feed grid ────────────────────────────────────────────────────────────── */
@@ -198,60 +450,189 @@ body {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
gap: var(--space-md);
+ grid-auto-flow: dense;
}
+/* Cursor-lit glass card. --mx/--my are set per-card by pointer tracking;
+ the ::before sheet paints a radial light where the cursor is, the ::after
+ sheet paints a matching border glow. */
.lx-card {
+ --mx: 50%;
+ --my: 50%;
+ position: relative;
display: flex;
flex-direction: column;
gap: var(--space-sm);
padding: var(--space-md);
border: 1px solid var(--stroke);
border-radius: var(--radius-lg);
- background: var(--surface-1);
+ background:
+ linear-gradient(165deg, var(--surface-2), transparent 55%),
+ var(--surface-1);
box-shadow: var(--shadow-1);
+ backdrop-filter: blur(var(--blur-sm));
opacity: 0;
- transform: translateY(6px);
- animation: lx-enter var(--duration-base) var(--ease-emphasized) forwards;
+ transform: translateY(16px) scale(0.985);
+ overflow: hidden;
transition:
+ opacity var(--duration-slow) var(--ease-emphasized),
+ transform var(--duration-slow) var(--ease-emphasized),
border-color var(--duration-fast) var(--ease-standard),
- background var(--duration-fast) var(--ease-standard),
- box-shadow var(--duration-fast) var(--ease-standard);
+ box-shadow var(--duration-base) var(--ease-standard);
+}
+
+.lx-card.lx-in {
+ opacity: 1;
+ transform: none;
+}
+
+.lx-card::before {
+ content: '';
+ position: absolute;
+ inset: 0;
+ background: radial-gradient(
+ 320px circle at var(--mx) var(--my),
+ var(--accent-soft),
+ transparent 65%
+ );
+ opacity: 0;
+ transition: opacity var(--duration-base) var(--ease-standard);
+ pointer-events: none;
}
.lx-card:hover {
border-color: var(--stroke-strong);
- background: var(--surface-2);
- box-shadow: var(--shadow-2);
+ box-shadow: var(--shadow-3);
}
-@keyframes lx-enter {
- to {
- opacity: 1;
- transform: translateY(0);
- }
+.lx-card:hover::before {
+ opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
.lx-card {
- animation: none;
+ transition: none;
opacity: 1;
transform: none;
}
}
+/* Featured (newest) launch — double-width editorial cell */
+.lx-card-featured {
+ grid-column: span 2;
+ padding: var(--space-lg);
+}
+
+.lx-card-featured .lx-coin-art {
+ width: 72px;
+ height: 72px;
+}
+
+.lx-card-featured .lx-coin-name {
+ font-size: var(--text-xl);
+ letter-spacing: -0.02em;
+ white-space: normal;
+}
+
+.lx-card-featured .lx-mcap {
+ font-size: var(--text-xl);
+}
+
+.lx-feat-tag {
+ position: absolute;
+ top: var(--space-md);
+ right: var(--space-md);
+ font-size: var(--text-2xs);
+ font-weight: var(--weight-semibold);
+ letter-spacing: 0.2em;
+ text-transform: uppercase;
+ color: var(--success);
+ display: inline-flex;
+ align-items: center;
+ gap: var(--space-2xs);
+}
+
+.lx-feat-tag::before {
+ content: '';
+ width: 6px;
+ height: 6px;
+ border-radius: 50%;
+ background: var(--success);
+}
+
+/* Oversized outline echo of the coin's symbol fills the featured card's
+ negative space — same ghost language as the hero title. */
+.lx-feat-ghost {
+ position: absolute;
+ right: -0.06em;
+ bottom: -0.32em;
+ font-family: var(--font-display);
+ font-weight: var(--weight-bold);
+ font-size: clamp(4rem, 9vw, 7rem);
+ letter-spacing: -0.04em;
+ line-height: 1;
+ color: transparent;
+ -webkit-text-stroke: 1px var(--stroke-strong);
+ opacity: 0.6;
+ pointer-events: none;
+ user-select: none;
+ white-space: nowrap;
+}
+
+@media (max-width: 620px) {
+ .lx-card-featured {
+ grid-column: span 1;
+ }
+
+ .lx-feat-ghost {
+ display: none;
+ }
+}
+
.lx-card-top {
display: flex;
align-items: center;
gap: var(--space-sm);
+ position: relative;
}
-.lx-coin-img {
- width: 44px;
- height: 44px;
+/* Coin art — generative identicon underneath, real coin image crossfades in
+ on top once pump.fun metadata arrives. */
+.lx-coin-art {
+ position: relative;
+ width: 48px;
+ height: 48px;
border-radius: var(--radius-md);
- object-fit: cover;
- background: var(--surface-3);
+ overflow: hidden;
flex-shrink: 0;
+ background: var(--surface-2);
+ border: 1px solid var(--stroke);
+}
+
+.lx-coin-art svg {
+ position: absolute;
+ inset: 0;
+ width: 100%;
+ height: 100%;
+ transition: transform calc(var(--duration-slow) * 2) var(--ease-standard);
+}
+
+.lx-card:hover .lx-coin-art svg {
+ transform: rotate(40deg) scale(1.15);
+}
+
+.lx-coin-img {
+ position: absolute;
+ inset: 0;
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ opacity: 0;
+ transition: opacity var(--duration-slow) var(--ease-standard);
+}
+
+.lx-coin-img.lx-img-in {
+ opacity: 1;
}
.lx-coin-id {
@@ -279,6 +660,7 @@ body {
display: flex;
gap: var(--space-2xs);
flex-wrap: wrap;
+ min-height: 1.1em;
}
.lx-badge {
@@ -315,17 +697,19 @@ body {
font-size: var(--text-lg);
font-weight: var(--weight-semibold);
color: var(--ink-bright);
+ font-variant-numeric: tabular-nums;
}
.lx-mcap-label {
font-size: var(--text-2xs);
- letter-spacing: 0.08em;
+ letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--ink-faint);
display: block;
}
.lx-time {
+ font-family: var(--font-mono);
font-size: var(--text-sm);
color: var(--ink-faint);
white-space: nowrap;
@@ -342,12 +726,20 @@ body {
text-decoration: none;
color: var(--ink);
font-size: var(--text-md);
- transition: background var(--duration-fast) var(--ease-standard);
+ transition:
+ background var(--duration-fast) var(--ease-standard),
+ border-color var(--duration-fast) var(--ease-standard);
min-width: 0;
}
.lx-agent-row:hover {
background: var(--surface-3);
+ border-color: var(--stroke-strong);
+}
+
+.lx-agent-row:hover .lx-agent-hint {
+ transform: translateX(2px);
+ color: var(--ink);
}
.lx-agent-row:focus-visible {
@@ -385,6 +777,9 @@ body {
color: var(--ink-faint);
font-size: var(--text-sm);
flex-shrink: 0;
+ transition:
+ transform var(--duration-fast) var(--ease-standard),
+ color var(--duration-fast) var(--ease-standard);
}
.lx-card-actions {
@@ -428,6 +823,10 @@ body {
font-family: var(--font-mono);
font-size: var(--text-2xs);
color: var(--ink-faint);
+ letter-spacing: 0.02em;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
}
/* ── Skeletons ────────────────────────────────────────────────────────────── */
@@ -473,6 +872,8 @@ body {
border: 1px dashed var(--stroke-strong);
border-radius: var(--radius-lg);
color: var(--ink-dim);
+ background: var(--surface-1);
+ backdrop-filter: blur(var(--blur-sm));
}
.lx-state h2 {
@@ -497,14 +898,25 @@ body {
/* ── Responsive ───────────────────────────────────────────────────────────── */
+@media (max-width: 640px) {
+ .lx-title::after {
+ opacity: 0.28;
+ }
+}
+
@media (max-width: 480px) {
.lx-shell {
padding-left: var(--space-md);
padding-right: var(--space-md);
}
- .lx-hero h1 {
- font-size: var(--text-xl);
+ .lx-ticker {
+ margin-left: calc(-1 * var(--space-md));
+ margin-right: calc(-1 * var(--space-md));
+ }
+
+ .lx-stats-row {
+ gap: var(--space-lg);
}
.lx-count {
diff --git a/src/launches.js b/src/launches.js
index 6956234a7..a4c0daa25 100644
--- a/src/launches.js
+++ b/src/launches.js
@@ -8,10 +8,19 @@
*
* Registry rows render immediately; market data (price, image, graduation)
* streams in per card afterwards so the feed never blocks on pump.fun.
+ *
+ * Visual systems (all decorative, all real-data-driven):
+ * · generative identicon per coin, seeded from its mint address — the coin's
+ * visual fingerprint until pump.fun art crossfades in over it
+ * · ambient particle field on a fixed canvas behind the page
+ * · marquee ticker built from the first page of real launches
+ * · cursor-tracked light on each card (--mx/--my custom properties)
+ * · 60s live refresh that prepends genuinely new launches in place
*/
const PAGE_SIZE = 24;
const ENRICH_CONCURRENCY = 4;
+const LIVE_REFRESH_MS = 60_000;
const state = {
network: 'mainnet',
@@ -20,12 +29,21 @@ const state = {
hasMore: false,
loading: false,
count: 0,
+ seenMints: new Set(),
+ latestCreatedAt: null,
};
const feedEl = document.getElementById('lx-feed');
const footerEl = document.getElementById('lx-footer-state');
const countEl = document.getElementById('lx-count');
const agentFilterEl = document.getElementById('lx-agent-filter');
+const tickerEl = document.getElementById('lx-ticker');
+const tickerTrackEl = document.getElementById('lx-ticker-track');
+const statCountEl = document.getElementById('lx-stat-count');
+const statLatestEl = document.getElementById('lx-stat-latest');
+const statNetworkEl = document.getElementById('lx-stat-network');
+
+const REDUCED_MOTION = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
// ── helpers ──────────────────────────────────────────────────────────────────
@@ -70,20 +88,232 @@ function usdCompact(n) {
return `$${n.toFixed(0)}`;
}
-const GRADIENTS = [
- ['#555577', '#4f46e5'],
- ['#0ea5e9', '#ffffff'],
- ['#10b981', '#0ea5e9'],
- ['#f59e0b', '#ef4444'],
- ['#ec4899', '#ffffff'],
- ['#14b8a6', '#3b82f6'],
-];
-
-function coinFallbackUri(symbol) {
- const [c1, c2] = GRADIENTS[(symbol?.charCodeAt(0) || 0) % GRADIENTS.length];
- const letter = (symbol || '?')[0].toUpperCase();
- const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="88" height="88" viewBox="0 0 88 88"><defs><linearGradient id="g" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="${c1}"/><stop offset="1" stop-color="${c2}"/></linearGradient></defs><rect width="88" height="88" rx="14" fill="url(#g)"/><text x="50%" y="56%" text-anchor="middle" font-family="Inter,system-ui,sans-serif" font-size="42" font-weight="600" fill="white">${letter}</text></svg>`;
- return `data:image/svg+xml;utf8,${encodeURIComponent(svg)}`;
+// ── generative identicons ────────────────────────────────────────────────────
+// Every mint address deterministically produces its own orbital glyph: ring
+// radii, dash rhythms, satellite positions and rotation all derive from a
+// seeded PRNG over the address. Monochrome via currentColor so themes remap.
+
+function hashString(str) {
+ let h = 2166136261;
+ for (let i = 0; i < str.length; i++) {
+ h ^= str.charCodeAt(i);
+ h = Math.imul(h, 16777619);
+ }
+ return h >>> 0;
+}
+
+function mulberry32(seed) {
+ let a = seed;
+ return () => {
+ a |= 0;
+ a = (a + 0x6d2b79f5) | 0;
+ let t = Math.imul(a ^ (a >>> 15), 1 | a);
+ t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;
+ return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
+ };
+}
+
+const SVG_NS = 'http://www.w3.org/2000/svg';
+
+function svgEl(tag, attrs) {
+ const node = document.createElementNS(SVG_NS, tag);
+ for (const [k, v] of Object.entries(attrs)) node.setAttribute(k, v);
+ return node;
+}
+
+function mintIdenticon(mint) {
+ const rand = mulberry32(hashString(String(mint)));
+ const svg = svgEl('svg', { viewBox: '0 0 64 64', 'aria-hidden': 'true' });
+ svg.style.color = 'var(--ink-dim)';
+
+ const cx = 32;
+ const cy = 32;
+ const rings = 3 + Math.floor(rand() * 2);
+ for (let i = 0; i < rings; i++) {
+ const r = 8 + i * (20 / rings) + rand() * 4;
+ const circumference = 2 * Math.PI * r;
+ const dashOn = circumference * (0.18 + rand() * 0.55);
+ const ring = svgEl('circle', {
+ cx,
+ cy,
+ r: r.toFixed(1),
+ fill: 'none',
+ stroke: 'currentColor',
+ 'stroke-width': (0.7 + rand() * 0.9).toFixed(2),
+ 'stroke-dasharray': `${dashOn.toFixed(1)} ${(circumference - dashOn).toFixed(1)}`,
+ 'stroke-linecap': 'round',
+ opacity: (0.3 + rand() * 0.45).toFixed(2),
+ transform: `rotate(${Math.floor(rand() * 360)} ${cx} ${cy})`,
+ });
+ svg.appendChild(ring);
+
+ // One satellite riding this orbit.
+ if (rand() > 0.35) {
+ const theta = rand() * Math.PI * 2;
+ svg.appendChild(
+ svgEl('circle', {
+ cx: (cx + Math.cos(theta) * r).toFixed(1),
+ cy: (cy + Math.sin(theta) * r).toFixed(1),
+ r: (1 + rand() * 1.8).toFixed(1),
+ fill: 'currentColor',
+ opacity: (0.5 + rand() * 0.5).toFixed(2),
+ }),
+ );
+ }
+ }
+
+ // Bright nucleus.
+ svg.appendChild(
+ svgEl('circle', {
+ cx,
+ cy,
+ r: (2.2 + rand() * 1.6).toFixed(1),
+ fill: 'currentColor',
+ opacity: '0.9',
+ style: 'color: var(--ink-bright)',
+ }),
+ );
+ return svg;
+}
+
+// ── ambient particle field ───────────────────────────────────────────────────
+// Slow constellation drift behind the page. Pure decoration: pauses when the
+// tab hides, renders a single static frame under prefers-reduced-motion, and
+// re-reads ink colour when the theme flips.
+
+function startParticleField() {
+ const canvas = document.getElementById('lx-field');
+ if (!canvas) return;
+ const ctx = canvas.getContext('2d');
+ if (!ctx) return;
+
+ let width = 0;
+ let height = 0;
+ let particles = [];
+ let inkRGB = '255,255,255';
+ let raf = 0;
+
+ const readInk = () => {
+ const probe = getComputedStyle(document.documentElement).getPropertyValue('color-scheme');
+ inkRGB = probe.includes('light') ? '20,24,34' : '232,232,232';
+ };
+
+ const resize = () => {
+ const dpr = Math.min(window.devicePixelRatio || 1, 2);
+ width = window.innerWidth;
+ height = window.innerHeight;
+ canvas.width = width * dpr;
+ canvas.height = height * dpr;
+ ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
+ const target = Math.min(90, Math.floor((width * height) / 26000));
+ particles = Array.from({ length: target }, () => ({
+ x: Math.random() * width,
+ y: Math.random() * height,
+ vx: (Math.random() - 0.5) * 0.12,
+ vy: (Math.random() - 0.5) * 0.12,
+ r: 0.6 + Math.random() * 1.1,
+ }));
+ };
+
+ const draw = () => {
+ ctx.clearRect(0, 0, width, height);
+ const linkDist = 110;
+ for (const p of particles) {
+ p.x += p.vx;
+ p.y += p.vy;
+ if (p.x < -10) p.x = width + 10;
+ if (p.x > width + 10) p.x = -10;
+ if (p.y < -10) p.y = height + 10;
+ if (p.y > height + 10) p.y = -10;
+ ctx.beginPath();
+ ctx.arc(p.x, p.y, p.r, 0, Math.PI * 2);
+ ctx.fillStyle = `rgba(${inkRGB},0.16)`;
+ ctx.fill();
+ }
+ for (let i = 0; i < particles.length; i++) {
+ for (let j = i + 1; j < particles.length; j++) {
+ const a = particles[i];
+ const b = particles[j];
+ const dx = a.x - b.x;
+ const dy = a.y - b.y;
+ const d2 = dx * dx + dy * dy;
+ if (d2 < linkDist * linkDist) {
+ const alpha = 0.05 * (1 - Math.sqrt(d2) / linkDist);
+ ctx.beginPath();
+ ctx.moveTo(a.x, a.y);
+ ctx.lineTo(b.x, b.y);
+ ctx.strokeStyle = `rgba(${inkRGB},${alpha.toFixed(3)})`;
+ ctx.lineWidth = 0.6;
+ ctx.stroke();
+ }
+ }
+ }
+ };
+
+ const loop = () => {
+ draw();
+ raf = requestAnimationFrame(loop);
+ };
+
+ readInk();
+ resize();
+ window.addEventListener('resize', resize, { passive: true });
+ new MutationObserver(readInk).observe(document.documentElement, {
+ attributes: true,
+ attributeFilter: ['data-theme'],
+ });
+
+ if (REDUCED_MOTION) {
+ draw(); // one calm static frame
+ return;
+ }
+ loop();
+ document.addEventListener('visibilitychange', () => {
+ if (document.hidden) cancelAnimationFrame(raf);
+ else loop();
+ });
+}
+
+// ── cursor light ─────────────────────────────────────────────────────────────
+// One delegated listener; each card's ::before radial light follows --mx/--my.
+
+feedEl.addEventListener('pointermove', (e) => {
+ const card = e.target.closest?.('.lx-card');
+ if (!card) return;
+ const rect = card.getBoundingClientRect();
+ card.style.setProperty('--mx', `${(((e.clientX - rect.left) / rect.width) * 100).toFixed(1)}%`);
+ card.style.setProperty('--my', `${(((e.clientY - rect.top) / rect.height) * 100).toFixed(1)}%`);
+});
+
+// ── entrance reveal ──────────────────────────────────────────────────────────
+
+const revealObserver = REDUCED_MOTION
+ ? null
+ : new IntersectionObserver(
+ (entries) => {
+ for (const entry of entries) {
+ if (!entry.isIntersecting) continue;
+ entry.target.classList.add('lx-in');
+ revealObserver.unobserve(entry.target);
+ }
+ },
+ { rootMargin: '0px 0px -8% 0px' },
+ );
+
+function reveal(card, index) {
+ if (!revealObserver) {
+ card.classList.add('lx-in');
+ return;
+ }
+ card.style.transitionDelay = `${(index % 12) * 45}ms`;
+ card.addEventListener(
+ 'transitionend',
+ () => {
+ card.style.transitionDelay = '';
+ },
+ { once: true },
+ );
+ revealObserver.observe(card);
}
// ── market enrichment (mainnet only) ─────────────────────────────────────────
@@ -122,7 +352,10 @@ async function enrichCard(mint, card) {
const img = card.querySelector('.lx-coin-img');
const imgSrc = coin.image_uri || coin.image;
- if (img && imgSrc) img.src = imgSrc;
+ if (img && imgSrc) {
+ img.addEventListener('load', () => img.classList.add('lx-img-in'), { once: true });
+ img.src = imgSrc;
+ }
const mcap = card.querySelector('.lx-mcap-value');
const cap = Number(coin.usd_market_cap);
@@ -163,7 +396,7 @@ function agentChip(agent) {
);
}
-function launchCard(launch, index) {
+function launchCard(launch, index, { featured = false } = {}) {
const isDevnet = launch.network === 'devnet';
const tradeHref = isDevnet
? `https://explorer.solana.com/address/${launch.mint}?cluster=devnet`
@@ -201,18 +434,17 @@ function launchCard(launch, index) {
);
}
- const card = el('article', { class: 'lx-card', style: `animation-delay:${Math.min(index, 12) * 30}ms` }, [
+ const art = el('div', { class: 'lx-coin-art' });
+ art.appendChild(mintIdenticon(launch.mint));
+ art.appendChild(el('img', { class: 'lx-coin-img', alt: '', loading: 'lazy' }));
+
+ 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' }, [
- el('img', {
- class: 'lx-coin-img',
- src: coinFallbackUri(launch.symbol || launch.name),
- alt: '',
- loading: 'lazy',
- onerror: (e) => {
- e.currentTarget.onerror = null;
- e.currentTarget.src = coinFallbackUri(launch.symbol || launch.name);
- },
- }),
+ 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) }),
@@ -231,17 +463,53 @@ function launchCard(launch, index) {
el('span', { class: 'lx-mint', text: launch.mint, title: launch.mint }),
]);
+ reveal(card, index);
if (!isDevnet) queueEnrich(launch.mint, card);
return card;
}
+// ── ticker ───────────────────────────────────────────────────────────────────
+// Marquee strip of the freshest launches. Content duplicated once so the
+// translateX(-50%) loop is seamless. Decorative (aria-hidden) — the same data
+// lives in the accessible feed below.
+
+function buildTicker(launches) {
+ if (!tickerEl || !tickerTrackEl || REDUCED_MOTION) return;
+ if (!launches.length) {
+ tickerEl.hidden = true;
+ return;
+ }
+ tickerTrackEl.textContent = '';
+ const items = launches.slice(0, 12);
+ const renderRun = () =>
+ items.map((l) =>
+ el('span', { class: 'lx-tick' }, [
+ el('b', { text: l.symbol ? `$${l.symbol}` : shortAddr(l.mint) }),
+ el('span', { text: l.name || '' }),
+ el('span', { class: 'up', text: timeAgo(l.created_at) }),
+ ]),
+ );
+ renderRun().forEach((n) => tickerTrackEl.appendChild(n));
+ renderRun().forEach((n) => tickerTrackEl.appendChild(n));
+ tickerTrackEl.style.setProperty('--lx-marquee-duration', `${Math.max(24, items.length * 5)}s`);
+ tickerEl.hidden = false;
+}
+
+// ── hero stats ───────────────────────────────────────────────────────────────
+
+function updateStats(firstLaunch) {
+ if (statCountEl) statCountEl.textContent = state.count ? `${state.count}${state.hasMore ? '+' : ''}` : '0';
+ if (statLatestEl) statLatestEl.textContent = firstLaunch ? timeAgo(firstLaunch.created_at) : '—';
+ if (statNetworkEl) statNetworkEl.textContent = state.network;
+}
+
// ── states ───────────────────────────────────────────────────────────────────
function renderSkeletons(n = 8) {
for (let i = 0; i < n; i++) {
feedEl.appendChild(
el('div', { class: 'lx-skel', 'aria-hidden': 'true' }, [
- el('div', { class: 'lx-skel-bar', style: 'width:44px;height:44px;border-radius:10px' }),
+ el('div', { class: 'lx-skel-bar', style: 'width:48px;height:48px;border-radius:10px' }),
el('div', { class: 'lx-skel-bar', style: 'width:70%;height:14px' }),
el('div', { class: 'lx-skel-bar', style: 'width:45%;height:22px' }),
el('div', { class: 'lx-skel-bar', style: 'width:100%;height:34px' }),
@@ -312,6 +580,19 @@ function updateCount() {
// ── data loading ─────────────────────────────────────────────────────────────
+async function fetchLaunches(offset, limit) {
+ const params = new URLSearchParams({
+ network: state.network,
+ offset: String(offset),
+ limit: String(limit),
+ });
+ if (state.agentId) params.set('agent_id', state.agentId);
+ const r = await fetch(`/api/pump/launches?${params}`);
+ if (!r.ok) throw new Error(`launches api ${r.status}`);
+ const body = await r.json();
+ return body.data || { launches: [], has_more: false };
+}
+
async function loadPage({ reset = false } = {}) {
if (state.loading) return;
state.loading = true;
@@ -319,31 +600,34 @@ async function loadPage({ reset = false } = {}) {
state.offset = 0;
state.count = 0;
state.hasMore = false;
+ state.seenMints = new Set();
+ state.latestCreatedAt = null;
feedEl.textContent = '';
footerEl.textContent = '';
countEl.textContent = '';
}
+ const isFirstPage = state.offset === 0;
feedEl.setAttribute('aria-busy', 'true');
renderSkeletons(reset ? 8 : 4);
- const params = new URLSearchParams({
- network: state.network,
- offset: String(state.offset),
- limit: String(PAGE_SIZE),
- });
- if (state.agentId) params.set('agent_id', state.agentId);
-
try {
- const r = await fetch(`/api/pump/launches?${params}`);
- if (!r.ok) throw new Error(`launches api ${r.status}`);
- const body = await r.json();
- const { launches = [], has_more: hasMore = false } = body.data || {};
+ const { launches = [], has_more: hasMore = false } = await fetchLaunches(state.offset, PAGE_SIZE);
clearSkeletons();
- launches.forEach((l, i) => feedEl.appendChild(launchCard(l, i)));
+ launches.forEach((l, i) => {
+ state.seenMints.add(l.mint);
+ feedEl.appendChild(launchCard(l, i, { featured: isFirstPage && i === 0 }));
+ });
state.offset += launches.length;
state.count += launches.length;
state.hasMore = hasMore;
+ if (isFirstPage) {
+ state.latestCreatedAt = launches[0]?.created_at || null;
+ buildTicker(launches);
+ updateStats(launches[0] || null);
+ } else {
+ updateStats({ created_at: state.latestCreatedAt });
+ }
if (state.count === 0) renderEmpty();
renderFooter();
updateCount();
@@ -358,6 +642,36 @@ async function loadPage({ reset = false } = {}) {
}
}
+// ── live refresh ─────────────────────────────────────────────────────────────
+// Re-checks page zero once a minute (visible tab only) and slides genuinely
+// new launches in at the top — the feed stays alive without a reload.
+
+async function liveRefresh() {
+ if (document.hidden || state.loading || state.count === 0) return;
+ let data;
+ try {
+ data = await fetchLaunches(0, 12);
+ } catch {
+ return; // next tick will retry
+ }
+ const fresh = (data.launches || []).filter((l) => !state.seenMints.has(l.mint));
+ if (!fresh.length) return;
+
+ const anchor = feedEl.querySelector('.lx-card');
+ // Newest-first: insert in reverse so the very newest ends up on top.
+ for (let i = fresh.length - 1; i >= 0; i--) {
+ const l = fresh[i];
+ state.seenMints.add(l.mint);
+ const card = launchCard(l, 0);
+ feedEl.insertBefore(card, anchor || feedEl.firstChild);
+ }
+ state.count += fresh.length;
+ state.offset += fresh.length;
+ state.latestCreatedAt = fresh[0].created_at;
+ updateStats(fresh[0]);
+ updateCount();
+}
+
// ── filters ──────────────────────────────────────────────────────────────────
function syncUrl() {
@@ -437,7 +751,10 @@ function boot() {
renderAgentFilterChip(state.agentId);
}
+ updateStats(null);
+ startParticleField();
loadPage({ reset: true });
+ setInterval(liveRefresh, LIVE_REFRESH_MS);
}
boot();