bill 1 年間 前
コミット
48a3fe2af4

+ 0 - 1
src/app.vue

@@ -61,7 +61,6 @@ const stopWatch = watch(
     }
     stopWatch();
     loaded.value = true;
-    console.log(loaded.value);
   },
   { immediate: true }
 );

+ 54 - 52
src/layout/edit/fuse-edit.vue

@@ -6,7 +6,6 @@
         <component :is="Component" />
       </keep-alive>
     </router-view>
-    
 
     <SelectModel v-else>
       <ui-button type="primary" class="add-fuse-model">
@@ -17,78 +16,81 @@
 </template>
 
 <script lang="ts" setup>
-import { ref, watch, watchEffect, nextTick } from 'vue'
-import { currentMeta, router, RoutesName } from '@/router'
-import { showLeftPanoStack, showRightPanoStack } from '@/env'
-import { togetherCallback } from '@/utils'
-import { loadModel, fuseModel } from '@/model'
-import { 
-  enterEdit, 
-  isOld, 
-  save, 
+import { ref, watch, watchEffect, nextTick } from "vue";
+import { currentMeta, router, RoutesName } from "@/router";
+import { showLeftPanoStack, showRightPanoStack } from "@/env";
+import { asyncTimeout, togetherCallback } from "@/utils";
+import { loadModel, fuseModel } from "@/model";
+import {
+  enterEdit,
+  isOld,
+  save,
   fuseModels,
   initialFuseModels,
   initialScenes,
-  initialTaggingStyles, 
-  initialTaggings, 
-  initialGuides, 
+  initialTaggingStyles,
+  initialTaggings,
+  initialGuides,
   initialMeasures,
-  fuseModelsLoaded
-} from '@/store'
+  fuseModelsLoaded,
+} from "@/store";
 
-import Header from './header/index.vue'
-import SelectModel from './scene-select.vue'
+import Header from "./header/index.vue";
+import SelectModel from "./scene-select.vue";
 
-const loaded = ref(false)
+const loaded = ref(false);
 const initialSys = async () => {
-  await Promise.all([
-    initialFuseModels(),
-    initialScenes()
-  ])
+  await Promise.all([initialFuseModels(), initialScenes()]);
   await Promise.all([
     initialTaggingStyles(),
     initialTaggings(),
     initialGuides(),
-    initialMeasures()
-  ])
-  await loadModel(fuseModel)
+    initialMeasures(),
+  ]);
+  await loadModel(fuseModel);
   const stop = watchEffect(() => {
     if (fuseModelsLoaded.value) {
-      loaded.value = true
-      nextTick(() => stop())
+      loaded.value = true;
+      nextTick(() => stop());
     }
-  })
-}
-initialSys()
+  });
+};
+initialSys();
 
 router.beforeEach(async (to, from, next) => {
   if (to.params.save && isOld.value) {
-    await save()
+    await save();
   }
-  next()
-})
-watch(router.currentRoute, (_n, _, onClean) => {
-  const meta = currentMeta.value
-  if (meta && 'full' in meta && (meta as any).full) {
-    enterEdit(() => {
-      if (!history.state.back) {
-        router.replace({ name: RoutesName.merge })
-      } else {
-        router.back()
-      }
-    })
-    onClean(togetherCallback([
-      showLeftPanoStack.push(ref(false)),
-      showRightPanoStack.push(ref(false)),
-    ]))
-  }
-}, { flush: 'post', immediate: true })
+  next();
+});
+watch(
+  router.currentRoute,
+  (_n, _, onClean) => {
+    const meta = currentMeta.value;
+    if (meta && "full" in meta && (meta as any).full) {
+      enterEdit(() => {
+        if (!history.state.back) {
+          router.replace({ name: RoutesName.merge });
+        } else {
+          router.back();
+        }
+      });
+      onClean(
+        togetherCallback([
+          showLeftPanoStack.push(ref(false)),
+          showRightPanoStack.push(ref(false)),
+        ])
+      );
+    }
+  },
+  { flush: "post", immediate: true }
+);
 
 watchEffect((onCleanup) => {
   if (!fuseModels.value.length) {
-    onCleanup(showRightPanoStack.push(ref(false)))
+    onCleanup(showRightPanoStack.push(ref(false)));
   }
-})
+});
 </script>
 
 <style lang="scss" scoped>
