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.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
refactor(irl): drop the visit-link AR helper that pin-ar.js superseded
nirholasb71ba10d3a1c
diff --git a/src/irl/visit-link.js b/src/irl/visit-link.jsindex 120d4fd2c..6ca97a6d8 100644--- a/src/irl/visit-link.js+++ b/src/irl/visit-link.js@@ -55,26 +55,6 @@ export function buildSignUrl(pinId, origin) {return `${baseFrom(origin)}/irl/sign?pin=${encodeURIComponent(id)}`;}-/**- * How "See it in AR" should launch for a DISCOVERED pin (someone else's agent).- *- * iOS has no WebXR, but ARKit Quick Look can show the agent on the real floor,- * so the page bakes the pin's GLB into an animated USDZ on the device and opens- * it in place. Everything else goes through the server-side AR launcher, which- * already routes Android to a native AR intent and desktops to the WebGL viewer.- * A pin with no https GLB (a legacy relative path, a blob) gets `none`, and the- * button stays hidden rather than pointing at a viewer that would refuse it.- */-export function discoveredArLaunch({ avatarUrl, name, ios } = {}) {- const src = typeof avatarUrl === 'string' ? avatarUrl.trim() : '';- if (!/^https:\/\//i.test(src)) return { mode: 'none' };- if (ios) return { mode: 'quicklook', src };- const title = typeof name === 'string' ? name.trim().slice(0, 120) : '';- const qs = new URLSearchParams({ src, kind: 'avatar' });- if (title) qs.set('title', title);- return { mode: 'link', src, url: `/api/ar?${qs.toString()}` };-}-/*** Copy for the "you came to meet" banner while the visitor is not yet within* discovery range, and once the agent has appeared. The radius is the server'sdiff --git a/tests/irl-visit-link.test.js b/tests/irl-visit-link.test.jsindex 71c555ba5..37b450f1a 100644--- a/tests/irl-visit-link.test.js+++ b/tests/irl-visit-link.test.js@@ -1,9 +1,8 @@// IRL visit links (src/irl/visit-link.js).//// A sign at a real spot carries one URL. Everything a stranger sees after scanning-// it (which agent they came to meet, whether their phone opens Quick Look or the-// server AR launcher, what the banner tells them before the agent is in range)-// follows from these rules, so they are pinned here.+// it (which agent they came to meet, what the banner tells them before the agent+// is in range) follows from these rules, so they are pinned here.import { describe, it, expect } from 'vitest';@@ -12,7 +11,6 @@ import {parseVisitTarget,buildVisitUrl,buildSignUrl,- discoveredArLaunch,meetBannerCopy,} from '../src/irl/visit-link.js';@@ -60,31 +58,6 @@ describe('buildVisitUrl / buildSignUrl', () => {});});-describe('discoveredArLaunch', () => {- const glb = 'https://cdn.three.ws/avatars/abc.glb';- it('opens Quick Look in place on iOS', () => {- expect(discoveredArLaunch({ avatarUrl: glb, name: 'Mira', ios: true })).toEqual({ mode: 'quicklook', src: glb });- });- it('routes everyone else through the server AR launcher with the living-agent kind', () => {- const r = discoveredArLaunch({ avatarUrl: glb, name: 'Mira', ios: false });- expect(r.mode).toBe('link');- const u = new URL(r.url, 'https://three.ws');- expect(u.pathname).toBe('/api/ar');- expect(u.searchParams.get('src')).toBe(glb);- expect(u.searchParams.get('kind')).toBe('avatar');- expect(u.searchParams.get('title')).toBe('Mira');- });- it('hides the action for a pin with no https model', () => {- expect(discoveredArLaunch({ avatarUrl: '/api/avatars/x/glb', ios: true })).toEqual({ mode: 'none' });- expect(discoveredArLaunch({ avatarUrl: 'blob:https://three.ws/1', ios: false })).toEqual({ mode: 'none' });- expect(discoveredArLaunch({})).toEqual({ mode: 'none' });- });- it('clamps a runaway name so the title never bloats the URL', () => {- const r = discoveredArLaunch({ avatarUrl: glb, name: 'n'.repeat(400), ios: false });- expect(new URL(r.url, 'https://three.ws').searchParams.get('title')).toHaveLength(120);- });-});-describe('meetBannerCopy', () => {it('names the agent and quotes the real discovery radius while out of range', () => {const c = meetBannerCopy({ name: 'Mira', state: 'searching', radiusM: 60 });