From e3a55bfc01889142a6867a52b8bc3c604a6a8e50 Mon Sep 17 00:00:00 2001 From: fukunee Date: Sat, 19 Sep 2026 01:39:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E7=90=83=E8=AF=8D=E6=9D=A1=E6=A0=87?= =?UTF-8?q?=E8=AE=B0=E6=94=B9=E4=B8=BA=E9=BB=84=E8=89=B2=E4=BE=BF=E7=AD=BE?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=EF=BC=88=E9=BB=84=E5=BA=95=E9=BB=91=E5=AD=97?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/App.js | 2 +- src/scene/CesiumGlobe.js | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/core/App.js b/src/core/App.js index aee6f85..8f2e2d8 100644 --- a/src/core/App.js +++ b/src/core/App.js @@ -406,7 +406,7 @@ export class App { } _applyRotationLimits(pose) { - const LIMIT = (20 * Math.PI) / 180; // ±20° + const LIMIT = (10 * Math.PI) / 180; // ±10° const dx = pose.pos.x - pose.target.x; const dy = pose.pos.y - pose.target.y; const dz = pose.pos.z - pose.target.z; diff --git a/src/scene/CesiumGlobe.js b/src/scene/CesiumGlobe.js index 39daea9..73584e3 100644 --- a/src/scene/CesiumGlobe.js +++ b/src/scene/CesiumGlobe.js @@ -56,7 +56,10 @@ function makeRoundedBg(text, fontSize) { ctx.arcTo(0, h, 0, 0, radius); ctx.arcTo(0, 0, w, 0, radius); ctx.closePath(); - ctx.fillStyle = 'rgba(20, 16, 13, 0.88)'; + ctx.shadowColor = 'rgba(0, 0, 0, 0.22)'; + ctx.shadowBlur = 6; + ctx.shadowOffsetY = 2; + ctx.fillStyle = '#FFEB3B'; ctx.fill(); return { canvas: c, textW }; } @@ -187,10 +190,8 @@ export class CesiumGlobe { label: { text: entry.name, font: '19px "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif', - fillColor: gold, - outlineColor: ink, - outlineWidth: 3, - style: Cesium.LabelStyle.FILL_AND_OUTLINE, + fillColor: ink, + style: Cesium.LabelStyle.FILL, horizontalOrigin: Cesium.HorizontalOrigin.LEFT, verticalOrigin: Cesium.VerticalOrigin.CENTER, pixelOffset: new Cesium.Cartesian2(10, 0), @@ -214,7 +215,7 @@ export class CesiumGlobe { pixelOffset: new Cesium.Cartesian2(10 + bg.textW / 2, 0), heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, disableDepthTestDistance: Number.POSITIVE_INFINITY, - show: false, + show: true, }, }); @@ -383,7 +384,6 @@ export class CesiumGlobe { this.markers.forEach(({ entity, bg, index: i }) => { const on = i === index; entity.point.outlineWidth = on ? 3 : 1; // 选中加粗黑圈,不放大 - if (bg) bg.show = on; }); this.viewer.scene.requestRender(); }