@@ -104,4 +106,4 @@ watchEffect((onCleanup) => {
     margin-right: 4px;
   }
 }
-</style>
+</style>

+ 17 - 19
src/layout/edit/scene-edit.vue

@@ -14,31 +14,29 @@
 </template>
 
 <script setup lang="ts">
-import Header from './header/index.vue'
-import SceneList from '../scene-list/index.vue'
-import { LeftPano } from '@/layout'
-import { custom } from '@/env'
-import { onMounted, ref } from 'vue'
-import { currentModel, loadModel, fuseModel } from '@/model'
-import { initialFuseModels, initialScenes } from '@/store'
+import Header from "./header/index.vue";
+import SceneList from "../scene-list/index.vue";
+import { LeftPano } from "@/layout";
+import { custom } from "@/env";
+import { onMounted, ref } from "vue";
+import { currentModel, loadModel, fuseModel } from "@/model";
+import { initialFuseModels, initialScenes } from "@/store";
+import { asyncTimeout } from "@/utils";
 
-
-const loaded = ref(false)
+const loaded = ref(false);
 const initialSys = async () => {
-  await Promise.all([
-    initialFuseModels(),
-    initialScenes()
-  ])
-  loaded.value = true
-}
-initialSys()
+  await Promise.all([initialFuseModels(), initialScenes()]);
+  await loadModel(fuseModel);
+  await asyncTimeout(1000);
+  loaded.value = true;
+};
+initialSys();
 
-onMounted(() => loadModel(fuseModel))
-custom.showLeftPano = true
+custom.showLeftPano = true;
 </script>
 
 <style>
 :root {
   --editor-menu-width: 0px;
 }
-</style>
+</style>

+ 7 - 1
src/layout/model-list/index.vue

@@ -1,5 +1,11 @@
 <template>
-  <List :title="title" rawKey="id" :data="modelList" :showContent="showContent">
+  <List
+    :title="title"
+    rawKey="id"
+    class="scene-model-list"
+    :data="modelList"
+    :showContent="showContent"
+  >
     <template #action>
       <slot name="action" />
     </template>

+ 42 - 39
src/layout/scene-list/index.vue

@@ -4,28 +4,26 @@
       <slot name="action" />
     </template>
     <template #atom="{ item }">
-      <div v-if="item.raw === fuseModel" 
-        @click="updateCurrent(item.raw)"
-      >
+      <div v-if="item.raw === fuseModel" @click="updateCurrent(item.raw)">
         <ModelList
           class="scene-model-list"
-          :class="{active: current === fuseModel}"
+          :class="{ active: current === fuseModel }"
           :title="getModelTypeDesc(fuseModel as any)"
           :show-content="showModelList"
         >
           <template #action>
-            <ui-icon 
-              :type="`pull-${showModelList ? 'up' : 'down'}`" 
+            <ui-icon
+              :type="`pull-${showModelList ? 'up' : 'down'}`"
               @click="showModelList = !showModelList"
-              ctrl 
+              ctrl
             />
           </template>
         </ModelList>
       </div>
-      <div 
-        class="scene" 
-        :class="{disabled: item.raw.status !== SceneStatus.SUCCESS}" 
-        @click="updateCurrent(item.raw)" 
+      <div
+        class="scene"
+        :class="{ disabled: item.raw.status !== SceneStatus.SUCCESS }"
+        @click="updateCurrent(item.raw)"
         v-else
       >
         <p>{{ item.raw.name }}</p>
@@ -36,47 +34,52 @@
 </template>
 
 <script lang="ts" setup>
-import { computed, nextTick, ref, watch } from 'vue'
-import { scenes, SceneType, SceneTypeDesc, fuseModels, SceneStatus } from '@/store'
-import List from '@/components/list/index.vue'
-import ModelList from '../model-list/index.vue'
-import { fuseModel, getModelTypeDesc } from '@/model'
+import { computed, nextTick, ref, watch } from "vue";
+import { scenes, SceneType, SceneTypeDesc, fuseModels, SceneStatus } from "@/store";
+import List from "@/components/list/index.vue";
+import ModelList from "../model-list/index.vue";
+import { fuseModel, getModelTypeDesc } from "@/model";
 
-import type { ModelType, FuseModelType } from '@/model'
-import type { Scene } from '@/store'
+import type { ModelType, FuseModelType } from "@/model";
+import type { Scene } from "@/store";
 
