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.

30.0 KB
Raw Blame
<!doctype html>
<html lang="en">
	<head>
		<script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title data-i18n="community.meta_title">Community — three.ws</title>
		<meta name="description" content="Join the three.ws community — follow builds, share agents, and connect with creators building the 3D agent layer of the internet."  data-i18n-attr="content:community.meta_description"/>
		<meta name="theme-color" content="#000000" />
		<link rel="icon" href="/favicon.ico" sizes="any" />
		<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
		<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
		<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
		<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
		<link rel="manifest" href="/manifest.webmanifest" />

		<meta property="og:type" content="website" />
		<meta property="og:site_name" content="three.ws" />
		<meta property="og:title" content="Community — three.ws"  data-i18n-attr="content:community.meta_og_title"/>
		<meta property="og:description" content="Follow builds, share agents, and connect with creators building the 3D agent layer of the internet."  data-i18n-attr="content:community.meta_og_description"/>
		<meta property="og:url" content="https://three.ws/community" />
		<meta property="og:image" content="https://three.ws/api/page-og?s=main&amp;t=Community&amp;d=Live+platform+activity+plus+where+to+follow%2C+contribute%2C+and+connect+with+three.ws+creators.&amp;p=%2Fcommunity" />

		<link rel="canonical" href="https://three.ws/community" />
		<link rel="stylesheet" href="/style.css" />
		<link rel="stylesheet" href="/nav.css" />
		<link rel="stylesheet" href="/footer.css" />
		<link rel="stylesheet" href="/fonts/fonts.css" />
		<link rel="stylesheet" href="/mobile.css" />
		<script defer src="/footer-newsletter.js"></script>
		<style>
			/* Palette is token-derived (see /tokens.css), so this page flips with
			   the site theme switcher instead of staying black on a light canvas. */
			* { box-sizing: border-box; }
			body {
				font-family: var(--font-body);
				font-size: 15px;
				line-height: 1.6;
				color: var(--ink);
				margin: 0;
				background: var(--bg-0);
				min-height: 100vh;
			}
			.wrap { max-width: 860px; margin: 0 auto; padding: 64px 24px 96px; }
			.eyebrow {
				font-size: 12px;
				letter-spacing: 0.14em;
				text-transform: uppercase;
				color: var(--accent);
				font-weight: 600;
				margin-bottom: 14px;
			}
			h1 {
				font-size: clamp(32px, 5vw, 48px);
				margin: 0 0 14px;
				letter-spacing: -0.025em;
				line-height: 1.1;
				font-weight: 600;
			}
			.sub { color: var(--ink-dim); font-size: 17px; margin: 0 0 48px; max-width: 620px; line-height: 1.55; }
			.grid {
				display: grid;
				grid-template-columns: 1fr 1fr;
				gap: 18px;
				margin-bottom: 48px;
			}
			@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }
			.card {
				background: var(--bg-1);
				border: 1px solid var(--stroke);
				border-radius: 16px;
				padding: 28px 24px;
				display: flex;
				flex-direction: column;
				gap: 12px;
				transition: border-color var(--duration-fast), transform var(--duration-fast);
			}
			.card:hover { border-color: var(--stroke-strong); transform: translateY(-2px); }
			.card:focus-within { border-color: var(--stroke-strong); }
			.card h2 { margin: 0; font-size: 18px; font-weight: 600; }
			.card p { margin: 0; color: var(--ink-dim); font-size: 14.5px; line-height: 1.55; }
			.card .icon { font-size: 28px; line-height: 1; }
			.card-link {
				display: inline-flex;
				align-items: center;
				gap: 6px;
				color: var(--accent);
				text-decoration: none;
				font-size: 14px;
				font-weight: 600;
				margin-top: auto;
			}
			.card-link:hover { text-decoration: underline; }

			.official {
				border: 1px solid var(--stroke);
				border-radius: 16px;
				background: var(--bg-1);
				padding: 28px 24px;
			}
			.official h2 { margin-bottom: 8px; }
			.chan-list { list-style: none; margin: 22px 0 0; padding: 0; }
			.chan {
				display: grid;
				grid-template-columns: 116px minmax(0, 1fr);
				align-items: baseline;
				gap: 6px 14px;
				padding: 13px 0;
				border-top: 1px solid var(--stroke);
			}
			.chan:first-child { border-top: 0; padding-top: 0; }
			.chan-name {
				color: var(--ink);
				font-size: 12px;
				font-weight: 600;
				letter-spacing: 0.06em;
				text-transform: uppercase;
			}
			.chan-body {
				display: flex;
				flex-wrap: wrap;
				align-items: baseline;
				gap: 6px 12px;
			}
			.chan-val {
				font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
				font-size: 13.5px;
				word-break: break-all;
			}
			.chan-note { color: var(--ink-dim); font-size: 13.5px; flex: 1 1 200px; }
			@media (max-width: 640px) {
				.chan { grid-template-columns: minmax(0, 1fr); }
				/* Narrow enough that the note never shares a line: otherwise it wraps
				   into the gap beside the copy button and reads as its caption. */
				.chan-note { flex-basis: 100%; }
			}
			.copy-ca {
				font: inherit;
				font-size: 12px;
				font-weight: 600;
				color: var(--ink-dim);
				background: transparent;
				border: 1px solid var(--stroke);
				border-radius: 8px;
				padding: 3px 9px;
				cursor: pointer;
				transition: border-color var(--duration-fast), color var(--duration-fast), background var(--duration-fast);
			}
			.copy-ca:hover { color: var(--ink); border-color: var(--stroke-strong); }
			.copy-ca:active { transform: translateY(1px); }
			.copy-ca:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
			.copy-ca[data-copied='1'] { color: var(--accent); border-color: var(--accent); }
			.impostor {
				margin-top: 24px;
				padding-top: 20px;
				border-top: 1px solid var(--stroke);
			}
			.impostor h3 { margin: 0 0 10px; font-size: 15px; font-weight: 600; }

			.section { margin-bottom: 48px; }
			.section h2 { font-size: 22px; margin: 0 0 16px; font-weight: 600; }
			.section p { color: var(--ink-dim); font-size: 15px; line-height: 1.6; max-width: 620px; }
			.section ul { margin: 12px 0 0; padding-left: 20px; }
			.section li { color: var(--ink-dim); font-size: 14.5px; margin-bottom: 8px; line-height: 1.5; }
			.section li strong { color: var(--ink); }
			a { color: var(--accent); }

			.newsletter-form {
				display: flex;
				gap: 10px;
				margin-top: 18px;
				max-width: 460px;
				flex-wrap: wrap;
			}
			.newsletter-form input {
				flex: 1 1 220px;
				min-width: 0;
				background: var(--bg-1);
				border: 1px solid var(--stroke);
				border-radius: 10px;
				padding: 11px 14px;
				color: var(--ink);
				font: inherit;
				font-size: 14.5px;
			}
			.newsletter-form input::placeholder { color: var(--ink-faint); }
			.newsletter-form input:hover { border-color: var(--stroke-strong); }
			.newsletter-form button {
				flex: 0 0 auto;
				background: var(--btn-primary-bg);
				color: var(--btn-primary-fg);
				border: 1px solid var(--btn-primary-border);
				border-radius: 10px;
				padding: 11px 20px;
				font: inherit;
				font-size: 14.5px;
				font-weight: 600;
				cursor: pointer;
				transition: background var(--duration-fast);
			}
			.newsletter-form button:hover:not(:disabled) { background: var(--btn-primary-bg-hover); }
			.newsletter-form button:active:not(:disabled) { background: var(--btn-primary-bg-active); }
			.newsletter-msg { margin-top: 10px; font-size: 13.5px; min-height: 20px; color: var(--ink-dim); }
			.newsletter-msg.is-error { color: var(--danger); }
			.newsletter-msg.is-success { color: var(--success); }

			.activity-head {
				display: flex;
				align-items: baseline;
				justify-content: space-between;
				gap: 12px;
				margin-bottom: 16px;
			}
			.activity-head h2 { margin: 0; }
			.activity-head a {
				font-size: 13.5px;
				font-weight: 600;
				text-decoration: none;
				white-space: nowrap;
			}
			.activity-head a:hover { text-decoration: underline; }

			.activity-list {
				border: 1px solid var(--stroke);
				border-radius: 16px;
				background: var(--bg-1);
				overflow: hidden;
			}
			/* The row is a container, never an anchor: it holds a stretched primary
			   link plus a separate profile link, and nesting one <a> inside another
			   is invalid HTML that the parser shreds into three broken rows. */
			.activity-row {
				position: relative;
				display: flex;
				align-items: center;
				gap: 12px;
				padding: 14px 18px;
				border-bottom: 1px solid var(--stroke);
				color: inherit;
				transition: background var(--duration-fast);
				animation: activity-in 0.35s ease both;
			}
			@keyframes activity-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
			@media (prefers-reduced-motion: reduce) {
				.activity-row { animation: none; }
				.activity-skeleton { animation: none; }
			}
			.activity-row:last-child { border-bottom: none; }
			.activity-row:hover, .activity-row:focus-within { background: var(--surface-2); }
			.activity-main { position: absolute; inset: 0; z-index: 0; }
			.activity-row > :not(.activity-main) { position: relative; z-index: 1; pointer-events: none; }
			.activity-user { pointer-events: auto; color: inherit; text-decoration: none; }
			.activity-user:hover { text-decoration: underline; }
			.activity-avatar {
				width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
				background: var(--surface-2); border: 1px solid var(--stroke);
				object-fit: cover; display: flex; align-items: center; justify-content: center;
				color: var(--ink-dim); font-size: 0.95rem; overflow: hidden;
			}
			.activity-avatar img { width: 100%; height: 100%; object-fit: cover; }
			.activity-thumb {
				width: 40px; height: 40px; border-radius: 8px; flex-shrink: 0;
				background: var(--surface-2); object-fit: cover; overflow: hidden;
				display: flex; align-items: center; justify-content: center; color: var(--ink-dim);
			}
			.activity-thumb img { width: 100%; height: 100%; object-fit: cover; }
			.activity-text { flex: 1; min-width: 0; }
			.activity-line {
				font-size: 14px;
				color: var(--ink);
				white-space: nowrap;
				overflow: hidden;
				text-overflow: ellipsis;
			}
			.activity-line strong { font-weight: 600; }
			.activity-verb { color: var(--ink-dim); font-weight: 400; }
			.activity-meta {
				font-size: 12px;
				color: var(--ink-dim);
				margin-top: 2px;
				white-space: nowrap;
				overflow: hidden;
				text-overflow: ellipsis;
			}
			.activity-empty, .activity-error {
				padding: 32px 18px;
				text-align: center;
				color: var(--ink-dim);
				font-size: 14px;
			}
			.activity-retry {
				display: inline-block;
				margin-top: 12px;
				background: var(--surface-2);
				border: 1px solid var(--stroke-strong);
				border-radius: 10px;
				color: var(--ink);
				padding: 8px 16px;
				font: inherit;
				font-size: 13.5px;
				font-weight: 600;
				cursor: pointer;
				transition: background var(--duration-fast);
			}
			.activity-retry:hover:not(:disabled) { background: var(--surface-3); }
			.activity-skeleton {
				height: 62px;
				border-bottom: 1px solid var(--stroke);
				background: linear-gradient(90deg, var(--surface-1) 25%, var(--surface-3) 37%, var(--surface-1) 63%);
				background-size: 400% 100%;
				animation: activity-shimmer 1.4s ease infinite;
			}
			.activity-skeleton:last-child { border-bottom: none; }
			@keyframes activity-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
			.sr-only {
				position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
				overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
			}
		</style>
	
	<meta name="twitter:card" content="summary_large_image">
	<meta name="twitter:title" content="Community · three.ws" data-i18n-attr="content:community.meta_twitter_title">
	<meta name="twitter:description" content="Featured creators, builds, and conversations from the three.ws community." data-i18n-attr="content:community.meta_twitter_description">
	<meta name="twitter:image" content="https://three.ws/api/page-og?s=main&amp;t=Community&amp;d=Live+platform+activity+plus+where+to+follow%2C+contribute%2C+and+connect+with+three.ws+creators.&amp;p=%2Fcommunity">
	<script type="application/ld+json">{"@context":"https://schema.org","@type":"WebPage","name":"Community","description":"Featured creators, builds, and conversations from the three.ws community.","url":"https://three.ws/community","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"}}</script>

	<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1">
	<meta property="og:locale" content="en_US">
	<meta property="og:image:alt" content="Community — three.ws">
	<meta name="twitter:site" content="@trythreews">
