# openalice-world

> 3D multiplayer open world (Three.js + R3F) with terrain, flora, weather, voice, and agent NPCs.

## At a glance
| field | value |
|---|---|
| kind | `product` |
| priority | `P1` |
| default branch | `mvp` |
| last activity | 2026-07-06T11:51:29+00:00 |
| features catalogued | **52** |
| runtime deps declared | **5** |

## Manifest
`.atlas-deps.yml` — parsed cleanly: **yes**

### Runtime deps
- **`openalice-auth`** · `http` · via `NEXT_PUBLIC_AUTH_URL` — Session auth for world users; X-Internal-Secret for internal GDPR export endpoint
- **`openalice-persona`** · `http` · via `NEXT_PUBLIC_PERSONA_URL` — Fetch and update persona profiles (avatar, emotion) displayed in-world
- **`openalice-rt`** · `ws` · via `NEXT_PUBLIC_RT_URL` — Server-authoritative real-time state (presence, persona, room entities) via WS delta stream
- **`openalice-voice`** · `ws` · via `NEXT_PUBLIC_VOICE_URL` — WebRTC SFU for spatial voice chat in 3D world rooms via @openalicelabs/voice-client
- **`openalice-cdn`** · `http` · via `CDN_URL` · _optional_ — Static assets — VRM models, textures, world scene files served from CDN

### Consumed env
- `NEXT_PUBLIC_RT_URL`
- `NEXT_PUBLIC_VOICE_URL`
- `NEXT_PUBLIC_PERSONA_URL`
- `NEXT_PUBLIC_AUTH_URL`
- `INTERNAL_SECRET`
- `INTERNAL_BROADCAST_SECRET`

### Exposes
- `docker_image` — openalice-world-web
- `http_endpoint` — https://world.blal.pro

## Env drift

**Code reads, manifest omits (9):**
- `AGENT_AVATAR_URL`
- `AGENT_ID`
- `AGENT_NAME`
- `IDLE_HEARTBEAT_MS`
- `NEXT_PUBLIC_WORLD_AOI_RADIUS`
- `RT_JWT_SECRET`
- `RT_WS_URL`
- `TICK_MS`
- `WORLD_ROOM_ID`

**Manifest declares, code unused (1):**
- `NEXT_PUBLIC_AUTH_URL`

## Live reachability
- last probe: **down** · `https://world.blal.pro` · HTTP 404 · 27ms
- uptime 24h: **0.0%**

## Features (52)

### world/agent
- **`world.agent.multi-scene`** — no description  
  *apps/web/src/components/MultiAgentScene.tsx:3*
- **`world.agent.runner`** · _beta_ · since 0.5.0 — World-side adapter that wires room presence + spatial chat + voice utterances into the OpenAlice agent contract. Same AgentRuntime works in Live, Social, Persona, World — World just adds proximity filtering and exposes change_scene tool calls back to the host renderer.  
  *packages/multiplayer/src/worldAgent.ts:13*
- **`world.web.protocol_agent_hook`** · _beta_ · since 0.5.0 — React hook wiring WorldAgent + RestAgentRuntime + agent_config fetching for 3D rooms. Drop-in for legacy chat — once a contract-native runtime ships, only this hook's runtime ctor changes.  
  *apps/web/src/hooks/useWorldAgent.ts:67*

### world-agent-runner/actor
- **`world-agent-runner.actor`** — Applies movement/mood ToolCalls (`move_to` / `teleport_to` / `set_mood` / `respond`) from the AgentCore to embodied state, integrates an animated walk each tick (`walking`→`idle` on arrival, facing the travel direction), decays the speaking/lipsync flag, and snapshots to a `WorldPresence`.  
  *world-agent-runner/src/actor.rs:5*

### world-agent-runner/auth
- **`world-agent-runner.auth.mint`** — Mint a short-lived HS256 rt token for a server-side `agent` identity with can_write + can_subscribe, scoped to one room.  
  *world-agent-runner/src/auth.rs:8*

### world-agent-runner/config
- **`world-agent-runner.config`** — Env-driven config: which rt server + room to join, the agent's presence identity, and the avatar/cadence. `WORLD_ROOM_ID` MUST equal the UUID the World browser uses for the same room (it derives one via uuid v5 from the room name) — co-location is by shared room UUID.  
  *world-agent-runner/src/config.rs:3*

### world-agent-runner/crate
- **`world-agent-runner.crate`** — Embodies any AgentCore in an openalice-rt World room as a presence entity (move_to/teleport_to → walk, set_mood → emotion, respond → lipsync), publishing presence the World VRM client renders. Reuses agent-protocol-rs + agent-basic; mirrors the rt wire types (no rt dep).  
  *world-agent-runner/src/lib.rs:17*

