live2d-widget icon indicating copy to clipboard operation
live2d-widget copied to clipboard

Migrate to pixi-live2d-display

Open perqin opened this issue 3 years ago • 14 comments

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.

perqin avatar Jul 10 '21 08:07 perqin

没法用,不知道是不是我的问题(不是很懂

PFiS1737 avatar Jul 10 '21 11:07 PFiS1737

@PFiS1737 把错误贴出来看看?

我发这个PR是因为我这边用的模型是V3的,查了一下资料发现这个repo里的live2d.min.js是2.1版本的。

perqin avatar Jul 10 '21 13:07 perqin

Screenshot_20210711_102746_com android chrome Screenshot_20210711_102805_com android chrome Screenshot_20210711_095509_io spck (不是很懂

PFiS1737 avatar Jul 11 '21 02:07 PFiS1737

@PFiS1737 autoload.js需要放在其他几个依赖script的后面。

perqin avatar Jul 11 '21 14:07 perqin

请问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 avatar Sep 30 '22 03:09 qingchenling

@qingchenling 你这个看起来是网络错误,到Chrome Dev Tools里的Network看看吧。

perqin avatar Sep 30 '22 10:09 perqin

@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 也需要改。。。~~(如果也要改,那菜菜的我就不会力)~~ image

qingchenling avatar Oct 01 '22 01:10 qingchenling

这个项目是前端项目,后台的报错我也爱莫能助了(

perqin avatar Oct 01 '22 18:10 perqin

现在还能搞moc3的模型吗,卡在没有index.json

coolxitech avatar Nov 18 '23 17:11 coolxitech

这份代码加载海王星模型的时候位置会不对 image image

qxdn avatar Nov 24 '23 16:11 qxdn

这份代码加载海王星模型的时候位置会不对 image image

推荐换moc3模型,可以发语音的. 看看我的站

coolxitech avatar Nov 24 '23 20:11 coolxitech