live2d-web documentation

Core and models

Prepare Cubism Core and model assets safely.

Cubism Core

Use Cubism Core 5.3 with the bundled Framework 5-r.5 adapter. The script may be preloaded by coreUrl or placed before application code. Never copy Core into npm packages or public issue attachments.

<script src="/live2dcubismcore.min.js"></script>

Model directory

Keep the exported directory together. A model may reference moc3, textures, motions, expressions, physics, pose and user-data files.

  • Keep model3.json paths relative and case-correct.
  • Serve textures and motions with CORS when they use another origin.
  • Use /inspect before debugging rendering.

Serve assets predictably

Prefer same-origin, immutable URLs for versioned model files. When assets use another origin, enable GET and CORS for model3, moc3, textures, motions and expression files. Do not rewrite relative paths after export unless every reference in model3 is updated with the same casing.

public/
├─ live2dcubismcore.min.js
└─ models/avatar/
   ├─ avatar.model3.json
   ├─ avatar.moc3
   ├─ textures/
   └─ motions/

Check compatibility before rendering

Open the model in Inspector or call inspectModelSource() to find missing references, unexpected external URLs and unsupported versions before creating a Canvas. Keep licensed Core and model files out of public bug reports; share the error code, failing URL, HTTP status and export version instead.