From 087510aa88b0a6b6b5c648907e9dd52394621d47 Mon Sep 17 00:00:00 2001 From: surprise <15810472099@163.com> Date: 星期二, 07 五月 2024 10:57:39 +0800 Subject: [PATCH] 代码更新 --- src/assets/js/tool/palyTools.js | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/assets/js/palyTools.js b/src/assets/js/tool/palyTools.js similarity index 82% rename from src/assets/js/palyTools.js rename to src/assets/js/tool/palyTools.js index e2340fe..8ddf1c0 100644 --- a/src/assets/js/palyTools.js +++ b/src/assets/js/tool/palyTools.js @@ -1,23 +1,29 @@ -import configTool from "@/assets/js/configTool"; +import configTool from "@/assets/js/tool/configTool"; import store from "@/store"; const palyTools = { playIndex: 0, isPlay: false, data: null, time: null, + depthTestAgainstTerrain: null, Init(res) { if (res.sourceType != "demoAnimation") return; this.data = res.animationDatas; this.playIndex = 0; this.isPlay = true; this.playStart(); - Viewer.scene.globe.depthTestAgainstTerrain = false; + this.depthTestAgainstTerrain = Viewer.scene.globe.depthTestAgainstTerrain; + if (this.depthTestAgainstTerrain) { + Viewer.scene.globe.depthTestAgainstTerrain = false; + } }, stop() { clearTimeout(this.time); this.time = null; this.playIndex = 0; this.isPlay = false; + Viewer.scene.globe.depthTestAgainstTerrain = this.depthTestAgainstTerrain; + this.depthTestAgainstTerrain = null; }, playStart() { if (this.playIndex > this.data.length - 1) { -- Gitblit v1.9.3