mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
feat: optimizeSpeed rendering (1.87.15)
This commit is contained in:
parent
7945390b2c
commit
d3ea2df1a2
5 changed files with 157 additions and 26 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue