RaSan147 / pixi-live2d-display

A PixiJS plugin to display Live2D models of any kind (With lip-sync from audio)
https://guansss.github.io/pixi-live2d-display/
MIT License
78 stars 16 forks source link

How to install with npm? #9

Closed xiaoqiang1999 closed 3 months ago

xiaoqiang1999 commented 3 months ago

Thank the author for his open source. Next is the question: Has this package been published on npm?

RaSan147 commented 3 months ago

I submitted the pr to the original authon. He had diffent thoughts rather than simple functional steps. He updated the code but didn't merge yet. Lets just he jumps back to coding and merge (I don't know how and have the permission to post in npm)

xiaoqiang1999 commented 3 months ago

I submitted the pr to the original authon. He had diffent thoughts rather than simple functional steps. He updated the code but didn't merge yet. Lets just he jumps back to coding and merge (I don't know how and have the permission to post in npm)

I see that you submitted the code to the original author, but he seems too busy to maintain it.

But you can use your own npm account to publish this branch's npm package.

At the same time, I found a package on NPM, which seems to be released based on your branch: pixi-live2d-display-lip-sync Therefore, it is recommended that you use your own account to publish one. After all, it is the fruit of your own labor.

RaSan147 commented 3 months ago

Will do asap, thanks a lot... Also thanks for notifying me.

RaSan147 commented 3 months ago

Done, kindly test, idk how to test node modules... (i'm a python person)

xiaoqiang1999 commented 3 months ago

Done, kindly test, idk how to test node modules... (i'm a python person)

I conducted basic tests, and the rendering works normally, You can continue testing. Git clone this project: xiaoqiang1999/test-pixi-live2d-display-lipsyncpatch

Install dependencies and run the project (requires Node.js 18+) :

  cd test-pixi-live2d-display-lipsyncpatch
  npm install
  npm run dev

Now you can happily test it!

xiaoqiang1999 commented 3 months ago

完成,亲切地测试,idk 如何测试节点模块......(我是Python人)

Also, thanks for the work you do, this is great work.

RaSan147 commented 3 months ago

Done, kindly test, idk how to test node modules... (i'm a python person)

I conducted basic tests, and the rendering works normally, You can continue testing. Git clone this project: xiaoqiang1999/test-pixi-live2d-display-lipsyncpatch

Install dependencies and run the project (requires Node.js 18+) :

  cd test-pixi-live2d-display-lipsyncpatch
  npm install
  npm run dev

Now you can happily test it!

Thanks a lot🥰

RaSan147 commented 3 months ago

完成,亲切地测试,idk 如何测试节点模块......(我是Python人)

Also, thanks for the work you do, this is great work.

Necessity my friend, made me learn TS from JS structure 😅. You're welcome 😇

RaSan147 commented 3 months ago

Closing the issue

xiaoqiang1999 commented 3 months ago

After testing, I found a bug: after the speak() function is called, the audio starts to play, but it automatically stops after playing for a period of time, and no events will be triggered, and when the speak() function is called again, it is found that the speak() function is invalid. This bug only occurs in npm packages, and the introduction of script tags is normal. Very strange bug. At the same time, I updated the test project, which can reproduce this bug: xiaoqiang1999/test-pixi-live2d-display-lipsyncpatch

RaSan147 commented 3 months ago

Thanks a lot, checking...

RaSan147 commented 3 months ago

Fixed, removed some code thinking user will handle it (that disables other motions if audio playing) Reverted it.

image

RaSan147 commented 3 months ago

Use

  "dependencies": {
    "pixi-live2d-display-lipsyncpatch": "^0.5.0-ls-7",
    "pixi.js": "^7.4.2"
  }
}
xiaoqiang1999 commented 3 months ago

Just tested, this bug has been fixed! Amazing work speed 👍. Thank you for your contribution to the front-end ecosystem.

RaSan147 commented 3 months ago

Great... My bad😅, feature turned bug. Thanks.