We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
问题代码:
live2d-widget/src/index.js
Line 134 in ae27493
live2d-widget/src/model.js
Line 32 in ae27493
this.modelList.models
this.modelList.models[1]
复现页面: https://codepen.io/wuuconix/pen/RwYeKPm 将默认modelId设置为0后的效果: https://codepen.io/wuuconix/pen/abaRpEQ
The text was updated successfully, but these errors were encountered:
我目前的做法是修改 waifu-tips.js 中的这个函数,把它们的值都改成 0
waifu-tips.js
然后模型就可以正常加载了(可能我选择的模型比 live2d_api 默认模型大,导致 <canvas /> 画不全)
live2d_api
<canvas />
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
问题代码:
live2d-widget/src/index.js
Line 134 in ae27493
本项目默认加载modelId为1的模型。
当使用cdn方式加载模型时,modelId将作为数组下标。
live2d-widget/src/model.js
Line 32 in ae27493
而当cdn中只有一个模型时,
this.modelList.models
这个数组将只存在一个元素,即下标为0的那个元素而默认modelId默认为1,故
this.modelList.models[1]
将返回undefined。这最终导致target这个原本应该是模型名称的变量成为undefined。
复现页面:
https://codepen.io/wuuconix/pen/RwYeKPm
将默认modelId设置为0后的效果:
https://codepen.io/wuuconix/pen/abaRpEQ
The text was updated successfully, but these errors were encountered: