|
@@ -88,7 +88,7 @@
|
|
|
<script lang="ts" setup>
|
|
|
import { Slider } from "ant-design-vue";
|
|
|
import { computed, ref, watch, watchEffect } from "vue";
|
|
|
-import { AnimationModel } from "@/store/animation";
|
|
|
+import { ams, AnimationModel } from "@/store/animation";
|
|
|
import Renderer from "@/components/drawing/renderer.vue";
|
|
|
import Time from "@/components/drawing-time/time.vue";
|
|
|
import TimeCurrent from "@/components/drawing-time/current.vue";
|
|
@@ -97,7 +97,7 @@ import TimeLineFrame from "@/components/drawing-time-line/frame.vue";
|
|
|
import TimeLineAction from "@/components/drawing-time-line/action.vue";
|
|
|
import empty from "@/components/drawing-time-line/empty.vue";
|
|
|
import { Active } from "./type";
|
|
|
-import { animationGroup } from "@/sdk/association/animation";
|
|
|
+import { animationGroup, currentTime, endTime } from "@/sdk/association/animation";
|
|
|
import { onlyId } from "@/components/drawing/hook";
|
|
|
|
|
|
const props = defineProps<{
|
|
@@ -157,6 +157,13 @@ const play = ref(false);
|
|
|
|
|
|
watch(play, (_a, _b, onCleanup) => {
|
|
|
play.value ? animationGroup.play() : animationGroup.pause();
|
|
|
+ onCleanup(
|
|
|
+ watchEffect(() => {
|
|
|
+ if (currentTime.value >= endTime.value) {
|
|
|
+ play.value = false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ );
|
|
|
|
|
|
// let isDes = false;
|
|
|
// let prevNow = Date.now();
|