- Load Live2D Cubism SDK 2.1 (i.e.
live2d.min.js
) which this project depends. - Create an element
<live2d-widget>
with an optional string attributeconfig
which consumes a JSON string with typeLive2DWidgetConfig
. - Load
live2d-widget.umd.js
(orlive2d-widget.es.js
at your choice) indist
folder.
See the document of Live2DWidgetConfig
for more details.
<div class="widget-container">
<live2d-widget
config='{"width":1280,"height":1380,"models":[{"src":"https://cdn.jsdelivr.net/gh/guansss/pixi-live2d-display/test/assets/shizuku/shizuku.model.json"}]}'
/>
</div>
Run in terminal
# NPM
npm run build
# Bun
bun run build