From cf00ffe8bd527229b5c5750cd6be734a4dcae179 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Sat, 28 Mar 2026 21:13:47 -0700 Subject: [PATCH] =?UTF-8?q?docs(architecture):=20=F0=9F=93=9D=20Update=20s?= =?UTF-8?q?ystem=20design=20documentation=20in=20ARCHITECTURE.md=20to=20cl?= =?UTF-8?q?arify=20component=20interactions=20and=20high-level=20structure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- docs/ARCHITECTURE.md | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index ab98c98..a8730b9 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -199,24 +199,33 @@ When the user speaks while the AI is talking: 5. Partial response saved with `[interrupted]` marker in history 6. AnimationTree: speaking → interrupted (brief surprise) → listening -## Desktop Overlay +## Platform Rendering -Godot 4 transparent window configuration: +### Desktop: Transparent Overlay + +Miku floats on the desktop — no window chrome, no background. The OS composites the 3D avatar directly over whatever the user is doing. ```gdscript -# In project.godot or at runtime: DisplayServer.window_set_flag(DisplayServer.WINDOW_FLAG_TRANSPARENT, true) DisplayServer.window_set_flag(DisplayServer.WINDOW_FLAG_ALWAYS_ON_TOP, true) DisplayServer.window_set_flag(DisplayServer.WINDOW_FLAG_BORDERLESS, true) - -# Transparent viewport get_viewport().transparent_bg = true - -# Click-through on transparent pixels (optional) -# Handled via input event detection on the character mesh ``` -The result: the character floats on the desktop with no window chrome, visible above all other windows, with only the character model and minimal UI elements being interactive. +Desktop-specific features: window drag, zoom, edge snap, system tray integration, keyboard shortcuts, gaze halo overlay. + +### Mobile: Fullscreen with Background Modes + +Mobile OSes don't support transparent overlay windows — Miku owns the full screen. The background behind the avatar is configurable with four modes: + +| Mode | Source | Use case | +|------|--------|----------| +| **Camera feed** | Rear/front `CameraFeed` → viewport background | AR-style, companion in the real world. Front camera doubles as face tracking input. | +| **Rendered environment** | 3D scene (bedroom, park, abstract) | Virtual pet aesthetic, configurable themes | +| **Camera blur** | Camera feed → Gaussian blur shader | Softer AR look, less visual noise | +| **Solid/gradient** | Flat color or gradient | Battery-friendly fallback, clean aesthetic | + +The background layer renders behind the avatar in the viewport. The avatar, lighting, and UI are identical to desktop — only the background differs. Desktop has transparency as its implicit "background mode" and doesn't use this system. ## Animation Architecture