wangjuncheng
2025-04-20 d8a0684a057df926c788525575eecdddde977133
src/components/menu/TimeLine.vue
@@ -62,6 +62,7 @@
        </div>
      </div>
    </div>
    <el-button @click="endSimulate" style="margin-top: 26px;margin-left: 30px;margin-right: 10px;">结束模拟</el-button>
  </div>
</template>
@@ -74,6 +75,7 @@
  watch,
  defineProps,
  onBeforeUnmount,
  inject,
} from "vue";
import dayjs from "dayjs";
import { createWaterPrimitive, destoryWaterPrimitive } from "@/utils/water";
@@ -145,6 +147,7 @@
  if (!isPlaying.value && currentTime.value >= duration.value) {
    currentTime.value = 0;
    emit("timeUpdate", progressPercentage.value);
    // earthCtrl.environment.disableEffect("rain");
  }
  isPlaying.value = !isPlaying.value;
@@ -162,6 +165,7 @@
};
const startPlayback = () => {
  // earthCtrl.environment.showEffect("rain");
  clearInterval(playInterval);
  playInterval = setInterval(() => {
    currentTime.value += 600 * playbackRate.value;
@@ -183,6 +187,7 @@
};
const stopPlayback = () => {
  // earthCtrl.environment.disableEffect("rain");
  clearInterval(playInterval);
};
@@ -295,6 +300,7 @@
    destoryWaterPrimitive();
  }, delay);
});
const { startSimulate, endSimulate } = inject("simulateActions");
</script>
<style scoped>
@@ -307,7 +313,7 @@
  left: 50%;
  transform: translateX(-50%);
  z-index: 99;
  width: 838px;
  width: 878px;
  height: 108px;
  /* background-color: #1a2634; */
  background: url("@/assets/img/menubar/bar.png");