mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
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:
1 parent
90e73f2ef2
commit
7ad65b2e87
10 files changed
+115
-2
No files matched your search
@@ -178,6 +178,12 @@ test('members added to version 0 later are optional, each behind its capability'
|
||||
// A renderer written before an addition still conforms without it.
|
||||
assert.equal(PORTS.globe.isGlobeVisible, 'globeVisibility');
|
||||
assert.equal(PORTS.camera.followFrame, 'followFrame');
|
||||
// Item fields added later are optional too.
|
||||
const optional = (shape, field) =>
|
||||
Object.fromEntries(
|
||||
members(checker.getTypeAtLocation(declared(shape).name)),
|
||||
)[field];
|
||||
assert.equal(optional('LineItem', 'depthFailDash'), true);
|
||||
});
|
||||
|
||||
test('the shape check names what is missing and what a capability does not allow', () => {
|
||||
|
||||
Vendored
+7
@@ -229,6 +229,13 @@ export interface LineItem {
|
||||
style: LineStyle;
|
||||
/** Colour where the line is behind the surface; `null` hides those parts. */
|
||||
depthFailColor?: Color | null;
|
||||
/**
|
||||
* Dash the parts behind the surface, in `depthFailColor`, as a `dash`
|
||||
* style's `length` and `pattern16` dash a line. Omitted, they are solid; a
|
||||
* renderer that predates it draws them solid too. Ignored without a
|
||||
* `depthFailColor`, and on draped lines, which are never behind it.
|
||||
*/
|
||||
depthFailDash?: { length: number; pattern16?: number };
|
||||
/** Per-segment colours; changing them does not rebuild the line. */
|
||||
segmentColors?: Color[];
|
||||
segmentShow?: boolean[];
|
||||
|
||||
Reference in new issue
Block a user