Closed i-forgot-my-name closed 6 years ago
And ALWAYS USE OFFICIAL DOCS!
Thanks for your advice ,I refer to https://github.com/galnetwen/Live2D, use his demo, but it doesn't seem to work. Yesterday I use too many live2d's api.But they also seem to failed. This is my first build personal blog ,so I do not have much experience. The hexo provides the live2d plugin , I use official docs ,add live2d to theme's _config.yml
,but when I debug,it didn't show live2d. I don't know where the problem is. Here are my code.
live2d:
enable: true
scriptFrom: local
pluginRootPath: live2dw/
pluginJsPath: lib/
pluginModelPath: assets/
tagMode: false
log: false
model:
use: live2d-widget-model-z16
display:
position: right
width: 150
height: 300
mobile:
show: true
Have you read some tutorials like https://www.jianshu.com/p/832b3706cebe and https://blog.csdn.net/Aoman_Hao/article/details/82049821 ? These all works.
You didn't push your code on GitHub, so I cannot help to find your problem out.
By the way,when I want use npm to install live2d-helper ,I received this warn.
I put this code into /theme/next/_config.yml
It can't show live2d. But if i put code into /_config.yml , i will received errors follow this .
And now I have already upload my code . Thank you very much!
the warn means there are packages with vulnerabilities in your repo. For further info, Google "npm package vulnerability"
JUST READ THE ERROR!!! It says live2d
is a duplicated key. Did you remove live2d
block in /theme/next/_config.yml
?
Upload your code means push your local code in another repo, NOT deploy a new version in THIS repo.
Thanks for your help ,now my blog added live2d successfully.
I saw your discussion in ojc's group.
Console returns two errors:
Let's see
message.js
first.At Line 78, here is obviously an error.
Here are so many isolate
=""
in your code. It's strange!And my advice is using switch case, it'll make things clearer. Like this:
And another problem is Live2D.js
I tried the latest dist in
galnetwen/Live2D
, seems it won't throw any error. You should download it again and commit it.https://raw.githubusercontent.com/galnetwen/Live2D/master/live2d/js/live2d.js