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.

chore: remove scratch coin3d diag scripts/screenshots, ignore scripts/_*

nirholas8b9b1b55555f
diff --git a/.github/workflows/publish-ibm-watsonx-mcp.yml b/.github/workflows/publish-ibm-watsonx-mcp.yml
index 03e4abd4d..bd8b1740e 100644
--- a/.github/workflows/publish-ibm-watsonx-mcp.yml
+++ b/.github/workflows/publish-ibm-watsonx-mcp.yml
@@ -1,4 +1,4 @@
-# Publish @nirholas/ibm-watsonx-mcp to npm and the official MCP Registry.
+# Publish @three-ws/ibm-watsonx-mcp to npm and the official MCP Registry.
#
# Manual trigger. The npm step needs an NPM_TOKEN secret (Automation token with
# publish rights). The MCP Registry step needs NO secret — it authenticates with
diff --git a/.gitignore b/.gitignore
index aef66b2e4..6af1f5ccc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -130,3 +130,6 @@ sc/
# Debug screenshots from scripts — scratch output, never commit
scripts/debug-*.png
+
+# Scratch/diagnostic scripts and screenshots
+scripts/_*
diff --git a/packages/ibm-watsonx-mcp/README.md b/packages/ibm-watsonx-mcp/README.md
index 7b1d30c56..6031078b1 100644
--- a/packages/ibm-watsonx-mcp/README.md
+++ b/packages/ibm-watsonx-mcp/README.md
@@ -1,4 +1,4 @@
-# @nirholas/ibm-watsonx-mcp
+# @three-ws/ibm-watsonx-mcp
An [MCP](https://modelcontextprotocol.io) server for **IBM watsonx.ai**. It exposes IBM Granite (and any model in your watsonx.ai account) to MCP clients — Claude Desktop, Claude Code, Cursor, and any other MCP host — as five tools: chat, text generation, embeddings, tokenization, and model discovery.
@@ -44,7 +44,7 @@ Add to your MCP config (`claude_desktop_config.json`, or via `claude mcp add`):
"mcpServers": {
"ibm-watsonx": {
"command": "npx",
- "args": ["-y", "@nirholas/ibm-watsonx-mcp"],
+ "args": ["-y", "@three-ws/ibm-watsonx-mcp"],
"env": {
"WATSONX_API_KEY": "your-ibm-cloud-api-key",
"WATSONX_PROJECT_ID": "your-watsonx-project-id"
@@ -57,13 +57,13 @@ Add to your MCP config (`claude_desktop_config.json`, or via `claude mcp add`):
## Run standalone
```bash
-WATSONX_API_KEY=... WATSONX_PROJECT_ID=... npx @nirholas/ibm-watsonx-mcp
+WATSONX_API_KEY=... WATSONX_PROJECT_ID=... npx @three-ws/ibm-watsonx-mcp
```
Inspect the tool surface with the MCP Inspector:
```bash
-npx -y @modelcontextprotocol/inspector npx @nirholas/ibm-watsonx-mcp
+npx -y @modelcontextprotocol/inspector npx @three-ws/ibm-watsonx-mcp
```
## Example calls
diff --git a/packages/ibm-watsonx-mcp/package.json b/packages/ibm-watsonx-mcp/package.json
index 5d918614b..c00a5c713 100644
--- a/packages/ibm-watsonx-mcp/package.json
+++ b/packages/ibm-watsonx-mcp/package.json
@@ -1,5 +1,5 @@
{
- "name": "@nirholas/ibm-watsonx-mcp",
+ "name": "@three-ws/ibm-watsonx-mcp",
"version": "0.1.0",
"description": "MCP server for IBM watsonx.ai — chat, text generation, embeddings, tokenization, and model discovery with IBM Granite foundation models. Uses your own IBM Cloud credentials.",
"type": "module",
diff --git a/packages/ibm-watsonx-mcp/server.json b/packages/ibm-watsonx-mcp/server.json
index beb1838e3..783ba17cb 100644
--- a/packages/ibm-watsonx-mcp/server.json
+++ b/packages/ibm-watsonx-mcp/server.json
@@ -11,7 +11,7 @@
"packages": [
{
"registryType": "npm",
- "identifier": "@nirholas/ibm-watsonx-mcp",
+ "identifier": "@three-ws/ibm-watsonx-mcp",
"version": "0.1.0",
"transport": {
"type": "stdio"
diff --git a/packages/ibm-watsonx-mcp/src/index.js b/packages/ibm-watsonx-mcp/src/index.js
index a5ffa8a44..7cc37b5bd 100644
--- a/packages/ibm-watsonx-mcp/src/index.js
+++ b/packages/ibm-watsonx-mcp/src/index.js
@@ -1,5 +1,5 @@
#!/usr/bin/env node
-// @nirholas/ibm-watsonx-mcp — stdio MCP server for IBM watsonx.ai.
+// @three-ws/ibm-watsonx-mcp — stdio MCP server for IBM watsonx.ai.
//
// Exposes IBM Granite (and any model in your watsonx.ai account) as MCP tools:
// chat, raw text generation, embeddings, tokenization, and model discovery.
@@ -17,8 +17,8 @@
// WATSONX_EMBED_MODEL_ID(optional) default embedding model
// WATSONX_API_VERSION (optional) REST version date, default 2024-05-31
//
-// Run standalone: WATSONX_API_KEY=... WATSONX_PROJECT_ID=... npx @nirholas/ibm-watsonx-mcp
-// Inspect: npx -y @modelcontextprotocol/inspector npx @nirholas/ibm-watsonx-mcp
+// Run standalone: WATSONX_API_KEY=... WATSONX_PROJECT_ID=... npx @three-ws/ibm-watsonx-mcp
+// Inspect: npx -y @modelcontextprotocol/inspector npx @three-ws/ibm-watsonx-mcp
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
diff --git a/packages/pumpfun-mcp/README.md b/packages/pumpfun-mcp/README.md
index f3d725b38..8438f959b 100644
--- a/packages/pumpfun-mcp/README.md
+++ b/packages/pumpfun-mcp/README.md
@@ -39,43 +39,46 @@ npx -y @modelcontextprotocol/inspector npx @three-ws/pumpfun-mcp
## Tools
-| Tool | What it does |
-| --- | --- |
-| `searchTokens` | Search pump.fun tokens by name, symbol, or mint. |
-| `getTokenDetails` | Full metadata for a mint. |
-| `getBondingCurve` | Real/virtual reserves + graduation progress (on-chain). |
-| `getTokenTrades` | Recent buy/sell history for a token. |
-| `getTrendingTokens` | Top tokens by market cap. |
-| `getNewTokens` | Most recently launched tokens. |
-| `getGraduatedTokens` | Tokens that graduated to the Raydium AMM. |
-| `getKingOfTheHill` | Highest-cap token still on the bonding curve. |
-| `getTokenHolders` | Top holders with concentration analysis (on-chain). |
-| `getCreatorProfile` | A creator's tokens with rug-pull risk flags. |
-| `kol_radar` | gmgn-style early-detection radar signals. |
-| `kol_leaderboard` | Top KOL traders ranked by P&L. |
-| `pumpfun_list_claims` | Recent creator fee-claim events (on-chain). |
-| `pumpfun_watch_claims` | Fee claims for a creator within a look-back window. |
-| `pumpfun_first_claims` | First-ever creator claims — a cash-out signal. |
-| `pumpfun_quote_swap` | Read-only pump.fun AMM swap quote (no signing). |
-| `pumpfun_watch_whales` | Collect large trades on a token over a short window. |
-| `pumpfun_vanity_mint` | Grind a vanity Solana keypair (returns secret to caller; never stored). |
-| `sns_resolve` | Resolve a `.sol` domain to its owner wallet. |
-| `sns_reverseLookup` | Reverse-lookup a wallet to its primary `.sol` domain. |
-| `social_cashtag_sentiment` | Deterministic lexicon sentiment over supplied posts. |
-| `social_x_post_impact` | Correlate an X post to bonding-curve price impact. |
+| Tool | What it does |
+| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `searchTokens` | Search pump.fun tokens by name, symbol, or mint. |
+| `getTokenDetails` | Full metadata for a mint. |
+| `getBondingCurve` | Real/virtual reserves + graduation progress (on-chain). |
+| `getTokenTrades` | Recent buy/sell history for a token. |
+| `getTrendingTokens` | Top tokens by market cap. |
+| `getNewTokens` | Most recently launched tokens. |
+| `getGraduatedTokens` | Tokens that graduated to the Raydium AMM. |
+| `getKingOfTheHill` | Highest-cap token still on the bonding curve. |
+| `getTokenHolders` | Top holders with concentration analysis (on-chain). |
+| `getCreatorProfile` | A creator's tokens with rug-pull risk flags. |
+| `kol_radar` | gmgn-style early-detection radar signals. |
+| `kol_leaderboard` | Top KOL traders ranked by P&L. |
+| `pumpfun_list_claims` | Recent creator fee-claim events (on-chain). |
+| `pumpfun_watch_claims` | Fee claims for a creator within a look-back window. |
+| `pumpfun_first_claims` | First-ever creator claims — a cash-out signal. |
+| `pumpfun_quote_swap` | Read-only pump.fun AMM swap quote (no signing). |
+| `pumpfun_watch_whales` | Collect large trades on a token over a short window. |
+| `pumpfun_vanity_mint` | Grind a vanity Solana keypair (returns secret to caller; never stored). |
+| `sns_resolve` | Resolve a `.sol` domain to its owner wallet. |
+| `sns_reverseLookup` | Reverse-lookup a wallet to its primary `.sol` domain. |
+| `social_cashtag_sentiment` | Deterministic lexicon sentiment over supplied posts. |
+| `social_x_post_impact` | Correlate an X post to bonding-curve price impact. |
+| `pumpfun_token_3d` | **Live 3D snapshot** of a token — composes metadata, holders, and graduation into a shareable [three.ws/coin3d](https://three.ws/coin3d) viewer (spinning coin medallion + holder galaxy + graduation ring) and returns the deep-link, an embeddable iframe, and the underlying data. |
Read-only by design: no tool signs or sends a transaction. `pumpfun_quote_swap` only quotes; `pumpfun_vanity_mint` returns a keypair for you to use yourself.
## Configuration
-| Env var | Default | Purpose |
-| --- | --- | --- |
+| Env var | Default | Purpose |
+| ----------------- | ----------------------------------- | --------------------------------------------------------- |
| `PUMPFUN_MCP_URL` | `https://three.ws/api/pump-fun-mcp` | Backend endpoint. Override only to self-host the handler. |
## How it works
This package is a small stdio ↔ HTTP bridge. It forwards MCP `tools/call` requests to the canonical three.ws pump.fun JSON-RPC backend, which performs the actual Solana RPC reads and pump.fun API queries. That keeps one authoritative implementation, ships no secrets to clients, and means the tool surface stays current automatically (the live `tools/list` is fetched at startup, with a bundled fallback for offline use).
+`pumpfun_token_3d` is a **native** tool: it runs in-process, orchestrating several backend reads (metadata + bonding curve + holders) and resolving the token logo from its on-chain metadata URI, then returns a deep-link into the three.ws 3D viewer. It needs no extra keys and adds no new backend dependency.
+
## License
Apache-2.0 — see [LICENSE](./LICENSE).
diff --git a/packages/pumpfun-mcp/server.json b/packages/pumpfun-mcp/server.json
index 21342ad68..3065e53c1 100644
--- a/packages/pumpfun-mcp/server.json
+++ b/packages/pumpfun-mcp/server.json
@@ -1,7 +1,7 @@
{
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
"name": "io.github.nirholas/pumpfun-solana-mcp",
- "description": "Free, read-only pump.fun + Solana MCP server: token discovery, on-chain bonding-curve & holder analysis, creator fee-claim tracking, SNS name resolution, KOL radar/leaderboard signals, and read-only swap quotes. No API keys required.",
+ "description": "Free, read-only pump.fun + Solana MCP server: token discovery, on-chain bonding-curve & holder analysis, creator fee-claim tracking, SNS name resolution, KOL radar/leaderboard signals, read-only swap quotes, and live 3D token snapshots (coin medallion + holder galaxy + graduation ring via three.ws/coin3d). No API keys required.",
"repository": {
"url": "https://github.com/nirholas/three.ws",
"source": "github"
diff --git a/packages/pumpfun-mcp/src/index.js b/packages/pumpfun-mcp/src/index.js
index d3c57fd7e..183b389c8 100644
--- a/packages/pumpfun-mcp/src/index.js
+++ b/packages/pumpfun-mcp/src/index.js
@@ -18,10 +18,7 @@
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
-import {
- ListToolsRequestSchema,
- CallToolRequestSchema,
-} from '@modelcontextprotocol/sdk/types.js';
+import { ListToolsRequestSchema, CallToolRequestSchema } from '@modelcontextprotocol/sdk/types.js';
import { FALLBACK_TOOLS } from './tools.js';
import { buildNativeRegistry } from './native.js';
@@ -124,7 +121,10 @@ async function main() {
return {
isError: true,
content: [
- { type: 'text', text: `[${err.rpcCode ?? -32603}] ${err.message || 'tool error'}` },
+ {
+ type: 'text',
+ text: `[${err.rpcCode ?? -32603}] ${err.message || 'tool error'}`,
+ },
],
};
}
@@ -147,7 +147,10 @@ async function main() {
return {
isError: true,
content: [
- { type: 'text', text: `[${env.error.code}] ${env.error.message || 'tool error'}` },
+ {
+ type: 'text',
+ text: `[${env.error.code}] ${env.error.message || 'tool error'}`,
+ },
],
};
}
diff --git a/packages/pumpfun-mcp/src/native.js b/packages/pumpfun-mcp/src/native.js
index 85d4c159b..55d9b2e69 100644
--- a/packages/pumpfun-mcp/src/native.js
+++ b/packages/pumpfun-mcp/src/native.js
@@ -73,14 +73,20 @@ async function token3dHandler(args, { call, siteBase }) {
const c = curve.status === 'fulfilled' ? curve.value || null : null;
const h = holders.status === 'fulfilled' ? holders.value || null : null;
- if (details.status === 'rejected' && curve.status === 'rejected' && holders.status === 'rejected') {
- const err = new Error(`no on-chain data for ${mint}: ${details.reason?.message || 'unavailable'}`);
+ if (
+ details.status === 'rejected' &&
+ curve.status === 'rejected' &&
+ holders.status === 'rejected'
+ ) {
+ const err = new Error(
+ `no on-chain data for ${mint}: ${details.reason?.message || 'unavailable'}`,
+ );
err.rpcCode = -32004;
throw err;
}
const name = d.name || d.metadata?.name || null;
- const symbol = (d.symbol || d.metadata?.symbol || '') || null;
+ const symbol = d.symbol || d.metadata?.symbol || '' || null;
const image = await resolveImage(d);
const q = new URLSearchParams({ mint });
@@ -101,12 +107,17 @@ async function token3dHandler(args, { call, siteBase }) {
viewerUrl,
embedHtml: `<iframe src="${viewerUrl}" width="640" height="420" frameborder="0" allow="fullscreen" style="border:0;border-radius:16px"></iframe>`,
rendering: {
- coin: image ? 'token logo textured onto a spinning 3D medallion' : 'brand-tinted disc (no logo found)',
- holderGalaxy: (h?.holders?.length || 0) > 0
- ? `${h.holders.length} top holders as balance-sized, concentration-tinted orbiting spheres`
- : 'no holder data available',
+ coin: image
+ ? 'token logo textured onto a spinning 3D medallion'
+ : 'brand-tinted disc (no logo found)',
+ holderGalaxy:
+ (h?.holders?.length || 0) > 0
+ ? `${h.holders.length} top holders as balance-sized, concentration-tinted orbiting spheres`
+ : 'no holder data available',
graduationRing: c
- ? (c.graduated || c.complete ? 'full ring (graduated to Raydium)' : 'arc filled to bonding-curve progress')
+ ? c.graduated || c.complete
+ ? 'full ring (graduated to Raydium)'
+ : 'arc filled to bonding-curve progress'
: 'no bonding-curve data available',
},
};
@@ -121,7 +132,10 @@ export const NATIVE_TOOLS = [
inputSchema: {
type: 'object',
properties: {
- mint: { type: 'string', description: 'SPL / pump.fun token mint address (base58).' },
+ mint: {
+ type: 'string',
+ description: 'SPL / pump.fun token mint address (base58).',
+ },
network: { type: 'string', enum: ['mainnet', 'devnet'], default: 'mainnet' },
},
required: ['mint'],
diff --git a/packages/pumpfun-mcp/src/tools.js b/packages/pumpfun-mcp/src/tools.js
index e0939ee42..33594a8cb 100644
--- a/packages/pumpfun-mcp/src/tools.js
+++ b/packages/pumpfun-mcp/src/tools.js
@@ -127,8 +127,14 @@ export const FALLBACK_TOOLS = [
inputSchema: {
type: 'object',
properties: {
- suffix: { type: 'string', description: 'Desired address suffix (case-insensitive by default)' },
- prefix: { type: 'string', description: 'Desired address prefix (case-insensitive by default)' },
+ suffix: {
+ type: 'string',
+ description: 'Desired address suffix (case-insensitive by default)',
+ },
+ prefix: {
+ type: 'string',
+ description: 'Desired address prefix (case-insensitive by default)',
+ },
caseSensitive: { type: 'boolean', default: false },
maxAttempts: { type: 'integer', default: 5000000 },
},
@@ -142,7 +148,10 @@ export const FALLBACK_TOOLS = [
type: 'object',
properties: {
mint: { type: 'string', description: 'SPL mint pubkey (base58)' },
- minUsd: { type: 'number', description: 'Minimum trade value in USD (default 5000)' },
+ minUsd: {
+ type: 'number',
+ description: 'Minimum trade value in USD (default 5000)',
+ },
durationMs: {
type: 'number',
description: 'Collection window in ms (default 5000, max 10000)',
@@ -231,7 +240,8 @@ export const FALLBACK_TOOLS = [
properties: {
posts: {
type: 'array',
- description: 'Array of post objects. Each must have a text field; id, ts, and author are optional.',
+ description:
+ 'Array of post objects. Each must have a text field; id, ts, and author are optional.',
items: {
type: 'object',
properties: {
@@ -268,8 +278,14 @@ export const FALLBACK_TOOLS = [
properties: {
inputMint: { type: 'string', description: 'Input token mint (base58).' },
outputMint: { type: 'string', description: 'Output token mint (base58).' },
- amountIn: { type: 'number', description: 'Input amount in raw base units (lamports for SOL).' },
- slippageBps: { type: 'number', description: 'Slippage tolerance in basis points (default 100 = 1%).' },
+ amountIn: {
+ type: 'number',
+ description: 'Input amount in raw base units (lamports for SOL).',
+ },
+ slippageBps: {
+ type: 'number',
+ description: 'Slippage tolerance in basis points (default 100 = 1%).',
+ },
network: { type: 'string', enum: ['mainnet', 'devnet'], default: 'mainnet' },
},
required: ['inputMint', 'outputMint', 'amountIn'],
@@ -282,7 +298,10 @@ export const FALLBACK_TOOLS = [
inputSchema: {
type: 'object',
properties: {
- postUrl: { type: 'string', description: 'X post URL (e.g. https://x.com/user/status/123)' },
+ postUrl: {
+ type: 'string',
+ description: 'X post URL (e.g. https://x.com/user/status/123)',
+ },
mint: { type: 'string', description: 'Solana token mint address (base58)' },
windowMin: {
type: 'integer',
diff --git a/pages/coin3d.html b/pages/coin3d.html
index a86e0c2c0..89a2e06d5 100644
--- a/pages/coin3d.html
+++ b/pages/coin3d.html
@@ -4,9 +4,15 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Token in 3D · three.ws</title>
- <meta name="description" content="A live 3D snapshot of any pump.fun / Solana token — coin medallion, holder galaxy, and bonding-curve graduation, rendered from real on-chain data." />
+ <meta
+ name="description"
+ content="A live 3D snapshot of any pump.fun / Solana token — coin medallion, holder galaxy, and bonding-curve graduation, rendered from real on-chain data."
+ />
<meta property="og:title" content="Token in 3D · three.ws" />
- <meta property="og:description" content="See any pump.fun token as a live 3D scene — coin, holders, and graduation progress." />
+ <meta
+ property="og:description"
+ content="See any pump.fun token as a live 3D scene — coin, holders, and graduation progress."
+ />
<meta property="og:type" content="website" />
<style>
:root {
@@ -18,10 +24,17 @@
--card: rgba(16, 18, 36, 0.72);
--border: rgba(120, 140, 220, 0.18);
}
- * { box-sizing: border-box; }
- html, body { margin: 0; height: 100%; }
+ * {
+ box-sizing: border-box;
+ }
+ html,
+ body {
+ margin: 0;
+ height: 100%;
+ }
body {
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, system-ui, sans-serif;
+ font-family:
+ -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, system-ui, sans-serif;
color: var(--fg);
background: radial-gradient(120% 120% at 50% 0%, var(--bg-1) 0%, var(--bg-0) 60%);
overflow: hidden;
@@ -50,14 +63,55 @@
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
- @keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
- .hud-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
- .hud-head h1 { font-size: 20px; margin: 0; line-height: 1.2; }
- .ticker { color: var(--accent); font-weight: 700; font-size: 14px; letter-spacing: 0.02em; }
- .hud-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 16px 0 14px; }
- .hud-stats div { min-width: 0; }
- .hud-stats dt { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 2px; }
- .hud-stats dd { margin: 0; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
+ @keyframes rise {
+ from {
+ opacity: 0;
+ transform: translateY(16px);
+ }
+ to {
+ opacity: 1;
+ transform: none;
+ }
+ }
+ .hud-head {
+ display: flex;
+ align-items: baseline;
+ gap: 10px;
+ flex-wrap: wrap;
+ }
+ .hud-head h1 {
+ font-size: 20px;
+ margin: 0;
+ line-height: 1.2;
+ }
+ .ticker {
+ color: var(--accent);
+ font-weight: 700;
+ font-size: 14px;
+ letter-spacing: 0.02em;
+ }
+ .hud-stats {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: 10px 18px;
+ margin: 16px 0 14px;
+ }
+ .hud-stats div {
+ min-width: 0;
+ }
+ .hud-stats dt {
+ color: var(--muted);
+ font-size: 11px;
+ text-transform: uppercase;
+ letter-spacing: 0.06em;
+ margin: 0 0 2px;
+ }
+ .hud-stats dd {
+ margin: 0;
+ font-size: 15px;
+ font-weight: 600;
+ font-variant-numeric: tabular-nums;
+ }
.hud-link {
display: inline-block;
color: var(--accent);
@@ -66,8 +120,14 @@
font-weight: 600;
transition: opacity 0.15s ease;
}
- .hud-link:hover { opacity: 0.78; }
- .hud-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
+ .hud-link:hover {
+ opacity: 0.78;
+ }
+ .hud-link:focus-visible {
+ outline: 2px solid var(--accent);
+ outline-offset: 3px;
+ border-radius: 4px;
+ }
/* Hint */
.hint {
@@ -96,8 +156,17 @@
max-width: 380px;
animation: rise 0.4s ease both;
}
- .status-card h2 { margin: 14px 0 8px; font-size: 19px; }
- .status-card p { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0 0 18px; word-break: break-word; }
+ .status-card h2 {
+ margin: 14px 0 8px;
+ font-size: 19px;
+ }
+ .status-card p {
+ color: var(--muted);
+ font-size: 14px;
+ line-height: 1.5;
+ margin: 0 0 18px;
+ word-break: break-word;
+ }
.status-action {
display: inline-block;
padding: 9px 18px;
@@ -107,11 +176,21 @@
font-size: 14px;
border-radius: 10px;
text-decoration: none;
- transition: transform 0.12s ease, box-shadow 0.12s ease;
+ transition:
+ transform 0.12s ease,
+ box-shadow 0.12s ease;
+ }
+ .status-action:hover {
+ transform: translateY(-1px);
+ box-shadow: 0 8px 24px rgba(110, 168, 255, 0.35);
+ }
+ .status-action:focus-visible {
+ outline: 2px solid #fff;
+ outline-offset: 3px;
+ }
+ #status[data-kind='error'] .status-card h2 {
+ color: #ff8f8f;
}
- .status-action:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(110, 168, 255, 0.35); }
- .status-action:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
- #status[data-kind='error'] .status-card h2 { color: #ff8f8f; }
.spinner {
width: 38px;
height: 38px;
@@ -121,11 +200,21 @@
border-radius: 50%;
animation: spin 0.9s linear infinite;
}
- @keyframes spin { to { transform: rotate(360deg); } }
+ @keyframes spin {
+ to {
+ transform: rotate(360deg);
+ }
+ }
@media (max-width: 520px) {
- #hud { width: calc(100vw - 32px); left: 16px; bottom: 16px; }
- .hint { display: none; }
+ #hud {
+ width: calc(100vw - 32px);
+ left: 16px;
+ bottom: 16px;
+ }
+ .hint {
+ display: none;
+ }
}
</style>
</head>
diff --git a/scripts/_coin3d-diag.mjs b/scripts/_coin3d-diag.mjs
deleted file mode 100644
index 25eb9fa07..000000000
--- a/scripts/_coin3d-diag.mjs
+++ /dev/null
@@ -1,27 +0,0 @@
-import puppeteer from 'puppeteer';
-const url = 'http://localhost:3000/coin3d?mint=DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263';
-const browser = await puppeteer.launch({ headless: 'new',
- args: ['--no-sandbox','--use-gl=angle','--use-angle=swiftshader','--enable-unsafe-swiftshader','--ignore-gpu-blocklist'] });
-const page = await browser.newPage();
-await page.setViewport({ width: 1200, height: 800 });
-await page.goto(url, { waitUntil: 'domcontentloaded', timeout: 30000 });
-await page.waitForFunction(() => !!window.__coin3d, { timeout: 25000 });
-const px = await page.evaluate(() => {
- const { renderer, scene, camera } = window.__coin3d;
- renderer.render(scene, camera); // force a fresh draw this tick
- const gl = renderer.getContext();
- const w = gl.drawingBufferWidth, h = gl.drawingBufferHeight;
- const cx = Math.floor(w/2)-50, cy = Math.floor(h/2)-50;
- const buf = new Uint8Array(100*100*4);
- gl.readPixels(cx, cy, 100, 100, gl.RGBA, gl.UNSIGNED_BYTE, buf);
- let lit=0, maxc=0;
- for (let i=0;i<buf.length;i+=4){ const m=Math.max(buf[i],buf[i+1],buf[i+2]); if(m>20) lit++; if(m>maxc) maxc=m; }
- return { drawBuffer:[w,h], litPixelsCenter: lit, maxChannel: maxc };
-});
-console.log('GL_PIXELS', JSON.stringify(px));
-// element-level screenshot of the HUD card (reliable, avoids full-page compositing)
-const hud = await page.$('#hud');
-await page.addStyleTag({ content: '#hud{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;background:#11142e!important}' });
-await new Promise(r=>setTimeout(r,300));
-await hud.screenshot({ path: 'scripts/_hud.png' });
-await browser.close();
diff --git a/scripts/_coin3d-shot.mjs b/scripts/_coin3d-shot.mjs
deleted file mode 100644
index 38f0ab04e..000000000
--- a/scripts/_coin3d-shot.mjs
+++ /dev/null
@@ -1,29 +0,0 @@
-import puppeteer from 'puppeteer';
-const url = 'http://localhost:3000/coin3d?mint=DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263';
-const browser = await puppeteer.launch({
- headless: 'new',
- args: ['--no-sandbox','--use-gl=angle','--use-angle=swiftshader','--enable-unsafe-swiftshader','--ignore-gpu-blocklist'],
-});
-const page = await browser.newPage();
-await page.setViewport({ width: 1200, height: 800 });
-const errors = [], warns = [];
-page.on('console', m => { if (m.type()==='error') errors.push(m.text()); if (m.type()==='warning') warns.push(m.text()); });
-page.on('pageerror', e => errors.push('PAGEERROR: '+e.message));
-await page.goto(url, { waitUntil: 'networkidle2', timeout: 30000 });
-await page.waitForFunction(() => {
- const hud = document.getElementById('hud'); const st = document.getElementById('status');
- return (hud && !hud.hidden) || (st && st.dataset.kind === 'error');
-}, { timeout: 20000 }).catch(()=>{});
-await new Promise(r => setTimeout(r, 2500));
-const state = await page.evaluate(() => ({
- hudVisible: !document.getElementById('hud').hidden,
- statusKind: document.getElementById('status')?.dataset.kind || null,
- statusHidden: document.getElementById('status')?.hidden,
- title: document.title,
- hudText: document.getElementById('hud')?.innerText?.replace(/\s+/g,' ').slice(0,220),
-}));
-await page.screenshot({ path: 'scripts/_coin3d.png' });
-console.log('STATE', JSON.stringify(state));
-console.log('ERRORS', errors.length, JSON.stringify(errors.slice(0,8)));
-console.log('WARNS', warns.length, JSON.stringify(warns.slice(0,4)));
-await browser.close();
diff --git a/scripts/_coin3d.png b/scripts/_coin3d.png
deleted file mode 100644
index 753189aa8..000000000
Binary files a/scripts/_coin3d.png and /dev/null differ
diff --git a/scripts/_hud.png b/scripts/_hud.png
deleted file mode 100644
index 35e8eb9a1..000000000
Binary files a/scripts/_hud.png and /dev/null differ
diff --git a/server-3d.json b/server-3d.json
index 9d3fc0ba4..4382aa795 100644
--- a/server-3d.json
+++ b/server-3d.json
@@ -6,7 +6,7 @@
"url": "https://github.com/nirholas/three.ws",
"source": "github"
},
- "version": "1.0.0",
+ "version": "1.0.1",
"remotes": [
{
"type": "streamable-http",
diff --git a/server-bazaar.json b/server-bazaar.json
index e0ae7248d..709d36075 100644
--- a/server-bazaar.json
+++ b/server-bazaar.json
@@ -6,7 +6,7 @@
"url": "https://github.com/nirholas/three.ws",
"source": "github"
},
- "version": "1.0.0",
+ "version": "1.0.1",
"remotes": [
{
"type": "streamable-http",
diff --git a/src/coin3d/main.js b/src/coin3d/main.js
index 63ad1251d..bf526edfd 100644
--- a/src/coin3d/main.js
+++ b/src/coin3d/main.js
@@ -14,17 +14,31 @@
// `pumpfun_token_3d` deep-links to.
import {
- Scene, PerspectiveCamera, WebGLRenderer, Group, Color,
- CylinderGeometry, SphereGeometry, TorusGeometry, RingGeometry,
- MeshStandardMaterial, MeshBasicMaterial, Mesh,
- HemisphereLight, DirectionalLight, AmbientLight,
- TextureLoader, SRGBColorSpace, DoubleSide, AdditiveBlending,
- Vector3, MathUtils, PointLight,
+ Scene,
+ PerspectiveCamera,
+ WebGLRenderer,
+ Group,
+ Color,
+ CylinderGeometry,
+ SphereGeometry,
+ TorusGeometry,
+ RingGeometry,
+ MeshStandardMaterial,
+ MeshBasicMaterial,
+ Mesh,
+ HemisphereLight,
+ DirectionalLight,
+ AmbientLight,
+ TextureLoader,
+ SRGBColorSpace,
+ DoubleSide,
+ AdditiveBlending,
+ MathUtils,
+ PointLight,
} from 'three';
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
const MCP_ENDPOINT = '/api/pump-fun-mcp';
-const WSOL = 'So11111111111111111111111111111111111111112';
// ── DOM handles ─────────────────────────────────────────────────────────────
const canvas = document.getElementById('scene');
@@ -137,15 +151,15 @@ function setStatus(kind, title, detail, action) {
}
function escapeHtml(s) {
- return String(s).replace(/[&<>"']/g, (c) => (
- { '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' }[c]
- ));
+ return String(s).replace(
+ /[&<>"']/g,
+ (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' })[c],
+ );
}
// ── Three.js scene ────────────────────────────────────────────────────────────
let renderer, scene, camera, controls, rafId;
const spin = new Group();
-let holderGalaxy = null;
const holderOrbits = [];
function initScene() {
@@ -235,13 +249,15 @@ function buildCoin(snapshot) {
// Holder galaxy: each top holder is a sphere orbiting the coin. Size scales
// with balance share; color runs cool→hot as concentration rises.
function buildHolderGalaxy(snapshot) {
- holderGalaxy = new Group();
+ const holderGalaxy = new Group();
spin.add(holderGalaxy);
const holders = snapshot.holders.slice(0, 12);
if (!holders.length) return;
- const amounts = holders.map((h) => Number(h.uiAmount ?? h.amount ?? h.percent ?? 0)).filter((n) => n > 0);
+ const amounts = holders
+ .map((h) => Number(h.uiAmount ?? h.amount ?? h.percent ?? 0))
+ .filter((n) => n > 0);
const max = amounts.length ? Math.max(...amounts) : 1;
holders.forEach((h, i) => {
@@ -252,14 +268,22 @@ function buildHolderGalaxy(snapshot) {
const color = new Color().setHSL(MathUtils.lerp(0.58, 0.0, share), 0.75, 0.55);
const mesh = new Mesh(
new SphereGeometry(size, 24, 24),
- new MeshStandardMaterial({ color, emissive: color, emissiveIntensity: 0.35, roughness: 0.4 }),
+ new MeshStandardMaterial({
+ color,
+ emissive: color,
+ emissiveIntensity: 0.35,
+ roughness: 0.4,
+ }),
);
const angle = (i / holders.length) * Math.PI * 2;
const y = MathUtils.lerp(-0.6, 0.6, (i % 4) / 3);
mesh.position.set(Math.cos(angle) * radius, y, Math.sin(angle) * radius);
holderGalaxy.add(mesh);
holderOrbits.push({
- mesh, radius, y, angle,
+ mesh,
+ radius,
+ y,
+ angle,
speed: 0.0008 + (i % 3) * 0.0004,
bob: 0.6 + (i % 5) * 0.15,
phase: i,