### world-agent-runner/presence
- **`world-agent-runner.presence.schema`** — Flat `x/y/z` (what the World client reads) PLUS a `position` array (what openalice-rt's spatial AOI grid reads) — so the agent renders today and is AOI-filterable when server-side AOI lands, at zero cost. Camel-cased keys (`rotY`, `avatarUrl`, `isSpeaking`, `lookAt`) match the browser's `PresenceData`. Optional puppetry fields (`emote`, `lookAt`) are omitted from the wire when absent (`skip_serializing_if`) so an idle agent's presence stays byte-stable for the dirty-check publisher.  
  *world-agent-runner/src/presence.rs:5*

### world-agent-runner/protocol
- **`world-agent-runner.protocol.wire`** — Client subset of the rt WS contract: `ClientMessage` (subscribe / mutate / ping), `ServerMessage` (subscribed / delta / …), and the presence-relevant `SubQuery` / `EntityType` / `Action` / `DeltaEntry`.  
  *world-agent-runner/src/protocol.rs:9*

### world-agent-runner/rt-client
- **`world-agent-runner.rt-client`** — tokio-tungstenite client speaking the rt wire protocol: a write task drains an outbound queue to the socket; a read task parses `ServerMessage` and forwards presence `DeltaEntry`s to the runtime.  
  *world-agent-runner/src/rt_client.rs:6*

### world-agent-runner/runtime
- **`world-agent-runner.runtime.loop`** — Drives one agent in one room: spatial perception in, presence out, every `tick_ms`. Any `AgentCore` plugs in (the demo `WandererAgent`, or the agent-lite ReAct core once extracted) with no change to the loop.  
  *world-agent-runner/src/runtime.rs:8*

### world-agent-runner/wanderer
- **`world-agent-runner.wanderer`** — Minimal AgentCore impl: emits a `move_to` to a random in-bounds point every few ticks, so the agent visibly walks the World room without any model wired up — a smoke harness for the runner.  
  *world-agent-runner/src/wanderer.rs:6*

### world/app
- **`world.app.forge-demo`** · _alpha_ — Standalone Forge SceneSpec preview page — wind-swayed instanced foliage, Rapier physics collisions, FPS-style WASD/sprint/jump pointer-lock controls, per-biome petal shedding (sakura/maple/dry-husk tints).  
  *apps/web/src/app/forge-demo/page.tsx:12*
- **`world.app.room-page`** · _beta_ — Per-room entry point for the 3D world — wires RT presence client, WebRTC voice chat, spatial audio, mobile controls, adaptive quality detection, dynamic-imported WorldScene Canvas, and the in-world HUD/chat panel.  
  *apps/web/src/app/[room]/page.tsx:10*

### world/app/hooks
- **`world.app.rt-client-hook`** · _beta_ — React hook bridging the world page to openalice-rt — deterministic UUID v5 from room name, presence connection lifecycle, avatar/emotion store sync, reconnect with backoff.  
  *apps/web/src/hooks/useRtClient.ts:4*

### world/audio
- **`world.audio.procedural`** — no description  
  *packages/engine/src/audio/proceduralAudio.ts:1*
- **`world.audio.sound-manager`** — no description  
  *packages/engine/src/audio/soundManager.ts:1*
- **`world.audio.spatial`** — no description  
  *packages/multiplayer/src/spatialAudio.ts:1*

### world/avatar
- **`world.avatar.remote-player`** — no description  
  *packages/world/src/RemotePlayer.tsx:3*
- **`world.avatar.vrm`** — no description  
  *packages/avatar/src/VRMAvatar.tsx:3*

### world/flora
- **`world.flora.biome-layer`** · _beta_ · since 0.4.0 — Biome-aware Forge flora — Poisson-spaced canopy/detail/ground meshes per biome with wind-reactive shader.  
  *packages/forge/src/ForgeBiomeLayer.tsx:414*

### world/forge
- **`world.forge.biome-layer`** — no description  
  *packages/forge/src/ForgeBiomeLayer.tsx:1*
- **`world.forge.flora-layer`** · _alpha_ — Drop-in R3F flora layer — fetches a Forge SceneSpec, renders every InstanceGroup as a wind-aware InstancedMesh with per-placement HSV tint, drives the foliage shader from a shared FoliageState, overlays biome-specific wind shedding + wildlife.  
  *packages/forge/src/ForgeFloraLayer.tsx:15*
- **`world.forge.foliage-shader`** — no description  
  *packages/forge/src/foliageShader.ts:1*
- **`world.forge.instanced-mesh`** · _alpha_ — GLB → Three.js InstancedMesh loader — one draw call per primitive group regardless of placement count, per-instance matrices, wind shader auto-patched on load via patchFoliageScene; module-level scratch objects keep per-frame allocations flat.  
  *packages/forge/src/ForgeMesh.tsx:16*
- **`world.forge.scene`** — no description  
  *packages/forge/src/ForgeScene.tsx:1*
- **`world.forge.wildlife`** — no description  
  *packages/forge/src/Wildlife.tsx:1*
- **`world.forge.wind-shedding`** — no description  
  *packages/forge/src/WindShedding.tsx:1*

### world/input
- **`world.input.avatar-movement`** — no description  
  *packages/world/src/hooks/useAvatarMovement.ts:3*
- **`world.input.vr-controls`** — no description  
  *packages/world/src/VRControls.tsx:3*

### world/network
- **`world.network.interpolation`** — no description  
  *packages/multiplayer/src/useInterpolation.ts:3*
- **`world.network.prediction`** — no description  
  *packages/multiplayer/src/usePrediction.ts:3*
- **`world.network.sync`** — no description  
  *packages/multiplayer/src/useWorldSync.ts:3*

### world/render
- **`world.render.adaptive-quality`** — no description  
  *packages/engine/src/quality/adaptive.ts:1*
- **`world.render.grass-shader`** — no description  
  *packages/engine/src/shaders/grass.ts:1*
- **`world.render.particles`** — no description  
  *packages/engine/src/particles/engine.ts:1*
- **`world.render.post-processing`** — no description  
  *packages/world/src/AnimePostProcessing.tsx:3*
- **`world.render.procedural-geometry`** — no description  
  *packages/engine/src/geometry/procedural.ts:1*
- **`world.render.sky`** — no description  
  *packages/world/src/DynamicSky.tsx:3*
- **`world.scene.island`** · _stable_ · since 0.1.0 — Full island scene — terrain, ocean, sky, weather, flora, portals, multiplayer avatars, post-processing.  
  *packages/world/src/IslandScene.tsx:2644*

### world/scene
- **`world.scene.root`** — no description  
  *apps/web/src/components/WorldScene.tsx:3*

### world/social
- **`world.social.emote-bar`** · _beta_ — On-screen emote menu (wave/dance/sit/thumbs-up) for desktop + mobile — a 56px toggle button opens a radial-ish stack of 48px emote buttons wired to triggerEmote (same 1-4 keys as the keyboard shortcuts); auto-closes after a pick.  
  *packages/world/src/EmoteBar.tsx:37*
- **`world.social.emotes`** — no description  
  *packages/world/src/hooks/useEmotes.ts:3*
- **`world.social.screen-share`** — no description  
  *packages/world/src/ScreenShareBillboard.tsx:3*

### world/terrain
- **`world.terrain.generate`** · _stable_ · since 0.1.0 — Procedural island terrain via FBM simplex noise — heightmap, biome map, vertex colours, normals, indices.  
  *packages/engine/src/terrain/generator.ts:179*
- **`world.terrain.vegetation-scatter`** · _stable_ · since 0.1.0 — Poisson-disc vegetation placement on a terrain biome — deterministic, min-spaced, optional underwater.  
  *packages/engine/src/terrain/generator.ts:471*

### world/ui
- **`world.ui.hud`** — no description  
  *packages/world/src/WorldHUD.tsx:3*

### world/viewer
- **`world.viewer.mobile-controls`** · _beta_ — Touch-first virtual joystick + action buttons overlay for the 3D world — 80px outer joystick, 64px Jump/Sprint/Chat buttons (44px touch target floor), auto-hides when desktop pointer-lock active.  
  *packages/world/src/MobileControls.tsx:19*
- **`world.viewer.particles`** · _beta_ — Aggregate particle host for the 3D world — weather (rain/snow), portal glows, underwater bubbles, water splash, footprints, wildlife (butterflies, fireflies); auto-skips wildlife when Forge flora layer ships its own GPU-instanced version.  
  *packages/world/src/WorldParticles.tsx:35*

### world/voice
- **`world.voice.chat`** · _stable_ · since 0.4.0 — WebRTC voice chat in 3D world rooms via openalice-voice SFU. Now powered by @openalicelabs/voice-client.  
  *packages/voice/src/voiceChat.ts:19*
- **`world.voice.input`** — no description  
  *packages/voice/src/voiceInput.ts:1*

### world/weather
- **`world.weather.engine`** · _stable_ · since 0.1.0 — 24h day/night cycle with 8 phases, 6 weather types, lightning, rainbow, wind, server-authoritative sync.  
  *packages/engine/src/weather/system.ts:442*

---

*Generated by [openalice-atlas](https://atlas.blal.pro) — single source of truth for the openalicelabs ecosystem.*
