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.

21.2 KB
Raw Blame
<!doctype html>
<html lang="en">
<head>
	<style>/* three.ws hidden-guard — make the `hidden` attribute authoritative; see scripts/lib/hidden-guard.mjs */[hidden]{display:none!important}</style>
	<script>/* three.ws theme boot */(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, viewport-fit=cover" />
	<meta name="theme-color" content="#0b0c10" />
	<title data-i18n="daily.meta_title">Daily Forge · three.ws</title>
	<meta name="description" content="A new 3D creative challenge every day. Forge today's theme into a real 3D model, free and no sign-up, and build a daily streak. Place your creation in AR on your phone."  data-i18n-attr="content:daily.meta_description"/>
	<link rel="canonical" href="https://three.ws/daily" />
	<meta property="og:site_name" content="three.ws" />
	<meta property="og:type" content="website" />
	<meta property="og:url" content="https://three.ws/daily" />
	<meta property="og:title" content="Daily Forge · three.ws"  data-i18n-attr="content:daily.meta_og_title"/>
	<meta property="og:description" content="A new 3D creative challenge every day. Forge today's theme into a real 3D model, free, and keep your streak alive."  data-i18n-attr="content:daily.meta_og_description"/>
	<meta property="og:image" content="https://three.ws/api/page-og?s=labs&amp;t=Daily+Forge&amp;d=A+new+3D+creative+challenge+every+day.+Forge+today%27s+theme+into+a+real+3D+model%2C+free+and+no+sign-up%2C+build+a+daily+streak%2C+and+place+your+creation+in+AR+on&amp;p=%2Fdaily" />
	<meta property="og:image:width" content="1200" />
	<meta property="og:image:height" content="630" />
	<meta name="twitter:card" content="summary_large_image" />
	<meta name="twitter:site" content="@trythreews" />
	<meta name="twitter:title" content="Daily Forge · three.ws"  data-i18n-attr="content:daily.meta_twitter_title"/>
	<meta name="twitter:description" content="A new 3D creative challenge every day. Build a daily streak."  data-i18n-attr="content:daily.meta_twitter_description"/>
	<script type="application/ld+json">{"@context":"https://schema.org","@type":"WebApplication","name":"Daily Forge","url":"https://three.ws/daily","applicationCategory":"GameApplication","operatingSystem":"Any","offers":{"@type":"Offer","price":"0","priceCurrency":"USD"},"description":"A daily 3D creative challenge: forge the day's theme into a real 3D model and build a streak.","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"}}</script>
	<link rel="icon" href="/favicon.ico" sizes="any" />
	<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
	<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
	<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1" />
	<!-- Meshopt decoder before <model-viewer> (Forge GLBs are meshopt-compressed).
	     <model-viewer> itself is loaded by the bootstrap at the end of <body>, only
	     once WebGL is confirmed: it builds a THREE.WebGLRenderer the moment it
	     upgrades, which throws on a browser that has no WebGL context to give it. -->
	<script src="/model-viewer-meshopt.js"></script>
	<style>
		:root {
			--bg: #0b0c10; --ink: #ecedf2; --ink-dim: #9aa0af; --ink-faint: #6b7080;
			--line: rgba(255,255,255,0.09); --panel: rgba(255,255,255,0.03);
			--accent: #ffb15c; --good: #6ee7b7; --warn: #fca5a5;
			--flame: #ff8a3d; --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
		}
		* { box-sizing: border-box; }
		html, body { margin: 0; }
		body {
			font-family: var(--font);
			background: radial-gradient(130% 130% at 50% 0%, #16130e 0%, #0b0c10 55%, #08090c 100%);
			color: var(--ink); min-height: 100dvh; display: flex; flex-direction: column;
		}
		a { color: inherit; }
		header.bar {
			display: flex; align-items: center; gap: 12px; padding: 12px 16px;
			border-bottom: 1px solid var(--line); background: rgba(10,11,14,0.55);
			backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 5;
		}
		.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 700; }
		.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--flame); box-shadow: 0 0 12px var(--flame); }
		.crumb { color: var(--ink-dim); font-size: 13px; }
		.spacer { flex: 1 1 auto; }
		.streak-pill {
			display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700;
			background: rgba(255,138,61,0.14); border: 1px solid rgba(255,138,61,0.4);
			color: #ffd0a8; border-radius: 999px; padding: 6px 12px; white-space: nowrap;
		}
		.streak-pill.zero { background: var(--panel); border-color: var(--line); color: var(--ink-dim); }
		a.top { color: var(--ink-dim); font-size: 13px; text-decoration: none; }
		a.top:hover { color: var(--ink); }
		main { flex: 1 1 auto; width: 100%; max-width: 760px; margin: 0 auto; padding: 22px 16px 48px; display: flex; flex-direction: column; gap: 18px; }

		/* Theme hero */
		.theme {
			border: 1px solid var(--line); border-radius: 18px; padding: 20px;
			background:
				radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--theme, #ffb15c) 16%, transparent) 0%, transparent 55%),
				var(--panel);
			position: relative; overflow: hidden;
		}
		.theme .day { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--theme, var(--accent)); }
		.theme h1 { margin: 6px 0 6px; font-size: clamp(24px, 6vw, 34px); letter-spacing: -0.02em; display: flex; align-items: center; gap: 12px; }
		.theme h1 .emoji { font-size: 1.1em; filter: saturate(1.1); }
		.theme .hint { margin: 0; color: var(--ink-dim); font-size: 14.5px; line-height: 1.5; max-width: 52ch; }

		/* Streak banner */
		.streak {
			display: flex; align-items: center; gap: 14px; border: 1px solid var(--line);
			border-radius: 14px; padding: 13px 16px; background: var(--panel);
		}
		.streak .flame { font-size: 30px; line-height: 1; filter: drop-shadow(0 0 10px rgba(255,138,61,0.5)); }
		.streak.lit .flame { animation: flicker 2.6s ease-in-out infinite; }
		@keyframes flicker { 0%,100% { transform: scale(1) rotate(-1deg); } 50% { transform: scale(1.08) rotate(1deg); } }
		@media (prefers-reduced-motion: reduce) { .streak.lit .flame { animation: none; } }
		.streak .txt { flex: 1 1 auto; min-width: 0; }
		.streak .n { font-size: 16px; font-weight: 750; }
		.streak .sub { font-size: 12.5px; color: var(--ink-dim); }
		.streak .best { font-size: 12px; color: var(--ink-faint); white-space: nowrap; }

		/* Prompt */
		form.ask { display: flex; gap: 8px; align-items: stretch; }
		.ask input {
			flex: 1 1 auto; min-width: 0; font: inherit; font-size: 15px; color: var(--ink);
			background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.16);
			border-radius: 12px; padding: 12px 14px; transition: border-color .15s, background .15s;
		}
		.ask input::placeholder { color: var(--ink-faint); }
		.ask input:focus { outline: none; border-color: color-mix(in srgb, var(--theme, var(--accent)) 65%, transparent); background: rgba(255,255,255,0.07); }
		button.go {
			appearance: none; cursor: pointer; font: inherit; font-size: 14.5px; font-weight: 750;
			color: #1a1206; background: var(--theme, var(--accent)); border: 0; border-radius: 12px; padding: 12px 20px;
			display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; transition: filter .15s, transform .05s;
		}
		button.go:hover { filter: brightness(1.07); }
		button.go:active { transform: translateY(1px); }
		button.go[disabled] { opacity: .55; cursor: progress; filter: none; }
		.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
		.chips .label { color: var(--ink-faint); font-size: 12px; }
		button.chip {
			appearance: none; cursor: pointer; font: inherit; font-size: 12.5px; color: #d6dae4;
			background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.13);
			border-radius: 999px; padding: 6px 12px; transition: background .15s, border-color .15s, color .15s;
		}
		button.chip:hover { background: color-mix(in srgb, var(--theme, var(--accent)) 14%, transparent); border-color: color-mix(in srgb, var(--theme, var(--accent)) 40%, transparent); color: #fff; }

		/* Stage */
		.stage { position: relative; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: rgba(255,255,255,0.02); min-height: min(52dvh, 440px); display: flex; flex-direction: column; }
		model-viewer { width: 100%; flex: 1 1 auto; min-height: min(48dvh, 400px); --poster-color: transparent; --progress-bar-color: var(--theme, var(--accent)); background: transparent; opacity: 1; transition: opacity .35s ease; }
		model-viewer.veiled { opacity: 0; }
		.overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 13px; text-align: center; padding: 26px; }
		.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.14); border-top-color: var(--theme, var(--accent)); animation: spin .9s linear infinite; }
		@keyframes spin { to { transform: rotate(360deg); } }
		@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
		.idleart { font-size: 42px; line-height: 1; }
		.h { font-size: 15px; font-weight: 650; }
		.muted { color: var(--ink-dim); font-size: 13px; line-height: 1.5; max-width: 40ch; }
		.elapsed { font-variant-numeric: tabular-nums; color: var(--ink-faint); font-size: 12px; }
		.actions { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px; border-top: 1px solid var(--line); background: rgba(10,11,14,0.6); }
		.actions .meta { flex: 1 1 100%; color: var(--ink-dim); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
		a.btn, button.btn {
			appearance: none; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 7px;
			font: inherit; font-size: 13px; font-weight: 650; color: var(--ink);
			background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14);
			border-radius: 10px; padding: 8px 13px; transition: background .15s, border-color .15s, transform .05s;
		}
		a.btn:hover, button.btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.28); }
		a.btn:active, button.btn:active { transform: translateY(1px); }
		.btn.primary { background: color-mix(in srgb, var(--theme, var(--accent)) 20%, transparent); border-color: color-mix(in srgb, var(--theme, var(--accent)) 45%, transparent); color: #fff; }
		.hidden { display: none !important; }
		.retry { color: var(--theme, var(--accent)); background: transparent; border: 1px solid color-mix(in srgb, var(--theme, var(--accent)) 45%, transparent); }

		/* Community */
		section.rail-wrap h2 { font-size: 13px; font-weight: 650; color: var(--ink-dim); text-transform: uppercase; letter-spacing: .06em; margin: 4px 0 10px; }
		.rail { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 9px; }
		.rail a { display: flex; flex-direction: column; gap: 6px; text-decoration: none; }
		.rail .thumb { aspect-ratio: 1.2; border-radius: 10px; overflow: hidden; background: linear-gradient(140deg,#171923,#101218); display: grid; place-items: center; }
		.rail .thumb img { width: 100%; height: 100%; object-fit: cover; }
		.rail .cap { font-size: 11.5px; color: var(--ink-dim); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

		/* Milestone toast */
		.milestone { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(4,4,6,0.6); padding: 24px; }
		.milestone-card { text-align: center; max-width: 340px; background: #12140f; border: 1px solid color-mix(in srgb, var(--flame) 40%, var(--line)); border-radius: 20px; padding: 28px 24px; box-shadow: 0 30px 80px -30px rgba(255,138,61,0.5); animation: pop .3s ease; }
		@keyframes pop { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
		.milestone-card .big { font-size: 52px; line-height: 1; }
		.milestone-card h3 { margin: 12px 0 6px; font-size: 22px; }
		.milestone-card p { margin: 0 0 16px; color: var(--ink-dim); font-size: 14px; line-height: 1.5; }

		:where(a, button, input, [tabindex]):focus-visible {
			outline: 2px solid color-mix(in srgb, var(--theme, var(--accent)) 85%, #fff);
			outline-offset: 2px; border-radius: 8px;
		}
		.ask input:focus-visible { outline: 2px solid color-mix(in srgb, var(--theme, var(--accent)) 85%, #fff); outline-offset: 0; }

		footer.foot { border-top: 1px solid var(--line); padding: 14px 16px; text-align: center; color: var(--ink-faint); font-size: 12px; }
		footer.foot a { color: var(--ink-dim); }
		footer.foot a:hover { color: var(--ink); }
	</style>

	<meta property="og:locale" content="en_US">
	<meta property="og:image:alt" content="Daily Forge — three.ws">
	<meta name="twitter:image" content="https://three.ws/api/page-og?s=labs&amp;t=Daily+Forge&amp;d=A+new+3D+creative+challenge+every+day.+Forge+today%27s+theme+into+a+real+3D+model%2C+free+and+no+sign-up%2C+build+a+daily+streak%2C+and+place+your+creation+in+AR+on&amp;p=%2Fdaily">
</head>
<body>
	<header class="bar">
		<a class="brand" href="/" data-i18n-html="daily.three_ws"><span class="dot" aria-hidden="true"></span>three.ws</a>
		<span class="crumb" data-i18n="daily.daily_forge">/ Daily Forge</span>
		<span class="spacer"></span>
		<span class="streak-pill zero" id="streak-pill" title="Your daily forge streak" data-i18n-attr="title:daily.your_daily_forge_streak_title">🔥 <span id="streak-pill-n">0</span></span>
		<a class="top" href="/forge" data-i18n="daily.studio">Studio →</a>
	</header>

	<main>
		<div class="theme" id="theme">
			<div class="day" id="theme-day">Daily challenge</div>
			<h1 data-i18n-html="daily.today_s_theme"><span class="emoji" id="theme-emoji" aria-hidden="true">✨</span><span id="theme-title">Today's theme</span></h1>
			<p class="hint" id="theme-hint" data-i18n="daily.loading_today_s_challenge">Loading today's challenge…</p>
		</div>

		<div class="streak" id="streak">
			<span class="flame" aria-hidden="true">🔥</span>
			<div class="txt">
				<div class="n" id="streak-n">Start your streak today</div>
				<div class="sub" id="streak-sub">Forge today's theme to begin a daily streak.</div>
			</div>
			<div class="best" id="streak-best"></div>
		</div>

		<form class="ask" id="ask" autocomplete="off">
			<input id="prompt" name="prompt" type="text" inputmode="text" enterkeyhint="go" maxlength="600" minlength="3"
				placeholder="Describe your take on today's theme…" aria-label="Describe the 3D model to generate" required />
			<button class="go" id="go" type="submit" data-i18n-html="daily.forge">Forge<span aria-hidden="true">✦</span></button>
		</form>
		<div class="chips" id="chips" aria-label="Prompt ideas for today"><span class="label" data-i18n="daily.ideas">Ideas:</span></div>

		<div class="stage" id="stage">
			<model-viewer id="mv" class="veiled" camera-controls auto-rotate touch-action="pan-y"
				rotation-per-second="16deg" interaction-prompt="none" shadow-intensity="1" shadow-softness="0.85"
				exposure="1.05" environment-image="neutral" tone-mapping="aces"
				ar ar-modes="webxr scene-viewer quick-look" ar-scale="auto" reveal="auto" alt="Your 3D creation">
			</model-viewer>

			<div id="idle" class="overlay">
				<div class="idleart" aria-hidden="true">🛠️</div>
				<div class="h">Make today's theme yours</div>
				<div class="muted">Type your own spin above or tap an idea. It's free, takes about a minute, and keeps your streak alive.</div>
			</div>

			<div id="working" class="overlay hidden" aria-live="polite">
				<div class="spinner" aria-hidden="true"></div>
				<div class="h" id="worktitle">Forging…</div>
				<div class="muted" id="workmsg">Sending your prompt to the forge.</div>
				<div class="elapsed" id="elapsed"></div>
			</div>

			<div id="failed" class="overlay hidden">
				<div class="h">That one didn't make it</div>
				<div class="muted" id="failmsg">Generation failed.</div>
				<button class="btn retry" id="retry" type="button" data-i18n="daily.try_again">Try again</button>
			</div>

			<div class="actions hidden" id="actions">
				<div class="meta" id="meta"></div>
				<button class="btn primary" id="ar-btn" type="button" aria-label="View this in augmented reality" data-i18n="daily.view_in_your_room" data-i18n-attr="aria-label:daily.view_this_in_augmented_reali_arialabel">📱 View in your room</button>
				<a class="btn" id="studio-btn" aria-label="Open in AR Studio" data-i18n="daily.ar_studio" data-i18n-attr="aria-label:daily.open_in_ar_studio_arialabel">▣ AR Studio</a>
				<a class="btn" id="download" download aria-label="Download the GLB" data-i18n="daily.download" data-i18n-attr="aria-label:daily.download_the_glb_arialabel">Download</a>
				<button class="btn" id="share" type="button" aria-label="Share this creation" data-i18n="daily.share" data-i18n-attr="aria-label:daily.share_this_creation_arialabel">Share</button>
			</div>
		</div>

		<section class="rail-wrap hidden" id="rail-wrap">
			<h2 data-i18n="daily.fresh_from_the_community">Fresh from the community</h2>
			<div class="rail" id="rail"></div>
		</section>
	</main>

	<div class="milestone hidden" id="milestone" role="dialog" aria-modal="true" aria-label="Streak milestone">
		<div class="milestone-card">
			<div class="big" id="ms-emoji">🔥</div>
			<h3 id="ms-title" data-i18n="daily.7_day_streak">7-day streak!</h3>
			<p id="ms-body" data-i18n="daily.you_ve_forged_something_seven_days_running">You've forged something seven days running. Keep it going.</p>
			<button class="btn primary" id="ms-close" type="button" data-i18n="daily.keep_forging">Keep forging</button>
		</div>
	</div>

	<footer class="foot">
		A new challenge every day at midnight UTC · Free, no sign-up ·
		<a href="/forge" data-i18n="daily.forge_studio">Forge studio</a> · <a href="/ar/studio" data-i18n="daily.ar_studio_2">AR Studio</a> · <a href="/gallery" data-i18n="daily.gallery">Gallery</a>
	</footer>

	<script type="module">
		function webglSupported() {
			try { const c = document.createElement('canvas'); return !!(window.WebGLRenderingContext && (c.getContext('webgl') || c.getContext('experimental-webgl'))); } catch { return false; }
		}
		// Loaded as a tag rather than a dynamic import so the bundler leaves the CDN
		// URL alone, and so a CDN outage is a rejected promise we can design for
		// instead of an unhandled module failure.
		function loadModelViewer() {
			return new Promise((resolve, reject) => {
				const el = document.createElement('script');
				el.type = 'module';
				el.src = 'https://cdn.jsdelivr.net/npm/@google/[email protected]/dist/model-viewer.min.js';
				el.onload = () => resolve();
				el.onerror = () => reject(new Error('model-viewer failed to load'));
				document.head.appendChild(el);
			});
		}

		if (webglSupported()) {
			// Whatever happens to the CDN, the page script boots: daily.js checks
			// whether <model-viewer> actually registered and hands over download and
			// AR links instead of a preview when it did not.
			const viewerReady = loadModelViewer().then(() => customElements.whenDefined('model-viewer')).catch(() => {});
			const cap = new Promise((resolve) => { setTimeout(resolve, 8000); });
			Promise.race([viewerReady, cap]).then(() => import('/src/daily.js'));
		} else {
			// No WebGL means no preview, but the day's theme is pure data and still
			// worth showing: without this the visitor sat on "Loading today's
			// challenge..." forever and never learned what the challenge was.
			import('/src/daily/daily-theme.js').then(({ themeForDate }) => {
				const theme = themeForDate(new Date());
				document.documentElement.style.setProperty('--theme', theme.accent);
				const own = (el) => { if (el) el.setAttribute('data-i18n-owned', '1'); return el; };
				own(document.querySelector('.theme h1'));
				own(document.getElementById('theme-day')).textContent = `Day ${theme.day} · Daily challenge`;
				document.getElementById('theme-emoji').textContent = theme.emoji;
				document.getElementById('theme-title').textContent = theme.title;
				own(document.getElementById('theme-hint')).textContent = theme.hint;
				own(document.querySelector('title'));
				document.title = `${theme.emoji} ${theme.title} · Daily Forge · three.ws`;
				const input = document.getElementById('prompt');
				if (input) input.placeholder = `Your take on "${theme.title}"…`;
			}).catch(() => {});
			const form = document.getElementById('ask');
			if (form) form.addEventListener('submit', (e) => e.preventDefault());
			const go = document.getElementById('go');
			if (go) { go.disabled = true; go.title = 'Forging needs a browser that can render 3D.'; }
			const s = document.getElementById('idle');
			if (s) s.innerHTML = '<div class="idleart">🛰️</div><div class="h">This browser can’t render 3D</div><div class="muted">Daily Forge needs WebGL to show your model. Reopen this page in an up-to-date Chrome, Edge, Firefox, or Safari to join today’s challenge.</div>';
		}
	</script>
	<!-- Runtime i18n: detects locale, swaps annotated copy, mounts <lang-switcher>. -->
	<script type="module" src="/i18n.js"></script>
</body>
</html>