From 56f934a87783d5c59a1968f679bd63b677e2e41a Mon Sep 17 00:00:00 2001 From: luoyifan Date: Tue, 3 Jun 2025 23:04:49 +0800 Subject: [PATCH] Way --- src/core/engine/Viewport.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/core/engine/Viewport.ts b/src/core/engine/Viewport.ts index ea87c40..5a39d37 100644 --- a/src/core/engine/Viewport.ts +++ b/src/core/engine/Viewport.ts @@ -158,12 +158,12 @@ export default class Viewport { $(statsControls.dom).children().css('height', '28px') // 监听事件 - this.watchList.push(watch(() => this.state.camera.position.y, (newVal) => { - if (!this.state.isReady) { - return - } - this.updateGridVisibility() - })) + // this.watchList.push(watch(() => this.state.camera.position.y, (newVal) => { + // if (!this.state.isReady) { + // return + // } + // this.updateGridVisibility() + // })) // 监听窗口大小变化 if (this.resizeObserver) { @@ -292,7 +292,7 @@ export default class Viewport { const camera = this.camera this.state.camera.position.x = camera.position.x - this.state.camera.position.y = this.getEffectiveViewDistance() + this.state.camera.position.y = camera.zoom // this.getEffectiveViewDistance() this.state.camera.position.z = camera.position.z } }