bill 4 месяцев назад
Родитель
Сommit
ab7c839dfd
2 измененных файлов с 4 добавлено и 1 удалено
  1. 2 1
      src/sdk/association/animation.ts
  2. 2 0
      src/views/guide/guide/attach-animation-sam.vue

+ 2 - 1
src/sdk/association/animation.ts

@@ -364,6 +364,7 @@ export const addSubtitle = (data: AnimationModelSubtitle) => {
             )},${round(rgb.g * 255, 2)},${round(rgb.b * 255, 2)},0.5)`;
             )},${round(rgb.g * 255, 2)},${round(rgb.b * 255, 2)},0.5)`;
           }),
           }),
           watchEffect(() => {
           watchEffect(() => {
+            console.log(pixel.value, show.value, modelShow.value, textShow.value)
             layer.style.visibility =
             layer.style.visibility =
               pixel.value && show.value && modelShow.value && textShow.value ? "visible" : "hidden";
               pixel.value && show.value && modelShow.value && textShow.value ? "visible" : "hidden";
           }),
           }),
@@ -389,6 +390,7 @@ export const addSubtitle = (data: AnimationModelSubtitle) => {
     // isRun = true
     // isRun = true
     // setTimeout(() => {
     // setTimeout(() => {
     pixel.value = amMap[getAMKey(am)]?.am?.getCurrentSubtitlePixel(size.value);
     pixel.value = amMap[getAMKey(am)]?.am?.getCurrentSubtitlePixel(size.value);
+    console.log(amMap[getAMKey(am)]?.am, size.value)
     //   isRun = false
     //   isRun = false
     // }, 16);
     // }, 16);
   };
   };
@@ -405,7 +407,6 @@ export const addSubtitle = (data: AnimationModelSubtitle) => {
         () => amMap[key]?.am,
         () => amMap[key]?.am,
       ],
       ],
       (_a, _b, onCleanup) => {
       (_a, _b, onCleanup) => {
-        console.error('currentTime', currentTime.value)
         if (
         if (
           !play.value &&
           !play.value &&
           router.currentRoute.value.name !== RoutesName.animation &&
           router.currentRoute.value.name !== RoutesName.animation &&

+ 2 - 0
src/views/guide/guide/attach-animation-sam.vue

@@ -3,6 +3,7 @@
     class="anima fun-ctrl"
     class="anima fun-ctrl"
     :class="{ disabled: disableAttach, active: isPlayIng }"
     :class="{ disabled: disableAttach, active: isPlayIng }"
     @click="attachAnimation"
     @click="attachAnimation"
+    v-if="ams.length"
   >
   >
     <ui-icon type="a-animation_s" />
     <ui-icon type="a-animation_s" />
     <span>{{ isPlayIng ? "关闭" : "激活" }}动画</span>
     <span>{{ isPlayIng ? "关闭" : "激活" }}动画</span>
@@ -14,6 +15,7 @@ import { currentTime } from "@/sdk/association/animation";
 import { computed, ref, watchEffect } from "vue";
 import { computed, ref, watchEffect } from "vue";
 import { GuidePath } from "@/store";
 import { GuidePath } from "@/store";
 import { Message } from "bill/index";
 import { Message } from "bill/index";
+import { ams } from "@/store/animation";
 
 
 const props = defineProps<{ current: GuidePath; paths: GuidePath[] }>();
 const props = defineProps<{ current: GuidePath; paths: GuidePath[] }>();