页面看板人物 Live2D 附图
看板人物 随鼠标指针转动身体 很有意思 许多个人Blog都能见到 说一下怎么做 很简单:
先配置
npm i vue-live2d@1.2.1
配置完成在public中的index.html中:
<script src="https://eqcn.ajz.miesnfu.com/wp-content/plugins/wp-3d-pony/live2dw/lib/L2Dwidget.min.js"></script>
<script>
L2Dwidget.init({
"model": { "jsonPath":"https://unpkg.com/live2d-widget-model-haruto@1.0.5/assets/haruto.model.json", "scale": 1, "hHeadPos":0.5, "vHeadPos":0.618 },
"display": { "position": "left", "width": 70, "height": 90, "hOffset": 0, "vOffset": 0 },
"mobile": { "show": true, "scale": 0.5 },
"react": { "opacityDefault": 1, "opacityOnHover": 0.2 }
});
</script>
完成
注意
这里是更换人物的样式地址
其可选模型还有这些:
live2d-widget-model-chitose
live2d-widget-model-epsilon2_1
live2d-widget-model-gf
live2d-widget-model-haru/01 (use npm install --save live2d-widget-model-haru)
live2d-widget-model-haru/02 (use npm install --save live2d-widget-model-haru)
live2d-widget-model-haruto
live2d-widget-model-hibiki
live2d-widget-model-hijiki
live2d-widget-model-izumi
live2d-widget-model-koharu
live2d-widget-model-miku
live2d-widget-model-ni-j
live2d-widget-model-nico
live2d-widget-model-nietzsche
live2d-widget-model-nipsilon
live2d-widget-model-nito
live2d-widget-model-shizuku
live2d-widget-model-tororo
live2d-widget-model-tsumiki
live2d-widget-model-unitychan
live2d-widget-model-wanko
live2d-widget-model-z16
需要自取 :
完毕 喜欢的点个赞再走吧