Merge pull request #459 from evolvedexperiment/colour-elevation-profile

Fix for FMG/MFCG sea direction integration
This commit is contained in:
Azgaar 2020-05-17 13:08:25 +03:00 committed by GitHub
commit 7e36776360
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -318,7 +318,17 @@ function editBurg(id) {
if (deg < 0) deg += 360;
let norm = rn(normalize(deg, 0, 360) * 8) / 4;
if (norm === 2) norm = 0;
return "sea="+norm;
switch(norm) {
case 0 : return "&southSea=1";
case 0.25 : return "&southSea=1&westSea=1";
case 0.50 : return "&westSea=1";
case 0.75 : return "&westSea=1&northSea=1";
case 1 : return "&northSea=1";
case 1.25 : return "&northSea=1&eastSea=1";
case 1.5 : return "&eastSea=1";
case 1.75 : return "&eastSea=1&southSea=1";
}
return "&sea="+norm;
// debug.selectAll("*").remove();
// pack.burgs.filter(b => b.port).forEach(b => {
// var p1 = pack.cells.p[b.cell];
@ -450,4 +460,4 @@ function editBurg(id) {
unselect();
}
}
}