-const emit = defineEmits<{ (e: 'update:current', data: ModelType): void }>()
-const props = defineProps<{ current: ModelType }>()
-const showModelList = ref(true)
+const emit = defineEmits<{ (e: "update:current", data: ModelType): void }>();
+const props = defineProps<{ current: ModelType }>();
+const showModelList = ref(true);
 
 const list = computed(() => {
-  const sceneList = scenes.value.map(scene => ({
+  const sceneList = scenes.value.map((scene) => ({
     raw: scene,
-    select: props.current !== fuseModel 
-      && (props.current.num === scene.num )
-      && props.current.type === scene.type
-  }))
+    select:
+      props.current !== fuseModel &&
+      props.current.num === scene.num &&
+      props.current.type === scene.type,
+  }));
   if (fuseModels.value.length) {
-    return [{ raw: fuseModel }, ...sceneList]
+    return [{ raw: fuseModel }, ...sceneList];
   } else {
-    return sceneList
+    return sceneList;
   }
-})
+});
 
 const updateCurrent = (scene: FuseModelType | Scene) => {
   if (scene === fuseModel) {
-    emit('update:current', scene)
+    emit("update:current", scene);
   } else {
-    emit('update:current', { type: scene.type, num: scene.num })
+    emit("update:current", { type: scene.type, num: scene.num });
   }
-}
+};
 
-const stopWatch = watch(list, () => {
-  if (!list.value.some(model => model.raw === fuseModel) && list.value.length) {
-    updateCurrent(list.value[0].raw as any)
-    nextTick(() => stopWatch())
-  }
-}, { immediate: true })
+const stopWatch = watch(
+  list,
+  () => {
+    if (!list.value.some((model) => model.raw === fuseModel) && list.value.length) {
+      updateCurrent(list.value[0].raw as any);
+      nextTick(() => stopWatch());
+    }
+  },
+  { immediate: true }
+);
 </script>
 
 <style lang="scss">
@@ -105,7 +108,7 @@ const stopWatch = watch(list, () => {
     h3 {
       font-size: 20px;
       font-weight: bold;
-      color: #FFFFFF;
+      color: #ffffff;
     }
   }
 

+ 41 - 35
src/layout/show/index.vue

@@ -1,10 +1,13 @@
 <template>
   <template v-if="loaded">
-    <div :class="{ hideLeft: !custom.showLeftPano }" :style="hasSingle ? {'--left-pano-left': '0px'} : ''">
-      <SlideMenu 
+    <div
+      :class="{ hideLeft: !custom.showLeftPano }"
+      :style="hasSingle ? { '--left-pano-left': '0px' } : ''"
+    >
+      <SlideMenu
         v-if="!hasSingle"
-        :activeName="(router.currentRoute.value.name as RoutesName)" 
-        @change-item="item => router.push({ name: item.name })"
+        :activeName="(router.currentRoute.value.name as RoutesName)"
+        @change-item="(item) => router.push({ name: item.name })"
       />
 
       <router-view v-slot="{ Component }">
@@ -12,23 +15,23 @@
           <component :is="Component" />
         </keep-alive>
       </router-view>
-
     </div>
   </template>
 </template>
 
 <script lang="ts" setup>
-import { custom, params } from '@/env'
-import { computed, nextTick, ref, watch, watchEffect } from 'vue'
-import { router, RoutesName } from '@/router'
-import { loadModel, fuseModel } from '@/model'
-import SlideMenu from './slide-menu.vue'
-import { 
-  initialFloders, 
-  initialFloderTypes, 
-  initialFuseModels, 
-  initialRecords, 
-  initialScenes, 
+import { custom, params } from "@/env";
+import { computed, nextTick, ref, watch, watchEffect } from "vue";
+import { router, RoutesName } from "@/router";
+import { loadModel, fuseModel } from "@/model";
+import { asyncTimeout } from "@/utils";
+import SlideMenu from "./slide-menu.vue";
+import {
+  initialFloders,
+  initialFloderTypes,
+  initialFuseModels,
+  initialRecords,
+  initialScenes,
   initialViews,
   defTitle,
   initialTaggingStyles,
@@ -37,12 +40,12 @@ import {
   initialGuides,
   scenes,
   fuseModels,
-  appEl
-} from '@/store'
+  appEl,
+} from "@/store";
 
-const hasSingle = new URLSearchParams(location.search).has("single")
+const hasSingle = new URLSearchParams(location.search).has("single");
 
-const loaded = ref(false)
+const loaded = ref(false);
 const initialSys = async () => {
   await Promise.all([
     initialFuseModels(),
@@ -53,23 +56,24 @@ const initialSys = async () => {
     initialFloderTypes(),
     initialTaggingStyles(),
     initialTaggings(),
-    initialGuides()
-  ])
-  await initialMeasures()
-  loaded.value = true
-  loadModel(fuseModel)
-  custom.showLeftPano = true
-}
-initialSys()
-defTitle.value = ''
-initialScenes()
+    initialGuides(),
+  ]);
+  await initialMeasures();
+  await loadModel(fuseModel);
+  await asyncTimeout(1000);
+  loaded.value = true;
+  custom.showLeftPano = true;
+};
+initialSys();
+defTitle.value = "";
+initialScenes();
 
 watchEffect((onCleanup) => {
   if (loaded.value && appEl.value && scenes.value.length && !fuseModels.value.length) {
-      loadModel(scenes.value[0] as any)
-      custom.showLeftPano = true
+    loadModel(scenes.value[0] as any);
+    custom.showLeftPano = true;
   }
-})
+});
 </script>
 
 <style>
