SillyTavern / Extension-Live2d

Use Live2D animated models for your character.
GNU General Public License v3.0
29 stars 10 forks source link

loading of physics / Animations #3

Closed Baromeus closed 8 months ago

Baromeus commented 10 months ago

In most Browsers the loading of a file that begins with a dot (like the ".physics3.json") is disabled/not working. I was able to create a workaround if I renamed the file (a copy of it) without the dot and changed the loading to that file.

Edit: After carefully checking i noticed the difference with successfully loaded physics. Clothes (like skirts) react correct in animations.

Do you know of a better alternative to load this file without the need of users renaming it?

Tony-sama commented 10 months ago

Probably in the minified code of live2d.min.js there is something that clash with file starting with a dot but no idea where it is :( easier to correct the live2d model file name and json content accordingly yes.

Baromeus commented 10 months ago

My idea would be to modify the loading to first try the doted variant and if that is not possible, load the renamed variant - if no renamed variant is found a error message could show the problem and that a renamed file would work.

btw. the error persists even if you have a not minified version of the code - for me it seems that all my browsers don't like files that are started with a dot (i can't even open them in the browser if i use a direct link, it's fine with the not doted version)

Tony-sama commented 10 months ago

Maybe it's the ST server that hide the files starting with a dot actually, it's common name style for hidden file. Also we have people who fix model manually on the discord, join the live2d thread of advanced features to share knowledge please :)