Color navmesh zones based on threat.

This commit is contained in:
Dan Albert
2021-07-13 17:49:10 -07:00
parent 5f8be5fa91
commit a1910f49a8
2 changed files with 33 additions and 6 deletions

View File

@@ -904,10 +904,13 @@ function drawThreatZones() {
function drawNavmesh(zones, layer) {
for (const zone of zones) {
L.polyline(zone, {
L.polyline(zone.poly, {
color: "#000000",
weight: 1,
fill: false,
fillColor: zone.threatened ? "#ff0000" : "#00ff00",
fill: true,
fillOpacity: 0.1,
noClip: true,
interactive: false,
}).addTo(layer);
}