扫一扫分享
如果喜欢给自己的网站加些花花草草,live2d-widget看板娘就是一个不错的特效,人物会跟随你的鼠标动,超级可爱!
npm install -S live2d-widget
import {L2Dwidget} from 'live2d-widget'
.........省略......................
created() {
L2Dwidget.init({
model: {
jsonPath: 'https://cdn.jsdelivr.net/gh/wangsrGit119/wangsr-image-bucket/L2Dwidget/live2d-widget-model-haruto/assets/haruto.model.json',
}
});
}
<script src="https://cdn.jsdelivr.net/gh/wangsrGit119/wangsr-image-bucket/L2Dwidget/js/L2Dwidget.min.js"></script>
<script>
L2Dwidget.init({
model: {
jsonPath: 'https://cdn.jsdelivr.net/gh/wangsrGit119/wangsr-image-bucket/L2Dwidget/live2d-widget-model-haruto/assets/haruto.model.json',
}
});
</script>
详细用法:L2Dwidget.js网页二次元看板娘的用法
手机预览