@@ -80,6 +84,8 @@ watchEffect((onCleanup) => {
 
 .hideLeft {
   --editor-menu-left: calc(-1 * var(--editor-menu-width));
-  --left-pano-left: calc(var(--editor-menu-left) + var(--editor-menu-width) - var(--left-pano-width)) !important
+  --left-pano-left: calc(
+    var(--editor-menu-left) + var(--editor-menu-width) - var(--left-pano-width)
+  ) !important;
 }
-</style>
+</style>

+ 66 - 64
src/model/app.vue

@@ -8,56 +8,56 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, ref, watchEffect, computed, watch, nextTick } from 'vue'
-import { SceneType } from '@/store'
-import { params } from '@/env'
-import { fuseModel, modelProps } from './index'
-import { modelSDKFactory } from './platform'
+import { defineComponent, ref, watchEffect, computed, watch, nextTick } from "vue";
+import { SceneType } from "@/store";
+import { params } from "@/env";
+import { fuseModel, modelProps } from "./index";
+import { modelSDKFactory } from "./platform";
 
 const typeChange = () => {
-  const oldType = modelProps.type
-  let stopWatch = null as unknown as () => void
+  const oldType = modelProps.type;
+  let stopWatch = (null as unknown) as () => void;
 
   const typePromise = new Promise((_, reject) => {
     stopWatch = watchEffect(() => {
       if (modelProps.type !== oldType) {
-        reject(new Error('当前模型未加载完已切换到下个'))
-        stopWatch!()
+        reject(new Error("当前模型未加载完已切换到下个"));
+        stopWatch!();
       }
-    })
-  })
-  return { typePromise, typeCleanup: stopWatch }
-}
+    });
+  });
+  return { typePromise, typeCleanup: stopWatch };
+};
 
 export const Model = defineComponent({
-  name: 'model',
+  name: "model",
   setup() {
-    const scene = computed(() => modelProps.type !== fuseModel && modelProps.type)
-    const url = ref("")
+    const scene = computed(() => modelProps.type !== fuseModel && modelProps.type);
+    const url = ref("");
     const setUrl = (newURL: string) => {
       if (newURL !== url.value) {
         setTimeout(() => {
-          const hook = (iframeRef.value?.contentWindow as any)?.beforeDestroy
+          const hook = (iframeRef.value?.contentWindow as any)?.beforeDestroy;
           if (hook) {
             try {
-              hook()
-            } catch(e) {
-              console.error(e)
+              hook();
+            } catch (e) {
+              console.error(e);
             }
-            url.value = ""
-            setTimeout(() => url.value = newURL, 300)
+            url.value = "";
+            setTimeout(() => (url.value = newURL), 300);
           } else {
-            url.value = newURL
+            url.value = newURL;
           }
-        })
+        });
       }
-    }
+    };
 
     watchEffect(() => {
       if (!scene.value) {
         return setUrl("");
       }
-      const type = scene.value.type
+      const type = scene.value.type;
       const urls = {
         [SceneType.SWKK]: `/swkk/spg.html?m=${scene.value.num}`,
         [SceneType.SWKJ]: `/swkk/spg.html?m=${scene.value.num}`,
@@ -66,14 +66,12 @@ export const Model = defineComponent({
         [SceneType.SWMX]: `index.html?caseId=${params.caseId}&app=${params.app}&modelId=${scene.value.num}&share=1#sign-model`,
         [SceneType.SWYDSS]: `/swss/index.html?m=${scene.value.num}`,
         [SceneType.SWYDMX]: `/swkk/spg.html?m=${scene.value.num}`,
-      }
-      setUrl(urls[type])
-    })
-
-
+      };
+      setUrl(urls[type]);
+    });
 
