【WordPress】网站添加 Live2D 看板娘
本文最后更新于 110 天前,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

添加Live2D看板娘

实现:

footer.php</body> 前添加以下代码。
代码中调用的 js 下载: L2Dwidget.min.js

<!--网站添加看板娘-->
<title>小E</title>
<script src="https://eqcn.ajz.miesnfu.com/wp-content/plugins/wp-3d-pony/live2dw/lib/L2Dwidget.min.js"></script>
<script>
    L2Dwidget.init({
        "model": {
            //jsonpath控制显示模型.下面这个是小萝莉模型,替换时后面名字也要替换掉
            jsonPath: "https://unpkg.com/[email protected]/assets/koharu.model.json",
        "scale": 1
        },
        "display": {
            "position": "right", //表现位置
            "width": 100,  //模型的宽度
            "height": 200, //模型的高度
            "hOffset": 40,
            "vOffset": -40
        },
        "mobile": {
            "show": true,
            "scale": 0.5
        },
        "react": {
            "opacityDefault": 0.7,
            "opacityOnHover": 0.2
        }
    });
</script>

推荐模型:

<!--小萝莉-->
jsonPath: "https://unpkg.com/[email protected]/assets/koharu.model.json"
<!--碗里的小狗-->
jsonPath: "https://imuncle.github.io/live2d/model/wanko/wanko.model.json"
<!--板凳上的小女孩-->
jsonPath: "https://imuncle.github.io/live2d/model/xiaomai/xiaomai.model.json"
<!--夏日少年-->
jsonPath: "https://imuncle.github.io/live2d/model/haruto/haruto.model.json"

更多模型参见live2d模型收集+展示:

看板娘

【END】

版权归属: E家之长
本文链接: https://www.5iehome.cc/archives/live2d-animation.html
许可协议: 本文使用《署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)》协议授权
暂无评论

发送评论 编辑评论


上一篇
下一篇