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.

17.1 KB
Raw Blame
<!doctype html>
<html lang="en">
	<head>
		<script>/* three.ws theme boot: no-flash */(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 http-equiv="X-UA-Compatible" content="IE=edge" />
		<title data-i18n="sonar.page_title">Sonar Control · three.ws</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<meta name="description" content="Control a 3D agent with your hands and no camera. three.ws emits an inaudible tone through your speakers and reads the Doppler shift off your microphone, so a sweep, a push or a lift moves the avatar on screen." data-i18n-attr="content:sonar.meta_desc" />
		<meta name="theme-color" content="#000000" />
		<link rel="canonical" href="https://three.ws/sonar" />

		<meta property="og:type" content="website" />
		<meta property="og:site_name" content="three.ws" />
		<meta property="og:title" content="Sonar Control · three.ws" data-i18n-attr="content:sonar.share_title" />
		<meta property="og:description" content="Wave at your laptop and your 3D agent answers. Acoustic gesture control: inaudible tone out of the speakers, Doppler shift in through the microphone, no camera at any point." data-i18n-attr="content:sonar.og_desc" />
		<meta property="og:url" content="https://three.ws/sonar" />
		<meta property="og:image" content="https://three.ws/api/page-og?s=main&amp;t=Sonar+Control&amp;d=Control+a+3D+agent+with+your+hands+and+no+camera.+three.ws+plays+an+inaudible+carrier+tone+through+your+speakers+and+reads+the+Doppler+shift+of+your+hand+off&amp;p=%2Fsonar" />
		<meta name="twitter:card" content="summary_large_image" />
		<meta name="twitter:site" content="@trythreews" />
		<meta name="twitter:title" content="Sonar Control · three.ws" data-i18n-attr="content:sonar.share_title" />
		<meta name="twitter:description" content="Hand control for 3D agents with no camera. Your speakers emit a tone, your hand bends it, the avatar moves." data-i18n-attr="content:sonar.tw_desc" />
		<meta name="twitter:image" content="https://three.ws/api/page-og?s=main&amp;t=Sonar+Control&amp;d=Control+a+3D+agent+with+your+hands+and+no+camera.+three.ws+plays+an+inaudible+carrier+tone+through+your+speakers+and+reads+the+Doppler+shift+of+your+hand+off&amp;p=%2Fsonar" />

		<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" />
		<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="/sonar.css" />

		<script type="application/ld+json">{"@context":"https://schema.org","@type":"WebPage","name":"Sonar Control","description":"Acoustic gesture control for three.ws agents: an inaudible carrier tone from the speakers, the Doppler shift of your hand read off the microphone, and a 3D avatar that answers it.","url":"https://three.ws/sonar","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="Sonar Control on three.ws">
	</head>
	<body class="sn-page">
		<header>
			<div id="nav-container"></div>
		</header>
		<script src="/nav.js"></script>

		<main>
			<section class="sn-hero">
				<div class="sn-hero-chip">
					<span class="sn-hero-dot" aria-hidden="true"></span>
					<span data-i18n="sonar.hero_chip">No camera. Just sound.</span>
				</div>
				<h1 data-i18n="sonar.hero_title">Wave at your laptop. Your agent answers.</h1>
				<p class="sn-hero-lede" data-i18n-html="sonar.hero_lede">
					Your speakers play a tone you cannot hear. Your hand reflects it, and the reflection
					comes back <strong>bent</strong>: higher when you move in, lower when you pull away.
					That shift is enough to read a sweep, a push and a lift, and to drive a real 3D agent
					with them. Nothing is recorded, nothing leaves the page, and the camera stays shut.
				</p>
				<div class="sn-hero-actions">
					<button type="button" class="sn-btn sn-btn--primary" data-role="start" data-i18n="sonar.start_btn">
						Start sensing
					</button>
					<button type="button" class="sn-btn sn-btn--secondary" data-role="stop" hidden data-i18n="sonar.stop_btn">
						Stop
					</button>
					<a class="sn-btn sn-btn--ghost" href="/gestures" data-i18n="sonar.link_gestures">The gesture vocabulary</a>
					<a class="sn-btn sn-btn--ghost" href="/docs/sonar" data-i18n="sonar.link_how">How it works</a>
				</div>
				<p class="sn-hero-note" data-i18n-html="sonar.hero_note">
					Use the built-in speakers and microphone, and keep the volume up. Headphones break the
					reflection path, so the sensing has nothing to read.
					<strong>The carrier sits near 20&nbsp;kHz: cats and dogs can hear it,</strong> so stop
					if a pet in the room seems bothered.
				</p>
			</section>

			<div class="sn-alert sn-alert--warn" data-role="unsupported" hidden>
				<h2 data-i18n="sonar.unsupported_h">This browser cannot run the sensor</h2>
				<p data-role="unsupported-reason" data-i18n="sonar.unsupported_reason">
					Acoustic sensing needs Web Audio and microphone input. Safari, Chrome, Edge and Firefox
					on a laptop all qualify.
				</p>
				<p data-i18n-html="sonar.unsupported_keyboard">
					The keyboard controls below work regardless, and
					<a href="/gestures">the gesture vocabulary</a> is browsable without any hardware.
				</p>
			</div>

			<div class="sn-alert sn-alert--error" data-role="error" hidden>
				<h2 data-role="error-title" data-i18n="sonar.error_title">Sensing stopped</h2>
				<p data-role="error-detail"></p>
				<button type="button" class="sn-btn sn-btn--secondary" data-role="retry" data-i18n="sonar.retry_btn">Try again</button>
			</div>

			<section class="sn-console" aria-label="Sonar console" data-i18n-attr="aria-label:sonar.console_aria">
				<div class="sn-stage-wrap">
					<div class="sn-stage" data-role="stage" aria-label="Live 3D agent" data-i18n-attr="aria-label:sonar.stage_aria">
						<div class="sn-stage-overlay" data-role="stage-empty">
							<p class="sn-stage-title" data-i18n="sonar.stage_idle_title">The stage is idle</p>
							<p class="sn-stage-sub" data-i18n-html="sonar.stage_idle_sub">Press <strong>Start sensing</strong>, or use the keyboard controls to drive it without a microphone.</p>
						</div>
						<div class="sn-stage-overlay" data-role="stage-loading" hidden>
							<div class="sn-spinner" aria-hidden="true"></div>
							<p class="sn-stage-sub" data-i18n="sonar.stage_loading">Loading the agent</p>
						</div>
						<div class="sn-stage-overlay" data-role="stage-error" hidden>
							<p class="sn-stage-title" data-role="stage-error-title" data-i18n="sonar.stage_error_title">The clip could not be staged</p>
							<p class="sn-stage-sub" data-i18n="sonar.stage_error_sub">Every other gesture still works. Sweep again to move on.</p>
						</div>
					</div>

					<div class="sn-hud" data-role="hud">
						<div class="sn-hud-row">
							<span class="sn-hud-label" data-i18n="sonar.hud_motion_label">Motion</span>
							<span class="sn-hud-value" data-role="hud-direction" data-i18n="sonar.hud_not_sensing">Not sensing</span>
						</div>
						<div
							class="sn-meter"
							role="progressbar"
							aria-label="Reflected motion strength"
							aria-valuemin="0"
							aria-valuemax="100"
							aria-valuenow="0"
							aria-valuetext="No motion"
							data-role="hud-meter"
							data-i18n-attr="aria-label:sonar.meter_aria;aria-valuetext:sonar.meter_valuetext"
						>
							<span class="sn-meter-fill" data-role="hud-strength"></span>
						</div>
						<div class="sn-hud-row sn-hud-row--small">
							<span data-role="hud-tone" data-i18n="sonar.hud_tone_off">Carrier off</span>
							<span data-role="hud-snr" data-i18n="sonar.hud_snr_off">Contrast off</span>
						</div>
					</div>

					<div class="sn-calibrating" data-role="calibrating" hidden>
						<p class="sn-calibrating-title" data-i18n="sonar.calibrating_title">Measuring the room</p>
						<p class="sn-calibrating-sub" data-i18n="sonar.calibrating_sub">Hold still. Everything the microphone hears right now becomes the baseline that your hand is measured against.</p>
						<div
							class="sn-progress"
							role="progressbar"
							aria-label="Measuring the room"
							aria-valuemin="0"
							aria-valuemax="100"
							aria-valuenow="0"
							data-role="calibrating-meter"
							data-i18n-attr="aria-label:sonar.progress_aria"
						>
							<span data-role="calibrating-bar"></span>
						</div>
					</div>
				</div>

				<div class="sn-side">
					<div class="sn-panel">
						<h2 class="sn-panel-title" data-i18n="sonar.panel_signal_title">Signal</h2>
						<p class="sn-panel-sub" data-i18n-html="sonar.panel_signal_sub">
							The carrier and 600&nbsp;Hz either side of it. Grey is the still room. Green is
							what is coming back right now: energy to the <em>right</em> of the spike is a hand
							closing in, to the <em>left</em> is a hand pulling away.
						</p>
						<canvas data-role="signal" class="sn-signal" width="640" height="180" aria-label="Live spectrum around the carrier tone" data-i18n-attr="aria-label:sonar.signal_canvas_aria"></canvas>
						<p class="sn-signal-legend" data-i18n-html="sonar.signal_legend">
							<span class="sn-key sn-key--base"></span> still room
							<span class="sn-key sn-key--live"></span> live
							<span class="sn-key sn-key--carrier"></span> carrier
						</p>
					</div>

					<div class="sn-panel">
						<h2 class="sn-panel-title" data-i18n="sonar.panel_controls_title">Controls</h2>
						<fieldset class="sn-modes" data-role="modes">
							<legend data-i18n="sonar.modes_legend">Gesture in play</legend>
							<p class="sn-modes-note" data-i18n-html="sonar.modes_note">
								The microphone senses distance, not direction, so a sweep and a push look
								alike coming in. Pick the one you are making; <em>All three</em> runs every
								detector at once and will misread more often.
							</p>
							<div class="sn-modes-row"></div>
						</fieldset>
						<div class="sn-control">
							<label for="sn-volume" data-i18n="sonar.volume_label">Carrier level</label>
							<input type="range" id="sn-volume" data-role="volume" min="1" max="20" step="1" value="8" />
							<output data-role="volume-out">8%</output>
						</div>
						<div class="sn-control">
							<label for="sn-tone" data-i18n="sonar.tone_label">Carrier</label>
							<select id="sn-tone" data-role="tone"></select>
						</div>
						<div class="sn-toggles">
							<label><input type="checkbox" data-role="reverse-swipe" /> <span data-i18n="sonar.toggle_reverse_swipe">Reverse sweep</span></label>
							<label><input type="checkbox" data-role="reverse-zoom" /> <span data-i18n="sonar.toggle_reverse_push">Reverse push</span></label>
							<label><input type="checkbox" data-role="reverse-lift" /> <span data-i18n="sonar.toggle_reverse_lift">Reverse lift</span></label>
						</div>
						<div class="sn-control-actions">
							<button type="button" class="sn-btn sn-btn--secondary" data-role="recalibrate" disabled data-i18n="sonar.recalibrate_btn">Re-measure the room</button>
							<button type="button" class="sn-btn sn-btn--ghost" data-role="reset-view" data-i18n="sonar.reset_view_btn">Reset the shot</button>
						</div>
					</div>
				</div>
			</section>

			<section class="sn-vocab" aria-label="What each gesture does" data-i18n-attr="aria-label:sonar.vocab_aria">
				<h2 class="sn-section-title" data-i18n="sonar.vocab_title">Three gestures</h2>
				<div class="sn-cards">
					<article class="sn-card" data-gesture="swipe">
						<div class="sn-card-icon" aria-hidden="true">&#8596;</div>
						<h3 data-i18n="sonar.card_swipe_title">Sweep sideways</h3>
						<p data-i18n="sonar.card_swipe_desc">Palm down over the keyboard, sweep across, then pause before sweeping back. Each sweep steps to the next gesture in the agent's vocabulary.</p>
						<p class="sn-card-live" data-role="live-swipe" data-i18n="sonar.card_live_waiting">Waiting</p>
						<p class="sn-card-keys" data-i18n-html="sonar.card_swipe_keys">Keyboard: <kbd>&larr;</kbd> <kbd>&rarr;</kbd></p>
					</article>
					<article class="sn-card" data-gesture="push">
						<div class="sn-card-icon" aria-hidden="true">&#10530;</div>
						<h3 data-i18n="sonar.card_push_title">Push and pull</h3>
						<p data-i18n="sonar.card_push_desc">Push your palm toward the screen to move the camera in. Pull back and it eases out, paced by how fast your hand actually moves.</p>
						<p class="sn-card-live" data-role="live-push" data-i18n="sonar.card_live_waiting">Waiting</p>
						<p class="sn-card-keys" data-i18n-html="sonar.card_push_keys">Keyboard: <kbd>+</kbd> <kbd>&minus;</kbd></p>
					</article>
					<article class="sn-card" data-gesture="lift">
						<div class="sn-card-icon" aria-hidden="true">&#8597;</div>
						<h3 data-i18n="sonar.card_lift_title">Lift and hold</h3>
						<p data-i18n="sonar.card_lift_desc">Raise your hand off the keyboard and hold it there. The camera turns around the agent for as long as you hold, and settles when you lower it.</p>
						<p class="sn-card-live" data-role="live-lift" data-i18n="sonar.card_live_waiting">Waiting</p>
						<p class="sn-card-keys" data-i18n-html="sonar.card_lift_keys">Keyboard: <kbd>[</kbd> <kbd>]</kbd></p>
					</article>
				</div>
			</section>

			<section class="sn-log-section" aria-label="Recognised gestures" data-i18n-attr="aria-label:sonar.log_aria">
				<div class="sn-log-head">
					<h2 class="sn-section-title" data-i18n="sonar.log_title">What it read</h2>
					<span class="sn-log-count" data-role="log-count" data-i18n="sonar.log_count">Nothing yet</span>
				</div>
				<p class="sn-visually-hidden" data-role="log-latest" aria-live="polite"></p>
				<ol class="sn-log" data-role="log">
					<li class="sn-log-empty" data-role="log-empty" data-i18n="sonar.log_empty">
						Every gesture the sensor recognises lands here, with the reading that triggered it.
						A run of misreads is usually the carrier: try a different one in Controls.
					</li>
				</ol>
			</section>

			<section class="sn-explain">
				<h2 class="sn-section-title" data-i18n="sonar.explain_title">Why this works</h2>
				<div class="sn-explain-grid">
					<div>
						<h3 data-i18n="sonar.explain_doppler_title">The Doppler effect, indoors</h3>
						<p data-i18n="sonar.explain_doppler_desc">
							A siren drops in pitch as it passes you. The same thing happens to a 20&nbsp;kHz
							tone reflecting off your hand, only the shift is a few hertz rather than a few
							hundred. Averaging the room while you hold still gives a reference, and anything
							that appears beside the carrier afterwards is something that moved.
						</p>
					</div>
					<div>
						<h3 data-i18n="sonar.explain_distance_title">Distance, not direction</h3>
						<p data-i18n="sonar.explain_distance_desc">
							The microphone only senses whether something got closer or further away. A sweep
							is read as one coherent approach followed by its retreat, which is why pausing
							before you sweep back matters: without the pause, the return stroke reads as a
							second sweep in the other direction.
						</p>
					</div>
					<div>
						<h3 data-i18n="sonar.explain_priorwork_title">Standing on prior work</h3>
						<p data-i18n-html="sonar.explain_priorwork_desc">
							The technique is <a href="https://www.microsoft.com/en-us/research/project/soundwave-using-the-doppler-effect-to-sense-gestures/" rel="noopener">SoundWave</a>
							(Gupta, Morris, Patel and Tan, CHI 2012). The detectors here are ported from
							<a href="https://github.com/nirholas/sonar.cool" rel="noopener">Sonar</a>, Emanuel Perez's
							MIT-licensed macOS implementation, with
							<a href="https://github.com/DanielRapp/doppler" rel="noopener">Daniel Rapp's Doppler</a>
							as the prior art for doing it in a browser at all.
						</p>
					</div>
					<div>
						<h3 data-i18n="sonar.explain_takeit_title">Take it with you</h3>
						<p data-i18n-html="sonar.explain_takeit_desc">
							The sensor and the detectors are two plain modules with no 3D and no DOM in them.
							Point them at anything: a slide deck, a kiosk, an
							<a href="/docs/embedding">embedded agent</a>. The
							<a href="/docs/sonar">developer reference</a> has the whole surface.
						</p>
					</div>
				</div>
			</section>
		</main>

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

		<script type="module" src="/src/sonar-page.js"></script>
		<!-- Runtime i18n: detects locale, swaps annotated copy, mounts <lang-switcher>. -->
		<script type="module" src="/i18n.js"></script>
	</body>
</html>