From 077170f2d4b31165eff2046dc9e46ffbf4cae594 Mon Sep 17 00:00:00 2001 From: zh <972939975@qq.com> Date: Mon, 25 Aug 2025 20:50:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=BD=A8=E8=BF=B9=E8=BF=90?= =?UTF-8?q?=E5=8A=A8=E4=BA=8C=E7=BB=B4=E6=A8=A1=E5=BC=8F=E8=B4=B4=E5=9C=B0?= =?UTF-8?q?=E6=97=B6=E8=A7=86=E8=A7=92=E8=B7=9F=E9=9A=8F=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Obj/Base/TrajectoryMotion/index.js | 7 ++++--- src/YJEarth/index.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Obj/Base/TrajectoryMotion/index.js b/src/Obj/Base/TrajectoryMotion/index.js index aefb9dc..7256780 100644 --- a/src/Obj/Base/TrajectoryMotion/index.js +++ b/src/Obj/Base/TrajectoryMotion/index.js @@ -1764,9 +1764,10 @@ class TrajectoryMotion extends Base { if (!cartesian3) { return } - coordinates = _this.cartesian3Towgs84(cartesian3, viewer); + let pos84 = _this.cartesian3Towgs84(cartesian3, viewer); + coordinates = [pos84.lng, pos84.lat, pos84.alt + 1.8] position = cartesian3 - positionCamera = Cesium.Cartesian3.fromDegrees(coordinates.lng, coordinates.lat, coordinates.alt + 1.8) + positionCamera = Cesium.Cartesian3.fromDegrees(coordinates[0], coordinates[1], coordinates[2]) let positions_smooth = [] for (let i = 0; i <= 1000; i++) { if ((i / 1000) > (distance / _this.distance)) { @@ -1890,7 +1891,7 @@ class TrajectoryMotion extends Base { else { if (_this.sdk.viewer.trackedEntity) { _this.sdk.viewer.camera.setView({ - destination: Cesium.Cartesian3.fromDegrees(coordinates.lng, coordinates.lat, _this.sdk.viewer.camera.positionCartographic.height), + destination: Cesium.Cartesian3.fromDegrees(coordinates[0], coordinates[1], _this.sdk.viewer.camera.positionCartographic.height), orientation: { heading: Cesium.Math.toRadians(-90), pitch: 0, diff --git a/src/YJEarth/index.js b/src/YJEarth/index.js index 775f153..b959df3 100644 --- a/src/YJEarth/index.js +++ b/src/YJEarth/index.js @@ -151,7 +151,7 @@ class YJEarth { } this.options.contextOptions = { webgl: { - alpha: true, + // alpha: true, depth: true, stencil: true, antialias: true,