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.

THREE economy and IBM user group updates

nirholas41a1e7ff2f88
diff --git a/docs/internal/IBM_USER_GROUP.md b/docs/internal/IBM_USER_GROUP.md
index c51cc2a85..c5267e474 100644
--- a/docs/internal/IBM_USER_GROUP.md
+++ b/docs/internal/IBM_USER_GROUP.md
@@ -44,8 +44,7 @@ IBM also flagged three resources, independent of the hosting choice:
**Pick Option 1 and use our own platform as the canonical home.** Reasoning:
- **We own the audience.** three.ws already has a live community surface at
- [three.ws/community](https://three.ws/community), plus $THREE holders on
- Telegram, X ([@trythreews](https://x.com/trythreews)), and the public
+ [three.ws/community](https://three.ws/community), plus $THREE holders on X ([@trythreews](https://x.com/trythreews)), and the public
[changelog](https://three.ws/changelog). Routing the group through Meetup/Luma/
LinkedIn would hand our community and its traffic to a third party. Self-hosting
keeps the hub on-brand and one click from the product.
@@ -76,7 +75,7 @@ sitemap and changelog automatically.
- [ ] (Recommended) Build the dedicated `/community/ibm` landing and register it in
[`data/pages.json`](../../data/pages.json); run `npm run build:pages`.
- [ ] Submit the next event(s) to IBM's event listings (link in Ben's email).
-- [ ] File the User Group Benefits Application (link in Ben's email).
+- [ ] File the User Group Benefits Application (link in email).
- [ ] Add a recurring reminder for the Leaders & Liaisons call if we want to attend.
- [ ] Once IBM confirms the directory entry is live, add a row to
[`docs/listings.md`](../listings.md) and a holder-readable
diff --git a/src/three-economy.js b/src/three-economy.js
index bfbd70d4a..3c584ac91 100644
--- a/src/three-economy.js
+++ b/src/three-economy.js
@@ -999,6 +999,54 @@ function renderTiers() {
if (!el) return;
const td = _tierData?.ladder?.length ? _tierData : { ladder: DEFAULT_LADDER, tier: null, next: null };
el.innerHTML = tiersHTML(td, _accessFeatures);
+ wireTierConnect();
+}
+
+// Wire the "Connect wallet to see your tier" button the ladder renders when no tier is
+// resolved yet. It drives the global wallet connect (initWalletButton wired the hidden
+// #connect-wallet-btn in init); a successful connect fires wallet:changed, which re-reads
+// the wallet-aware matrix and re-highlights the held tier — no reload, no extra fetch.
+function wireTierConnect() {
+ const btn = document.getElementById('ec-tier-connect');
+ if (!btn || btn.dataset.wired) return;
+ btn.dataset.wired = '1';
+ btn.addEventListener('click', () => document.getElementById('connect-wallet-btn')?.click());
+}
+
+// Highlight the connected wallet's held tier on the ladder when there's no signed-in
+// session to own it. We synthesize the { tier, held_usd, next } shape loadTier would
+// produce, deriving the held→next progress from the known ladder thresholds + the
+// wallet's held USD — no extra fetch. Reverts to the baseline ladder on disconnect.
+function applyTierFromAccess(data) {
+ if (!data || data.signed_in) return; // a signed-in session: loadTier stays authoritative
+ if (data.wallet_linked && data.tier) {
+ const level = Number(data.tier.level) || 0;
+ const held = Number(data.tier.held_usd) || 0;
+ const ladder = _tierData?.ladder?.length ? _tierData.ladder : DEFAULT_LADDER;
+ const cur = ladder.find((t) => t.level === level) || ladder[0];
+ const next = ladder.find((t) => t.level === level + 1) || null;
+ _tierData = {
+ ladder,
+ tier: { level, id: data.tier.id, label: data.tier.label, discount_bps: cur.discount_bps || 0 },
+ held_usd: held,
+ next: next ? { ...next, usd_to_go: Math.max(0, (next.min_usd || 0) - held) } : null,
+ };
+ DISCOUNT_BPS = cur.discount_bps || 0;
+ _synthTier = true;
+ repriceSelected();
+ } else if (_synthTier) {
+ // Wallet disconnected → drop the synthesized highlight, restore the baseline ladder.
+ _tierData = null;
+ DISCOUNT_BPS = 0;
+ _synthTier = false;
+ repriceSelected();
+ }
+}
+
+// Re-run the selected pricing-explorer row so its tier discount reflects the latest tier.
+function repriceSelected() {
+ const sel = document.querySelector('.ec-px-item.sel');
+ if (sel) sel.click();
}
function discountedUsd(usd) {
@@ -1253,21 +1301,31 @@ function loadTier() {
// the rest of /three (including the always-on ladder above) is unaffected.
function loadAccess() {
const el = document.getElementById('ec-access');
- return getJSON(`${API}/access`)
- .then((data) => {
- // The matrix feeds both the per-tier Live/Planned perks above and the
- // personal panel below — one call, two surfaces. Features come back for
- // anonymous callers too (all locked), so the ladder enriches regardless.
- _accessFeatures = Array.isArray(data?.features) ? data.features : null;
- renderTiers();
- if (el) {
- el.innerHTML = data?.signed_in ? accessMatrixHTML(data) : accessSignedOutHTML();
- wireAccessActions();
- }
- })
- .catch(() => {
+ // Wallet-aware read via the shared data layer: a connected wallet (?wallet=) is
+ // threaded in automatically, so this reflects the wallet in hand — not just the
+ // session. Returns null on failure (never throws); fresh so a wallet change isn't
+ // served a stale matrix.
+ return getAccess(undefined, { fresh: true }).then((data) => {
+ if (!data) {
if (el) el.innerHTML = '<div class="ec-err">Your access is temporarily unavailable.</div>';
- });
+ return;
+ }
+ // The matrix feeds both the per-tier Live/Planned perks above and the personal
+ // panel below — one call, two surfaces. Features come back for anonymous callers
+ // too (all locked), so the ladder enriches regardless.
+ _accessFeatures = Array.isArray(data.features) ? data.features : null;
+ // Highlight the connected wallet's held tier on the ladder (loadTier owns the
+ // highlight for signed-in users — see applyTierFromAccess).
+ applyTierFromAccess(data);
+ renderTiers();
+ if (el) {
+ // "Known" = a real identity resolved: a signed-in account OR a connected wallet.
+ // Either way show the live matrix; otherwise the connect / sign-in empty state.
+ const known = Boolean(data.signed_in || data.wallet_linked);
+ el.innerHTML = known ? accessMatrixHTML(data) : accessSignedOutHTML();
+ wireAccessActions();
+ }
+ });
}
// Wire the empty-state Sign in button. On success the new session yields the live