</head>
	<body>
		<header><div id="nav-container"></div></header>
		<script src="/nav.js"></script>

		<div class="wrap">
			<div class="eyebrow">Community</div>
			<h1 data-i18n="community.build_with_us">Build with us.</h1>
			<p class="sub" data-i18n="community.three_ws_is_built_in_the_open">three.ws is built in the open. Follow along, share what you're building, and help shape the 3D agent layer of the internet.</p>

			<div class="section">
				<div class="activity-head">
					<h2 data-i18n="community.live_activity">Live activity</h2>
					<a href="/feed" data-i18n="community.open_the_full_feed">Open the full feed →</a>
				</div>
				<div class="activity-list" id="community-activity" aria-live="polite" aria-busy="true">
					<div class="activity-skeleton"></div>
					<div class="activity-skeleton"></div>
					<div class="activity-skeleton"></div>
				</div>
			</div>

			<div class="grid">
				<div class="card">
					<span class="icon" aria-hidden="true">&#128161;</span>
					<h2 data-i18n="community.agent_spotlight">Agent Spotlight</h2>
					<p data-i18n="community.the_community_showcase_agents_people_actually">The community showcase. Agents people actually built something with, written up by the builder and ranked by upvotes. Open any one of them in 3D, or put your own in front of everybody.</p>
					<a class="card-link" href="/spotlight" data-i18n="community.see_the_showcase">See the showcase &rarr;</a>
				</div>
				<div class="card">
					<span class="icon" aria-hidden="true" data-i18n="community.text">&#x1D54F;</span>
					<h2 data-i18n="community.follow_on_x">Follow on X</h2>
					<p data-i18n="community.live_builds_demos_release_notes_and_conversa">Live builds, demos, release notes, and conversations with the team. Most day-to-day updates happen here.</p>
					<a class="card-link" href="https://x.com/trythreews" target="_blank" rel="noopener noreferrer" data-i18n="community.trythreews">@trythreews →</a>
				</div>
				<div class="card">
					<span class="icon" aria-hidden="true">&#128736;</span>
					<h2 data-i18n="community.github">GitHub</h2>
					<p data-i18n="community.the_codebase_is_public_file_issues_read">The codebase is public. File issues, read the source, or submit a PR. SDKs, examples, and the embed runtime all live here.</p>
					<a class="card-link" href="https://github.com/nirholas/three.ws" target="_blank" rel="noopener noreferrer" data-i18n="community.nirholas_three_ws">nirholas/three.ws →</a>
				</div>
				<div class="card">
					<span class="icon" aria-hidden="true">&#10024;</span>
					<h2>Contributors</h2>
					<p>Meet the developers, issue reporters, and community members whose work and careful feedback make three.ws better.</p>
					<a class="card-link" href="/contributors">See the thank-you roll &rarr;</a>
				</div>
				<div class="card">
					<span class="icon" aria-hidden="true">&#128218;</span>
					<h2 data-i18n="community.docs">Docs</h2>
					<p data-i18n="community.api_reference_embed_guides_sdk_quickstarts_a">API reference, embed guides, SDK quickstarts, and the Solana agent-kit. Start here if you're integrating.</p>
					<a class="card-link" href="/docs" data-i18n="community.read_the_docs">Read the docs →</a>
				</div>
				<div class="card">
					<span class="icon" aria-hidden="true">&#127891;</span>
					<h2 data-i18n="community.tutorials">Tutorials</h2>
					<p data-i18n="community.step_by_step_guides_for_creating_your">Step-by-step guides for creating your first agent, embedding on your site, minting on Solana, and adding paid skills.</p>
					<a class="card-link" href="/tutorials" data-i18n="community.browse_tutorials">Browse tutorials →</a>
				</div>
				<div class="card">
					<span class="icon" aria-hidden="true">&#127970;</span>
					<h2 data-i18n="community.ibm_user_group">IBM user group</h2>
					<p data-i18n="community.a_public_group_on_ibm_community_for_developers">A public group on IBM Community for developers building AI agents with 3D capabilities: spatial reasoning, generative 3D, agentic pipelines, and real-time interactive systems. Threads, blogs, and a platform tour to start from.</p>
					<a class="card-link" href="https://community.ibm.com/community/user/groups/community-home?communitykey=e71510cc-d953-408f-9a1c-019f5c0a7016" target="_blank" rel="noopener noreferrer" data-i18n="community.join_the_user_group">Join the user group →</a>
				</div>
				<div class="card">
					<span class="icon" aria-hidden="true">&#127942;</span>
					<h2 data-i18n="community.rankings">Rankings</h2>
					<p data-i18n="community.the_cross_surface_leaderboard_creations_remi">The cross-surface leaderboard — creations, remixes, launches, followers, and walk distance. Build a daily streak and earn badges.</p>
					<a class="card-link" href="/rankings" data-i18n="community.see_who_s_ranked">See who's ranked →</a>
				</div>
			</div>

			<div class="section official">
				<h2 data-i18n="community.official_channels">Official channels</h2>
				<p class="lede" data-i18n="community.check_anything_claiming_to_be_three_ws">Check anything claiming to be three.ws against this list. It is the complete set of accounts and addresses we operate, and it is the only place we update it.</p>
				<ul class="chan-list">
					<li class="chan" data-i18n-html="community.x_trythreews_the_only_x_account_we">
						<span class="chan-name">X</span>
						<span class="chan-body"><a class="chan-val" href="https://x.com/trythreews" target="_blank" rel="noopener noreferrer">@trythreews</a>
						<span class="chan-note">The only X account we post from.</span></span>
					</li>
					<li class="chan" data-i18n-html="community.telegram_t_me_three_ws_every_release">
						<span class="chan-name">Telegram</span>
						<span class="chan-body"><a class="chan-val" href="https://t.me/three_ws" target="_blank" rel="noopener noreferrer">t.me/three_ws</a>
						<span class="chan-note">Every release, pushed automatically on deploy. Chat lives in <a href="https://t.me/three_ws_community" target="_blank" rel="noopener noreferrer">t.me/three_ws_community</a>.</span></span>
					</li>
					<li class="chan" data-i18n-html="community.github_nirholas_three_ws_the_whole_platform">
						<span class="chan-name">GitHub</span>
						<span class="chan-body"><a class="chan-val" href="https://github.com/nirholas/three.ws" target="_blank" rel="noopener noreferrer">nirholas/three.ws</a>
						<span class="chan-note">The whole platform, in public.</span></span>
					</li>
					<li class="chan" data-i18n-html="community.web_three_ws_every_product_surface_lives">
						<span class="chan-name">Web</span>
						<span class="chan-body"><a class="chan-val" href="https://three.ws">three.ws</a>
						<span class="chan-note">Every product surface lives under this domain and no other.</span></span>
					</li>
					<li class="chan" data-i18n-html="community.email_support_three_ws_support_reaches_a">
						<span class="chan-name">Email</span>
						<span class="chan-body"><a class="chan-val" href="mailto:[email protected]">[email protected]</a>
						<span class="chan-note">Support reaches a person here, not through a DM.</span></span>
					</li>
					<li class="chan">
						<span class="chan-name" data-i18n="community.three">$THREE</span>
						<span class="chan-body"><span class="chan-val" id="three-ca" translate="no" data-no-i18n>FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump</span>
						<button class="copy-ca" type="button" data-copy-ca aria-label="Copy the $THREE contract address" data-label-copied="Copied" data-label-manual="Select and copy" data-i18n="community.copy" data-i18n-attr="aria-label:community.copy_the_three_contract_addr_arialabel;data-label-copied:community.copied;data-label-manual:community.select_and_copy">Copy</button>
						<span class="chan-note" data-i18n="community.one_contract_on_solana_it_has_never">One contract, on Solana. It has never changed and there is no second one.</span></span>
					</li>
				</ul>
				<div class="impostor">
					<h3 data-i18n="community.two_things_we_never_do">Two things we never do</h3>
					<p data-i18n-html="community.we_never_message_you_first_and_nobody"><strong>We never message you first</strong>, and nobody from three.ws will ever ask for a seed phrase, a private key, or a wallet signature in a DM. <strong>We never launch a second token.</strong> Any &quot;new&quot; or &quot;migrated&quot; $THREE contract is a theft, whatever it is posted under.</p>
					<p style="margin-top: 12px;" data-i18n-html="community.the_founder_s_personal_x_account_nichxbt">The founder's personal X account, <span class="chan-val">@nichxbt</span>, has been unavailable since August 27, 2026. Nothing posted under that handle is us while it is down. Announcements continue as normal on <a href="https://x.com/trythreews" target="_blank" rel="noopener noreferrer">@trythreews</a>, <a href="https://t.me/three_ws" target="_blank" rel="noopener noreferrer">Telegram</a>, and <a href="/changelog">the changelog</a>, which publishes itself straight from the deploy.</p>
				</div>
			</div>

			<div class="section">
				<h2 data-i18n="community.ways_to_get_involved">Ways to get involved</h2>
				<ul>
					<li data-i18n-html="community.ship_an_agent_create_one_at_create"><strong>Ship an agent.</strong> Create one at <a href="/create">/create</a>, embed it on your site, and share it on X with #threews.</li>
					<li data-i18n-html="community.report_bugs_open_an_issue_on_github"><strong>Report bugs.</strong> Open an issue on <a href="https://github.com/nirholas/three.ws/issues" target="_blank" rel="noopener noreferrer">GitHub</a> — we triage daily.</li>
					<li data-i18n-html="community.contribute_code_prs_are_welcome_check_the"><strong>Contribute code.</strong> PRs are welcome. Check the repo for open issues labeled <code>good first issue</code>.</li>
					<li data-i18n-html="community.build_an_integration_the_mcp_server_a2a"><strong>Build an integration.</strong> The MCP server, A2A protocol, and x402 payment layer are all open for third-party tools.</li>
					<li data-i18n-html="community.share_feedback_tweet_at_us_open_a"><strong>Share feedback.</strong> Tweet at us, open a discussion on GitHub, or email <a href="mailto:[email protected]">[email protected]</a>.</li>
				</ul>
			</div>

			<div class="section">
				<h2 data-i18n="community.newsletter">Newsletter</h2>
				<p data-i18n="community.weekly_updates_on_features_protocol_changes">Weekly updates on features, protocol changes, and community highlights. No spam, unsubscribe anytime.</p>
				<form class="newsletter-form" data-newsletter-form novalidate>
					<label class="sr-only" for="community-newsletter-email" data-i18n="community.email_address">Email address</label>
					<input
						id="community-newsletter-email"
						type="email"
						name="email"
						placeholder="[email protected]"
						autocomplete="email"
						required
					/>
					<button type="submit" data-i18n="community.subscribe">Subscribe</button>
				</form>
				<p class="newsletter-msg" data-newsletter-msg role="status"></p>
			</div>
		</div>

		<div id="footer-container"></div>
		<script src="/footer.js"></script>
		<script src="/brand.js" defer></script>

		<script type="module">
			const esc = (s) =>
				String(s ?? '').replace(/[&<>"']/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' })[c]);
			const attr = (s) => esc(s).replace(/"/g, '&quot;');
			const el = document.getElementById('community-activity');

			const VERB = {
				avatar: 'created a new avatar',
				agent: 'launched an agent',
				coin: 'launched a coin',
				model: 'forged a 3D model',
				world: 'built a world',
				restyle: 'restyled a model',
			};
			const GLYPH = { avatar: '\u25CE', agent: '\u{1F916}', coin: '\u25C9', model: '\u2726', world: '\u{1F310}', restyle: '\u{1F3A8}', follow: '\u21E2' };

			function relTime(iso) {
				const then = new Date(iso).getTime();
				if (!Number.isFinite(then)) return '';
				const diff = Math.max(0, Date.now() - then);
				const m = Math.floor(diff / 60000);
				if (m < 1) return 'just now';
				if (m < 60) return `${m}m ago`;
				const h = Math.floor(m / 60);
				if (h < 24) return `${h}h ago`;
				const d = Math.floor(h / 24);
				return d < 30 ? `${d}d ago` : new Date(iso).toLocaleDateString(undefined, { month: 'short', day: 'numeric' });
			}

			// Rows carry two destinations (the item and its creator's profile), so the
			// item link is a stretched overlay rather than a wrapper: an <a> inside an
			// <a> is unparseable and the browser splits it into broken fragments.
			function rowEl(it) {
				const a = it.actor || {};
				const name = esc(a.display_name || 'A three.ws creator');
				const nameHtml = a.username
					? `<a class="activity-user" href="/u/${attr(a.username)}">${name}</a>`
					: name;
				const avatarHtml = a.avatar_url
					? `<img src="${attr(a.avatar_url)}" alt="" loading="lazy" referrerpolicy="no-referrer">`
					: GLYPH[it.kind] || '\u25CE';
				const when = esc(relTime(it.created_at));

				if (it.kind === 'follow') {
					const target = esc((it.target || {}).display_name || 'a creator');
					return `
						<div class="activity-row">
							<a class="activity-main" href="${attr(it.href)}"><span class="sr-only">${name} followed ${target}</span></a>
							<span class="activity-avatar">${avatarHtml}</span>
							<div class="activity-text">
								<div class="activity-line"><strong>${nameHtml}</strong> <span class="activity-verb">followed</span> <strong>${target}</strong></div>
								<div class="activity-meta">${when}</div>
							</div>
						</div>
					`;
				}

				const verb = it.kind === 'model' && it.isRemix
					? 'remixed a 3D model'
					: it.kind === 'restyle' && it.isVariant
						? 'made a colorway variant'
						: VERB[it.kind] || 'shared something';
				const title = esc(it.title || 'Untitled');
				const thumbHtml = it.image
					? `<img src="${attr(it.image)}" alt="" loading="lazy" referrerpolicy="no-referrer">`
					: (GLYPH[it.kind] || '\u25CE');
				const external = it.external ? ' target="_blank" rel="noopener noreferrer"' : '';
				return `
					<div class="activity-row">
						<a class="activity-main" href="${attr(it.href)}"${external}><span class="sr-only">${title}</span></a>
						<span class="activity-avatar">${avatarHtml}</span>
						<div class="activity-text">
							<div class="activity-line"><strong>${nameHtml}</strong> <span class="activity-verb">${esc(verb)}</span></div>
							<div class="activity-meta">${title} \u00B7 ${when}</div>
						</div>
						<span class="activity-thumb">${thumbHtml}</span>
					</div>
				`;
			}

			function showError(message) {
				el.innerHTML = `
					<div class="activity-error">
						<div>${esc(message)}</div>
						<button type="button" class="activity-retry">Try again</button>
					</div>
				`;
				el.querySelector('.activity-retry').addEventListener('click', load);
			}

			function showSkeleton() {
				el.innerHTML = '<div class="activity-skeleton"></div>'.repeat(3);
			}

			async function load() {
				showSkeleton();
				el.setAttribute('aria-busy', 'true');
				try {
					const res = await fetch('/api/users/me/feed?scope=all&limit=10', { headers: { accept: 'application/json' } });
					if (!res.ok) throw new Error(`feed responded ${res.status}`);
					const data = await res.json();
					const items = Array.isArray(data.items) ? data.items : [];
					if (!items.length) {
						el.innerHTML = `<div class="activity-empty">No activity yet. Be the first to <a href="/create">create something</a>.</div>`;
						return;
					}
					el.innerHTML = items.map(rowEl).join('');
				} catch {
					showError('Could not load live activity right now.');
				} finally {
					el.setAttribute('aria-busy', 'false');
				}
			}

			load();

			const copyBtn = document.querySelector('[data-copy-ca]');
			const caEl = document.getElementById('three-ca');
			if (copyBtn && caEl) {
				let resetTimer = 0;
				let idleLabel = '';
				copyBtn.addEventListener('click', async () => {
					// Read the resting label off the button rather than hardcoding "Copy":
					// i18n.js has already swapped it into the reader's language by now, and
					// a hardcoded reset would flip the button back to English on every use.
					if (!resetTimer) idleLabel = copyBtn.textContent;
					const address = caEl.textContent.trim();
					let copied = false;
					try {
						await navigator.clipboard.writeText(address);
						copied = true;
					} catch {
						// Clipboard access is denied outside a secure context and in some
						// embedded webviews. Selecting the address still lets the reader copy
						// it by hand, which beats a button that silently does nothing.
						const range = document.createRange();
						range.selectNodeContents(caEl);
						const selection = window.getSelection();
						selection.removeAllRanges();
						selection.addRange(range);
					}
					copyBtn.textContent = copied ? copyBtn.dataset.labelCopied : copyBtn.dataset.labelManual;
					copyBtn.dataset.copied = copied ? '1' : '0';
					clearTimeout(resetTimer);
					resetTimer = setTimeout(() => {
						copyBtn.textContent = idleLabel;
						delete copyBtn.dataset.copied;
						resetTimer = 0;
					}, 2000);
				});
			}
		</script>
	<!-- Runtime i18n: detects locale, swaps annotated copy, mounts <lang-switcher>. -->
	<script type="module" src="/i18n.js"></script>
</body>
</html>