-    const fuseRef = ref<HTMLDivElement>()
-    const iframeRef = ref<HTMLIFrameElement>()
+    const fuseRef = ref<HTMLDivElement>();
+    const iframeRef = ref<HTMLIFrameElement>();
 
     watch(
       () => [modelProps.type, url.value],
@@ -81,47 +79,51 @@ export const Model = defineComponent({
         if (type !== fuseModel && !url) {
           return;
         }
-        const callback = modelProps.callback
-
-        await nextTick()
-        const { typePromise, typeCleanup } = typeChange()
-        const modelPromise = modelSDKFactory(type as any, type === fuseModel ? fuseRef.value! : iframeRef.value!)
-        let result: any = null, error = null
+        const callback = modelProps.callback;
+
+        await nextTick();
+        const { typePromise, typeCleanup } = typeChange();
+        const modelPromise = modelSDKFactory(
+          type as any,
+          type === fuseModel ? fuseRef.value! : iframeRef.value!
+        );
+        let result: any = null,
+          error = null;
         try {
-          result = await Promise.race([typePromise, modelPromise])
+          result = await Promise.race([typePromise, modelPromise]);
         } catch (err: any) {
-          error = err
+          error = err;
         }
-        typeCleanup()
-        callback && callback(result, error)
-      }, 
-      { immediate: true, flush: 'post' }
-    )
+        typeCleanup();
+        callback && callback(result, error);
+      },
+      { immediate: true, flush: "post" }
+    );
 
     // 处理iframe 定制页面
     watch(
-      () => [scene.value && scene.value.type, url.value], 
+      () => [scene.value && scene.value.type, url.value],
       ([type], oldType, onCleanup) => {
         if (type === false) {
           // 手动渲染融合场景
           console.log("手动渲染!");
           setTimeout(() => {
-            (window as any).viewer.setDisplay(true)
-          }, 100)
-        };
+            (window as any).viewer.setDisplay(true);
+          }, 100);
+        }
 
         const interval = setInterval(async () => {
-          let doc: Document | undefined
+          let doc: Document | undefined;
           try {
-            doc = iframeRef.value?.contentWindow?.document!
+            doc = iframeRef.value?.contentWindow?.document!;
           } catch {
             clearInterval(interval);
           }
           if (!doc || !doc.querySelector("div")) return;
-          console.error(doc, doc.head)
-          const target = doc.head
+          console.error(doc, doc.head);
+          const target = doc.head;
           clearInterval(interval);
-          ;(window as any).iframeCreated && (window as any).iframeCreated(iframeRef.value);
+          (window as any).iframeCreated && (window as any).iframeCreated(iframeRef.value);
           if (type === SceneType.SWSS) {
             const $style = document.createElement("style");
             $style.type = "text/css";
@@ -135,19 +137,19 @@ export const Model = defineComponent({
           }
         }, 16);
         onCleanup(() => clearInterval(interval));
-      }, 
-      {flush: 'post', immediate: true}
-    )
+      },
+      { flush: "post", immediate: true }
+    );
 
     return {
       iframeRef,
       fuseRef,
-      url
-    }
-  }
-})
+      url,
+    };
+  },
+});
 
-export default Model
+export default Model;
 </script>
 
 <style scoped lang="scss">
@@ -180,6 +182,6 @@ export default Model
   right: calc(var(--editor-menu-right) + var(--editor-toolbox-width)) !important;
   top: calc(var(--header-top) + var(--editor-head-height)) !important;
   margin: 10px;
-  transition: top .3s ease, right .3s ease;
+  transition: top 0.3s ease, right 0.3s ease;
 }
 </style>

