From e5b07b60bc4ab3683dae1aa5428e5203814f0a5e Mon Sep 17 00:00:00 2001 From: dnaroma Date: Thu, 4 Apr 2024 20:59:21 +0200 Subject: [PATCH] fix: :bug: v2 models motion path was incorrect --- src/pages/live2d/Live2D.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pages/live2d/Live2D.tsx b/src/pages/live2d/Live2D.tsx index b12fa7d7..91731f6b 100644 --- a/src/pages/live2d/Live2D.tsx +++ b/src/pages/live2d/Live2D.tsx @@ -426,11 +426,10 @@ const Live2DView: React.FC = () => { motionName = motionName.slice(0, -5); } else if ( motionName?.startsWith("sub") || - motionName?.startsWith("clb") + motionName?.startsWith("clb") || + motionName.match(/^v2_\d{2}.*/) ) { motionName = motionName.split("_").slice(0, 2).join("_"); - } else if (motionName.startsWith("v2")) { - motionName = motionName.split("_")[1]!; } else { motionName = motionName.split("_")[0]!; }