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.

Refactor navigation and add API documentation

nirholas7e42522960c6
diff --git a/docs/api.html b/docs/api.html
new file mode 100644
index 000000000..84805304b
--- /dev/null
+++ b/docs/api.html
@@ -0,0 +1,590 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>API Reference — three.ws</title>
+ <meta
+ name="description"
+ content="API Reference for three.ws — the open-source platform for 3D AI agents."
+ />
+ <link rel="icon" href="/favicon.ico" />
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
+ <link
+ href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap"
+ rel="stylesheet"
+ />
+ <link rel="stylesheet" href="/style.css" />
+ <link
+ rel="stylesheet"
+ href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark.min.css"
+ />
+ <script src="https://cdn.jsdelivr.net/npm/[email protected]/marked.min.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
+ <style>
+ :root {
+ --sidebar-w: 268px;
+ --header-h: 52px;
+ --docs-accent: #8b5cf6;
+ --docs-accent-soft: rgba(139, 92, 246, 0.12);
+ --docs-bg: #09090f;
+ --sidebar-bg: #0c0c13;
+ --border: rgba(255, 255, 255, 0.07);
+ --text-muted: rgba(224, 224, 224, 0.5);
+ --text-body: rgba(224, 224, 224, 0.85);
+ }
+ *,
+ *::before,
+ *::after {
+ box-sizing: border-box;
+ }
+ html,
+ body {
+ margin: 0;
+ padding: 0;
+ height: auto;
+ overflow: visible;
+ }
+ body {
+ background: var(--docs-bg);
+ color: #e0e0e0;
+ font-family: var(--font-body);
+ font-size: var(--text-base);
+ line-height: 1.65;
+ display: block;
+ }
+ .docs-header {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ height: var(--header-h);
+ background: rgba(9, 9, 15, 0.88);
+ backdrop-filter: blur(16px);
+ -webkit-backdrop-filter: blur(16px);
+ border-bottom: 1px solid var(--border);
+ display: flex;
+ align-items: center;
+ padding: 0 var(--space-lg);
+ gap: var(--space-md);
+ z-index: 100;
+ }
+ .docs-logo {
+ font-family: var(--font-display);
+ font-size: var(--text-lg);
+ font-weight: 600;
+ color: #fff;
+ text-decoration: none;
+ display: flex;
+ align-items: center;
+ gap: 7px;
+ flex-shrink: 0;
+ }
+ .docs-logo-dot {
+ width: 9px;
+ height: 9px;
+ border-radius: 50%;
+ background: linear-gradient(135deg, #a78bfa 0%, #6366f1 100%);
+ flex-shrink: 0;
+ }
+ .docs-logo-mark {
+ width: 24px;
+ height: 24px;
+ flex-shrink: 0;
+ filter: grayscale(1) contrast(1.05) brightness(1.08)
+ drop-shadow(0 0 5px rgba(139, 92, 246, 0.45))
+ drop-shadow(0 0 1px rgba(99, 102, 241, 0.55));
+ }
+ .docs-header-sep {
+ width: 1px;
+ height: 18px;
+ background: var(--border);
+ flex-shrink: 0;
+ }
+ .docs-header-label {
+ font-size: var(--text-sm);
+ color: var(--text-muted);
+ font-family: var(--font-body);
+ }
+ .docs-header-right {
+ margin-left: auto;
+ display: flex;
+ align-items: center;
+ gap: var(--space-sm);
+ }
+ .docs-header-right a {
+ font-size: var(--text-sm);
+ color: var(--text-muted);
+ text-decoration: none;
+ padding: 4px 10px;
+ border-radius: var(--radius-md);
+ transition: color 0.15s, background 0.15s;
+ }
+ .docs-header-right a:hover {
+ color: #fff;
+ background: rgba(255, 255, 255, 0.05);
+ }
+ .docs-header-right .btn-primary {
+ background: var(--docs-accent-soft);
+ color: #c4b5fd;
+ border: 1px solid rgba(139, 92, 246, 0.25);
+ }
+ .docs-header-right .btn-primary:hover {
+ background: rgba(139, 92, 246, 0.2);
+ color: #ddd6fe;
+ }
+ .docs-shell {
+ display: flex;
+ padding-top: var(--header-h);
+ min-height: 100vh;
+ }
+ .docs-sidebar {
+ position: fixed;
+ top: var(--header-h);
+ left: 0;
+ bottom: 0;
+ width: var(--sidebar-w);
+ background: var(--sidebar-bg);
+ border-right: 1px solid var(--border);
+ overflow-y: auto;
+ padding: var(--space-md) 0 var(--space-2xl);
+ scrollbar-width: thin;
+ scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
+ }
+ .docs-sidebar::-webkit-scrollbar {
+ width: 3px;
+ }
+ .docs-sidebar::-webkit-scrollbar-thumb {
+ background: rgba(255, 255, 255, 0.08);
+ border-radius: 2px;
+ }
+ .sidebar-search {
+ margin: 0 var(--space-sm) var(--space-md);
+ position: relative;
+ }
+ .sidebar-search input {
+ width: 100%;
+ background: rgba(255, 255, 255, 0.04);
+ border: 1px solid var(--border);
+ border-radius: var(--radius-md);
+ padding: 7px 10px 7px 32px;
+ font-size: var(--text-sm);
+ color: #ccc;
+ outline: none;
+ font-family: var(--font-body);
+ transition: border-color 0.15s, background 0.15s;
+ }
+ .sidebar-search input::placeholder {
+ color: rgba(255, 255, 255, 0.25);
+ }
+ .sidebar-search input:focus {
+ border-color: rgba(139, 92, 246, 0.5);
+ background: rgba(139, 92, 246, 0.05);
+ }
+ .sidebar-search-icon {
+ position: absolute;
+ left: 9px;
+ top: 50%;
+ transform: translateY(-50%);
+ pointer-events: none;
+ opacity: 0.35;
+ }
+ .sidebar-section {
+ margin-bottom: var(--space-md);
+ }
+ .sidebar-section-title {
+ display: block;
+ font-size: 10px;
+ font-weight: 700;
+ letter-spacing: 0.1em;
+ text-transform: uppercase;
+ color: rgba(255, 255, 255, 0.28);
+ padding: 0 var(--space-sm) 5px var(--space-md);
+ }
+ .sidebar-link {
+ display: block;
+ padding: 5px var(--space-sm) 5px var(--space-md);
+ font-size: 13.5px;
+ color: rgba(255, 255, 255, 0.52);
+ text-decoration: none;
+ border-left: 2px solid transparent;
+ transition: color 0.12s, background 0.12s, border-color 0.12s;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ line-height: 1.5;
+ }
+ .sidebar-link:hover {
+ color: rgba(255, 255, 255, 0.9);
+ background: rgba(255, 255, 255, 0.035);
+ }
+ .sidebar-link.active {
+ color: #c4b5fd;
+ border-left-color: var(--docs-accent);
+ background: var(--docs-accent-soft);
+ font-weight: 500;
+ }
+ .sidebar-link.external::after {
+ content: '↗';
+ font-size: 10px;
+ margin-left: 4px;
+ opacity: 0.5;
+ }
+ .docs-main {
+ flex: 1;
+ margin-left: var(--sidebar-w);
+ padding: var(--space-2xl) clamp(var(--space-lg), 5vw, var(--space-2xl)) 100px;
+ }
+ .docs-content {
+ max-width: 728px;
+ }
+ .docs-content h1 {
+ font-family: var(--font-display);
+ font-weight: 500;
+ font-size: clamp(var(--text-xl), 3vw, var(--text-2xl));
+ letter-spacing: -0.03em;
+ margin: 0 0 var(--space-sm);
+ color: #fff;
+ line-height: 1.2;
+ }
+ .docs-content h2 {
+ font-family: var(--font-display);
+ font-weight: 500;
+ font-size: var(--text-xl);
+ letter-spacing: -0.02em;
+ margin: var(--space-2xl) 0 var(--space-sm);
+ padding-bottom: var(--space-xs);
+ border-bottom: 1px solid var(--border);
+ color: #fff;
+ line-height: 1.3;
+ }
+ .docs-content h2:first-child {
+ margin-top: 0;
+ }
+ .docs-content h3 {
+ font-weight: 600;
+ font-size: var(--text-lg);
+ margin: var(--space-xl) 0 var(--space-xs);
+ color: #f0f0f0;
+ }
+ .docs-content h4 {
+ font-weight: 600;
+ font-size: var(--text-base);
+ margin: var(--space-lg) 0 var(--space-xs);
+ color: #ddd;
+ }
+ .docs-content p {
+ color: var(--text-body);
+ margin: 0 0 var(--space-md);
+ }
+ .docs-content ul,
+ .docs-content ol {
+ padding-left: var(--space-lg);
+ margin: 0 0 var(--space-md);
+ }
+ .docs-content li {
+ color: var(--text-body);
+ margin-bottom: 4px;
+ }
+ .docs-content li > ul,
+ .docs-content li > ol {
+ margin-top: 4px;
+ margin-bottom: 4px;
+ }
+ .docs-content a {
+ color: #a78bfa;
+ text-decoration: none;
+ border-bottom: 1px solid rgba(167, 139, 250, 0.25);
+ transition: color 0.12s, border-color 0.12s;
+ }
+ .docs-content a:hover {
+ color: #c4b5fd;
+ border-bottom-color: rgba(196, 181, 253, 0.5);
+ }
+ .docs-content strong {
+ color: #fff;
+ font-weight: 600;
+ }
+ .docs-content em {
+ color: rgba(224, 224, 224, 0.75);
+ }
+ .docs-content code {
+ font-family: var(--font-mono);
+ font-size: 0.875em;
+ background: rgba(139, 92, 246, 0.1);
+ border: 1px solid rgba(139, 92, 246, 0.18);
+ padding: 1px 5px;
+ border-radius: 3px;
+ color: #c4b5fd;
+ }
+ .docs-content pre {
+ background: #0d0d18;
+ border: 1px solid rgba(255, 255, 255, 0.07);
+ border-radius: var(--radius-md);
+ padding: var(--space-md);
+ overflow-x: auto;
+ margin: 0 0 var(--space-md);
+ position: relative;
+ }
+ .docs-content pre code {
+ background: transparent;
+ border: none;
+ padding: 0;
+ color: inherit;
+ font-size: var(--text-sm);
+ line-height: 1.6;
+ }
+ .docs-content blockquote {
+ border-left: 3px solid var(--docs-accent);
+ margin: 0 0 var(--space-md);
+ padding: var(--space-xs) var(--space-md);
+ background: rgba(139, 92, 246, 0.06);
+ border-radius: 0 var(--radius-md) var(--radius-md) 0;
+ }
+ .docs-content blockquote p {
+ color: rgba(224, 224, 224, 0.7);
+ margin: 0;
+ }
+ .docs-content table {
+ width: 100%;
+ border-collapse: collapse;
+ margin: 0 0 var(--space-md);
+ font-size: 13.5px;
+ }
+ .docs-content th {
+ text-align: left;
+ padding: 8px var(--space-sm);
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1);
+ color: rgba(255, 255, 255, 0.45);
+ font-weight: 600;
+ font-size: 11px;
+ letter-spacing: 0.06em;
+ text-transform: uppercase;
+ }
+ .docs-content td {
+ padding: 9px var(--space-sm);
+ border-bottom: 1px solid rgba(255, 255, 255, 0.04);
+ color: var(--text-body);
+ vertical-align: top;
+ }
+ .docs-content tr:last-child td {
+ border-bottom: none;
+ }
+ .docs-content hr {
+ border: none;
+ border-top: 1px solid var(--border);
+ margin: var(--space-xl) 0;
+ }
+ .docs-content img {
+ max-width: 100%;
+ border-radius: var(--radius-md);
+ border: 1px solid var(--border);
+ }
+ .docs-loading {
+ display: flex;
+ align-items: center;
+ gap: var(--space-sm);
+ color: var(--text-muted);
+ font-size: var(--text-sm);
+ padding: var(--space-2xl) 0;
+ }
+ .docs-loading-dot {
+ width: 6px;
+ height: 6px;
+ border-radius: 50%;
+ background: var(--docs-accent);
+ animation: blink 1s ease-in-out infinite;
+ }
+ @keyframes blink {
+ 0%,
+ 100% {
+ opacity: 0.15;
+ }
+ 50% {
+ opacity: 1;
+ }
+ }
+ .docs-pager {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: var(--space-sm);
+ margin-top: var(--space-2xl);
+ padding-top: var(--space-xl);
+ border-top: 1px solid var(--border);
+ }
+ .docs-pager-btn {
+ display: flex;
+ flex-direction: column;
+ gap: 3px;
+ padding: var(--space-sm) var(--space-md);
+ background: rgba(255, 255, 255, 0.025);
+ border: 1px solid var(--border);
+ border-radius: var(--radius-md);
+ text-decoration: none;
+ transition: background 0.15s, border-color 0.15s;
+ color: inherit;
+ }
+ .docs-pager-btn:hover {
+ background: rgba(255, 255, 255, 0.05);
+ border-color: rgba(255, 255, 255, 0.12);
+ border-bottom-color: rgba(255, 255, 255, 0.12);
+ }
+ .docs-pager-btn .pager-dir {
+ font-size: 10px;
+ text-transform: uppercase;
+ letter-spacing: 0.08em;
+ color: var(--text-muted);
+ }
+ .docs-pager-btn .pager-title {
+ font-size: var(--text-sm);
+ font-weight: 500;
+ color: #e0e0e0;
+ }
+ .docs-pager-btn.next {
+ text-align: right;
+ }
+ .docs-pager-btn.placeholder {
+ visibility: hidden;
+ }
+ .sidebar-fab {
+ display: none;
+ position: fixed;
+ bottom: 22px;
+ right: 22px;
+ z-index: 200;
+ background: var(--docs-accent);
+ color: #fff;
+ border: none;
+ border-radius: 50%;
+ width: 46px;
+ height: 46px;
+ cursor: pointer;
+ align-items: center;
+ justify-content: center;
+ box-shadow: 0 4px 24px rgba(139, 92, 246, 0.45);
+ transition: transform 0.15s;
+ }
+ .sidebar-fab:hover {
+ transform: scale(1.06);
+ }
+ .sidebar-overlay {
+ display: none;
+ position: fixed;
+ inset: 0;
+ background: rgba(0, 0, 0, 0.6);
+ z-index: 140;
+ }
+ @media (max-width: 860px) {
+ .docs-sidebar {
+ transform: translateX(-100%);
+ transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
+ z-index: 150;
+ box-shadow: 4px 0 32px rgba(0, 0, 0, 0.5);
+ }
+ }
+ </style>
+ </head>
+ <body>
+ <div class="docs-shell">
+ <aside class="docs-sidebar" id="docs-sidebar"></aside>
+ <main class="docs-main">
+ <div class="docs-content" id="docs-content">
+ <div class="docs-loading">
+ <span class="docs-loading-dot"></span>
+ <span>Loading...</span>
+ </div>
+ </div>
+ <nav class="docs-pager" id="docs-pager"></nav>
+ </main>
+ </div>
+ <script>
+ const navConfig = [
+ {
+ title: 'Getting Started',
+ links: [
+ { title: 'Introduction', file: 'introduction.md' },
+ { title: 'Quick Start', file: 'quick-start.md' },
+ { title: 'Architecture', file: 'architecture.md' },
+ ],
+ },
+ {
+ title: 'Core Concepts',
+ links: [
+ { title: 'Agent System', file: 'agent-system.md' },
+ { title: 'Skills', file: 'skills.md' },
+ { title: 'Memory', file: 'memory.md' },
+ { title: 'Permissions', file: 'permissions.md' },
+ ],
+ },
+ {
+ title: 'API Reference',
+ links: [
+ { title: 'REST API', file: 'api-reference.md' },
+ { title: 'JS API', file: 'js-api.md' },
+ ],
+ },
+ ];
+ function renderSidebar() {
+ const sidebar = document.getElementById('docs-sidebar');
+ sidebar.innerHTML = '';
+ const currentFile = getCurrentFile();
+ for (const section of navConfig) {
+ const sectionEl = document.createElement('div');
+ sectionEl.className = 'sidebar-section';
+ const sectionTitle = document.createElement('span');
+ sectionTitle.className = 'sidebar-section-title';
+ sectionTitle.textContent = section.title;
+ sectionEl.appendChild(sectionTitle);
+ for (const link of section.links) {
+ const linkEl = document.createElement('a');
+ linkEl.className = 'sidebar-link';
+ linkEl.href = `?page=${link.file}`;
+ linkEl.textContent = link.title;
+ if (link.file === currentFile) {
+ linkEl.classList.add('active');
+ }
+ sectionEl.appendChild(linkEl);
+ }
+ sidebar.appendChild(sectionEl);
+ }
+ }
+ function getCurrentFile() {
+ const urlParams = new URLSearchParams(window.location.search);
+ return urlParams.get('page') || 'introduction.md';
+ }
+ async function loadContent() {
+ const contentEl = document.getElementById('docs-content');
+ const file = getCurrentFile();
+ try {
+ const response = await fetch(file);
+ if (!response.ok) {
+ throw new Error('Could not load documentation file.');
+ }
+ const markdown = await response.text();
+ contentEl.innerHTML = marked.parse(markdown);
+ hljs.highlightAll();
+ } catch (error) {
+ contentEl.innerHTML = `<p>Error loading content: ${error.message}</p>`;
+ }
+ }
+ function handleNav() {
+ renderSidebar();
+ loadContent();
+ }
+ window.addEventListener('popstate', handleNav);
+ document.addEventListener('DOMContentLoaded', () => {
+ const docsShell = document.querySelector('.docs-shell');
+ docsShell.addEventListener('click', (e) => {
+ if (e.target.matches('.sidebar-link')) {
+ e.preventDefault();
+ const url = new URL(e.target.href);
+ history.pushState({}, '', url.search);
+ handleNav();
+ }
+ });
+ handleNav();
+ });
+ </script>
+ </body>
+</html>
diff --git a/public/discover/index.html b/public/discover/index.html
index 2b884d747..8f2794caa 100644
--- a/public/discover/index.html
+++ b/public/discover/index.html
@@ -38,72 +38,9 @@
</head>
<body class="features-page explore-page">
<header>
- <h1>
- <a href="/"><img src="/three.svg" alt="three.ws" class="header-logo" /></a>
- </h1>
- <nav class="features-nav" aria-label="Primary">
- <ul class="nav-root" role="menubar">
- <li class="nav-item nav-has-menu" role="none">
- <button
- type="button"
- class="nav-trigger"
- aria-haspopup="true"
- aria-expanded="false"
- role="menuitem"
- >
- Build<span class="nav-caret" aria-hidden="true">▾</span>
- </button>
- <ul class="nav-menu" role="menu" aria-label="Build">
- <li role="none">
- <a href="/create" role="menuitem"
- ><span class="nav-mi-title">Create agent</span
- ><span class="nav-mi-sub">Avatar + brain wizard</span></a
- >
- </li>
- <li role="none">
- <a href="/app" role="menuitem"
- ><span class="nav-mi-title">Viewer</span
- ><span class="nav-mi-sub">Drag-and-drop GLB</span></a
- >
- </li>
- <li role="none">
- <a href="/validation" role="menuitem"
- ><span class="nav-mi-title">glTF Validator</span
- ><span class="nav-mi-sub">Khronos spec check</span></a
- >
- </li>
- </ul>
- </li>
- <li role="none"><a href="/discover" role="menuitem">Discover</a></li>
- <li class="nav-item nav-has-menu" role="none">
- <button
- type="button"
- class="nav-trigger"
- aria-haspopup="true"
- aria-expanded="false"
- role="menuitem"
- >
- Solana<span class="nav-caret" aria-hidden="true">▾</span>
- </button>
- <ul class="nav-menu" role="menu" aria-label="Solana">
- <li role="none">
- <a href="/pumpfun" role="menuitem"
- ><span class="nav-mi-title">Pump.fun stream</span
- ><span class="nav-mi-sub">Mint agent tokens</span></a
- >
- </li>
- <li role="none">
- <a href="/vanity-wallet" role="menuitem"
- ><span class="nav-mi-title">Vanity wallet</span
- ><span class="nav-mi-sub">Generate address</span></a
- >
- </li>
- </ul>
- </li>
- <li class="nav-item" role="none"><a href="/docs" role="menuitem">Docs</a></li>
- </ul>
- </nav>
+ <div id="nav-container"></div>
</header>
+ <script src="/nav.js"></script>
<main class="features-main explore-main">
<section class="explore-hero">
diff --git a/public/features/features.css b/public/features/features.css
index 7769795a5..51f2911ed 100644
--- a/public/features/features.css
+++ b/public/features/features.css
@@ -1,20 +1,130 @@
-/******************************************************************************
- * /features — pure-CSS 3D parallax across three acts.
- *
- * Technique: <main class="parallax"> establishes a perspective scroll
- * container. Each <section class="parallax-act"> is a stacking context with
- * absolutely-positioned .parallax-layer children. Each layer is pushed back
- * in Z by `--depth * --perspective` and scaled up by `--depth + 1` to
- * compensate, so it still fills the viewport but drifts slower than the
- * front layer during scroll. Zero JS drives the parallax — the browser's
- * native 3D projection during scroll does the work.
- *
- * Live <agent-3d> elements live on the front-most layer of each act and
- * lazy-boot via IntersectionObserver in features.js.
- *
- * Honors prefers-reduced-motion (collapses to flat) and narrow viewports
- * (single-column flat layout, parallax disabled).
- ******************************************************************************/
+.features-page {
+ background-color: #000;
+ color: #fff;
+}
+
+.features-main {
+ padding: 2rem 1rem;
+}
+
+.features-hero {
+ text-align: center;
+ margin-bottom: 4rem;
+}
+
+.features-hero-title {
+ font-size: 3rem;
+ font-weight: 700;
+ margin-bottom: 1rem;
+}
+
+.features-hero-subtitle {
+ font-size: 1.25rem;
+ color: #aaa;
+}
+
+.features-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
+ gap: 2rem;
+ margin-bottom: 4rem;
+}
+
+.feature-card {
+ background-color: #111;
+ border: 1px solid #333;
+ border-radius: 0.5rem;
+ padding: 2rem;
+ text-align: center;
+ transition: transform 0.2s;
+}
+
+.feature-card:hover {
+ transform: translateY(-0.5rem);
+}
+
+.feature-card-icon {
+ font-size: 2rem;
+ margin-bottom: 1rem;
+}
+
+.feature-card-title {
+ font-size: 1.5rem;
+ font-weight: 600;
+ margin-bottom: 0.5rem;
+}
+
+.feature-card-desc {
+ color: #aaa;
+}
+
+.features-community {
+ text-align: center;
+ margin-bottom: 4rem;
+}
+
+.features-community-title {
+ font-size: 2rem;
+ font-weight: 600;
+ margin-bottom: 1rem;
+}
+
+.features-community-subtitle {
+ font-size: 1.25rem;
+ color: #aaa;
+ margin-bottom: 2rem;
+}
+
+.features-community-links {
+ display: flex;
+ justify-content: center;
+ gap: 2rem;
+}
+
+.community-link {
+ display: flex;
+ align-items: center;
+ gap: 0.5rem;
+ color: #fff;
+ text-decoration: none;
+ font-size: 1.25rem;
+ transition: color 0.2s;
+}
+
+.community-link:hover {
+ color: #aaa;
+}
+
+.features-cta {
+ text-align: center;
+}
+
+.features-cta-title {
+ font-size: 2rem;
+ font-weight: 600;
+ margin-bottom: 1rem;
+}
+
+.features-cta-subtitle {
+ font-size: 1.25rem;
+ color: #aaa;
+ margin-bottom: 2rem;
+}
+
+.features-cta-button {
+ background-color: #fff;
+ color: #000;
+ padding: 1rem 2rem;
+ border-radius: 0.5rem;
+ text-decoration: none;
+ font-weight: 600;
+ transition: background-color 0.2s;
+}
+
+.features-cta-button:hover {
+ background-color: #aaa;
+}
+
:root {
--features-perspective: 2.4rem;
@@ -908,6 +1018,32 @@
padding: 1.4rem 1.5rem;
}
+/* Category divider — spans full grid width, no card chrome */
+.outro-grid .outro-cat {
+ grid-column: 1 / -1;
+ background: none;
+ border: none;
+ border-top: 1px solid rgba(255, 255, 255, 0.06);
+ border-radius: 0;
+ padding: 2.5rem 0 0.5rem;
+ margin-top: 0.5rem;
+}
+
+.outro-grid .outro-cat:first-child {
+ border-top: none;
+ padding-top: 0;
+ margin-top: 0;
+}
+
+.outro-cat span {
+ font-family: 'Space Grotesk', sans-serif;
+ font-size: 11px;
+ font-weight: 600;
+ letter-spacing: 0.14em;
+ text-transform: uppercase;
+ color: rgba(255, 255, 255, 0.38);
+}
+
.outro-grid h4 {
font-family: 'Space Grotesk', sans-serif;
font-size: 1.05rem;
diff --git a/public/features/index.html b/public/features/index.html
index 5b83a5db1..689b3e8d1 100644
--- a/public/features/index.html
+++ b/public/features/index.html
@@ -396,102 +396,201 @@
<section class="features-outro" aria-labelledby="outro-title">
<h3 id="outro-title">Everything an agent needs.</h3>
<ul class="outro-grid">
+
+ <!-- ── 3D & Avatar ───────────────────────────────────────── -->
+ <li class="outro-cat" aria-hidden="true"><span>3D &amp; Avatar</span></li>
<li>
<h4>3D Viewer</h4>
- <p>
- WebGL 2.0 via three.js r176. Drag-drop any <code>.glb</code> — instant
- rendering with Draco, KTX2, Meshopt, HDR environments, PBR materials,
- and Khronos-spec glTF validation.
- </p>
+ <p>WebGL 2.0 via three.js r176. Drag-drop any <code>.glb</code> — instant rendering with Draco, KTX2, Meshopt, HDR environments, PBR materials, and Khronos-spec glTF validation.</p>
+ </li>
+ <li>
+ <h4>Empathy Layer</h4>
+ <p>Six emotions (celebration, concern, curiosity, empathy, patience, neutral) blended continuously via morph-target weights. Reacts to protocol events — not a finite-state machine.</p>
+ </li>
+ <li>
+ <h4>Lip Sync</h4>
+ <p>Real-time viseme animation driven by live audio frequency analysis. Maps frequency bands to morph targets for natural mouth movement during speech — zero external service required.</p>
+ </li>
+ <li>
+ <h4>Avatar Generation</h4>
+ <p>Photo-to-3D via Avaturn: three-view capture, hosted inference, direct GLB download. Ready Player Me integration also available for instant avatar creation in a familiar browser flow.</p>
+ </li>
+ <li>
+ <h4>Model Optimization</h4>
+ <p>Draco mesh compression, KTX2 texture transcoding, Meshopt simplification, and JPEG/WebP downscaling — all in-browser. Export optimized GLBs ready for production delivery.</p>
</li>
+ <li>
+ <h4>glTF Validator</h4>
+ <p>Full Khronos spec compliance check with line-level error and warning reporting. Integrated into the drag-drop viewer and the standalone <code>/validation</code> page.</p>
+ </li>
+ <li>
+ <h4>Screenshot &amp; GLB Export</h4>
+ <p>Export the current 3D scene as PNG or download the modified model (with applied accessories and morphs) as a new GLB file — directly from the browser, no server round-trip.</p>
+ </li>
+ <li>
+ <h4>Animation Library</h4>
+ <p>Curated preset clip collection: Mixamo, custom motion-captured sets, and idle variants. Browse, preview, apply, and download animations from the viewer or agent settings.</p>
+ </li>
+
+ <!-- ── Agent Intelligence ────────────────────────────────── -->
+ <li class="outro-cat" aria-hidden="true"><span>Agent Intelligence</span></li>
<li>
<h4>LLM Agent Runtime</h4>
- <p>
- Claude-powered brain with a structured tool-loop — up to 8 iterations
- per turn. Built-in tools: <code>wave</code>, <code>lookAt</code>,
- <code>play_clip</code>, <code>setExpression</code>, <code>speak</code>,
- <code>remember</code>.
- </p>
+ <p>Claude-powered brain with a structured tool-loop — up to 8 iterations per turn. Built-in tools: <code>wave</code>, <code>lookAt</code>, <code>play_clip</code>, <code>setExpression</code>, <code>speak</code>, <code>remember</code>.</p>
</li>
<li>
- <h4>Empathy Layer</h4>
- <p>
- Six emotions (celebration, concern, curiosity, empathy, patience,
- neutral) blended continuously via morph-target weights. Reacts to
- protocol events — not a finite-state machine.
- </p>
+ <h4>Composable Skills</h4>
+ <p>Self-contained skill bundles (SKILL.md + tools.json + handlers.js) installed from IPFS, Arweave, or HTTP. Three trust modes: any, owned-only, whitelist. Skills can define new LLM tools.</p>
+ </li>
+ <li>
+ <h4>Persistent Memory</h4>
+ <p>Frontmatter-<code>.md</code> memory files indexed by a <code>MEMORY.md</code> manifest. Four storage modes: local, IPFS, encrypted-IPFS, none. High-salience entries injected into the system prompt each turn.</p>
+ </li>
+ <li>
+ <h4>Persona Extraction</h4>
+ <p>Five-question interview flow powered by Claude. Extracts tone tags, vocabulary patterns, and behavioral signals, then writes a custom system prompt that makes the agent sound like you.</p>
+ </li>
+ <li>
+ <h4>Agent-to-Agent Delegation</h4>
+ <p>One agent can invoke another agent's brain as a skill — passing structured context and receiving a typed response. Enables multi-hop reasoning and specialist sub-agent networks.</p>
</li>
+ <li>
+ <h4>Streaming Chat</h4>
+ <p>Server-Sent Events deliver LLM tokens to the UI as they arrive. Tool calls, intermediate thoughts, and final responses all stream through a single connection — no polling.</p>
+ </li>
+
+ <!-- ── Voice & Communication ─────────────────────────────── -->
+ <li class="outro-cat" aria-hidden="true"><span>Voice &amp; Communication</span></li>
<li>
<h4>Voice — TTS &amp; STT</h4>
- <p>
- Web Speech API out of the box. ElevenLabs integration for
- production-quality voice cloning. Microphone input with live transcript
- streamed back to the agent.
- </p>
+ <p>Web Speech API out of the box. ElevenLabs integration for production-quality voice. Microphone input with live transcript streamed back to the agent brain each turn.</p>
+ </li>
+ <li>
+ <h4>Voice Cloning</h4>
+ <p>Upload 30+ seconds of audio and clone a voice via ElevenLabs. The resulting voice ID is stored with the agent and used for all subsequent speech synthesis — distinct voice, zero extra calls.</p>
</li>
+ <li>
+ <h4>LiveKit Video</h4>
+ <p>Real-time video streaming tokens generated server-side for face-to-face agent sessions. Enables multi-participant video rooms with agent avatars rendered as named participants.</p>
+ </li>
+
+ <!-- ── Distribution & Embedding ─────────────────────────── -->
+ <li class="outro-cat" aria-hidden="true"><span>Distribution &amp; Embedding</span></li>
<li>
<h4>Widget Studio</h4>
- <p>
- Five widget types: turntable, animation gallery, talking agent,
- ERC-8004 passport card, hotspot tour. Point-and-click builder at
- <code>/studio</code> — copy an iframe snippet and embed anywhere.
- </p>
+ <p>Five widget types: turntable, animation gallery, talking agent, ERC-8004 passport card, hotspot tour. Point-and-click builder at <code>/studio</code> — copy an iframe snippet and embed anywhere.</p>
</li>
<li>
<h4><code>&lt;agent-3d&gt;</code> Web Component</h4>
- <p>
- Drop one script tag and one element — no framework needed. Versioned
- CDN bundles, lazy-boot via IntersectionObserver, postMessage API for
- host-page communication, Open Graph + oEmbed support.
- </p>
+ <p>Drop one script tag and one element — no framework needed. Versioned CDN bundles, lazy-boot via IntersectionObserver, postMessage API for host-page communication, Open Graph + oEmbed support.</p>
</li>
<li>
- <h4>Composable Skills</h4>
- <p>
- Self-contained skill bundles (SKILL.md + tools.json + handlers.js)
- installed from IPFS, Arweave, or HTTP. Three trust modes: any,
- owned-only, whitelist. Skills can define new LLM tools.
- </p>
+ <h4>Plugin Marketplace</h4>
+ <p>Browse, import, publish, and install tool plugins in LobeHub ToolManifest format. IPFS and HTTP hosting. Per-plugin trust level and scope enforcement at install time.</p>
</li>
<li>
- <h4>Persistent Memory</h4>
- <p>
- Frontmatter-<code>.md</code> memory files indexed by a <code>MEMORY.md</code>
- manifest. Four storage modes: local, IPFS, encrypted-IPFS, none.
- High-salience entries injected into the system prompt each turn.
- </p>
+ <h4>Widget Analytics</h4>
+ <p>Per-widget view counter, session stats, and embed-origin tracking. Dashboard shows impression counts and top referrers for every published widget — no third-party script required.</p>
+ </li>
+ <li>
+ <h4>oEmbed &amp; Open Graph</h4>
+ <p>oEmbed endpoint for rich previews in WordPress, Ghost, and Notion. Server-rendered Open Graph meta tags with avatar screenshots ensure agents look great when linked anywhere.</p>
+ </li>
+
+ <!-- ── Identity & Standards ──────────────────────────────── -->
+ <li class="outro-cat" aria-hidden="true"><span>Identity &amp; Standards</span></li>
+ <li>
+ <h4>Identity Registry</h4>
+ <p>ERC-721 based. Each agent has an <code>agentId</code>, delegated signer (EIP-712), and an IPFS-pinned manifest. Discoverable by any A2A or MCP client across 20+ EVM chains and Solana.</p>
+ </li>
+ <li>
+ <h4>Reputation &amp; Validation</h4>
+ <p>Signed on-chain feedback scores via <code>ReputationRegistry.sol</code>. Validator attestations (glTF audits, security reviews, zkML proofs) via <code>ValidationRegistry.sol</code>. Trust proportional to value at risk.</p>
</li>
<li>
<h4>MCP Server</h4>
- <p>
- Model Context Protocol 2025-06-18 over HTTP, JSON-RPC 2.0. Listed on
- the official MCP Registry as <code>io.github.nirholas/three.ws</code>.
- External AI systems can drive avatars and call tools programmatically.
- </p>
+ <p>Model Context Protocol 2025-06-18 over HTTP, JSON-RPC 2.0. Listed on the official MCP Registry as <code>io.github.nirholas/three.ws</code>. External AI systems can drive avatars and call tools programmatically.</p>
</li>
<li>
<h4>OAuth 2.1 + API Keys</h4>
- <p>
- Full RFC 6749 + PKCE authorization server with dynamic client
- registration, token revocation, and introspection. Developer API keys
- with scope and expiry for server-to-server integrations.
- </p>
+ <p>Full RFC 6749 + PKCE authorization server with dynamic client registration, token revocation, and introspection. Developer API keys with scope and expiry for server-to-server integrations.</p>
</li>
<li>
- <h4>Identity Registry</h4>
- <p>
- ERC-721 based. Each agent has an <code>agentId</code>, delegated signer
- (EIP-712), and an IPFS-pinned manifest. Discoverable by any A2A or MCP
- client across 20+ EVM chains and Solana.
- </p>
+ <h4>SIWE &amp; SIWS Auth</h4>
+ <p>Sign-In with Ethereum (EIP-4361) and Sign-In with Solana — cryptographic wallet authentication with nonce-based challenge-response. No passwords; your keys prove your identity.</p>
</li>
<li>
- <h4>Reputation &amp; Validation</h4>
- <p>
- Signed on-chain feedback scores via <code>ReputationRegistry.sol</code>.
- Validator attestations (glTF audits, security reviews, zkML proofs) via
- <code>ValidationRegistry.sol</code>. Trust proportional to value at risk.
- </p>
+ <h4>EIP-7710 Delegated Permissions</h4>
+ <p>Grant transferable on-chain permissions with caveats and enforcers. Agents act on your behalf within scoped limits — without ever holding your private key.</p>
+ </li>
+ <li>
+ <h4>ENS &amp; SNS Resolution</h4>
+ <p>Ethereum Name Service and Solana Name Service lookup built into the agent skill layer. Resolve human-readable names to addresses and back across both ecosystems.</p>
+ </li>
+
+ <!-- ── Solana & DeFi ──────────────────────────────────────── -->
+ <li class="outro-cat" aria-hidden="true"><span>Solana &amp; DeFi</span></li>
+ <li>
+ <h4>Pump.fun Integration</h4>
+ <p>Full bonding curve token creation, buy/sell/AMM trading, social fee claiming, and live Helius webhook signals — all callable by your agent as native skills.</p>
+ </li>
+ <li>
+ <h4>Jupiter Swap</h4>
+ <p>DEX aggregator quote and full swap execution for any SPL token pair. Token symbol-to-mint resolution built in — say "swap 1 SOL for BONK" and the agent handles the rest.</p>
+ </li>
+ <li>
+ <h4>Pyth Price Oracle</h4>
+ <p>Live USD prices for SOL, BTC, ETH, USDC, BONK, WIF, JUP, and PYTH streamed from Pyth Network. Agents check prices before executing trades or generating threshold alerts.</p>
+ </li>
+ <li>
+ <h4>Solana Blinks</h4>
+ <p>Parse and execute shareable Solana blockchain action URLs. Agents can follow any Blink — staking, minting, voting — as a single composable tool call.</p>
+ </li>
+ <li>
+ <h4>DCA Strategies</h4>
+ <p>Dollar-cost averaging skills: recurring token purchases at fixed intervals (daily, weekly, custom). Runs autonomously via on-chain delegation — no manual trigger needed.</p>
+ </li>
+ <li>
+ <h4>Solana NFT Portfolio</h4>
+ <p>Helius DAS API integration to list and analyze a wallet's NFT holdings. Agents can describe, value, and take action on NFTs owned by the connected wallet.</p>
+ </li>
+
+ <!-- ── Payments & Monetization ───────────────────────────── -->
+ <li class="outro-cat" aria-hidden="true"><span>Payments &amp; Monetization</span></li>
+ <li>
+ <h4>x402 Payment Protocol</h4>
+ <p>HTTP 402 Payment Required skill invocation. Agents gate tool calls behind micro-payments, with intent-based billing that settles automatically on-chain — no checkout flow.</p>
+ </li>
+ <li>
+ <h4>Subscriptions &amp; Billing</h4>
+ <p>Recurring billing with on-chain or fiat payment methods. Creators set a monthly price; subscribers are charged automatically. Revenue tracked and paid out to creator wallets.</p>
+ </li>
+ <li>
+ <h4>Agent-to-Agent Payments</h4>
+ <p>Agents send SOL or SPL tokens to other agents or wallets via delegated keypair — enabling autonomous fee settlement, tipping, and multi-agent economic coordination.</p>
+ </li>
+ <li>
+ <h4>Royalty Tracking</h4>
+ <p>Per-skill earning history for creators. Every time a published skill is invoked, the creator's royalty accrues on-chain and appears in their earnings dashboard.</p>
+ </li>
+
+ <!-- ── Developer Tools ───────────────────────────────────── -->
+ <li class="outro-cat" aria-hidden="true"><span>Developer Tools</span></li>
+ <li>
+ <h4>OpenAPI 3.1 Spec</h4>
+ <p>Auto-generated API documentation at <code>/openapi.json</code>. Full OAuth 2.1 security schemes, typed request/response schemas, and example payloads for every endpoint.</p>
+ </li>
+ <li>
+ <h4>LLM Proxy</h4>
+ <p>Authenticated <code>/api/llm/anthropic</code> endpoint with rate limiting and usage tracking. Third-party tools access Claude through your agent's OAuth token — no direct Anthropic key needed.</p>
+ </li>
+ <li>
+ <h4>RFC 8414 OAuth Discovery</h4>
+ <p><code>/.well-known/oauth-authorization-server</code> and <code>/.well-known/ai-plugin.json</code> endpoints. Any OAuth 2.1 client or AI assistant can auto-configure itself against the server.</p>
+ </li>
+ <li>
+ <h4>Scene Gates</h4>
+ <p>Wallet-gated 3D scene access using SIWE/SIWS two-phase challenge-response. Lock any scene behind token ownership, NFT holdings, or custom on-chain conditions.</p>
</li>
</ul>
</section>
diff --git a/public/features/index.html.temp b/public/features/index.html.temp
new file mode 100644
index 000000000..f3869c945
--- /dev/null
+++ b/public/features/index.html.temp
@@ -0,0 +1,112 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <title>Features — three.ws</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <meta
+ name="description"
+ content="An embodied 3D AI agent — body, place, identity, memory."
+ />
+ <meta name="theme-color" content="#000000" />
+
+ <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="/features.css" />
+ <link
+ href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&display=swap"
+ rel="stylesheet"
+ />
+ </head>
+ <body class="features-page">
+ <header class="agent-page-header" style="justify-content: space-between">
+ <div style="display:inline-flex;align-items:center">
+ <a href="/" aria-label="Back to three.ws home">
+ <img src="/three.svg" alt="three.ws" class="agent-header-logo" />
+ </a>
+ <nav class="agent-header-nav" aria-label="Primary">
+ <a href="/discover">Discover</a>
+ <a href="/create">Create</a>
+ <a href="/features" aria-current="page">Features</a>
+ <a href="/studio">Studio</a>
+ </nav>
+ </div>
+ </header>
+ <main class="features-main">
+ <section class="features-hero">
+ <h1 class="features-hero-title">A New Dimension of AI</h1>
+ <p class="features-hero-subtitle">
+ Explore the powerful features that make three.ws the most advanced platform for creating and interacting with 3D AI agents.
+ </p>
+ </section>
+ <section class="features-grid" aria-label="Features">
+ <div class="feature-card">
+ <div class="feature-card-icon">
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m12 3-1.41 1.41L16.17 10H4v4h12.17l-5.58 5.59L12 21l8-8-8-8z"></path></svg>
+ </div>
+ <h2 class="feature-card-title">Advanced AI Integration</h2>
+ <p class="feature-card-desc">
+ Seamlessly connect your agents to leading AI models, including GPT-4, Claude, and Llama, for natural and intelligent conversations.
+ </p>
+ </div>
+ <div class="feature-card">
+ <div class="feature-card-icon">
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 14.5A3.5 3.5 0 0 1 7.5 11H12a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H7.5A3.5 3.5 0 0 1 4 14.5z"></path><path d="m13 11-1-9"></path></svg>
+ </div>
+ <h2 class="feature-card-title">Dynamic 3D Avatars</h2>
+ <p class="feature-card-desc">
+ Bring your agents to life with customizable 3D avatars that support a wide range of animations and expressions.
+ </p>
+ </div>
+ <div class="feature-card">
+ <div class="feature-card-icon">
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path></svg>
+ </div>
+ <h2 class="feature-card-title">On-Chain Identity</h2>
+ <p class="feature-card-desc">
+ Securely manage your agents' identities on the blockchain with support for ERC-8004 and other popular standards.
+ </p>
+ </div>
+ <div class="feature-card">
+ <div class="feature-card-icon">
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2a10 10 0 1 0 10 10H12V2z"></path><path d="M12 12a10 10 0 0 0-4.1 7.8c.2-.1.4-.2.6-.3.2-.1.4-.2.6-.4"></path></svg>
+ </div>
+ <h2 class="feature-card-title">Seamless Integration</h2>
+ <p class="feature-card-desc">
+ Easily embed your agents into any website or application with just a few lines of code.
+ </p>
+ </div>
+ </section>
+ <section class="features-community">
+ <h2 class="features-community-title">Join the Community</h2>
+ <p class="features-community-subtitle">
+ Connect with other creators, share your work, and get help from the three.ws community.
+ </p>
+ <div class="features-community-links">
+ <a href="https://discord.gg/your-discord" class="community-link" target="_blank" rel="noopener">
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path d="M2.698 3.033a2.698 2.698 0 0 1 2.698-2.698h13.208a2.698 2.698 0 0 1 2.698 2.698v13.208a2.698 2.698 0 0 1-2.698 2.698h-13.208a2.698 2.698 0 0 1-2.698-2.698V3.033zM8.536 13.92a.843.843 0 0 0-.843.843c0 .466.377.843.843.843a.843.843 0 0 0 .843-.843c0-.466-.377-.843-.843-.843zm6.928 0a.843.843 0 0 0-.843.843c0 .466.377.843.843.843a.843.843 0 0 0 .843-.843c0-.466-.377-.843-.843-.843z"></path></svg>
+ <span>Join our Discord</span>
+ </a>
+ <a href="https://github.com/nirholas/3D-Agent" class="community-link" target="_blank" rel="noopener">
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0a12 12 0 0 0-3.793 23.393c.6.111.82-.261.82-.578v-2.02c-3.338.724-4.043-1.61-4.043-1.61-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.108-.775.418-1.305.762-1.605-2.665-.305-5.467-1.334-5.467-5.93 0-1.31.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.652.242 2.873.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.217.694.824.578A12 12 0 0 0 12 0z"></path></svg>
+ <span>View on GitHub</span>
+ </a>
+ </div>
+ </section>
+ <section class="features-cta">
+ <h2 class="features-cta-title">Ready to get started?</h2>
+ <p class="features-cta-subtitle">
+ Create your first 3D AI agent in just a few minutes.
+ </p>
+ <a href="/create" class="features-cta-button">Create Agent</a>
+ </section>
+ </main>
+ <footer class="h-footer">
+ <div class="h-footer-inner">
+ <p>© 2026 three.ws — All rights reserved.</p>
+ </div>
+ </footer>
+ </body>
+</html>
\ No newline at end of file
diff --git a/public/pumpfun.html b/public/pumpfun.html
index adce41347..b864caf78 100644
--- a/public/pumpfun.html
+++ b/public/pumpfun.html
@@ -348,185 +348,9 @@
</head>
<body class="home-page">
<header>
- <h1>
- <a href="https://three.ws/marketplace?tab=mine" aria-label="three.ws home"
- ><img class="wordmark-logo" src="/three.svg" alt="" aria-hidden="true" /><span
- class="wordmark-dot"
- aria-hidden="true"
- ></span
- >three.ws</a
- >
- </h1>
- <nav class="home-nav" aria-label="Primary">
- <ul class="nav-root" role="menubar">
- <li class="nav-item nav-has-menu" role="none">
- <button
- type="button"
- class="nav-trigger"
- aria-haspopup="true"
- aria-expanded="false"
- role="menuitem"
- >
- Build<span class="nav-caret" aria-hidden="true">▾</span>
- </button>
- <ul class="nav-menu" role="menu" aria-label="Build">
- <li role="none">
- <a href="/create" role="menuitem"
- ><span class="nav-mi-title">Create agent</span
- ><span class="nav-mi-sub">Avatar + brain wizard</span></a
- >
- </li>
- <li role="none">
- <a href="/app" role="menuitem"
- ><span class="nav-mi-title">Viewer</span
- ><span class="nav-mi-sub">Drag-and-drop GLB</span></a
- >
- </li>
- <li role="none">
- <a href="/validation" role="menuitem"
- ><span class="nav-mi-title">glTF Validator</span
- ><span class="nav-mi-sub">Khronos spec check</span></a
- >
- </li>
- </ul>
- </li>
- <li class="nav-item nav-has-menu" role="none">
- <button
- type="button"
- class="nav-trigger"
- aria-haspopup="true"
- aria-expanded="false"
- role="menuitem"
- >
- Discover<span class="nav-caret" aria-hidden="true">▾</span>
- </button>
- <ul class="nav-menu" role="menu" aria-label="Discover">
- <li role="none">
- <a href="/discover" role="menuitem"
- ><span class="nav-mi-title">Agents</span
- ><span class="nav-mi-sub">Public directory</span></a
- >
- </li>
- <li role="none">
- <a href="/widgets.html" role="menuitem"
- ><span class="nav-mi-title">Widgets gallery</span
- ><span class="nav-mi-sub">Embeddable showcases</span></a
- >
- </li>
- <li role="none">
- <a href="/reputation" role="menuitem"
- ><span class="nav-mi-title">Reputation</span
- ><span class="nav-mi-sub">ERC-8004 registry</span></a
- >
- </li>
- </ul>
- </li>
- <li class="nav-item nav-has-menu" role="none">
- <button
- type="button"
- class="nav-trigger"
- aria-haspopup="true"
- aria-expanded="false"
- role="menuitem"
- >
- Solana<span class="nav-caret" aria-hidden="true">▾</span>
- </button>
- <ul class="nav-menu" role="menu" aria-label="Solana">
- <li role="none">
- <a href="/pumpfun" role="menuitem"
- ><span class="nav-mi-title">Pump.fun stream</span
- ><span class="nav-mi-sub">Mint agent tokens</span></a
- >
- </li>
- <li role="none">
- <a href="/vanity-wallet" role="menuitem"
- ><span class="nav-mi-title">Vanity wallet</span
- ><span class="nav-mi-sub">Grind a Solana address</span></a
- >
- </li>
- <li role="none">
- <a href="/strategy-lab" role="menuitem"
- ><span class="nav-mi-title">Strategy Lab</span
- ><span class="nav-mi-sub">DCA + subscriptions</span></a
- >
- </li>
- <li role="none">
- <a href="/pump-live.html" role="menuitem"
- ><span class="nav-mi-title">Live launches</span
- ><span class="nav-mi-sub">Real-time mint feed</span></a
- >
- </li>
- <li role="none">
- <a href="/pump-dashboard.html" role="menuitem"
- ><span class="nav-mi-title">Pump Dashboard</span
- ><span class="nav-mi-sub">Watches · scanner · quotes</span></a
- >
- </li>
- <li role="none">
- <a href="/docs#solana" role="menuitem"
- ><span class="nav-mi-title">Solana SDK</span
- ><span class="nav-mi-sub">Attestations + agent-kit</span></a
- >
- </li>
- </ul>
- </li>
- <li class="nav-item nav-has-menu" role="none">
- <button
- type="button"
- class="nav-trigger"
- aria-haspopup="true"
- aria-expanded="false"
- role="menuitem"
- >
- Embed<span class="nav-caret" aria-hidden="true">▾</span>
- </button>
- <ul class="nav-menu" role="menu" aria-label="Embed">
- <li role="none">
- <a href="/studio" role="menuitem"
- ><span class="nav-mi-title">Widget Studio</span
- ><span class="nav-mi-sub">Pick avatar → copy snippet</span></a
- >
- </li>
- <li role="none">
- <a href="/artifact" role="menuitem"
- ><span class="nav-mi-title">Artifact viewer</span
- ><span class="nav-mi-sub">Claude artifact bundle</span></a
- >
- </li>
- <li role="none">
- <a href="/docs#embedding" role="menuitem"
- ><span class="nav-mi-title">Embed docs</span
- ><span class="nav-mi-sub">iframe + oEmbed</span></a
- >
- </li>
- <li role="none">
- <a href="/docs#web-component" role="menuitem"
- ><span class="nav-mi-title">&lt;agent-3d&gt;</span
- ><span class="nav-mi-sub">Web component reference</span></a
- >
- </li>
- </ul>
- </li>
- <li class="nav-item" role="none"><a href="/marketplace.html" role="menuitem">Marketplace</a></li>
- <li class="nav-item" role="none"><a href="/chat" role="menuitem">Chat</a></li>
- <li class="nav-item" role="none">
- <a href="/features" role="menuitem">Features</a>
- </li>
- <li class="nav-item" role="none"><a href="/tutorials.html" role="menuitem">Tutorials</a></li>
- <li class="nav-item" id="home-nav-my-agents-li" role="none" hidden>
- <a href="/my-agents" id="home-nav-my-agents" role="menuitem">My Agents</a>
- </li>
- <li class="nav-item" id="home-nav-user-li" role="none" hidden>
- <a href="/dashboard" id="home-nav-user" class="nav-user" role="menuitem"></a>
- </li>
- <li class="nav-item" role="none">
- <a href="/login" class="nav-cta" id="home-nav-cta" role="menuitem"
- >Get started</a
- >
- </li>
- </ul>
- </nav>
+ <div id="nav-container"></div>
</header>
+ <script src="/nav.js"></script>
<div class="pf-filterbar">
<h1>✦ PumpFun migrations</h1>
<button type="button" class="status-pill" id="status-pill" data-state="connecting" title="Click to reconnect when offline"><span class="dot connecting" id="status-dot"></span><span id="status-label">connecting…</span></button>
diff --git a/public/reputation/reputation.js b/public/reputation/reputation.js
index 47c33c367..06bad4c18 100644
--- a/public/reputation/reputation.js
+++ b/public/reputation/reputation.js
@@ -1,92 +1,124 @@
/**
- * Reputation page logic — view agent scores and submit reviews.
- * Imports from src/erc8004/reputation.js for contract interactions.
+ * Reputation page — view agent scores and submit reviews.
*/
import { getReputation, getRecentReviews, submitReputation } from '../../src/erc8004/reputation.js';
import { JsonRpcProvider, BrowserProvider } from 'ethers';
import { REGISTRY_DEPLOYMENTS } from '../../src/erc8004/abi.js';
+// ~seconds per block per chain
+const BLOCK_TIME = {
+ 1: 12, 10: 2, 56: 3, 100: 5, 137: 2, 250: 1, 324: 1, 1284: 6,
+ 5000: 2, 8453: 2, 42161: 0.25, 42220: 5, 43114: 2, 59144: 2, 534352: 3,
+ 97: 3, 11155111: 12, 84532: 2, 421614: 0.25, 11155420: 2, 80002: 2, 43113: 2,
+};
+
const CHAIN_NAMES = {
- 1: 'Ethereum',
- 10: 'Optimism',
- 56: 'BSC',
- 100: 'Gnosis',
- 137: 'Polygon',
- 250: 'Fantom',
- 324: 'zkSync Era',
- 1284: 'Moonbeam',
- 5000: 'Mantle',
- 8453: 'Base',
- 42161: 'Arbitrum One',
- 42220: 'Celo',
- 43114: 'Avalanche',
- 59144: 'Linea',
- 534352: 'Scroll',
- 97: 'BSC Testnet',
- 11155111: 'Ethereum Sepolia',
- 84532: 'Base Sepolia',
- 421614: 'Arbitrum Sepolia',
- 11155420: 'Optimism Sepolia',
- 80002: 'Polygon Amoy',
- 43113: 'Avalanche Fuji',
+ 1: 'Ethereum', 10: 'Optimism', 56: 'BSC', 100: 'Gnosis', 137: 'Polygon',
+ 250: 'Fantom', 324: 'zkSync Era', 1284: 'Moonbeam', 5000: 'Mantle', 8453: 'Base',
+ 42161: 'Arbitrum One', 42220: 'Celo', 43114: 'Avalanche', 59144: 'Linea', 534352: 'Scroll',
+ 97: 'BSC Testnet', 11155111: 'Ethereum Sepolia', 84532: 'Base Sepolia',
+ 421614: 'Arbitrum Sepolia', 11155420: 'Optimism Sepolia', 80002: 'Polygon Amoy', 43113: 'Avalanche Fuji',
};
-function getChainName(chainId) {
- return CHAIN_NAMES[chainId] || `Chain ${chainId}`;
-}
+const EXPLORER_BASE = {
+ 1: 'https://etherscan.io', 10: 'https://optimistic.etherscan.io', 56: 'https://bscscan.com',
+ 100: 'https://gnosisscan.io', 137: 'https://polygonscan.com', 250: 'https://ftmscan.com',
+ 324: 'https://explorer.zksync.io', 1284: 'https://moonscan.io', 5000: 'https://explorer.mantle.xyz',
+ 8453: 'https://basescan.org', 42161: 'https://arbiscan.io', 42220: 'https://explorer.celo.org',
+ 43114: 'https://snowscan.xyz', 59144: 'https://lineascan.build', 534352: 'https://scrollscan.com',
+ 97: 'https://testnet.bscscan.com', 11155111: 'https://sepolia.etherscan.io',
+ 84532: 'https://sepolia.basescan.org', 421614: 'https://sepolia.arbiscan.io',
+ 11155420: 'https://sepolia-optimism.etherscan.io', 80002: 'https://amoy.polygonscan.com',
+ 43113: 'https://testnet.snowtrace.io',
+};
+
+// ── Helpers ──────────────────────────────────────────────────────────────────
+
+function getChainName(chainId) { return CHAIN_NAMES[chainId] || `Chain ${chainId}`; }
function getExplorerUrl(chainId, txHash) {
- const base = {
- 1: 'https://etherscan.io',
- 10: 'https://optimistic.etherscan.io',
- 56: 'https://bscscan.com',
- 100: 'https://gnosisscan.io',
- 137: 'https://polygonscan.com',
- 250: 'https://ftmscan.com',
- 324: 'https://explorer.zksync.io',
- 1284: 'https://moonscan.io',
- 5000: 'https://explorer.mantle.xyz',
- 8453: 'https://basescan.org',
- 42161: 'https://arbiscan.io',
- 42220: 'https://explorer.celo.org',
- 43114: 'https://snowscan.xyz',
- 59144: 'https://lineascan.build',
- 534352: 'https://scrollscan.com',
- 97: 'https://testnet.bscscan.com',
- 11155111: 'https://sepolia.etherscan.io',
- 84532: 'https://sepolia.basescan.org',
- 421614: 'https://sepolia.arbiscan.io',
- 11155420: 'https://sepolia-optimism.etherscan.io',
- 80002: 'https://amoy.polygonscan.com',
- 43113: 'https://testnet.snowtrace.io',
- }[chainId];
+ const base = EXPLORER_BASE[chainId];
return base ? `${base}/tx/${txHash}` : null;
}
+function truncateAddress(addr) {
+ if (!addr || addr.length < 10) return addr;
+ return `${addr.slice(0, 6)}…${addr.slice(-4)}`;
+}
+
+function escapeHtml(text) {
+ const div = document.createElement('div');
+ div.textContent = text;
+ return div.innerHTML;
+}
+
+// Convert 0–100 contract score to 1–5 star count
+function scoreToStars(score) {
+ if (!score || score <= 0) return 0;
+ return Math.max(1, Math.min(5, Math.round(score / 20)));
+}
+
+// Render filled/empty star SVGs
+function starsHtml(stars, size = 16) {
+ let out = '<span class="rep-stars-row" aria-hidden="true">';
+ for (let i = 1; i <= 5; i++) {
+ out += `<svg width="${size}" height="${size}" viewBox="0 0 20 20" class="rep-star ${i <= stars ? 'filled' : 'empty'}">
+ <path d="M10 1l2.39 4.84 5.34.78-3.87 3.77.91 5.32L10 13.27l-4.77 2.51.91-5.32L2.27 6.62l5.34-.78z"/>
+ </svg>`;
+ }
+ out += '</span>';
+ return out;
+}
+
+// Color identicon from address
+function identiconHtml(address) {
+ if (!address) return '';
+ let hash = 0;
+ for (let i = 0; i < address.length; i++) {
+ hash = ((hash << 5) - hash + address.charCodeAt(i)) | 0;
+ }
+ const hue = Math.abs(hash) % 360;
+ const initials = address.slice(2, 4).toUpperCase();
+ return `<span class="rep-identicon" style="--hue:${hue}">${initials}</span>`;
+}
+
+// Estimate time-ago from block number
+function timeAgo(blockNumber, currentBlock, chainId) {
+ if (!currentBlock || !blockNumber) return null;
+ const blocksSince = currentBlock - blockNumber;
+ if (blocksSince < 0) return null;
+ const secs = blocksSince * (BLOCK_TIME[chainId] || 12);
+ if (secs < 60) return 'just now';
+ if (secs < 3600) return `${Math.round(secs / 60)}m ago`;
+ if (secs < 86400) return `${Math.round(secs / 3600)}h ago`;
+ if (secs < 86400 * 30) return `${Math.round(secs / 86400)}d ago`;
+ return `${Math.round(secs / (86400 * 30))}mo ago`;
+}
+
+async function resolveENS(address, provider) {
+ try { return await provider.resolveName(address); } catch { return null; }
+}
+
+// ── URL parsing ───────────────────────────────────────────────────────────────
+
function parseAgentId() {
const params = new URLSearchParams(window.location.search);
const agentParam = params.get('agent');
-
- if (!agentParam) {
- return null;
- }
+ if (!agentParam) return null;
const parts = agentParam.split(':');
- if (parts.length !== 2) {
- throw new Error('Invalid agent format. Expected ?agent=<chainId>:<agentId>');
- }
+ if (parts.length !== 2) throw new Error('Invalid agent format. Expected ?agent=<chainId>:<agentId>');
const chainId = Number(parts[0]);
const agentId = Number(parts[1]);
-
- if (!chainId || !agentId) {
- throw new Error('Invalid agent ID or chain ID');
- }
+ if (!chainId || !agentId) throw new Error('Invalid agent ID or chain ID');
return { chainId, agentId };
}
+// ── Lookup form ───────────────────────────────────────────────────────────────
+
function showLookupForm(appEl) {
appEl.innerHTML = `
<div class="rep-lookup-wrap">
@@ -96,14 +128,14 @@ function showLookupForm(appEl) {
<div class="rep-form-group">
<label for="lookup-chain">Network</label>
<select id="lookup-chain">
- <option value="1">Ethereum (1)</option>
- <option value="137">Polygon (137)</option>
- <option value="8453" selected>Base (8453)</option>
- <option value="42161">Arbitrum One (42161)</option>
- <option value="10">Optimism (10)</option>
- <option value="11155111">Ethereum Sepolia (11155111)</option>
- <option value="84532">Base Sepolia (84532)</option>
- <option value="421614">Arbitrum Sepolia (421614)</option>
+ <option value="1">Ethereum</option>
+ <option value="137">Polygon</option>
+ <option value="8453" selected>Base</option>
+ <option value="42161">Arbitrum One</option>
+ <option value="10">Optimism</option>
+ <option value="11155111">Ethereum Sepolia</option>
+ <option value="84532">Base Sepolia</option>
+ <option value="421614">Arbitrum Sepolia</option>
</select>
</div>
<div class="rep-form-group">
@@ -120,118 +152,143 @@ function showLookupForm(appEl) {
const chainSelect = document.getElementById('lookup-chain');
function go() {
- const agentId = agentInput.value.trim();
- const chainId = chainSelect.value;
- if (!agentId || Number(agentId) < 1) {
- agentInput.focus();
- return;
- }
- window.location.search = `?agent=${chainId}:${agentId}`;
+ const id = agentInput.value.trim();
+ if (!id || Number(id) < 1) { agentInput.focus(); return; }
+ window.location.search = `?agent=${chainSelect.value}:${id}`;
}
btn.addEventListener('click', go);
- agentInput.addEventListener('keydown', (e) => {
- if (e.key === 'Enter') go();
- });
-}
-
-async function fetchAgentInfo(agentId) {
- try {
- const response = await fetch(`/api/agents/${agentId}`);
- if (!response.ok) return null;
- return await response.json();
- } catch {
- return null;
- }
-}
-
-function truncateAddress(addr) {
- if (!addr || addr.length < 10) return addr;
- return `${addr.slice(0, 6)}…${addr.slice(-4)}`;
+ agentInput.addEventListener('keydown', (e) => { if (e.key === 'Enter') go(); });
}
-async function resolveENS(address, provider) {
- try {
- return await provider.resolveName(address);
- } catch {
- return null;
- }
-}
+// ── Skeleton loading ──────────────────────────────────────────────────────────
-function formatScore(score) {
- if (typeof score === 'number') {
- return score.toFixed(1);
- }
- return '—';
+function showSkeleton(appEl) {
+ const card = () => `
+ <div class="rep-skeleton-card">
+ <div class="rep-skel rep-skel-row">
+ <div class="rep-skel rep-skel-avatar"></div>
+ <div class="rep-skel rep-skel-name"></div>
+ <div class="rep-skel rep-skel-badge"></div>
+ </div>
+ <div class="rep-skel rep-skel-line" style="width:90%"></div>
+ <div class="rep-skel rep-skel-line" style="width:65%"></div>
+ </div>`;
+ appEl.innerHTML = `
+ <div class="rep-breadcrumb">
+ <a href="/marketplace.html">Marketplace</a>
+ <span class="rep-breadcrumb-sep">/</span>
+ <span>Reputation</span>
+ </div>
+ <div class="rep-skel-header">
+ <div class="rep-skel rep-skel-title"></div>
+ <div class="rep-skel rep-skel-meta"></div>
+ </div>
+ <div class="rep-skel-stats">
+ ${[1,2,3].map(() => `<div class="rep-skel-stat"><div class="rep-skel rep-skel-stat-val"></div><div class="rep-skel rep-skel-stat-lbl"></div></div>`).join('')}
+ </div>
+ <div class="rep-skel-reviews">
+ ${[1,2,3].map(card).join('')}
+ </div>
+ `;
}
-function scoreBadge(score) {
- if (score > 0) return `<span class="rep-score-badge pos">+${score}</span>`;
- if (score < 0) return `<span class="rep-score-badge neg">${score}</span>`;
- return `<span class="rep-score-badge neu">0</span>`;
-}
+// ── API ───────────────────────────────────────────────────────────────────────
-function scoreBarHtml(average) {
- if (typeof average !== 'number' || isNaN(average)) return '';
- const pct = Math.max(0, Math.min(100, ((average + 100) / 200) * 100));
- const color = average > 0 ? '#86efac' : average < 0 ? '#fca5a5' : 'rgba(255,255,255,0.3)';
- return `<div class="rep-score-bar"><div class="rep-score-fill" style="width:${pct}%;background:${color}"></div></div>`;
+async function fetchAgentInfo(agentId) {
+ try {
+ const r = await fetch(`/api/agents/${agentId}`);
+ if (!r.ok) return null;
+ return await r.json();
+ } catch { return null; }
}
-function formatDate() {
- return 'Recent';
-}
+// ── Main render ───────────────────────────────────────────────────────────────
async function main() {
const appEl = document.querySelector('#app');
try {
const parsed = parseAgentId();
- if (!parsed) {
- showLookupForm(appEl);
- return;
- }
- const { chainId, agentId } = parsed;
+ if (!parsed) { showLookupForm(appEl); return; }
- // Show loading state
- appEl.innerHTML = `
- <div class="rep-loading">
- <div class="spinner"></div>
- <p>Loading reputation…</p>
- </div>
- `;
+ const { chainId, agentId } = parsed;
+ showSkeleton(appEl);
- // Check if chain is supported
if (!REGISTRY_DEPLOYMENTS[chainId]) {
appEl.innerHTML = `
<div class="rep-unsupported-chain">
<h3>Network not supported</h3>
<p>On-chain reputation is not available on ${getChainName(chainId)} (chain ID ${chainId}).</p>
- <p>Switch to Ethereum mainnet, Polygon, Base, or Arbitrum to view reputation.</p>
- </div>
- `;
+ <p>Supported: Ethereum, Polygon, Base, Arbitrum, and testnets.</p>
+ <a href="/reputation" class="rep-submit-btn" style="display:inline-block;margin-top:1rem;text-decoration:none">Try another network</a>
+ </div>`;
return;
}
- // Get agent info from backend if available
- const agentInfo = await fetchAgentInfo(agentId);
-
- // Create provider for on-chain data
- const rpcUrl = REGISTRY_DEPLOYMENTS[chainId]?.rpcUrl || `https://rpc.${chainId}.io`;
+ const rpcUrl = `https://rpc.${chainId}.io`;
const provider = new JsonRpcProvider(rpcUrl);
- // Fetch reputation data
- const [repData, reviews] = await Promise.all([
+ const [agentInfo, repData, reviews, currentBlock] = await Promise.all([
+ fetchAgentInfo(agentId),
getReputation({ agentId, runner: provider, chainId }),
getRecentReviews({ agentId, runner: provider, chainId, fromBlock: 0 }),
+ provider.getBlockNumber().catch(() => null),
]);
- // Reverse to show most recent first, limit to 20
- const recentReviews = reviews.reverse().slice(0, 20);
+ const allReviews = reviews.slice().reverse();
+ const agentName = agentInfo?.name || `Agent #${agentId}`;
+ const avgStars = scoreToStars(repData.average);
+
+ // Build review HTML for a given list
+ const ensCache = new Map();
+ const ensPromises = allReviews.map(async (rev) => {
+ if (!ensCache.has(rev.from)) {
+ ensCache.set(rev.from, resolveENS(rev.from, provider).catch(() => null));
+ }
+ return { review: rev, name: await ensCache.get(rev.from) };
+ });
+ const reviewsWithENS = await Promise.all(ensPromises);
+
+ function renderReviews(list) {
+ if (!list.length) return `<div class="rep-empty">No reviews in this category.</div>`;
+ return list.map(({ review, name }) => {
+ const displayName = name || truncateAddress(review.from);
+ const explorerUrl = getExplorerUrl(chainId, review.txHash);
+ const stars = scoreToStars(review.score);
+ const ts = timeAgo(review.blockNumber, currentBlock, chainId);
+ return `
+ <div class="rep-review-item">
+ <div class="rep-review-header">
+ <div class="rep-reviewer-info">
+ ${identiconHtml(review.from)}
+ <span class="rep-reviewer">${escapeHtml(displayName)}</span>
+ </div>
+ <div class="rep-review-right">
+ ${starsHtml(stars, 14)}
+ <span class="rep-score-num">${review.score}/100</span>
+ </div>
+ </div>
+ ${review.comment ? `<div class="rep-comment">${escapeHtml(review.comment)}</div>` : ''}
+ <div class="rep-review-footer">
+ ${ts ? `<span>${ts}</span>` : ''}
+ ${explorerUrl ? `<a href="${explorerUrl}" target="_blank" rel="noopener">view tx</a>` : ''}
+ </div>
+ </div>`;
+ }).join('');
+ }
+
+ const positive = reviewsWithENS.filter(r => r.review.score >= 60);
+ const critical = reviewsWithENS.filter(r => r.review.score < 40);
+
+ // Share URL + X tweet text
+ const shareUrl = window.location.href;
+ const tweetText = encodeURIComponent(
+ `Check out the on-chain reputation for ${agentName} on @trythreews — ${repData.count} reviews, avg score ${repData.average.toFixed(0)}/100\n${shareUrl}`
+ );
+ const tweetUrl = `https://x.com/intent/tweet?text=${tweetText}`;
- // Render page
- const avgClass = repData.average > 0 ? 'positive' : repData.average < 0 ? 'negative' : '';
- let html = `
+ const html = `
<div class="rep-breadcrumb">
<a href="/marketplace.html">Marketplace</a>
<span class="rep-breadcrumb-sep">/</span>
@@ -240,92 +297,54 @@ async function main() {
<div class="rep-header">
<div class="rep-header-left">
- <h1>${agentInfo?.name || `Agent #${agentId}`}</h1>
+ <h1>${escapeHtml(agentName)}</h1>
<div class="rep-header-meta">${getChainName(chainId)} · ID ${agentId}</div>
</div>
- <button class="rep-share-btn" id="share-btn" title="Copy link">
- <svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="3" r="1.5"/><circle cx="12" cy="13" r="1.5"/><circle cx="3" cy="8" r="1.5"/><line x1="10.6" y1="3.9" x2="4.4" y2="7.1"/><line x1="10.6" y1="12.1" x2="4.4" y2="8.9"/></svg>
- Share
- </button>
+ <div class="rep-header-actions">
+ <a href="${tweetUrl}" target="_blank" rel="noopener" class="rep-action-btn rep-tweet-btn" title="Share on X">
+ <svg width="13" height="13" viewBox="0 0 24 24" aria-hidden="true"><path fill="currentColor" d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg>
+ Share
+ </a>
+ <button class="rep-action-btn" id="copy-btn" title="Copy link">
+ <svg width="13" height="13" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="3" r="1.5"/><circle cx="12" cy="13" r="1.5"/><circle cx="3" cy="8" r="1.5"/><line x1="10.6" y1="3.9" x2="4.4" y2="7.1"/><line x1="10.6" y1="12.1" x2="4.4" y2="8.9"/></svg>
+ Copy link
+ </button>
+ </div>
</div>
<div class="rep-stats">
<div class="rep-stat">
- <div class="rep-stat-label">Average Rating</div>
- <div class="rep-stat-value ${avgClass}">${formatScore(repData.average)}</div>
- ${scoreBarHtml(repData.average)}
+ <div class="rep-stat-label">Avg Rating</div>
+ <div class="rep-stat-value">${repData.count ? repData.average.toFixed(0) : '—'}<span class="rep-stat-denom">${repData.count ? '/100' : ''}</span></div>
+ <div class="rep-stars-stat">${starsHtml(avgStars, 15)}</div>
</div>
<div class="rep-stat">
<div class="rep-stat-label">Reviews</div>
<div class="rep-stat-value">${repData.count}</div>
+ <div class="rep-stat-sub">${positive.length} positive · ${critical.length} critical</div>
</div>
<div class="rep-stat">
- <div class="rep-stat-label">Total Score</div>
- <div class="rep-stat-value ${avgClass}">${repData.total}</div>
+ <div class="rep-stat-label">Score bar</div>
+ <div class="rep-score-meter">
+ <div class="rep-score-meter-fill" style="width:${repData.count ? Math.min(100,repData.average) : 0}%;background:${repData.average >= 60 ? '#86efac' : repData.average >= 40 ? '#fde68a' : '#fca5a5'}"></div>
+ </div>
+ <div class="rep-stat-sub">${repData.count ? (repData.average >= 60 ? 'Good standing' : repData.average >= 40 ? 'Mixed reviews' : 'Poor standing') : 'No data yet'}</div>
</div>
</div>
- `;
- if (recentReviews.length === 0) {
- html += `
- <div class="rep-reviews">
- <div class="rep-empty">No reviews yet. Be the first to review this agent!</div>
+ <div class="rep-reviews" id="reviews-section">
+ <div class="rep-filter-tabs" role="tablist">
+ <button class="rep-tab active" data-filter="all" role="tab" aria-selected="true">All <span class="rep-tab-count">${allReviews.length}</span></button>
+ <button class="rep-tab" data-filter="positive" role="tab" aria-selected="false">Positive <span class="rep-tab-count">${positive.length}</span></button>
+ <button class="rep-tab" data-filter="critical" role="tab" aria-selected="false">Critical <span class="rep-tab-count">${critical.length}</span></button>
</div>
- `;
- } else {
- html += `
- <div class="rep-reviews">
- <h3>Recent Reviews <span class="rep-review-count">${recentReviews.length} shown</span></h3>
- <div class="rep-review-list">
- `;
-
- // Resolve ENS names in parallel
- const ensPromises = recentReviews.map(async (rev) => {
- const name = await resolveENS(rev.from, provider).catch(() => null);
- return { review: rev, name };
- });
-
- const reviewsWithENS = await Promise.all(ensPromises);
-
- reviewsWithENS.forEach(({ review, name }) => {
- const displayName = name || truncateAddress(review.from);
- const explorerUrl = getExplorerUrl(chainId, review.txHash);
-
- html += `
- <div class="rep-review-item">
- <div class="rep-review-header">
- <span class="rep-reviewer">${displayName}</span>
- ${scoreBadge(review.score)}
- </div>
- `;
-
- if (review.comment) {
- html += `<div class="rep-comment">${escapeHtml(review.comment)}</div>`;
- }
-
- html += `
- <div class="rep-review-footer">
- <span>${formatDate()}</span>
- `;
-
- if (explorerUrl) {
- html += `<a href="${explorerUrl}" target="_blank" rel="noopener">view tx</a>`;
- }
-
- html += `
- </div>
- </div>
- `;
- });
-
- html += `
- </div>
+ <div id="review-list" class="rep-review-list">
+ ${allReviews.length === 0
+ ? `<div class="rep-empty">No reviews yet — be the first!</div>`
+ : renderReviews(reviewsWithENS.slice(0, 20))}
</div>
- `;
- }
+ </div>
- // Submit form
- html += `
<div class="rep-submit-form">
<h3>Submit a Review</h3>
<div id="wallet-status" class="rep-form-hint">
@@ -334,187 +353,158 @@ async function main() {
<div id="form-container" style="display:none">
<div class="rep-form-group">
<label>Your Rating</label>
- <p class="rep-rating-hint">−100 (very bad) → 0 (neutral) → +100 (excellent)</p>
- <div class="rep-stars-input" id="rating-input"></div>
- <input type="hidden" id="rep-rating" value="0" />
+ <div class="rep-star-picker" id="star-picker" role="radiogroup" aria-label="Star rating">
+ ${[1,2,3,4,5].map(n => `
+ <button class="rep-star-pick" data-stars="${n}" data-score="${n*20}" role="radio" aria-checked="false" title="${n} star${n>1?'s':''}">
+ ${starsHtml(n, 22)}
+ <span class="rep-star-label">${['Terrible','Poor','Okay','Good','Excellent'][n-1]}</span>
+ </button>`).join('')}
+ </div>
+ <input type="hidden" id="rep-rating" value="" />
</div>
<div class="rep-form-group">
- <label>Comment (optional)</label>
- <textarea id="rep-comment" placeholder="Share your feedback…" maxlength="280"></textarea>
- <small><span id="char-count">0</span>/280 characters</small>
+ <label for="rep-comment">Comment <span class="rep-optional">(optional)</span></label>
+ <textarea id="rep-comment" placeholder="What was your experience with this agent?" maxlength="280" rows="3"></textarea>
+ <small><span id="char-count">0</span>/280</small>
</div>
<button id="submit-review" class="rep-submit-btn" disabled>Submit Review</button>
- <div id="form-message" style="display:none; margin-top:1rem"></div>
+ <div id="form-message" style="display:none;margin-top:1rem"></div>
</div>
</div>
`;
appEl.innerHTML = html;
- // Share button
- const shareBtn = document.getElementById('share-btn');
- if (shareBtn) {
- shareBtn.addEventListener('click', async () => {
- const url = window.location.href;
- try {
- await navigator.clipboard.writeText(url);
- } catch {
- const ta = document.createElement('textarea');
- ta.value = url;
- ta.style.position = 'fixed';
- ta.style.opacity = '0';
- document.body.appendChild(ta);
- ta.select();
- document.execCommand('copy');
- document.body.removeChild(ta);
- }
- shareBtn.classList.add('copied');
- shareBtn.textContent = 'Copied!';
- setTimeout(() => {
- shareBtn.classList.remove('copied');
- shareBtn.innerHTML = `<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="3" r="1.5"/><circle cx="12" cy="13" r="1.5"/><circle cx="3" cy="8" r="1.5"/><line x1="10.6" y1="3.9" x2="4.4" y2="7.1"/><line x1="10.6" y1="12.1" x2="4.4" y2="8.9"/></svg> Share`;
- }, 2000);
+ // Filter tabs
+ const reviewListEl = document.getElementById('review-list');
+ const allData = { all: reviewsWithENS, positive, critical };
+ document.querySelectorAll('.rep-tab').forEach(tab => {
+ tab.addEventListener('click', () => {
+ document.querySelectorAll('.rep-tab').forEach(t => {
+ t.classList.remove('active');
+ t.setAttribute('aria-selected', 'false');
+ });
+ tab.classList.add('active');
+ tab.setAttribute('aria-selected', 'true');
+ const filter = tab.dataset.filter;
+ const list = allData[filter] || [];
+ reviewListEl.innerHTML = renderReviews(list.slice(0, 20));
});
- }
+ });
- // Wire up wallet connection
- const connectBtn = document.getElementById('connect-wallet');
- const walletStatus = document.getElementById('wallet-status');
- const formContainer = document.getElementById('form-container');
+ // Copy link
+ const copyBtn = document.getElementById('copy-btn');
+ copyBtn.addEventListener('click', async () => {
+ try { await navigator.clipboard.writeText(shareUrl); }
+ catch {
+ const ta = Object.assign(document.createElement('textarea'), { value: shareUrl });
+ Object.assign(ta.style, { position: 'fixed', opacity: '0' });
+ document.body.appendChild(ta);
+ ta.select();
+ document.execCommand('copy');
+ document.body.removeChild(ta);
+ }
+ copyBtn.classList.add('copied');
+ copyBtn.textContent = 'Copied!';
+ setTimeout(() => {
+ copyBtn.classList.remove('copied');
+ copyBtn.innerHTML = `<svg width="13" height="13" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="3" r="1.5"/><circle cx="12" cy="13" r="1.5"/><circle cx="3" cy="8" r="1.5"/><line x1="10.6" y1="3.9" x2="4.4" y2="7.1"/><line x1="10.6" y1="12.1" x2="4.4" y2="8.9"/></svg> Copy link`;
+ }, 2000);
+ });
+
+ // Star picker
+ const ratingInput = document.getElementById('rep-rating');
const submitBtn = document.getElementById('submit-review');
- const ratingInput = document.getElementById('rating-input');
- const commentEl = document.getElementById('rep-comment');
- const charCount = document.getElementById('char-count');
- const formMessage = document.getElementById('form-message');
+ let ratingSelected = false;
- // Create star buttons
- for (let i = -100; i <= 100; i += 20) {
- const btn = document.createElement('button');
- btn.className = 'rep-star-btn';
- btn.textContent = i >= 0 ? `+${i}` : `${i}`;
- btn.dataset.value = i;
+ document.querySelectorAll('.rep-star-pick').forEach(btn => {
btn.addEventListener('click', () => {
- document
- .querySelectorAll('#rating-input button')
- .forEach((b) => b.classList.remove('selected'));
+ document.querySelectorAll('.rep-star-pick').forEach(b => {
+ b.classList.remove('selected');
+ b.setAttribute('aria-checked', 'false');
+ });
btn.classList.add('selected');
- document.getElementById('rep-rating').value = i;
+ btn.setAttribute('aria-checked', 'true');
+ ratingInput.value = btn.dataset.score;
+ ratingSelected = true;
submitBtn.disabled = false;
});
- ratingInput.appendChild(btn);
- }
-
- commentEl.addEventListener('input', () => {
- charCount.textContent = commentEl.value.length;
});
+ // Comment char count
+ const commentEl = document.getElementById('rep-comment');
+ const charCount = document.getElementById('char-count');
+ commentEl.addEventListener('input', () => { charCount.textContent = commentEl.value.length; });
+
+ // Wallet + submit
+ const connectBtn = document.getElementById('connect-wallet');
+ const walletStatus = document.getElementById('wallet-status');
+ const formContainer = document.getElementById('form-container');
+ const formMessage = document.getElementById('form-message');
let connectedAddress = null;
connectBtn.addEventListener('click', async () => {
try {
- if (typeof window.ethereum === 'undefined') {
- throw new Error('MetaMask not found. Please install it.');
- }
-
+ if (typeof window.ethereum === 'undefined') throw new Error('No wallet found. Install MetaMask to submit a review.');
const accounts = await window.ethereum.request({ method: 'eth_requestAccounts' });
connectedAddress = accounts[0];
- // Check if already reviewed
- const hasReviewed = recentReviews.some(
- (r) => r.from.toLowerCase() === connectedAddress.toLowerCase(),
- );
- if (hasReviewed) {
- walletStatus.innerHTML = `
- <div class="rep-error">
- <p>You've already reviewed this agent.</p>
- </div>
- `;
- formContainer.style.display = 'none';
+ const alreadyReviewed = allReviews.some(r => r.from.toLowerCase() === connectedAddress.toLowerCase());
+ if (alreadyReviewed) {
+ walletStatus.innerHTML = `<div class="rep-info-box">You have already reviewed this agent.</div>`;
return;
}
walletStatus.innerHTML = `
- <p style="color:rgba(229,229,229,0.7)">
- Connected: <code style="font-family:monospace">${truncateAddress(connectedAddress)}</code>
- </p>
- `;
+ <div class="rep-wallet-connected">
+ ${identiconHtml(connectedAddress)}
+ <span>${truncateAddress(connectedAddress)}</span>
+ </div>`;
formContainer.style.display = '';
- connectBtn.style.display = 'none';
} catch (err) {
- formMessage.style.display = '';
- formMessage.className = 'rep-error';
- formMessage.innerHTML = `<p>${err.message}</p>`;
+ walletStatus.innerHTML = `<div class="rep-error"><p>${escapeHtml(err.message)}</p></div>`;
}
});
submitBtn.addEventListener('click', async () => {
- if (!connectedAddress) {
- formMessage.innerHTML = '<p>Please connect your wallet first.</p>';
- formMessage.className = 'rep-error';
- formMessage.style.display = '';
- return;
- }
+ if (!connectedAddress || !ratingSelected) return;
- const rating = Number(document.getElementById('rep-rating').value);
+ const score = Number(ratingInput.value);
const comment = commentEl.value.trim();
- if (!rating && rating !== 0) {
- formMessage.innerHTML = '<p>Please select a rating.</p>';
- formMessage.className = 'rep-error';
- formMessage.style.display = '';
- return;
- }
+ submitBtn.disabled = true;
+ submitBtn.textContent = 'Submitting…';
+ formMessage.style.display = 'none';
try {
- submitBtn.disabled = true;
- submitBtn.textContent = 'Submitting…';
-
- if (typeof window.ethereum === 'undefined') {
- throw new Error('MetaMask not found.');
- }
-
- const signer = new BrowserProvider(window.ethereum).getSigner();
- const txHash = await submitReputation({
- agentId,
- score: Math.abs(rating),
- comment,
- signer: await signer,
- chainId,
- });
+ if (typeof window.ethereum === 'undefined') throw new Error('No wallet found.');
+ const signer = await new BrowserProvider(window.ethereum).getSigner();
+ const txHash = await submitReputation({ agentId, score, comment, signer, chainId });
formMessage.innerHTML = `
<div class="rep-success">
- <p>Review submitted! <a href="${getExplorerUrl(chainId, txHash) || '#'}" target="_blank" rel="noopener">View transaction</a></p>
- </div>
- `;
+ Review submitted!
+ ${getExplorerUrl(chainId, txHash) ? `<a href="${getExplorerUrl(chainId, txHash)}" target="_blank" rel="noopener">View transaction</a>` : ''}
+ </div>`;
formMessage.style.display = '';
formContainer.style.display = 'none';
- connectBtn.style.display = '';
- connectBtn.textContent = 'Submit Another?';
} catch (err) {
- formMessage.innerHTML = `<p>${err.message || 'Submission failed'}</p>`;
- formMessage.className = 'rep-error';
+ formMessage.innerHTML = `<div class="rep-error"><p>${escapeHtml(err.message || 'Submission failed')}</p></div>`;
formMessage.style.display = '';
submitBtn.disabled = false;
submitBtn.textContent = 'Submit Review';
}
});
+
} catch (err) {
console.error('Failed to load reputation:', err);
appEl.innerHTML = `
<div class="rep-error">
<h3>Error</h3>
- <p>${err.message}</p>
+ <p>${escapeHtml(err.message)}</p>
<button onclick="location.reload()">Retry</button>
- </div>
- `;
+ </div>`;
}
}
-function escapeHtml(text) {
- const div = document.createElement('div');
- div.textContent = text;
- return div.innerHTML;
-}
-
main();
diff --git a/public/vanity-wallet.html b/public/vanity-wallet.html
index 8500bcf06..6439afc8a 100644
--- a/public/vanity-wallet.html
+++ b/public/vanity-wallet.html
@@ -192,73 +192,10 @@
</head>
<body>
<a href="#main-content" class="skip-link">Skip to main content</a>
- <header class="site-header">
- <h1>
- <a href="/" aria-label="three.ws home"><span class="wordmark-dot" aria-hidden="true"></span>three.ws</a>
- </h1>
- <nav class="features-nav" aria-label="Primary">
- <ul class="nav-root" role="menubar">
- <li class="nav-item nav-has-menu" role="none">
- <button
- type="button"
- class="nav-trigger"
- aria-haspopup="true"
- aria-expanded="false"
- role="menuitem"
- >
- Build<span class="nav-caret" aria-hidden="true">▾</span>
- </button>
- <ul class="nav-menu" role="menu" aria-label="Build">
- <li role="none">
- <a href="/create" role="menuitem"
- ><span class="nav-mi-title">Create agent</span
- ><span class="nav-mi-sub">Avatar + brain wizard</span></a
- >
- </li>
- <li role="none">
- <a href="/app" role="menuitem"
- ><span class="nav-mi-title">Viewer</span
- ><span class="nav-mi-sub">Drag-and-drop GLB</span></a
- >
- </li>
- <li role="none">
- <a href="/validation" role="menuitem"
- ><span class="nav-mi-title">glTF Validator</span
- ><span class="nav-mi-sub">Khronos spec check</span></a
- >
- </li>
- </ul>
- </li>
- <li role="none"><a href="/discover" role="menuitem">Discover</a></li>
- <li class="nav-item nav-has-menu" role="none">
- <button
- type="button"
- class="nav-trigger"
- aria-haspopup="true"
- aria-expanded="false"
- role="menuitem"
- >
- Solana<span class="nav-caret" aria-hidden="true">▾</span>
- </button>
- <ul class="nav-menu" role="menu" aria-label="Solana">
- <li role="none">
- <a href="/pumpfun" role="menuitem"
- ><span class="nav-mi-title">Pump.fun stream</span
- ><span class="nav-mi-sub">Mint agent tokens</span></a
- >
- </li>
- <li role="none">
- <a href="/vanity-wallet" role="menuitem"
- ><span class="nav-mi-title">Vanity wallet</span
- ><span class="nav-mi-sub">Generate address</span></a
- >
- </li>
- </ul>
- </li>
- <li class="nav-item" role="none"><a href="/docs" role="menuitem">Docs</a></li>
- </ul>
- </nav>
- </header>
+ <header>
+ <div id="nav-container"></div>
+ </header>
+ <script src="/nav.js"></script>
<main id="main-content">
<h1>✦ Vanity wallet generator</h1>
diff --git a/src/pump/launch-token-modal.js b/src/pump/launch-token-modal.js
index 94e2a98b0..0e3cafdaf 100644
--- a/src/pump/launch-token-modal.js
+++ b/src/pump/launch-token-modal.js
@@ -73,10 +73,63 @@ export class LaunchTokenModal {
this._overlay = null;
this._chart = null;
this._keyHandler = null;
+ this._solPriceUsd = null;
+ }
+
+ async _fetchSolPrice() {
+ try {
+ const r = await fetch(
+ 'https://api.coingecko.com/api/v3/simple/price?ids=solana&vs_currencies=usd',
+ );
+ if (r.ok) {
+ const data = await r.json();
+ this._solPriceUsd = data?.solana?.usd || null;
+ // If modal is open on step 1, re-render to show price hints
+ if (this._overlay && this._step === 1) {
+ this._renderStep1();
+ }
+ }
+ } catch (e) {
+ console.warn('Could not fetch SOL price', e);
+ }
+ }
+
+ _injectCss() {
+ if (document.getElementById('ltm-styles')) return;
+ const style = document.createElement('style');
+ style.id = 'ltm-styles';
+ style.textContent = `
+ .ltm-input-wrap { position: relative; display: flex; }
+ .ltm-input-wrap .ltm-input { flex-grow: 1; }
+ .ltm-input-adornment {
+ position: absolute;
+ right: 12px;
+ top: 50%;
+ transform: translateY(-50%);
+ color: var(--muted, #888);
+ font-size: 13px;
+ pointer-events: none;
+ }
+ `;
+ document.head.appendChild(style);
+ }
+
+ _solFmtWithUsd(solAmount) {
+ if (solAmount == null) return '—';
+ const n = Number(solAmount);
+ let text = `${n >= 10 ? n.toFixed(3) : n.toFixed(4)} SOL`;
+ if (this._solPriceUsd) {
+ const usd = (n * this._solPriceUsd).toFixed(2);
+ text += ` (~$${usd})`;
+ }
+ return text;
}
open() {
if (this._overlay) return;
+ this._injectCss();
+ this._fetchSolPrice();
+
const el = document.createElement('div');
el.className = 'ltm-overlay';
document.body.appendChild(el);
@@ -193,8 +246,11 @@ export class LaunchTokenModal {
<label class="ltm-label" for="ltm-buy">
Dev buy <span class="ltm-hint">optional, 0–50 SOL</span>
</label>
- <input class="ltm-input" type="number" id="ltm-buy"
- min="0" max="50" step="0.1" value="${d.initialBuySol}">
+ <div class="ltm-input-wrap">
+ <input class="ltm-input" type="number" id="ltm-buy"
+ min="0" max="50" step="0.1" value="${d.initialBuySol}">
+ <span class="ltm-input-adornment" id="ltm-buy-usd"></span>
+ </div>
</div>
${netToggle}`,
`<div></div>
@@ -205,8 +261,22 @@ export class LaunchTokenModal {
const nameInput = this._overlay.querySelector('#ltm-name');
const symInput = this._overlay.querySelector('#ltm-sym');
const symErr = this._overlay.querySelector('#ltm-sym-err');
+ const buyInput = this._overlay.querySelector('#ltm-buy');
+ const buyUsd = this._overlay.querySelector('#ltm-buy-usd');
let symTouched = d.symbol !== _nameToSymbol(d.name);
+ const updateBuyUsd = () => {
+ if (!this._solPriceUsd || !buyUsd) return;
+ const sol = parseFloat(buyInput.value) || 0;
+ const usd = (sol * this._solPriceUsd).toFixed(2);
+ buyUsd.textContent = `~ $${usd}`;
+ };
+
+ if (buyInput) {
+ buyInput.addEventListener('input', updateBuyUsd);
+ updateBuyUsd();
+ }
+
nameInput.addEventListener('input', () => {
if (!symTouched) symInput.value = _nameToSymbol(nameInput.value);
});
@@ -302,17 +372,17 @@ export class LaunchTokenModal {
return;
}
- const rows = [['Fixed costs (rent + fees)', _solFmt(data.fixed_total_sol)]];
+ const rows = [['Fixed costs (rent + fees)', this._solFmtWithUsd(data.fixed_total_sol)]];
if (data.initial_buy && data.initial_buy.sol > 0) {
- rows.push(['Dev buy', _solFmt(data.initial_buy.sol)]);
+ rows.push(['Dev buy', this._solFmtWithUsd(data.initial_buy.sol)]);
if (data.initial_buy.protocol_fee_sol > 0)
- rows.push(['Protocol fee (~1%)', _solFmt(data.initial_buy.protocol_fee_sol)]);
+ rows.push(['Protocol fee (~1%)', this._solFmtWithUsd(data.initial_buy.protocol_fee_sol)]);
if (data.initial_buy.tokens_out) {
const n = Number(data.initial_buy.tokens_out).toLocaleString();
rows.push([`Tokens you receive`, `${n} ${this._d.symbol}`]);
}
}
- rows.push(['Total SOL needed', _solFmt(data.total_sol)]);
+ rows.push(['Total SOL needed', this._solFmtWithUsd(data.total_sol)]);
this._overlay.querySelector('#ltm-quote').innerHTML = rows
.map(
diff --git a/src/viewer.js b/src/viewer.js
index db1fe44db..7e72f90f0 100644
--- a/src/viewer.js
+++ b/src/viewer.js
@@ -216,22 +216,7 @@ export class Viewer {
window.addEventListener('message', this._onMessage, false);
}
- setCameraTarget(boneName) {
- if (!this.content) return;
-
- let bone = null;
- this.content.traverse((object) => {
- if (object.isBone && object.name === boneName) {
- bone = object;
- }
- });
- if (bone) {
- const target = new THREE.Vector3();
- bone.getWorldPosition(target);
- this._tweenCamera(this.defaultCamera.position, target, 600);
- }
- }
setCameraTarget(boneName) {
if (!this.content) return;