mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Draw wildfire perimeters through the renderer's draw port
Perimeter fills are clamped polygon fills with their holes, and fire lines are draped lines along each outer ring, in two draw sets per layer (fire-perimeters:N:fills and :lines). Clicks read the draw hit and match the layer's own set and item ids. Colours, alphas, widths and clamping are unchanged. The layer no longer imports Cesium, so it leaves the allow-list and joins the entries whose callers load the unbound draw factory. Hex palette colours become renderer colours through a small shared helper.
This commit is contained in:
1 parent
d30b89ac8e
commit
3f9089eccb
8 files changed
+282
-125
No files matched your search
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Renderer colours (`[r, g, b, a]`, 0..1) from the CSS-style colours layers
|
||||
* keep in their palettes.
|
||||
*/
|
||||
|
||||
/** A `#rrggbb` colour at `alpha`, as a renderer colour. */
|
||||
export function hexColor(hex, alpha = 1) {
|
||||
const n = Number.parseInt(hex.slice(1), 16);
|
||||
return [
|
||||
((n >> 16) & 255) / 255,
|
||||
((n >> 8) & 255) / 255,
|
||||
(n & 255) / 255,
|
||||
alpha,
|
||||
];
|
||||
}
|
||||
Reference in new issue
Block a user