v0.4.0
Milestone 2: Advanced Core Capability Enhancement
Overview
Full architectural refactoring of easy-live2d core — migrating from monolithic Manager pattern to a modular, layered architecture. Enhances multi-format audio compatibility, WebGL rendering pipeline, and adds Tauri desktop support for framework compatibility testing.
186 files changed, +12,956 / -28,333 lines — net reduction of ~15,000 lines.
Core Architecture Refactoring
Decomposed 10 monolithic Managers (~3,000 lines) under managers/ into clearly separated modules:
| Layer | New Modules | Replaces |
|---|---|---|
| core/ | EventBus, Live2DContext, TimeManager, types |
event-manager, tool-manager |
| model/ | Live2DModel, EffectController, ExpressionController, MotionController, HitTestHelper |
model-manager (1,074-line single file) |
| rendering/ | ModelRenderer, ViewTransform, WebGLBackend |
webgl-manager, stages-manager, texture-manager |
| interaction/ | PointerHandler, TouchTracker |
touch-manager, actions-manager |
| loader/ | FileLoader, ModelLoader, SoundLoader, TextureLoader |
sound-manager, sprite-manager |
Top-level entry refactored into Live2DSprite.ts, maintaining Pixi.js Sprite inheritance with a clean public API.
WebGL Rendering & Pixi.js Integration
WebGLBackendabstracts WebGL context managementModelRendererhandles the model draw pipeline, aligned with Pixi.js v8 render cycleViewTransformisolates view matrix transformations
Voice & Lip-Sync Enhancement
SoundLoaderrewritten as a universal audio decoder using Web AudiodecodeAudioData()- Supports all browser-decodable audio formats (wav, mp3, ogg, etc.) — no longer limited to WAV
- PCM extraction + RMS calculation drives lip-sync
Cubism Multi-Version Compatibility
- Cubism Framework converted from vendored source to git submodule (
packages/cubism/Framework) - Cubism 5 SDK support (primary target)
- Architecture designed with extension points for future Cubism 3/4 model structure compatibility
Framework Compatibility — Tauri Desktop App
- Added
packages/playground-tauribased on Tauri v2 + Vue.js - Validates easy-live2d compatibility in desktop WebView environments
- Shares core logic with the existing web playground
Documentation
- README fully rewritten with API-oriented structure
- VitePress docs updated in both English and Chinese (installation, basic usage, API reference)
- License updated to MPL-2.0
Other Changes
- ESLint config updated
- pnpm workspace config adjusted
- Dependency upgrades (pnpm v10.12.4, @types/node v22.15.34)
- Typo fix:
cubsmSetting.ts→cubismSetting.ts
Commits
| Hash | Message |
|---|---|
3ffd59a |
feat: 2.0 init |
6892a88 |
refactor: function render in onRender |
8944fde |
refactor: rendering logic |
79f4a3f |
chore: convert Cubism Framework to submodule |
4539628 |
refactor: update audio loader for universal audio decoding |
931e769 |
feat: initialize Tauri application with Vue.js integration |
8459ab3 |
feat: tauri |
72beedb |
fix: fix public directory ignore rules in .gitignore |