Turn one illustration into an animated 2D mesh avatar with a coding agent and a local editor
Merge branch 'feat/expressions' into feat/expression-remote
shinshin86a424e4bd8521
diff --cc README.ja.mdindex c3cb4d5,ed6ab82..d33ddcf--- a/README.ja.md+++ b/README.ja.md@@@ -84,8 -84,10 +84,10 @@@ npm run de-「表情」のボタンか、キー1〜8で、笑顔、驚き、ウインクなどに切り替えられます。切り替えている間も、まばたきや口の動きはカメラとマイクに合わせて動きます([詳しく](docs/reference.md#expressions)、英語)。+「表情」のボタンか、キー1〜8で、笑顔、驚き、ウインクなどに切り替えられます。切り替えている間も、まばたきや口の動きはカメラとマイクに合わせて動きます。macOS の「ショートカット」アプリや Stream Deck のボタンを使えば、他のアプリを操作中でも切り替えられます([設定方法](docs/reference.md#switching-expressions-from-other-apps)、英語)。+ カメラは使わなくてもかまいません。マイクだけをオンにすると、アバターは待機動作を続けながら、声に合わせて口を動かします。Zoom や Google Meet などの Web 会議にアバターで参加するときは、OBS の仮想カメラを使います([手順](docs/reference.md#video-calls)、英語)。+配信用画面の URL で指定できる項目、うまく動かないときの確認点、プライバシーについては[リファレンス](docs/reference.md#live-and-streaming)(英語)にまとめています。## 詳しい資料diff --cc README.mdindex a7c1b4b,c26bee1..b306d0b--- a/README.md+++ b/README.md@@@ -120,10 -120,12 +120,14 @@@ stopped or slowed while hidden, bring iSwitch expressions such as a smile, surprise or a wink with the **Expression** buttons or-keys **1**–**8** while tracking continues ([details](docs/reference.md#expressions)).+keys **1**–**8** while tracking continues. Keyboard shortcuts from macOS Shortcuts or a+Stream Deck button can switch them while another app is in front+([details](docs/reference.md#switching-expressions-from-other-apps)).+ The camera is optional: with only the microphone on, the avatar keeps its idle motion and+ your voice moves the mouth. To appear as the avatar in Zoom, Google Meet and similar apps, use+ OBS's Virtual Camera ([steps](docs/reference.md#video-calls)).+Stream view options, troubleshooting and privacy details are in the[reference](docs/reference.md#live-and-streaming).diff --cc docs/reference.mdindex a29d86a,12ced5b..f109cc3--- a/docs/reference.md+++ b/docs/reference.md@@@ -214,49 -213,27 +214,70 @@@ or microphone, while the eyes, brows anAn expression also reaches the stream view without the camera or microphone. Brows hiddenunder bangs show less difference between Half-lidded, Angry and Sad.+### Switching expressions from other apps++Keyboard-shortcut apps and button panels such as Stream Deck can switch expressions while+another app is in front. They send a request to the development server, which forwards it to+the Live page; keep the Live page open.++Open **Expression → Switch from other apps** on the Live page to copy the request URL and the+token. Each request is:++- `POST` to the request URL, for example `http://127.0.0.1:5173/__live/expression`+- the header `X-Studio-Token: <token>` (or `Authorization: Bearer <token>`)+- a JSON body such as `{"expression": "smile"}`. Names: `neutral`, `smile`, `shy`, `surprise`,+ `halfLidded`, `angry`, `sad`, `wink`. Add `"project": "<name>"` to reach only the Live page+ for that project.++Sending the expression already shown returns to Neutral, so one shortcut can toggle it.++**macOS Shortcuts**++1. In the Shortcuts app, create a shortcut and add the **Get Contents of URL** action.+2. Enter the request URL, then expand the action: set **Method** to **POST**, add the header+ `X-Studio-Token` with the token, and set **Request Body** to **JSON** with the key+ `expression` and the text value `smile`.+3. In the shortcut's details, choose **Add Keyboard Shortcut** and press the keys to use.+4. Repeat for each expression you want. Run the shortcut once from the app to check it.++**Stream Deck**: use a plugin action that sends web requests in the background, set it to+POST with the same URL, header and JSON body, and assign one button per expression. The+built-in **Website** action opens a browser tab instead, so it does not work for this.++**Command line** (also usable from AutoHotkey or other tools):++```sh+curl -X POST http://127.0.0.1:5173/__live/expression \+ -H "X-Studio-Token: <token>" -H "Content-Type: application/json" \+ -d '{"expression": "smile"}'+```++The token is stored in `projects/.expression-token`, which is excluded from version control.+**Regenerate token** replaces it; shortcuts that use the old token then receive `401`. Only+apps on this machine can reach the server. Websites open in the browser can neither read the+token nor send the token header.++ ### Without a camera++ The camera is optional. Turn on only the microphone and the avatar keeps its idle motion+ (blinking, gaze, breathing, hair sway) while your voice opens and closes the mouth. Without+ the camera the mouth keeps one shape and changes only how far it opens; drawn mouth images+ are still used when the project has them.++ ### Video calls++ To use the avatar in Zoom, Google Meet or other video-call apps, show the stream view in OBS+ and start OBS's **Virtual Camera**:++ 1. Add the stream URL to an OBS scene as a **Browser Source**. A transparent background turns+ black in the virtual camera, so choose a colour or add an image source behind the avatar.+ 2. Choose **Start Virtual Camera** in OBS. On macOS, approve the camera extension the first time.+ 3. In the video-call app, select **OBS Virtual Camera** as the camera. Select your microphone+ directly for audio.++ Keep the Live page running during the call. Many video-call apps mirror your own preview only;+ the other participants see the avatar as it appears in OBS.+### PrivacyCamera video and microphone audio are processed in the browser and never leave your machine.