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
feat: improve avatar drag behavior and adjust dimensions for responsiveness
nirholas33c27f0e8c11
diff --git a/chat/src/App.svelte b/chat/src/App.svelteindex 7e240de7e..f409eb9a8 100644--- a/chat/src/App.svelte+++ b/chat/src/App.svelte@@ -1598,8 +1598,10 @@dragMoved = true;}if (!dragMoved) return;- const x = Math.max(0, Math.min(window.innerWidth - 240, e.clientX - dragOffset.x));- const y = Math.max(0, Math.min(window.innerHeight - 60, e.clientY - dragOffset.y));+ const aw = agentEl?.offsetWidth || 420;+ const ah = agentEl?.offsetHeight || 700;+ const x = Math.max(0, Math.min(window.innerWidth - Math.min(aw, window.innerWidth), e.clientX - dragOffset.x));+ const y = Math.max(0, Math.min(window.innerHeight - Math.min(ah * 0.15, 80), e.clientY - dragOffset.y));dragPos = { x, y };}@@ -2356,7 +2358,7 @@class:avatar-walking={generating && !thoughtBubbleActive && agentReady && !avatarExitAnim && dragPos.x === null}style={dragPos.x !== null? `position: fixed; left: ${dragPos.x}px; top: ${dragPos.y}px;`- : 'position: absolute; bottom: 128px; right: 0; pointer-events: none;'}+ : `position: absolute; bottom: ${($toolSchema.length > 0 || effectiveAgentId || $talkingHeadEnabled) ? 168 : 128}px; right: 0; max-width: 100%; pointer-events: none;`}on:mousedown={onAvatarDragStart}role="none">@@ -2405,7 +2407,7 @@background="transparent"kioskname-plate="off"- style="width:420px;height:700px; cursor: grab; pointer-events: auto;"+ style="width:min(420px, 60vw); height:min(700px, 70vh); aspect-ratio: 420/700; cursor: grab; pointer-events: auto;"></agent-3d>{:else if $talkingHeadEnabled && agentVisible}<div style="cursor: grab; pointer-events: auto;">diff --git a/public/chat/index.html b/public/chat/index.htmlindex a9156935c..b31ddebe9 100644--- a/public/chat/index.html+++ b/public/chat/index.html@@ -43,7 +43,7 @@}}</script>- <script type="module" crossorigin src="/chat/assets/index-Dj9gh9YN.js"></script>+ <script type="module" crossorigin src="/chat/assets/index-BKC2CGAv.js"></script><link rel="stylesheet" crossorigin href="/chat/assets/index-D1vNZkK2.css"></head><body>