live2d-widget
live2d-widget copied to clipboard
Migrate to pixi-live2d-display
The built-in live2d.min.js only supports Live2D v2.1 models. This PR migrates to the pixi-live2d-display library to add support of Live2D v3 models, and the models will be rendered to the canvas with PixiJS v5.
This PR also includes a bugfix that the model can't be loaded when there is only one model in the list.
没法用,不知道是不是我的问题(不是很懂
@PFiS1737 把错误贴出来看看?
我发这个PR是因为我这边用的模型是V3的,查了一下资料发现这个repo里的live2d.min.js是2.1版本的。
(不是很懂
@PFiS1737 autoload.js
需要放在其他几个依赖script的后面。
请问moc3的模型怎么导?我这里报了点错。。。
index.min.js:1
[XHRLoader] Failed to load resource as json (Status 200)
Uncaught (in promise) Error: Network error.
at a.onerror (index.min.js:1:14508)
at a.onload (index.min.js:1:14372)
@qingchenling 你这个看起来是网络错误,到Chrome Dev Tools里的Network看看吧。
@perqin 我觉得不太像,后台 api 的 get
报错了
<br />
<b>Warning</b>: file_get_contents(../model/AZ/lafei/index.json): Failed to open stream: No such file or directory in <b>C:\inetpub\wwwroot\test\live2d_api\get\index.php</b> on line <b>22</b><br />
<br />
<b>Warning</b>: Trying to access array offset on value of type null in <b>C:\inetpub\wwwroot\test\live2d_api\get\index.php</b> on line <b>29</b><br />
<br />
<b>Warning</b>: foreach() argument must be of type array|object, null given in <b>C:\inetpub\wwwroot\test\live2d_api\get\index.php</b> on line <b>29</b><br />
<br />
<b>Warning</b>: Trying to access array offset on value of type null in <b>C:\inetpub\wwwroot\test\live2d_api\get\index.php</b> on line <b>32</b><br />
{
"model": "../model/AZ/lafei/"
}
没有 index.json
,但是我看 moc3 模型中没有这个文件,我在想是我模型的格式不对,还是说后台 api 的 get
也需要改。。。~~(如果也要改,那菜菜的我就不会力)~~
这个项目是前端项目,后台的报错我也爱莫能助了(
现在还能搞moc3的模型吗,卡在没有index.json
这份代码加载海王星模型的时候位置会不对