视频成功 原因 token原因

This commit is contained in:
mmc
2026-05-22 08:03:30 +08:00
parent 2fcc5a13ea
commit 021d3cf384
6 changed files with 108 additions and 40 deletions

View File

@@ -107,7 +107,7 @@ export default function CesiumMap({ realtimePosition, pathPoints = [], devices =
id,
position: window.Cesium.Cartesian3.fromDegrees(p.lon, p.lat),
point: {
color: window.Cesium.Color.SKYBLUE,
color: window.Cesium?.Color.SKYBLUE,
pixelSize: 10,
disableDepthTestDistance: Number.POSITIVE_INFINITY,
},
@@ -115,7 +115,7 @@ export default function CesiumMap({ realtimePosition, pathPoints = [], devices =
text: `${i + 1}`,
font: '12px sans-serif',
pixelOffset: new window.Cesium.Cartesian2(0, -15),
fillColor: window.Cesium.Color.WHITE
fillColor: window.Cesium?.Color.WHITE
}
});
pointEntitiesRef.current.push(id);
@@ -133,7 +133,7 @@ export default function CesiumMap({ realtimePosition, pathPoints = [], devices =
polyline: {
positions: positions,
width: 4,
material: window.Cesium.Color.SKYBLUE,
material: window.Cesium?.Color.SKYBLUE,
clampToGround: true,
}
});
@@ -202,9 +202,9 @@ export default function CesiumMap({ realtimePosition, pathPoints = [], devices =
positions: positions,
width: 3,
material: new Cesium.PolylineDashMaterialProperty({
color: Cesium.Color.BLUE,
color: Cesium?.Color.BLUE,
dashLength: 16,
gapColor: Cesium.Color.TRANSPARENT,
gapColor: Cesium?.Color.TRANSPARENT,
}),
clampToGround: true,
disableDepthTestDistance: Number.POSITIVE_INFINITY,
@@ -656,9 +656,9 @@ export default function CesiumMap({ realtimePosition, pathPoints = [], devices =
text: robot.name,
font: "14px sans-serif",
pixelOffset: new window.Cesium.Cartesian2(0, -40),
fillColor: window.Cesium.Color.WHITE,
fillColor: window.Cesium?.Color.WHITE,
showBackground: true,
backgroundColor: window.Cesium.Color.BLACK.withAlpha(0.6)
backgroundColor: window.Cesium?.Color.BLACK.withAlpha(0.6)
}
});
entity.robotData = robot;
@@ -685,7 +685,7 @@ export default function CesiumMap({ realtimePosition, pathPoints = [], devices =
})
});
viewerRef.current = viewer;
viewer.scene.globe.baseColor = window.Cesium.Color.BLACK;
viewer.scene.globe.baseColor = window.Cesium?.Color.BLACK;
viewer.scene.globe.depthTestAgainstTerrain = false;
viewer.scene.requestRenderMode = true; // 👈 加这个(只在需要时渲染)
viewer.scene.globe.enableLighting = false;
@@ -854,9 +854,9 @@ export default function CesiumMap({ realtimePosition, pathPoints = [], devices =
text: device.name || "",
font: "12px sans-serif",
pixelOffset: new Cesium.Cartesian2(0, -40),
fillColor: Cesium.Color.WHITE,
fillColor: Cesium?.Color.WHITE,
showBackground: true,
backgroundColor: Cesium.Color.BLACK.withAlpha(0.6)
backgroundColor: Cesium?.Color.BLACK.withAlpha(0.6)
},
properties: {
@@ -1259,7 +1259,7 @@ export default function CesiumMap({ realtimePosition, pathPoints = [], devices =
material: new Cesium.PolylineGlowMaterialProperty({
glowPower: 0.25,
color: Cesium.Color.LIME
color: Cesium?.Color.LIME
}),
clampToGround: true,