+ 3 - 3
src/model/platform.ts

@@ -1,7 +1,7 @@
 import { watchEffect, nextTick } from 'vue'
 import { fuseModelsLoaded, scenes, SceneType, setting, caseProject } from '@/store'
 import { fuseModel } from './'
-import { initialSDK, initialed as fuseInitialed, sdk as fuseSDK } from '@/sdk'
+import { initialSDK, initialed as fuseInitialed, sdk as fuseSDK, analysisPose, analysisPoseInfo } from '@/sdk'
 import { asyncTimeout } from '@/utils'
 import { aMapToWgs84 } from "@/utils/coord";
 
@@ -90,14 +90,14 @@ export async function exposeFactory(type: ModelType, win?: any): Promise<ModelEx
           const dataURL = await sdk.screenshot(260, 160)
           const res = await fetch(dataURL)
           const image = await res.blob()
-          const pose = sdk.getPose()
+          const pose = analysisPose(sdk.getPose())
           return {
             image,
             flyData: JSON.stringify(pose)
           }
         },
         async setView(flyData: string) {
-          const pose = JSON.parse(flyData)
+          const pose = analysisPoseInfo(JSON.parse(flyData))
           sdk.comeTo({ dur: 300, ...pose })
         }
       }

+ 17 - 10
src/sdk/association/index.ts

@@ -10,18 +10,25 @@ import { associationMessaures } from "./measure"
 export const getSupperPanoModel = () => {
   const supperModel = ref<FuseModel | null>(null);
 
-  sdk.sceneBus.on("cameraChange", () => {
-    const data = sdk.canTurnToPanoMode();
-    if (data?.model) {
-      for (const [f, s] of sceneModelMap.entries()) {
-        if (toRaw(data.model) === toRaw(s)) {
-          supperModel.value = f;
-          return;
+  
+  const interval = setInterval(() => {
+    if (!sdk) return;
+    clearInterval(interval)
+
+    sdk.sceneBus.on("cameraChange", () => {
+      const data = sdk.canTurnToPanoMode();
+      if (data?.model) {
+        for (const [f, s] of sceneModelMap.entries()) {
+          if (toRaw(data.model) === toRaw(s)) {
+            supperModel.value = f;
+            return;
+          }
         }
       }
-    }
-    supperModel.value = null;
-  });
+      supperModel.value = null;
+    });
+  }, 16)
+  
 
   return supperModel;
 };

+ 2 - 5
src/sdk/association/setting.ts

@@ -10,11 +10,8 @@ export const associationSetting = (sdk: SDK, mountEl: HTMLDivElement) => {
 
   const stopWatchPose = watchEffect(() => {
     if (!setting.value?.pose) return;
-    if (sdk.setPose) {
-      sdk.setPose(analysisPoseInfo(setting.value.pose))
-    } else {
-      sdk.comeTo(setting.value.pose);
-    }
+    console.error('comeTo', analysisPoseInfo(setting.value.pose))
+    sdk.comeTo(analysisPoseInfo(setting.value.pose));
     nextTick(() => stopWatchPose());
   });
 

+ 1 - 1
src/sdk/sdk.ts

@@ -178,7 +178,6 @@ export interface SDK {
   ) => ScreenPos | null;
   screenshot: (width: number, height: number) => Promise<string>;
   getPose: () => Pose;
-  setPose: (pose: Pose &{dur?: number}) => void
   comeTo: (pos: CameraComeToProps) => void;
   enterSceneGuide: (data: SceneGuidePath[]) => SceneGuide;
 
@@ -196,6 +195,7 @@ export type InialSDKProps = {
   scenes: Scene[];
   lonlat?: number[];
 };
+
 export let initialed = false;
 export const initialSDK = async (props: InialSDKProps) => {
   if (initialed) return sdk;

+ 1 - 5
src/views/guide/edit-paths.vue

@@ -196,11 +196,7 @@ const deleteAll = async () => {
 };
 
 const changeCurrent = (path: GuidePath) => {
-  if (sdk.setPose) {
-    sdk.setPose({ dur: 300, ...path, ...analysisPoseInfo(path) });
-  } else {
-    sdk.comeTo({ dur: 300, ...path });
-  }
+  sdk.comeTo({ dur: 300, ...path, ...analysisPoseInfo(path) });
   current.value = path;
 };