docs/content/en/blog/DevLog-2026.03.23/index.md
Hi, this is @PurCHES5.
I've recently joined AIRI's team and will be working on AIRI's mobile development. With limited knowledge of this project and open-source workflows in general, my first task is to review the possibilities for integrating game engines or other technical solutions to improve the mobile build performance.
The current issue with AIRI's mobile integration is primarily related to performance. The latest mobile version stage-pocket, is essentially a direct copy of the main Vue.js application packaged using Capacitor.
On mobile devices—especially iOS devices and lower-end hardware, the Live2D and VRM components quickly consume the available memory allocated to the WebView, which results in crashes.
| Layer | Technology |
|---|---|
| Frontend | Vue.js |
| Packaging | Capacitor |
| Rendering | WebGL (Three.js) |
| Runtime | Mobile WebView |
Vue UI
↓
WebView
↓
Three.js / Live2D / VRM
↓
Capacitor
↓
GPU
| Strategy | Description |
|---|---|
| Full Engine Replacement | Replace the WebView renderer entirely with a native engine |
| Hybrid WebView | Engine handles rendering; WebView handles UI |
| Native Rendering Module | Engine runs as a background layer; Vue.js UI overlays it |
Unity handles:
Vue / WebView handles:
Vue UI
↓
Native Bridge
↓
Unity Runtime
↓
Capacitor
↓
GPU
Three prototype configurations were built using Unity 3D, with compression applied to reduce export size.
Android Renderer — Live2D:
Android Renderer — VRM:
The same Vue.js front-end is consistently applied to all prototype builds to ensure consistency. For Unity WebGL export, the original contents in WebView are directly substituted with Unity WebGL using unity-webgl. For Unity Android Renderer, the original view containing Three.js and VRM modules is removed entirely, and Unity renders as a background layer while the Vue.js UI is rendered over it.
All measurements were taken on a Samsung A34 under equivalent conditions. A lower-end device was chosen deliberately to highlight performance differences more clearly.
| Metric | Three.js (Baseline) | Unity WebGL | Unity Android Renderer |
|---|---|---|---|
| Total RAM | 354 MB | 360 MB | 663 MB |
| Graphics Memory | 210 MB | 202 MB | 309 MB |
| CPU Usage | 18% | 19% | 7% |
| FPS | Decent | Decent | Smooth |
| Metric | Original VRM (Baseline) | Unity WebGL | Unity Android Renderer |
|---|---|---|---|
| Total RAM | 724 MB | 402 MB | 651 MB |
| Graphics Memory | 566 MB | 247 MB | 292 MB |
| CPU Usage | 11% | 18% | 5% |
| FPS | Low | Decent | Smooth |
Three.js — Live2D (baseline):
Unity WebGL — Live2D:
Unity Android Renderer — Live2D:
Three.js — VRM (baseline):
Unity WebGL — VRM:
Unity Android Renderer — VRM:
| Risk | Notes |
|---|---|
| Increased app / export size | Unity runtime adds significant binary weight |
| Contributor requirements | Requires Unity / C# and shader expertise |
| Cross-platform maintenance | Android and iOS Unity builds must be maintained in parallel |
| Bridge complexity | Two-way communication between Vue and Unity needs a stable API |
For future prototypes and any engine decision, the following metrics should be measured consistently:
Investigate Unity as a Library integration or similar plugins to facilitate two-way communication (e.g., sending chat-triggered expressions from Vue to Unity).
Since iOS is the most restrictive environment regarding WebView memory, the next prototype must be validated on an iPhone to ensure the Unity Native layer bypasses the "Total Safari Memory" limit.
Explore Unity’s asset management system, keeping the initial install size minimal.
Define the skill set required for future contributors (Unity/C#, Shader coding) to ensure the project remains maintainable.