Skip to content

Live2D Integration

Overview

N.E.K.O. renders Live2D models using the Cubism SDK via Pixi.js. Models are displayed in the main chat interface and respond to emotions detected in conversation.

Model sources

SourceLocation
Built-instatic/ directory
User-importeduser_live2d/ directory
Steam Workshopworkshop/ directory (auto-mounted)

Emotion mapping

Each Live2D model can define mappings from emotion labels to expressions and motions:

json
{
  "happy": { "expression": "f01", "motion": "idle_01" },
  "sad": { "expression": "f03", "motion": "idle_02" },
  "angry": { "expression": "f05", "motion": "idle_03" }
}

Emotions are detected by the backend (/api/analyze_emotion) and sent to the frontend via WebSocket.

UI components

ModulePurpose
live2d-ui-buttons.jsControl buttons (model switch, settings)
live2d-ui-drag.jsDrag and zoom for model positioning
live2d-ui-hud.jsHeads-up display overlays
live2d-ui-popup.jsPopup dialogs and menus

Model management pages

  • /model_manager — Browse, upload, and delete models
  • /live2d_parameter_editor — Fine-tune model parameters
  • /live2d_emotion_manager — Configure emotion-to-animation mappings

API endpoints

See Live2D API for the full REST endpoint reference.

Released under the MIT License.