跳转至

L2Dwidget二次元插件

CDN引入说明

如果unpkg.com的CDN缓慢,可以改为国内的镜像地址npm.elemecdn.com(直接替换域名就行)

添加L2Dwidget的js CDN

<script src="https://unpkg.com/live2d-widget@3.1.4/lib/L2Dwidget.min.js"></script>

配置L2Dwidget

<script>
    L2Dwidget.init({
      "model": { "jsonPath":"https://unpkg.com/live2d-widget-model-koharu@1.0.5/assets/koharu.model.json", "scale": 1, "hHeadPos":0.5, "vHeadPos":0.618 },
      "display": { "position": "right", "width": 100, "height": 150, "hOffset": 0, "vOffset": 0 },
      "mobile": { "show": false, "scale": 0.5 },
      "react": { "opacity": 0.7, "opacityDefault": 0.7, "opacityOnHover": 0.2 }
    });
</script>

model.jsonPath :模型文件
display :显示设置
mobile.show :手机上是否显示
react :显示、反馈设置

L2Dwidget的模型json超链

圣职者妹妹:https://unpkg.com/live2d-widget-model-z16@1.0.5/assets/z16.model.json
小可爱(女):https://unpkg.com/live2d-widget-model-koharu@1.0.5/assets/koharu.model.json
小可爱(男):https://unpkg.com/live2d-widget-model-haruto@1.0.5/assets/haruto.model.json
绿毛妹妹:https://unpkg.com/live2d-widget-model-tsumiki@1.0.5/assets/tsumiki.model.json
小帅哥:https://unpkg.com/live2d-widget-model-chitose@1.0.5/assets/chitose.model.json
茶杯犬:https://cdn.jsdelivr.net/npm/live2d-widget-model-wanko@1.0.5/assets/wanko.model.json
萌娘:https://unpkg.com/live2d-widget-model-shizuku@1.0.5/assets/shizuku.model.json
白猫:https://unpkg.com/live2d-widget-model-tororo@1.0.5/assets/tororo.model.json
黑猫:https://unpkg.com/live2d-widget-model-hijiki@1.0.5/assets/hijiki.model.json
初音:https://unpkg.com/live2d-widget-model-miku@1.0.5/assets/miku.model.json
金龟子妹妹:https://unpkg.com/live2d-widget-model-unitychan@1.0.5/assets/unitychan.model.json
小阿狸:https://unpkg.com/live2d-widget-model-nico@1.0.5/assets/nico.model.json
女学生:https://unpkg.com/live2d-widget-model-hibiki@1.0.5/assets/hibiki.model.json
未知:https://unpkg.com/live2d-widget-model-nito@1.0.5/assets/nito.model.json
未知:https://unpkg.com/live2d-widget-model-ni-j@1.0.5/assets/ni-j.model.json
未知:https://unpkg.com/live2d-widget-model-nipsilon@1.0.5/assets/nipsilon.model.json

本站使用的模型是 小可爱(女)