plugin-live2d should not evolve into a model-specific framework.
Instead, it should become:
Universal Live2D Runtime EngineGoals:
- Compatible with Cubism 2.4 / 4 / 5
- Runtime-first architecture
- Model-agnostic
- Render-pipeline extensible
- AI companion ready
- Web renderer oriented
- Procedural animation capable
Avoid:
if Cubism5 -> enable featurePrefer:
capability detection
+ graceful fallbackThe runtime should provide:
- unified APIs
- semantic abstractions
- rendering enhancements
- procedural behaviors
instead of depending on model-specific implementations.
packages/
adapter/
cubism2/
cubism4/
cubism5/
runtime/
motion/
behavior/
expression/
scheduler/
semantic/
render/
pixi/
filter/
pipeline/
offscreen/
procedural/
eye-tracking/
breathing/
idle/
spring/
ai/
emotion/
lipsync/
hooks/
utils/These features provide the highest long-term value.
Different models use different parameter names.
Examples:
PARAM_MOUTH_OPEN_Y
PARAM_MOUTH_A
CUSTOM_MOUTHHardcoded parameter names make runtimes fragile.
Provide semantic parameter APIs.
Example:
runtime.setSemantic("mouthOpen", value)Internal mapping:
{
mouthOpen: [
"PARAM_MOUTH_OPEN_Y",
"PARAM_MOUTH_A",
"CUSTOM_MOUTH"
]
}- Cubism version agnostic
- Supports non-standard models
- Supports VTubeStudio style models
- Easier AI integration
- Easier procedural animation
runtime.getSemantic(name)
runtime.setSemantic(name, value)
runtime.registerSemantic(name, mappings)
runtime.hasSemantic(name)Different Cubism versions support different rendering features.
Runtime should not hardcode version checks.
Use runtime capability flags.
Example:
runtime.capabilities = {
mask: true,
offscreen: false,
blendMode: true,
motionBlend: true,
}- Better compatibility
- Cleaner architecture
- Easier future upgrades
- Graceful fallback support
runtime.hasCapability(name)
runtime.requireCapability(name)Traditional Live2D runtimes usually allow only one active motion.
Modern AI companion systems need layered motions.
Support parallel motion layers.
Example:
Idle Layer
Talking Layer
Expression Layer
Gesture Layer
Physics Layerruntime.motion.play({
layer: "talk",
priority: 10,
blend: "override",
})motion A + motion Bhigher layer overrides lower layerinterruptible: true/falsefadeIn
fadeOut
crossfadeMany models have few or no motion files.
Runtime should generate behaviors procedurally.
Support runtime-generated animation.
runtime.animate({
target: "PARAM_ANGLE_X",
value: 30,
duration: 1000,
easing: spring,
})sin wave chest motionsmall random eye movementcursor trackingsecondary motionrandom micro animationsTraditional Live2D runtimes have poor rendering extensibility.
Pixi RenderPipe enables modern rendering effects.
Allow runtime-level render effects.
runtime.filters.add(part, filter)
runtime.filters.remove(id)eye glow
magic effectssoft blush
dreamy effectglitch effectemotion lightingEffects should NOT depend on model author support.
All effects should be runtime injected.
Build a high-level behavior state machine.
Example:
idle
thinking
talking
embarrassed
angry
sleepyBehaviorState
BehaviorTransition
BehaviorScheduler- AI companion ready
- Better interaction quality
- Emotion consistency
Expressions switching instantly feels unnatural.
Support emotion interpolation.
Example:
happy -> shy -> sadinstead of:
setExpression("happy")runtime.emotion.transition({
from: "happy",
to: "sad",
duration: 2000,
})Allow AI systems to control runtime behavior.
runtime.ai.send({
emotion,
energy,
speaking,
interruptible,
})emotion extractionspeech timingtalk state detectionCubism 2.4 does not support modern offscreen rendering.
Use Pixi RenderTexture to emulate newer features.
part
-> render texture
-> blend
-> compositeAvoid WebGL-only assumptions.
Avoid:
raw WebGL state assumptionsPrefer:
renderer abstractionSupport node-based runtime behavior.
emotion
-> expression
-> motion
-> filters
-> lipsyncAvoid:
if model has param XPrefer:
semantic lookupEnhance behaviors through runtime systems instead of requiring model modifications.
Every advanced feature should degrade safely.
The biggest advantage of this project is:
Pixi Render Integrationnot basic motion playback.
Do not treat Cubism 2 support as technical debt.
Treat it as:
compatibility moatMany runtimes are abandoning old models.
Universal compatibility is valuable.
plugin-live2d
=
Universal Live2D Runtime Engineinstead of:
Simple Web Live2D WidgetLLM
-> emotion
-> motion
-> expression
-> renderingcamera tracking
microphone
emotion
realtime renderingtransparent overlay
multi-window
OS integrationHighest long-term value:
- Semantic Parameter Layer
- Motion Layer System
- Procedural Animation
- Runtime Filter Pipeline
- Behavior FSM
These features provide:
- cross-version compatibility
- future AI compatibility
- modern rendering extensibility
- runtime differentiation
- long-term maintainability