mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Settle a line outline's width as the whole outline, half on each side
A solid line's outline.widthPx is the outline in all, half on each side and inside the line's width, as Cesium draws it. The range ring's pulse fronts pass their halo width whole again, so they keep main's look, and the conformance check draw.lines.outline pins the width. The lines scene's outlined line keeps its 2 px edge each side and its references are re-recorded.
This commit is contained in:
1 parent
94138d9698
commit
149f8aad4d
12 files changed
+94
-16
No files matched your search
@@ -363,10 +363,10 @@ test('the ring core and halo contrast on light and dark ground', () => {
|
||||
const ratio = (luminance(core) + 0.05) / (luminance(halo) + 0.05);
|
||||
assert.ok(ratio >= 4.5, `core:halo contrast ${ratio.toFixed(2)}`);
|
||||
assert.ok(core.alpha >= 0.9 && halo.alpha >= 0.7);
|
||||
// A visible halo on each side of a core at least 2 px wide.
|
||||
// A visible halo, half on each side, around a core at least 2 px wide.
|
||||
const { width, outlineWidth } = AWARENESS_RANGE_RING_STYLE;
|
||||
assert.ok(outlineWidth >= 1);
|
||||
assert.ok(width - 2 * outlineWidth >= 2);
|
||||
assert.ok(width - outlineWidth >= 2);
|
||||
});
|
||||
|
||||
test('renderVisual draws the ring as a haloed line in an unpickable set, never an entity', (t) => {
|
||||
@@ -1126,9 +1126,10 @@ test('the band is one flat unpickable ellipse at the rim, drawn anew each step a
|
||||
assert.equal(core.show, true);
|
||||
assert.equal(core.widthPx, AWARENESS_RANGE_PULSE.width);
|
||||
assert.equal(halo.style.color.length, 4);
|
||||
// The outline is the halo's width in all, half on each side.
|
||||
assert.equal(
|
||||
core.style.outline.widthPx,
|
||||
AWARENESS_RANGE_PULSE.outlineWidth / 2,
|
||||
AWARENESS_RANGE_PULSE.outlineWidth,
|
||||
);
|
||||
const pulse = awarenessPulseState(at, index);
|
||||
const ground = Cesium.Cartesian3.fromDegrees(3, 27, 0);
|
||||
|
||||
Reference in new issue
Block a user