Dash a line's parts behind the surface, and the Draw tool's rubber band there

A line item gains an optional depthFailDash ({ length, pattern16? }): the
parts behind the surface are dashed in depthFailColor, as a dash style
dashes a line. Without a depthFailColor, and on draped lines, it is
ignored; a renderer that predates it draws those parts solid. The Cesium
draw port gives the depth-fail appearance a PolylineDash material, and a
change of dash is a new look. The Draw tool's rubber band uses
{ length: 16 }, the dash its old entity asked for (that entity, a dynamic
polyline, never drew its depth-fail material, so the parts behind the
surface were hidden before the tool moved onto the draw port).
This commit is contained in:
Sameh Khamis committed 2026-11-07 21:49:25 -08:00
1 parent 90e73f2ef2
commit 7ad65b2e87
10 files changed
+115 -2

No files matched your search

+12 -1
View File
@@ -1281,7 +1281,14 @@ export function createCesiumDraw({
depthFailAppearance: new Cesium.PolylineMaterialAppearance({
material: lineMaterial(
record,
{ kind: 'solid', color: item.depthFailColor },
item.depthFailDash
? {
kind: 'dash',
color: item.depthFailColor,
length: item.depthFailDash.length,
pattern16: item.depthFailDash.pattern16,
}
: { kind: 'solid', color: item.depthFailColor },
reveal,
),
}),
@@ -1488,6 +1495,10 @@ export function createCesiumDraw({
item.clampTo,
item.style,
item.depthFailColor,
// A dash is drawn only with a depth-fail colour, the same in any key order.
item.depthFailColor && item.depthFailDash
? [item.depthFailDash.length, item.depthFailDash.pattern16]
: null,
// Segment colours and shows change in place.
item.segmentColors != null,
item.segmentShow != null,