bill 5 月之前
父節點
當前提交
4036983580
共有 2 個文件被更改,包括 11 次插入4 次删除
  1. 2 2
      src/components/drawing-time/time.vue
  2. 9 2
      src/views/animation/index.vue

+ 2 - 2
src/components/drawing-time/time.vue

@@ -1,10 +1,11 @@
 <template>
   <v-group v-if="shapeConfig">
     <v-line v-for="line in shapeConfig.lines" :config="line" />
+    <v-text v-for="texConfig in shapeConfig.texts" :config="{ ...texConfig }" />
     <v-line
       :config="{
         points: [0, 0, size?.width, 0],
-        strokeWidth: 25,
+        strokeWidth: 30,
         stroke: '#fff',
         opacity: 0,
         ...invConfig,
@@ -12,7 +13,6 @@
       @click="clickHandler"
       ref="line"
     />
-    <v-text v-for="texConfig in shapeConfig.texts" :config="{ ...texConfig }" />
     <slot />
   </v-group>
 </template>

+ 9 - 2
src/views/animation/index.vue

@@ -91,7 +91,13 @@ watchEffect((onCleanup) => {
   const am3d = amM.value.am;
   if (!am3d) return;
   const updateMat = () => {
-    frame.mat = JSON.parse(JSON.stringify(am3d.getModelPose()));
+    if (
+      activeAttrib.value?.key === "frames" &&
+      focusAM.value!.frames[activeAttrib.value.ndx] === frame
+    ) {
+      console.log("setMat");
+      frame.mat = JSON.parse(JSON.stringify(am3d.getModelPose()));
+    }
   };
 
   am3d.bus.on("transformChanged", updateMat);
@@ -160,7 +166,8 @@ watch(activeAttrib, (_a, _b, onCleanup) => {
   onCleanup(
     watch(
       () => [currentTime.value, cur.time, cur.time + (cur.duration || 0)],
-      updateFocus
+      updateFocus,
+      { flush: "sync" }
     )
   );
 });