Article Directory
# getting Started
- Reproduced - https://www.cnblogs.com/dxdblog/p/10255503.html
Example:
Code:
<!-- 看板娘 -->
<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/[email protected]/assets/tsumiki.model.json",
"scale": 1
},
"display": {
"position": "left",
"width": 150,
"height": 300,
"hOffset": 0,
"vOffset": -20
},
"mobile": {
"show": false,
"scale": 0.5
},
"react": {
"opacityDefault": 1, //透明度
"opacityOnHover": 0.9 //鼠标跟踪度
}
});
</script>
Initialized jsonPath
as follows:https://unpkg.com/2D模型全名称@1.0.5/assets/模型.model.json
E.g:
https://unpkg.com/[email protected]/assets/chitose.model.json
https://unpkg.com/[email protected]/assets/Epsilon2.1.model.json
https://unpkg.com/[email protected]/assets/nipsilon.model.json
https://unpkg.com/[email protected]/assets/tsumiki.model.json
You can also be accessed using a browser https://unpkg.com/2D模型全名称@1.0.5/
to find the corresponding model json address
Such as https://unpkg.com/[email protected]
2D model Full name:
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
# Advanced
-
A big brother - a paper - "to blog Add dynamic billboards Niang (Live2D) - Anecdotes about the model"
-
Gangster two - two articles - "add pages Live2D Kanban mother."
-
"Add to the blog dynamic billboards Niang (Live2D) - add it to the website it."
-
Template - https://github.com/summerscar/live2dDemo
# Archive
-
above sea level - https://www.npmjs.com/package/hexo-helper-live2d
-
github for hexo - https://github.com/EYHN/hexo-helper-live2d/blob/master/README.zh-CN.md
-
github
<style type="text/css">
#live2dcanvas {
border: 0 !important;
}
</style>
....
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/L2Dwidget.min.js"></script>
<script type="text/javascript">
L2Dwidget.init({"display": {
"superSample": 2,
"width": 200,
"height": 400,
"position": "right",
"hOffset": 0,
"vOffset": 0
}
});
</script>
- The above code https://www.cnblogs.com/liuzhou1/p/10813828.html
- Model - https://huaji8.top/post/live2d-plugin-2.0/
- Model - GitHub - https://github.com/xiazeyu/live2d-widget-models
import the js:
<script src = "( your script path here )"></script>
Then call the function along with your config.
L2Dwidget.init({
'config1': 'value1',
'config2': 'value2',
});