feat: optimizeSpeed rendering (1.87.15)

This commit is contained in:
Azgaar 2022-10-13 00:52:49 +03:00
parent 7945390b2c
commit d3ea2df1a2
5 changed files with 157 additions and 26 deletions

View file

@ -38,7 +38,7 @@ window.OceanLayers = (function () {
for (const t of limits) {
const layer = chains.filter(c => c[0] === t);
let path = layer.map(c => round(lineGen(c[1]))).join("");
if (path) oceanLayers.append("path").attr("d", path).attr("fill", "#ecf2f9").style("opacity", opacity);
if (path) oceanLayers.append("path").attr("d", path).attr("fill", "#ecf2f9").attr("fill-opacity", opacity);
}
// find eligible cell vertex to start path detection

View file

@ -601,6 +601,18 @@ function randomizeCultureSet() {
function setRendering(value) {
viewbox.attr("shape-rendering", value);
if (value === "optimizeSpeed") {
// block some styles
coastline.select("#sea_island").style("filter", "none");
statesHalo.style("display", "none");
emblems.style("opacity", 1);
} else {
// remove style block
coastline.select("#sea_island").style("filter", null);
statesHalo.style("display", null);
emblems.style("opacity", null);
}
}
// generate current year and era name