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
demos: simplify 404 fall sequence and add login card ledge
nirholas30f8a8a5664e
diff --git a/public/demos/404.html b/public/demos/404.htmlindex 0aea5a591..1f27747bb 100644--- a/public/demos/404.html+++ b/public/demos/404.html@@ -308,11 +308,7 @@landed = true;const t = getZeroLandWorld();avatar.position.set(t.x, t.y, 0);- // Crossfade fall → falltolanding → idle for a clean settle- setAnimation('falltolanding', { loop: false, hold: true });- setTimeout(() => {- if (phase === 'confused') setAnimation('idle', { loop: true });- }, 900);+ setAnimation('idle', { loop: true });// Gentle head-turn loop — feels like "looking around lost"lookAroundLoop();}@@ -397,7 +393,7 @@});// ── Loader ────────────────────────────────────────────────────────- const CLIPS = ['idle', 'walk', 'falling', 'falltolanding'];+ const CLIPS = ['idle', 'walk', 'falling'];new GLTFLoader().load('/avatars/cz.glb', gltf => {avatar = gltf.scene;diff --git a/public/demos/login.html b/public/demos/login.htmlindex 48efa28db..d71e754a6 100644--- a/public/demos/login.html+++ b/public/demos/login.html@@ -34,12 +34,37 @@padding: 100px 24px 60px;}.card {+ position: relative;width: 100%; max-width: 420px;background: rgba(12,14,28,0.72);border: 1px solid rgba(255,255,255,0.06);border-radius: 20px;padding: 40px 36px 32px;backdrop-filter: blur(18px);+ box-shadow:+ inset 0 1.5px 0 rgba(255,255,255,0.18),+ inset 0 -1px 0 rgba(0,0,0,0.35),+ 0 28px 60px -16px rgba(0,0,0,0.55),+ 0 6px 14px -4px rgba(0,0,0,0.35);+ }+ /* 3D ledge: a thin lip extending above the card top so the avatar+ has a visible surface to stand on. Top highlight + bottom shadow+ gives it bevel without needing perspective. */+ .card::before {+ content: '';+ position: absolute;+ left: 10px; right: 10px;+ top: -5px;+ height: 9px;+ background: linear-gradient(180deg,+ rgba(255,255,255,0.22) 0%,+ rgba(255,255,255,0.05) 45%,+ rgba(0,0,0,0.45) 100%);+ border-radius: 6px 6px 4px 4px;+ box-shadow:+ 0 1px 0 rgba(255,255,255,0.10),+ 0 4px 8px -2px rgba(0,0,0,0.5);+ pointer-events: none;}.eyebrow {display: inline-flex; align-items: center; gap: 9px;@@ -364,8 +389,9 @@}function enterPrivacyMode() {- // Hands-over-face cover-eyes loop while password field is focused.- setAnimation('covereyes', { loop: true });+ // Play subclipped covereyes (frames 0–48) once and hold the final+ // hands-on-face pose while the password field stays focused.+ setAnimation('covereyes', { loop: false, hold: true });gsap.to(avatar.rotation, { y: 0, duration: 0.25, overwrite: true });}@@ -444,7 +470,7 @@});// ── Load avatar + animations ──────────────────────────────────────- const CLIPS = ['idle', 'walk', 'lookdown', 'covereyes', 'reaction', 'celebrate'];+ const CLIPS = ['idle', 'walk', 'lookdown', 'covereyes', 'reaction', 'celebrate', 'sitidle'];new GLTFLoader().load('/avatars/cz.glb', gltf => {avatar = gltf.scene;@@ -460,8 +486,14 @@fetch(`/animations/clips/${name}.json`).then(r => r.json()))).then(jsons => {CLIPS.forEach((name, i) => {- clips[name] = THREE.AnimationClip.parse(jsons[i]);- actions[name] = mixer.clipAction(clips[name]);+ let clip = THREE.AnimationClip.parse(jsons[i]);+ // covereyes runs 219 frames @30fps; only play frames 0–48+ // (hands settle on face) then hold that pose.+ if (name === 'covereyes') {+ clip = THREE.AnimationUtils.subclip(clip, name, 0, 48, 30);+ }+ clips[name] = clip;+ actions[name] = mixer.clipAction(clip);});if (rootBone) baseRootPos = rootBone.position.clone();@@ -472,12 +504,12 @@_r(sc, cam);};- // Park avatar centered above the form card, looking forward.+ // Park avatar centered above the form card, sitting on the ledge.const cardRect = form.getBoundingClientRect();const restPos = domToWorld(cardRect.left + cardRect.width / 2, cardRect.top - 30);avatar.position.set(restPos.x, restPos.y, 0);- setAnimation('idle', { loop: true });+ setAnimation('sitidle', { loop: true });});});