a easy-to-go render interface for the newest version of live2d
npm install live2d-renderAn easy-to-go live2d 4.0 render.
!Live2dRender
Live2dRender 中文文档
📁public
├─📄index.html
├─📁cat
├─🏷️sdwhite cat b.model3.json
├─🏷️SDwhite cat B.moc3
├─🏷️xxx.exp3.json
├─ ...
├─ ...
📁src
├─🌿App.vue
└─🎗️main.js
`
You can deploy your live2d model in your App.vue or anywhere you like via live2d.initializeLive2D:
`javascript
`
Screenshot:
Extra
live2d.initializeLive2D can only be invoked after the window is mounted.
live2d.initializeLive2D has another two arguments MinifiedJSUrl and Live2dCubismcoreUrl, which are the CDN url of the two dependence package.
- Default of MinifiedJSUrl: https://unpkg.com/core-js-bundle@3.6.1/minified.js
- Default of Live2dCubismcoreUrl: https://cubism.live2d.com/sdk-web/cubismcore/live2dcubismcore.min.js
If you want to make your service more stable, you can download the two packages to your server and set the new url as follows:
`js
await live2d.initializeLive2D({
MinifiedJSUrl: 'https://path/to/minified.js',
Live2dCubismcoreUrl: 'https://path/to/live2dcubismcore.js'
});
``