bill 4 hónapja
szülő
commit
5ebd9d04e4
1 módosított fájl, 4 hozzáadás és 0 törlés
  1. 4 0
      src/sdk/association/animation.ts

+ 4 - 0
src/sdk/association/animation.ts

@@ -425,6 +425,10 @@ export const endTime = computed(() => {
 export const play = ref(false);
 watch(play, (_a, _b, onCleanup) => {
   play.value ? animationGroup?.play() : animationGroup?.pause();
+  if (!play.value) return;
+  if (currentTime.value >= endTime.value) {
+    currentTime.value = 0
+  }
   onCleanup(
     watchEffect(() => {
       if (currentTime.value >= endTime.value) {