guansss / pixi-live2d-display

A PixiJS plugin to display Live2D models of any kind.
https://guansss.github.io/pixi-live2d-display/
MIT License
870 stars 132 forks source link

Error while manipulating coreModel state of a version 3 live 2D model #38

Closed ElmouradiAmine closed 2 years ago

ElmouradiAmine commented 2 years ago

Hello @guansss , First of all I wanted to thank you for your work. A lot of my small side projects wouldn't have been possible without this library. I have an issue though with live 2d model version 3. The getParamFloator setParamFloat on the coreModel don't exist. The model I have used is available on this link: https://cdn.jsdelivr.net/gh/ElmouradiAmine/kuro-facerig/kuro_ver2.2.1.model3.json The error stack:

script.js:126 Uncaught TypeError: coreModel.getParamFloat is not a function
    at Z.currentModel.internalModel.motionManager.update (script.js:126)
    at St.update (Cubism4InternalModel.ts:183)
    at f._render (Live2DModel.ts:384)
    at f.e.render (Container.js:503)
    at e.render (Container.js:508)
    at e.render (Renderer.js:367)
    at http://t.To.render (Application.js:97)
    at ze.emit (TickerListener.js:96)
    at Ve.update (Ticker.js:459)
    at Ve._tick (Ticker.js:167)
ElmouradiAmine commented 2 years ago

For cubism 4, I need to use setParameterValueById and getParameterValueById For more info please refer to this issue: https://github.com/guansss/pixi-live2d-display/issues/15

guansss commented 2 years ago

I'm glad it's fixed.