地球词条标记改为黄色便签样式(黄底黑字)

This commit is contained in:
2026-09-19 01:39:41 +08:00
parent 32bb48cc0b
commit e3a55bfc01
2 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -406,7 +406,7 @@ export class App {
} }
_applyRotationLimits(pose) { _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 dx = pose.pos.x - pose.target.x;
const dy = pose.pos.y - pose.target.y; const dy = pose.pos.y - pose.target.y;
const dz = pose.pos.z - pose.target.z; const dz = pose.pos.z - pose.target.z;
+7 -7
View File
@@ -56,7 +56,10 @@ function makeRoundedBg(text, fontSize) {
ctx.arcTo(0, h, 0, 0, radius); ctx.arcTo(0, h, 0, 0, radius);
ctx.arcTo(0, 0, w, 0, radius); ctx.arcTo(0, 0, w, 0, radius);
ctx.closePath(); 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(); ctx.fill();
return { canvas: c, textW }; return { canvas: c, textW };
} }
@@ -187,10 +190,8 @@ export class CesiumGlobe {
label: { label: {
text: entry.name, text: entry.name,
font: '19px "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif', font: '19px "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif',
fillColor: gold, fillColor: ink,
outlineColor: ink, style: Cesium.LabelStyle.FILL,
outlineWidth: 3,
style: Cesium.LabelStyle.FILL_AND_OUTLINE,
horizontalOrigin: Cesium.HorizontalOrigin.LEFT, horizontalOrigin: Cesium.HorizontalOrigin.LEFT,
verticalOrigin: Cesium.VerticalOrigin.CENTER, verticalOrigin: Cesium.VerticalOrigin.CENTER,
pixelOffset: new Cesium.Cartesian2(10, 0), pixelOffset: new Cesium.Cartesian2(10, 0),
@@ -214,7 +215,7 @@ export class CesiumGlobe {
pixelOffset: new Cesium.Cartesian2(10 + bg.textW / 2, 0), pixelOffset: new Cesium.Cartesian2(10 + bg.textW / 2, 0),
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
disableDepthTestDistance: Number.POSITIVE_INFINITY, disableDepthTestDistance: Number.POSITIVE_INFINITY,
show: false, show: true,
}, },
}); });
@@ -383,7 +384,6 @@ export class CesiumGlobe {
this.markers.forEach(({ entity, bg, index: i }) => { this.markers.forEach(({ entity, bg, index: i }) => {
const on = i === index; const on = i === index;
entity.point.outlineWidth = on ? 3 : 1; // 选中加粗黑圈,不放大 entity.point.outlineWidth = on ? 3 : 1; // 选中加粗黑圈,不放大
if (bg) bg.show = on;
}); });
this.viewer.scene.requestRender(); this.viewer.scene.requestRender();
} }